source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCOANC3.m@ 1211

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

initial load of WorldVistAEHR

File size: 2.9 KB
Line 
1ONCOANC3 ;Hines OIFO/GWB - CONTINUE ONCOANC2 ;12/23/94
2 ;;2.11;ONCOLOGY;**19,25,26**;Mar 07, 1995
3 ;
4TNM(PTCODE,PNCODE,PMCODE,PGROUP,CTCODE,CNCODE,CMCODE,CGROUP) ; STAGE/EXTENT OF DISEASE
5 N TCODE,NCODE,MCODE,GROUP,BASIS
6CLIN S TCODE=$P(AAS1655("N2"),U,25) S TCODE=$S(TCODE="":" ",TCODE'?.2NA:" ",$L(TCODE)<2:TCODE_$E(AASBLNK,1,2-$L(TCODE)),1:TCODE),CTCODE=TCODE
7 S NCODE=$P(AAS1655("N2"),U,26) S NCODE=$S(NCODE="":" ",NCODE'?.2NA:" ",$L(NCODE)<2:NCODE_$E(AASBLNK,1,2-$L(NCODE)),1:NCODE),CNCODE=NCODE
8 S MCODE=$P(AAS1655("N2"),U,27) S MCODE=$S(MCODE="":" ",MCODE'?.1NA:" ",1:MCODE),CMCODE=MCODE
9 S GROUP=$P(AAS1655("N2"),U,20) S GROUP=$S(GROUP="":" ",GROUP'?.2NA:" ",1:GROUP)
10 S GROUP=$S("^0^0A^1^1A^1B^1C^2^2A^2B^2C^3^3A^3B^3C^4^4A^4B^4C^9^"[("^"_GROUP_"^"):GROUP,GROUP["0":"0",1:"9") ; S GROUP=" "
11 S:$L(GROUP)<2 GROUP=GROUP_$E(AASBLNK,1,2-$L(GROUP))
12 S CGROUP=GROUP
13PATH S TCODE=$P($G(^ONCO(165.5,D0,2.1)),U,1)
14 S TCODE=$S(TCODE="":" ",TCODE'?.2NA:" ",$L(TCODE)<2:TCODE_$E(AASBLNK,1,2-$L(TCODE)),1:TCODE)
15 S PTCODE=TCODE
16 S NCODE=$P($G(^ONCO(165.5,D0,2.1)),U,2)
17 S NCODE=$S(NCODE="":" ",NCODE'?.2NA:" ",$L(NCODE)<2:NCODE_$E(AASBLNK,1,2-$L(NCODE)),1:NCODE)
18 S PNCODE=NCODE
19 S MCODE=$P($G(^ONCO(165.5,D0,2.1)),U,3)
20 S MCODE=$S(MCODE="":" ",MCODE'?.1NA:" ",1:MCODE),PMCODE=MCODE
21 S GROUP=$P($G(^ONCO(165.5,D0,2.1)),U,4)
22 S GROUP=$S(GROUP="":" ",GROUP'?.2NA:" ",1:GROUP)
23 S GROUP=$S("^0^0A^1^1A^1B^1C^2^2A^2B^2C^3^3A^3B^3C^4^4A^4B^4C^9^"[("^"_GROUP_"^"):GROUP,GROUP["0":"0",1:"9")
24 S:$L(GROUP)<2 GROUP=GROUP_$E(AASBLNK,1,2-$L(GROUP))
25 S PGROUP=GROUP
26 Q
27FOLLOW ;
28 D INIT^ONCOANC4(D0,.AASRDSB1,.AASRHSR1,.AASRHRA1,.AASRXCH1,.AASRST1,.AASRXBR1,.AASROC1,1)
29 S ^TMP($J,D0,352)=AASRXBDT_AASRHSR_AASRXREA_AASRHRA_AASRXCN_AASRXSEQ_AASRXCH_AASRST_AASRXBR_AASROC_$E(AASBLNK,1,20)_AASRDSB1_AASRHSR1_AASRHRA1_AASRXCH1_AASRST1_AASRXBR1_AASROC1
30 D INIT^ONCOANC4(D0,.AASRDSB2,.AASRHSR2,.AASRHRA2,.AASRXCH2,.AASRST2,.AASRXBR2,.AASROC2,2)
31 S ^TMP($J,D0,425)=AASRDSB2_AASRHSR2_AASRHRA2_AASRXCH2_AASRST2_AASRXBR2_AASROC2
32 D INIT^ONCOANC4(D0,.AASRDSB3,.AASRHSR3,.AASRHRA3,.AASRXCH3,.AASRST3,.AASRXBR3,.AASROC3,3)
33 S ^TMP($J,D0,425)=^TMP($J,D0,425)_AASRDSB3_AASRHSR3_AASRHRA3_AASRXCH3_AASRST3_AASRXBR3_AASROC3
34 D INIT^ONCOANC4(D0,.AASRDSB4,.AASRHSR4,.AASRHRA4,.AASRXCH4,.AASRST4,.AASRXBR4,.AASROC4,4)
35 S ^TMP($J,D0,425)=^TMP($J,D0,425)_AASRDSB4_AASRHSR4_AASRHRA4_AASRXCH4_AASRST4_AASRXBR4_AASROC4
36 Q
37HANG ;
38 W !!
39 S DIR("T")=30 ; timeout override
40 S DIR("A",1)="I will hang for "_DIR("T")_" seconds while you set up the log file."
41 S DIR("A")="(Hit <CR> to start sooner, or enter '^' to abort)"
42 S DIR(0)="E" D ^DIR K DIR
43 Q
44EDT(DOD) ;
45 N CNT,OSP S CNT=0
46 S OSP=$O(^ONCO(160.1,"C",DUZ(2),0))
47 I OSP="" S OSP=$O(^ONCO(160.1,0))
48 S CNT=$P($G(^ONCO(160.1,OSP,5)),U,1)
49 Q $S(DOD<88:2,DOD<+CNT:3,DOD<93:3,1:4)
50MET(NODE) ;
51 N PIECE,VALUE S VALUE=""
52 F PIECE=14,15,16 D
53 .S VALUE=VALUE_$S($L($P(NODE,U,PIECE)):$P(NODE,U,PIECE),1:0)
54 Q VALUE
Note: See TracBrowser for help on using the repository browser.