1 | ONCCS ;Hines OIFO/GWB - COLLABORATIVE STAGING ;11/20/03
|
---|
2 | ;;2.11;ONCOLOGY;**40,43,44,47**;Mar 07, 1995;Build 19
|
---|
3 | ;
|
---|
4 | N DIR,X
|
---|
5 | W !
|
---|
6 | S DIR("A")=" Compute Collaborative Staging"
|
---|
7 | S DIR(0)="Y",DIR("B")="Yes" D ^DIR
|
---|
8 | I (Y=0)!(Y="")!(Y[U) S Y=$S(ONCOANS="A":"@4",1:"@0") Q
|
---|
9 | ;
|
---|
10 | S IEN=D0
|
---|
11 | S $P(^ONCO(165.5,IEN,"CS1"),U,1,9)=U_U_U_U_U_U_U_U
|
---|
12 | S $P(^ONCO(165.5,IEN,"CS1"),U,11)=""
|
---|
13 | ;
|
---|
14 | K INPUT,STORE,DISPLAY,STATUS,ONCSAPI
|
---|
15 | D CLEAR^ONCSAPIE(1)
|
---|
16 | S INPUT("AGE")=$$AGEDX^ONCACDU1(IEN)
|
---|
17 | S:$L(INPUT("AGE"))=1 INPUT("AGE")="00"_INPUT("AGE")
|
---|
18 | S:$L(INPUT("AGE"))=2 INPUT("AGE")=0_INPUT("AGE")
|
---|
19 | S INPUT("BEHAV")=$E($$GET1^DIQ(165.5,IEN,22.3,"I"),5)
|
---|
20 | S INPUT("EXT")=$$GET1^DIQ(165.5,IEN,30.2,"I")
|
---|
21 | S INPUT("EXTEVAL")=$$GET1^DIQ(165.5,IEN,29.1,"I")
|
---|
22 | S INPUT("GRADE")=$$GET1^DIQ(165.5,IEN,24,"I")
|
---|
23 | S INPUT("HIST")=$E($$GET1^DIQ(165.5,IEN,22.3,"I"),1,4)
|
---|
24 | S INPUT("LNPOS")=$$GET1^DIQ(165.5,IEN,32,"I")
|
---|
25 | S:$L(INPUT("LNPOS"))=1 INPUT("LNPOS")=0_INPUT("LNPOS")
|
---|
26 | S INPUT("LNEXAM")=$$GET1^DIQ(165.5,IEN,33,"I")
|
---|
27 | S:$L(INPUT("LNEXAM"))=1 INPUT("LNEXAM")=0_INPUT("LNEXAM")
|
---|
28 | S INPUT("METS")=$$GET1^DIQ(165.5,IEN,34.3,"I")
|
---|
29 | S INPUT("METSEVAL")=$$GET1^DIQ(165.5,IEN,34.4,"I")
|
---|
30 | S INPUT("NODES")=$$GET1^DIQ(165.5,IEN,31.1,"I")
|
---|
31 | S INPUT("NODESEVAL")=$$GET1^DIQ(165.5,IEN,32.1,"I")
|
---|
32 | S PS=$$GET1^DIQ(165.5,IEN,20,"I")
|
---|
33 | S:PS'="" PS=$TR($$GET1^DIQ(164,PS,1,"I"),".","")
|
---|
34 | S INPUT("SITE")=PS
|
---|
35 | S INPUT("SIZE")=$$GET1^DIQ(165.5,IEN,29.2,"I")
|
---|
36 | S INPUT("SSF1")=$$GET1^DIQ(165.5,IEN,44.1,"I")
|
---|
37 | S INPUT("SSF2")=$$GET1^DIQ(165.5,IEN,44.2,"I")
|
---|
38 | S INPUT("SSF3")=$$GET1^DIQ(165.5,IEN,44.3,"I")
|
---|
39 | S INPUT("SSF4")=$$GET1^DIQ(165.5,IEN,44.4,"I")
|
---|
40 | S INPUT("SSF5")=$$GET1^DIQ(165.5,IEN,44.5,"I")
|
---|
41 | S INPUT("SSF6")=$$GET1^DIQ(165.5,IEN,44.6,"I")
|
---|
42 | ;
|
---|
43 | S RC=$$CALC^ONCSAPI3(.ONCSAPI,.INPUT,.STORE,.DISPLAY,.STATUS)
|
---|
44 | I RC D PRTERRS^ONCSAPIE() R "Press return to continue",X:DTIME
|
---|
45 | ;---
|
---|
46 | S $P(^ONCO(165.5,IEN,"CS1"),U,1)=STORE("T")
|
---|
47 | S $P(^ONCO(165.5,IEN,"CS1"),U,2)=STORE("TDESCR")
|
---|
48 | S $P(^ONCO(165.5,IEN,"CS1"),U,3)=STORE("N")
|
---|
49 | S $P(^ONCO(165.5,IEN,"CS1"),U,4)=STORE("NDESCR")
|
---|
50 | S $P(^ONCO(165.5,IEN,"CS1"),U,5)=STORE("M")
|
---|
51 | S $P(^ONCO(165.5,IEN,"CS1"),U,6)=STORE("MDESCR")
|
---|
52 | S $P(^ONCO(165.5,IEN,"CS1"),U,7)=STORE("AJCC")
|
---|
53 | S $P(^ONCO(165.5,IEN,"CS1"),U,8)=STORE("SS1977")
|
---|
54 | S $P(^ONCO(165.5,IEN,"CS1"),U,9)=STORE("SS2000")
|
---|
55 | S $P(^ONCO(165.5,IEN,"CS1"),U,11)=$G(STATUS("APIVER"))
|
---|
56 | D ^ONCPCS
|
---|
57 | I $P(RC,U,1)=0 W !," Collaborative Staging was successful" Q
|
---|
58 | I $P(RC,U,1)=-10 W !," CS server unavailable. Contact IRM." Q
|
---|
59 | I $P(RC,U,1)=-22 W !," Invalid COLLABORATIVE STAGING URL value in ONCOLOGY SITE PARAMETERS" Q
|
---|
60 | I $P(RC,U,1)<0 W !," You have encountered a CS error" G CSERR
|
---|
61 | I $P(RC,U,1)>0 W !," You have encountered a CS warning" G CSERR
|
---|
62 | ;
|
---|
63 | CSERR N DIR,X
|
---|
64 | S DIR("A")="Do you wish to re-enter the CS input values"
|
---|
65 | S DIR(0)="Y",DIR("B")="Yes" D ^DIR
|
---|
66 | I Y=1 S Y="@292" Q
|
---|
67 | I Y[U S Y="@0" Q
|
---|
68 | S Y=$S(ONCOANS="A":"@4",1:"@0")
|
---|
69 | Q
|
---|
70 | ;
|
---|
71 | INIT ;Initialize CS fields when HISTOLOGY (ICD-O-3) (165.5,22.3) changes
|
---|
72 | S LNS=$O(^ONCO(164.2,"B","LUNG NOS",0))
|
---|
73 | S LSC=$O(^ONCO(164.2,"B","LUNG SMALL CELL",0))
|
---|
74 | S MEL=$O(^ONCO(164.2,"B","MELANOMA",0))
|
---|
75 | S SITEGRP=$P($G(^ONCO(165.5,D0,0)),U,1)
|
---|
76 | S OLDHST=$P($G(^ONCO(165.5,D0,2.2)),U,3)
|
---|
77 | I X=OLDHST Q
|
---|
78 | I SITEGRP=LNS D
|
---|
79 | .I ($E(X,1,4)=8041)!($E(X,1,4)=8042)!($E(X,1,4)=8043)!($E(X,1,4)=8044)!($E(X,1,4)=8045)!($E(X,1,4)=8246) D W !!," SITE/GP changed to LUNG SMALL CELL",!
|
---|
80 | ..S $P(^ONCO(165.5,D0,0),U,1)=LSC
|
---|
81 | ..K ^ONCO(165.5,"B",LNS,D0)
|
---|
82 | ..S ^ONCO(165.5,"B",LSC,D0)=""
|
---|
83 | I SITEGRP=LSC D
|
---|
84 | .I ($E(X,1,4)'=8041)&($E(X,1,4)'=8042)&($E(X,1,4)'=8043)&($E(X,1,4)'=8044)&($E(X,1,4)'=8045)&($E(X,1,4)'=8246) D W !!," SITE/GP changed to LUNG NOS",!
|
---|
85 | ..S $P(^ONCO(165.5,D0,0),U,1)=LNS
|
---|
86 | ..K ^ONCO(165.5,"B",LSC,D0)
|
---|
87 | ..S ^ONCO(165.5,"B",LNS,D0)=""
|
---|
88 | I SITEGRP'=MEL D
|
---|
89 | .I (X'<87200)&(X<87910) D W !!," SITE/GP changed to MELANOMA",!
|
---|
90 | ..S $P(^ONCO(165.5,D0,0),U,1)=MEL
|
---|
91 | ..K ^ONCO(165.5,"B",SITEGRP,D0)
|
---|
92 | ..S ^ONCO(165.5,"B",MEL,D0)=""
|
---|
93 | I SITEGRP=MEL D
|
---|
94 | .I (X<87200)!(X>87900) D
|
---|
95 | ..W !
|
---|
96 | ..W !," WARNING: SITE/GP and HISTOLOGY discrepancy"
|
---|
97 | ..W !," SITE/GP = MELANOMA"
|
---|
98 | ..W !," HISTOLOGY = ",$P(Y,U,1)," ",$P(Y,U,2)
|
---|
99 | ..W !
|
---|
100 | I OLDHST="" Q
|
---|
101 | S HSTI=$$HIST^ONCFUNC(D0)
|
---|
102 | S TEXT=HISTNAM
|
---|
103 | S $P(^ONCO(165.5,D0,8),U,2)=$E(TEXT,1,40)
|
---|
104 | I $P($G(^ONCO(165.5,D0,0)),U,16)<3040000 Q
|
---|
105 | W !
|
---|
106 | W !?3,"You have changed the HISTOLOGY (ICD-O-3). This change may"
|
---|
107 | W !?3,"affect the validity of the COLLABORATIVE STAGING data."
|
---|
108 | W !?3,"Therefore, the CS fields have been initialized and need to"
|
---|
109 | W !?3,"be re-entered."
|
---|
110 | W !
|
---|
111 | F PIECE=1:1:12 S $P(^ONCO(165.5,D0,"CS"),U,PIECE)=""
|
---|
112 | F PIECE=1:1:11 S $P(^ONCO(165.5,D0,"CS1"),U,PIECE)=""
|
---|
113 | Q
|
---|