175 lines
8.3 KiB
Mathematica
175 lines
8.3 KiB
Mathematica
ONCP36F ;HINES OIFO/GWB-POST-INSTALL ROUTINE FOR PATCH ONC*2.11*36
|
|
;;2.11;ONCOLOGY;**36**;Mar 07, 1995
|
|
;
|
|
Q:$P($G(^ONCO(165.5,IEN,27)),U,6)="Y"
|
|
TEST S TFR=$$GET1^DIQ(165.5,IEN,71,"I")
|
|
S:TFR'="" TFR=$$GET1^DIQ(160.12,TFR,.01,"I")
|
|
S OTFR=$$GET1^DIQ(165.5,IEN,71.4,"I")
|
|
S:OTFR'="" OTFR=$$GET1^DIQ(160.12,OTFR,.01,"1")
|
|
G:(TFR="")&(OTFR="") EXIT
|
|
S (DS1,DS11)=$$GET1^DIQ(165.5,IEN,71.1,"I")
|
|
S (DS2,DS22)=$$GET1^DIQ(165.5,IEN,71.2,"I")
|
|
S (DS3,DS33)=$$GET1^DIQ(165.5,IEN,71.3,"I")
|
|
S:DS11=0 DS11=""
|
|
S:DS22=0 DS22=""
|
|
S:DS33=0 DS33=""
|
|
S DS=DS11_DS22_DS33
|
|
S DSFLAG=""
|
|
I $L(DS)=2 D
|
|
.S DSFLAG="YES"
|
|
.I (DS=11)!(DS=22)!(DS=33)!(DS=44)!(DS=55)!(DS=66)!(DS=77)!(DS=88)!(DS=99) S DSFLAG="NO"
|
|
I $L(DS)=3 D
|
|
.S DSFLAG="YES"
|
|
.I (DS=111)!(DS=222)!(DS=333)!(DS=444)!(DS=555)!(DS=666)!(DS=777)!(DS=888)!(DS=999) S DSFLAG="NO"
|
|
S HSTI=$$HIST^ONCFUNC(IEN)
|
|
S HIST=$E(HSTI,1,4)
|
|
S BEHAV=$E(HSTI,5)
|
|
S FORDS=""
|
|
D TABLE,TFR
|
|
;
|
|
EXIT S $P(^ONCO(165.5,IEN,27),U,6)="Y"
|
|
K TFR,OTFR,DS,DS1,DS2,DS3,DS11,DS22,DS33,DSFLAG,HSTI,HIST,BEHAV
|
|
Q
|
|
;
|
|
TABLE ;TYPE OF FIRST RECURRENCE ROADS to FORDS conversion table
|
|
;
|
|
;First pass
|
|
;
|
|
I TFR="00",(OTFR="00")!(OTFR="") S FORDS=5 Q
|
|
;
|
|
I (TFR="01")!(TFR="06"),(OTFR="00")!(OTFR="01")!(OTFR="06")!(OTFR=""),BEHAV=2 S FORDS=15 Q
|
|
I (TFR="01")!(TFR="06"),(OTFR="00")!(OTFR="01")!(OTFR="06")!(OTFR=""),BEHAV=3 S FORDS=22 Q
|
|
;
|
|
I (+TFR>9)&(+TFR<41),$$LEUKEMIA^ONCOAIP2(IEN) S FORDS=33 Q
|
|
;
|
|
I (TFR=10)!(TFR=16),(OTFR="00")!(OTFR=10)!(OTFR=16)!(OTFR=""),BEHAV'=2,BEHAV'=3 S FORDS=1 Q
|
|
I (TFR=10)!(TFR=16),(OTFR="00")!(OTFR=10)!(OTFR=16)!(OTFR=""),BEHAV=3 S FORDS=23 Q
|
|
;
|
|
I TFR=11,(OTFR="00")!(OTFR=11)!(OTFR=""),BEHAV=3 S FORDS=24 Q
|
|
;
|
|
I (TFR=15)!(TFR=17),(OTFR="00")!(OTFR=15)!(OTFR=17)!(OTFR=""),BEHAV=3 S FORDS=7 Q
|
|
;
|
|
I (TFR=10)!(TFR=11)!(TFR=15)!(TFR=16),(OTFR="00")!(OTFR=10)!(OTFR=11)!(OTFR=15)!(OTFR=16)!(OTFR=""),BEHAV=2 S FORDS=16 Q
|
|
;
|
|
I (TFR=15)!(TFR=17),(OTFR="00")!(OTFR=10)!(OTFR=11)!(OTFR=15)!(OTFR=16)!(OTFR=17)!(OTFR=""),BEHAV=2 S FORDS=17 Q
|
|
;
|
|
I TFR=10,OTFR=11,BEHAV=3 S FORDS=7 Q
|
|
;
|
|
I TFR=20,(OTFR="00")!(OTFR=20)!(OTFR=""),BEHAV'=2 S FORDS=2 Q
|
|
;
|
|
I TFR=21,(OTFR="00")!(OTFR=21)!(OTFR=""),BEHAV=3 S FORDS=8 Q
|
|
;
|
|
I TFR=22,(OTFR="00")!(OTFR=22)!(OTFR=""),BEHAV=3 S FORDS=10 Q
|
|
;
|
|
I TFR=25,(OTFR="00")!(OTFR=25)!(OTFR=""),BEHAV=3 S FORDS=11 Q
|
|
;
|
|
I TFR=21,OTFR=22,BEHAV=3 S FORDS=11 Q
|
|
;
|
|
I (TFR=20)!(TFR=21)!(TFR=22)!(TFR=25)!(TFR=26),(OTFR="00")!(OTFR=20)!(OTFR=21)!(OTFR=22)!(OTFR=25)!(OTFR=26)!(OTFR=""),BEHAV=2 S FORDS=18 Q
|
|
;
|
|
I (TFR=25)!(TFR=27),(OTFR="00")!(OTFR=20)!(OTFR=21)!(OTFR=22)!(OTFR=25)!(OTFR=26)!(OTFR=27)!(OTFR=""),BEHAV=2 S FORDS=19 Q
|
|
;
|
|
I TFR=30,(OTFR="00")!(OTFR=10)!(OTFR=11)!(OTFR=15)!(OTFR=20)!(OTFR=21)!(OTFR=22)!(OTFR=25)!(OTFR=30)!(OTFR=""),BEHAV=3 S FORDS=12 Q
|
|
;
|
|
I (TFR=10)!(TFR=11)!(TFR=15)!(TFR=16)!(TFR=17),(OTFR=20)!(OTFR=21)!(OTFR=22)!(OTFR=25)!(OTFR=26)!(OTFR=27),BEHAV=3 S FORDS=12 Q
|
|
;
|
|
I (TFR=10)!(TFR=11)!(TFR=15)!(TFR=16)!(TFR=17)!(TFR=36),(OTFR=20)!(OTFR=21)!(OTFR=22)!(OTFR=25)!(OTFR=26)!(OTFR=27)!(OTFR=36),BEHAV=2 S FORDS=20 Q
|
|
;
|
|
I TFR=40,(OTFR="00")!(OTFR=40)!(OTFR=""),(DS11="")&(DS22="")&(DS33="") S FORDS=3 Q
|
|
;
|
|
I TFR=40,(OTFR="00")!(OTFR=40)!(OTFR=""),BEHAV'=2,BEHAV'=3 S FORDS=3 Q
|
|
;
|
|
I (TFR=40)!(TFR=46),(OTFR="00")!(OTFR=40)!(OTFR=46)!(OTFR=""),BEHAV=2 S FORDS=21 Q
|
|
;
|
|
I (TFR=40)!(TFR=46),(OTFR="00")!(OTFR=40)!(OTFR=46)!(OTFR=""),(DS11=1)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=25 Q
|
|
I (TFR=40)!(TFR=46),(OTFR="00")!(OTFR=40)!(OTFR=46)!(OTFR=""),(DS11=2)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=26 Q
|
|
I (TFR=40)!(TFR=46),(OTFR="00")!(OTFR=40)!(OTFR=46)!(OTFR=""),(DS11=3)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=27 Q
|
|
I (TFR=40)!(TFR=46),(OTFR="00")!(OTFR=40)!(OTFR=46)!(OTFR=""),(DS11=4)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=28 Q
|
|
I (TFR=40)!(TFR=46),(OTFR="00")!(OTFR=40)!(OTFR=46)!(OTFR=""),(DS11=5)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=29 Q
|
|
I (TFR=40)!(TFR=46),(OTFR="00")!(OTFR=40)!(OTFR=46)!(OTFR=""),(DS11=6)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=30 Q
|
|
I (TFR=40)!(TFR=46),(OTFR="00")!(OTFR=40)!(OTFR=46)!(OTFR=""),(DS11=7)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=31 Q
|
|
I (TFR=40)!(TFR=46),(OTFR="00")!(OTFR=40)!(OTFR=46)!(OTFR=""),(DS11=8)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=32 Q
|
|
I (TFR=40)!(TFR=46),(OTFR="00")!(OTFR=40)!(OTFR=46)!(OTFR=""),(DS11=9)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=33 Q
|
|
I (TFR=40)!(TFR=46),(OTFR=10)!(OTFR=13)!(OTFR=14)!(OTFR=15)!(OTFR=16)!(OTFR=17)!(OTFR=20)!(OTFR=21)!(OTFR=22)!(OTFR=25)!(OTFR=26)!(OTFR=27),(DS11>0)&(DS11<9)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=34 Q
|
|
I (TFR=40)!(TFR=46),(OTFR=10)!(OTFR=13)!(OTFR=14)!(OTFR=15)!(OTFR=16)!(OTFR=17)!(OTFR=20)!(OTFR=21)!(OTFR=22)!(OTFR=25)!(OTFR=26)!(OTFR=27),DS?1.3"9",BEHAV=3 S FORDS=3 Q
|
|
I (TFR=40)!(TFR=46),DSFLAG="YES",BEHAV=3 S FORDS=35 Q
|
|
;
|
|
I TFR=70 S FORDS=4 Q
|
|
;
|
|
I TFR=88 S FORDS=13 Q
|
|
;
|
|
I TFR=99 S FORDS=9 Q
|
|
;
|
|
;Second pass
|
|
;
|
|
I OTFR="00",(TFR="00")!(TFR="") S FORDS=5 Q
|
|
;
|
|
I (OTFR="01")!(OTFR="06"),(TFR="00")!(TFR="01")!(TFR="06")!(TFR=""),BEHAV=2 S FORDS=15 Q
|
|
I (OTFR="01")!(OTFR="06"),(TFR="00")!(TFR="01")!(TFR="06")!(TFR=""),BEHAV=3 S FORDS=22 Q
|
|
;
|
|
I (+OTFR>9)&(+OTFR<41),$$LEUKEMIA^ONCOAIP2(IEN) S FORDS=33 Q
|
|
;
|
|
I (OTFR=10)!(OTFR=16),(TFR="00")!(TFR=10)!(TFR=16)!(TFR=""),BEHAV'=2,BEHAV'=3 S FORDS=1 Q
|
|
I (OTFR=10)!(OTFR=16),(TFR="00")!(TFR=10)!(TFR=16)!(TFR=""),BEHAV=3 S FORDS=23 Q
|
|
;
|
|
I OTFR=11,(TFR="00")!(TFR=11)!(TFR=""),BEHAV=3 S FORDS=24 Q
|
|
;
|
|
I (OTFR=15)!(OTFR=17),(TFR="00")!(TFR=15)!(TFR=17)!(TFR=""),BEHAV=3 S FORDS=7 Q
|
|
;
|
|
I (OTFR=10)!(OTFR=11)!(OTFR=15)!(OTFR=16),(TFR="00")!(TFR=10)!(TFR=11)!(TFR=15)!(TFR=16)!(TFR=""),BEHAV=2 S FORDS=16 Q
|
|
;
|
|
I (OTFR=15)!(OTFR=17),(TFR="00")!(TFR=10)!(TFR=11)!(TFR=15)!(TFR=16)!(TFR=17)!(TFR=""),BEHAV=2 S FORDS=17 Q
|
|
;
|
|
I OTFR=10,TFR=11,BEHAV=3 S FORDS=7 Q
|
|
;
|
|
I OTFR=20,(TFR="00")!(TFR=20)!(TFR=""),BEHAV'=2 S FORDS=2 Q
|
|
;
|
|
I OTFR=21,(TFR="00")!(TFR=21)!(TFR=""),BEHAV=3 S FORDS=8 Q
|
|
;
|
|
I OTFR=22,(TFR="00")!(TFR=22)!(TFR=""),BEHAV=3 S FORDS=10 Q
|
|
;
|
|
I OTFR=25,(TFR="00")!(TFR=25)!(TFR=""),BEHAV=3 S FORDS=11 Q
|
|
;
|
|
I OTFR=21,TFR=22,BEHAV=3 S FORDS=11 Q
|
|
;
|
|
I (OTFR=20)!(OTFR=21)!(OTFR=22)!(OTFR=25)!(OTFR=26),(TFR="00")!(TFR=20)!(TFR=21)!(TFR=22)!(TFR=25)!(TFR=26)!(TFR=""),BEHAV=2 S FORDS=18 Q
|
|
;
|
|
I (OTFR=25)!(OTFR=27),(TFR="00")!(TFR=20)!(TFR=21)!(TFR=22)!(TFR=25)!(TFR=26)!(TFR=27)!(TFR=""),BEHAV=2 S FORDS=19 Q
|
|
;
|
|
I OTFR=30,(TFR="00")!(TFR=10)!(TFR=11)!(TFR=15)!(TFR=20)!(TFR=21)!(TFR=22)!(TFR=25)!(TFR=30)!(TFR=""),BEHAV=3 S FORDS=12 Q
|
|
;
|
|
I (OTFR=10)!(OTFR=11)!(OTFR=15)!(OTFR=16)!(OTFR=17),(TFR=20)!(TFR=21)!(TFR=22)!(TFR=25)!(TFR=26)!(TFR=27),BEHAV=3 S FORDS=12 Q
|
|
;
|
|
I (OTFR=10)!(OTFR=11)!(OTFR=15)!(OTFR=16)!(OTFR=17)!(OTFR=36),(TFR=20)!(TFR=21)!(TFR=22)!(TFR=25)!(TFR=26)!(TFR=27)!(TFR=36),BEHAV=2 S FORDS=20 Q
|
|
;
|
|
I OTFR=40,(TFR="00")!(TFR=40)!(TFR=""),(DS11="")&(DS22="")&(DS33="") S FORDS=3 Q
|
|
;
|
|
I OTFR=40,(TFR="00")!(TFR=40)!(TFR=""),BEHAV'=2,BEHAV'=3 S FORDS=3 Q
|
|
;
|
|
I (OTFR=40)!(OTFR=46),(TFR="00")!(TFR=40)!(TFR=46)!(TFR=""),BEHAV=2 S FORDS=21 Q
|
|
;
|
|
I (OTFR=40)!(OTFR=46),(TFR="00")!(TFR=40)!(TFR=46)!(TFR=""),(DS11=1)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=25 Q
|
|
I (OTFR=40)!(OTFR=46),(TFR="00")!(TFR=40)!(TFR=46)!(TFR=""),(DS11=2)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=26 Q
|
|
I (OTFR=40)!(OTFR=46),(TFR="00")!(TFR=40)!(TFR=46)!(TFR=""),(DS11=3)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=27 Q
|
|
I (OTFR=40)!(OTFR=46),(TFR="00")!(TFR=40)!(TFR=46)!(TFR=""),(DS11=4)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=28 Q
|
|
I (OTFR=40)!(OTFR=46),(TFR="00")!(TFR=40)!(TFR=46)!(TFR=""),(DS11=5)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=29 Q
|
|
I (OTFR=40)!(OTFR=46),(TFR="00")!(TFR=40)!(TFR=46)!(TFR=""),(DS11=6)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=30 Q
|
|
I (OTFR=40)!(OTFR=46),(TFR="00")!(TFR=40)!(TFR=46)!(TFR=""),(DS11=7)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=31 Q
|
|
I (OTFR=40)!(OTFR=46),(TFR="00")!(TFR=40)!(TFR=46)!(TFR=""),(DS11=8)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=32 Q
|
|
I (OTFR=40)!(OTFR=46),(TFR="00")!(TFR=40)!(TFR=46)!(TFR=""),(DS11=9)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=33 Q
|
|
I (OTFR=40)!(OTFR=46),(TFR=10)!(TFR=13)!(TFR=14)!(TFR=15)!(TFR=16)!(TFR=17)!(TFR=20)!(TFR=21)!(TFR=22)!(TFR=25)!(TFR=26)!(TFR=27),(DS11>0)&(DS11<9)&(DS22="")&(DS33=""),BEHAV=3 S FORDS=34 Q
|
|
I (OTFR=40)!(OTFR=46),(TFR=10)!(TFR=13)!(TFR=14)!(TFR=15)!(TFR=16)!(TFR=17)!(TFR=20)!(TFR=21)!(TFR=22)!(TFR=25)!(TFR=26)!(TFR=27),DS?1.3"9",BEHAV=3 S FORDS=3 Q
|
|
I (OTFR=40)!(OTFR=46),DSFLAG="YES",BEHAV=3 S FORDS=35 Q
|
|
;
|
|
I OTFR=70 S FORDS=4 Q
|
|
;
|
|
I OTFR=88 S FORDS=13 Q
|
|
;
|
|
I OTFR=99 S FORDS=9 Q
|
|
;
|
|
Q
|
|
;
|
|
TFR I FORDS'="" D
|
|
.S $P(^ONCO(165.5,IEN,5),U,2)=FORDS
|
|
Q
|