source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCOCOS.m@ 789

Last change on this file since 789 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.7 KB
RevLine 
[613]1ONCOCOS ;Hines OIFO/GWB 'COMPUTED-FIELD' EXPRESSIONS; 11/09/99
2 ;;2.11;ONCOLOGY;**5,13,16,17,19,22,24,36,42,45,47**;Mar 07, 1995;Build 19
3 ;
4SICD ;SELECTED SITES (165.5,.015)
5 S X=$P(^ONCO(165.5,D0,0),U,1)
6 S X=$S(X=31:"LUNG NOS",X=62:"LYMPHOMA",X=63:"N-H LYMPHOMA",X=54:"BLADDER",X=17:"COLON",X>65&(X<70):"LEUKEMIA",X=39:"MELANOMA",X=50:"PROSTATE",X=9:"ORAL CAVITY",1:"OTHER")
7 Q
8 ;
9SYS ;SYSTEMS (165.5,.017)
10 S X=$P(^ONCO(165.5,D0,0),U,1)
11 S X=$S(X=63:"LYMPH-NH",X=62:"LYMPH",1:"") Q:X'=""
12 S X=$P($G(^ONCO(165.5,D0,0)),U,22) Q:X=""
13 S X=$S(X<6715:"H&N",X<6726:"DS",X<6739:"RS",X<6747:"MS",(X>6751&(X<6768)):"GU",X=6747!(X>6769&(X<6772)):"NS",1:"OTH")
14 Q
15 ;
16RSX ;RACE-SEX (165.5,.13)
17 D GT G RSXEX:XD0=""
18 S X=$S(SX=1:"-M",SX=2:"-F",1:"")
19 S XRX=$S(RC=1:"White"_X,RC=2:"Black"_X,1:"Other"_X)
20 S X=XRX
21RSXEX K XD0,SX,RC,XRX
22 Q
23 ;
24SXR ;SEX-RACE (165.5,.14)
25 D GT G SXREX:XD0=""
26 S X=$S(RC=1:"W",RC=2:"B",1:"O")
27 S XRX=$S(SX=1:"Male-"_X,SX=2:"Female-"_X,1:X)
28 S X=XRX
29SXREX K XD0,SX,RC,XRX
30 Q
31 ;
32GT ;RACE 1 (160,8)
33 ;SEX (160,10)
34 S XD0=$S($D(^ONCO(165.5,D0,0)):$P(^(0),U,2),1:"") Q:XD0=""
35 Q:'$D(^ONCO(160,XD0,0))
36 S XP0=^ONCO(160,XD0,0)
37 S RC=$P(XP0,U,6)
38 S SX=$P(XP0,U,8)
39 Q
40 ;
41GSS ;SEER SUMMARY STAGE ABBREVIATED (165.5,35.1)
42 S X=$P($G(^ONCO(165.5,D0,2)),U,17)
43 S X=$S(X=0:"In Situ",X=1:"Local",X=2:"Reg Ext",X=3:"Reg Nodes",X=4:"Reg Ext/Nodes",X=5:"Reg NOS",X=7:"Dist Met/Sys",X=8:"NA",X=9:"Unk",1:"")
44 Q
45 ;
46SSG1 ;GP-I AJCC SUMMARY STAGE (165.5,38.1)
47 D SG
48 S X=$S(+X=1:"I"_$E(X,2),1:"")
49 Q
50 ;
51SSG2 ;GP-II AJCC SUMMARY STAGE (165.5,38.2)
52 D SG
53 S X=$S(+X=2:"II"_$E(X,2),1:"")
54 Q
55 ;
56SSG3 ;GP-III AJCC SUMMARY STAGE (165.5,38.3)
57 D SG
58 S X=$S(+X=3:"III"_$E(X,2),1:"")
59 Q
60 ;
61SSG4 ;GP-IV AJCC SUMMARY STAGE (165.5,38.4)
62 D SG
63 S X=$S(+X=4:"IV"_$E(X,2),1:"")
64 Q
65 ;
66SG ;STAGE GROUP CLINICAL (165.5,38)
67 S X=$S($D(^ONCO(165.5,D0,2)):$P(^(2),U,20),1:"")
68 Q
69 ;
70TXS ;TREATMENT ABBREVIATED (165.5,42)
71 S XD0=D0,XX=0
72 F S XX=$O(^ONCO(165.5,"ATX",XD0,XX)) Q:XX="" D
73 .I $E(XX,1,7)="0000000" Q
74 .I $E(XX,1,7)=9999999 Q
75 .S T=$E(XX,8,9)
76 .I T["S",T'="S1" Q
77 .I T["S",X["S" Q
78 .S X=$S(X="":$E(XX,8),1:X_"/"_$E(XX,8))
79 S X=$S(X="":"NONE",1:X)
80 K XD0,XX,T
81 Q
82 ;
83TX ;TREATMENT (165.5,43)
84 S XD0=D0,XX=0
85 F S XX=$O(^ONCO(165.5,"ATX",XD0,XX)) Q:XX="" D
86 .I $E(XX,1,7)="0000000" Q
87 .I $E(XX,1,7)=9999999 Q
88 .S T=$E(XX,8,9)
89 .I T["S",X["SUR" Q
90 .S TX=$S(T="S1":"SUR",T="C":"CMX",T="R":"XRT",T="H":"HOR",T="B":"BRM",T="P":"CNS",T="N":"NTX",T="E":"HEM",T="O":"OTR",1:"XXX")
91 .S:TX'="XXX" X=$S(X="":TX,1:X_"/"_TX)
92 S X=$S(X="":"NONE",1:X)
93 K XD0,XX,T,TX
94 Q
95 ;
96TRS ;STATUS/LAST TUMOR STATUS (165.5,95.1)
97 S XD0=D0
98 S XTS=$P($G(^ONCO(165.5,XD0,7)),U,6)
99 S XTS=$S(XTS=1:"No Evidence",XTS=2:"CA Evidence",1:"Unknown")
100 S XD1=$P(^ONCO(165.5,XD0,0),U,2)
101 S VS=$$GET1^DIQ(160,XD1,15)
102 S X=VS_"/"_XTS
103 K XD0,XTS,XD1,VS
104 Q
Note: See TracBrowser for help on using the repository browser.