source: FOIAVistA/tag/r/ONCOLOGY-ONC/ONCOTM.m@ 1141

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

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1ONCOTM ;HINES IRMFO/WAA-ONCO TUMOR MARKER PROMPT 1/7/98 10:33
2 ;;2.11;ONCOLOGY;**15,24,28**;Mar 07, 1995
3 ;
4TM(IEN,TUM) ;
5 ; This routine will set the prompt base on the primary site
6 ; X is the internal entry number of the entry in file 165.5
7 ; TUM is which tumor marker this is.
8 N %,D,DC,DIC,DIE,DIEL,DIFLD,DIP,DK,DM,DOV,DQ,DU,DV,DW,DXS
9 N DH,DIR,DA,D0,D1,DIE,DR,DP,DO,DL,I,ICDO,X,TM1,TM2,TM,U
10 K Y
11 S DIE="^ONCO(165.5,",DA=IEN
12 I TUM=1 S DR="25.1"_$$PROMPT(IEN,TUM)
13 I TUM=2 S DR="25.2"_$$PROMPT(IEN,TUM)
14 I TUM=3 S DR="25.3"_$$PROMPT(IEN,TUM)
15 D ^DIE
16 I $D(Y) S Y="@0" Q
17 I TUM=1 S Y="@2510"
18 I TUM=2 S Y="@2520"
19 I TUM=3 S Y="@2530"
20 Q
21PRINT(IEN,TUM) ;
22 ; This routine will set the prompt base on the primary site
23 ; IEN is the internal entry number of the entry in file 165.5
24 ; TUM is which tumor marker this is.
25 N PROMPT,LOWER,CAP,I,WORD
26 S PROMPT=$$PROMPT(IEN,TUM)
27 S LOWER=$$LOW^XLFSTR(PROMPT)
28 F I=1:1 S WORD=$P(LOWER," ",I) Q:WORD="" D
29 .I $E(WORD,1)="(" S $P(LOWER," ",I)=$P(PROMPT," ",I) Q
30 .N NEW,OLD,NWORD
31 .S OLD=$E(WORD,1)
32 .S NEW=$$UP^XLFSTR(OLD)
33 .S NWORD=NEW_$E(WORD,2,99999)
34 .S $P(LOWER," ",I)=NWORD
35 .Q
36 S PROMPT=LOWER
37 Q PROMPT
38PROMPT(IEN,TUM) ;
39 ; This routine will set the prompt base on the primary site
40 ; IEN is the internal entry number of the entry in file 165.5
41 ; TUM is which tumor marker this is.
42 N PROMPT
43 S PROMPT=$S(TUM=1:"TUMOR MARKER 1",TUM=2:"TUMOR MARKER 2",TUM=3:"TUMOR MARKER 3",1:"TUMOR MARKER")
44 I TUM=1 D TUMOR(TUM,"17-63")
45 I TUM=2 D TUMOR(TUM,"49-63")
46 I TUM=3 D TUMOR(TUM,"61-63")
47 Q PROMPT
48 ;
49TUMOR(TUM,RANGE) ; Execute if valid tumor marker
50 N PRIM1
51 S PRIM1=$$GET1^DIQ(165.5,IEN,20,"I")
52 I PRIM1'="" D
53 .N PRIM2
54 .S PRIM2=$$GET1^DIQ(164,PRIM1,1,"I")
55 .I PRIM2'="" D
56 ..N PRIM3,LINE,LOOP,NUMBER,FLG,X
57 ..S PRIM3=$P(PRIM2,"C",2)
58 ..I PRIM3'>$P(RANGE,"-")!(PRIM3'<$P(RANGE,"-",2)) Q
59 ..S FLG=0
60 ..S X="S LINE=$T(TABLE"_TUM_"+LOOP)"
61 ..F LOOP=1:1 X X Q:$P(LINE,";",3)="" D Q:FLG
62 ...S LINE=$P(LINE,";",3),NUMBER=$P(LINE,U)
63 ...I NUMBER["-" D Q
64 ....N NUM1,NUM2
65 ....S NUM1=$P(NUMBER,"-"),NUM2=$P(NUMBER,"-",2)
66 ....I PRIM3<NUM1 Q
67 ....I PRIM3>NUM2 Q
68 ....S FLG=1,PROMPT=$P(LINE,U,2)
69 ....Q
70 ...I PRIM3=NUMBER S FLG=1,PROMPT=$P(LINE,U,2)
71 ...Q
72 ..Q
73 .Q
74 I TUM=1,PROMPT="TUMOR MARKER 1",$$HIST^ONCFUNC(IEN)=95003 S PROMPT="TUMOR MARKER 1 (UC)"
75 Q
76 ;
77TABLE1 ;;NUMBER/NUMBER-RANGE^NEW PROMPT
78 ;;18.0-18.9^TUMOR MARKER 1 (CEA)
79 ;;19.9^TUMOR MARKER 1 (CEA)
80 ;;20.9^TUMOR MARKER 1 (CEA)
81 ;;22.0^TUMOR MARKER 1 (AFP)
82 ;;22.1^TUMOR MARKER 1 (AFP)
83 ;;50.0-50.9^TUMOR MARKER 1 (ERA)
84 ;;56.9^TUMOR MARKER 1 (CA-125)
85 ;;61.9^TUMOR MARKER 1 (PAP)
86 ;;62.0^TUMOR MARKER 1 (AFP)
87 ;;62.1^TUMOR MARKER 1 (AFP)
88 ;;62.9^TUMOR MARKER 1 (AFP)
89 ;;
90TABLE2 ;;NUMBER/NUMBER-RANGE^NEW PROMPT
91 ;;50.0-50.9^TUMOR MARKER 2 (PRA)
92 ;;61.9^TUMOR MARKER 2 (PSA)
93 ;;62.0^TUMOR MARKER 2 (hCG)
94 ;;62.1^TUMOR MARKER 2 (hCG)
95 ;;62.9^TUMOR MARKER 2 (hCG)
96 ;;
97TABLE3 ;;NUMBER/NUMBER-RANGE^NEW PROMPT
98 ;;62.0^TUMOR MARKER 3 (LDH)
99 ;;62.1^TUMOR MARKER 3 (LDH)
100 ;;62.9^TUMOR MARKER 3 (LDH)
101 ;;
102SCREEN ;;Tumor Marker screen
103 I $$TNMED^ONCOU55(D0)<5,Y<7 Q
104 I $$TNMED^ONCOU55(D0)>4,(($E($P($G(^ONCO(165.5,DA,2)),U,1),3,4)=62)&(Y<2!(Y>4)))!(($E($P($G(^ONCO(165.5,DA,2)),U,1),3,4)'=62)&(Y<7)) Q
Note: See TracBrowser for help on using the repository browser.