55 lines
2.9 KiB
Mathematica
55 lines
2.9 KiB
Mathematica
ONCOANC3 ;Hines OIFO/GWB - CONTINUE ONCOANC2 ;12/23/94
|
|
;;2.11;ONCOLOGY;**19,25,26**;Mar 07, 1995
|
|
;
|
|
TNM(PTCODE,PNCODE,PMCODE,PGROUP,CTCODE,CNCODE,CMCODE,CGROUP) ; STAGE/EXTENT OF DISEASE
|
|
N TCODE,NCODE,MCODE,GROUP,BASIS
|
|
CLIN 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
|
|
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
|
|
S MCODE=$P(AAS1655("N2"),U,27) S MCODE=$S(MCODE="":" ",MCODE'?.1NA:" ",1:MCODE),CMCODE=MCODE
|
|
S GROUP=$P(AAS1655("N2"),U,20) S GROUP=$S(GROUP="":" ",GROUP'?.2NA:" ",1:GROUP)
|
|
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=" "
|
|
S:$L(GROUP)<2 GROUP=GROUP_$E(AASBLNK,1,2-$L(GROUP))
|
|
S CGROUP=GROUP
|
|
PATH S TCODE=$P($G(^ONCO(165.5,D0,2.1)),U,1)
|
|
S TCODE=$S(TCODE="":" ",TCODE'?.2NA:" ",$L(TCODE)<2:TCODE_$E(AASBLNK,1,2-$L(TCODE)),1:TCODE)
|
|
S PTCODE=TCODE
|
|
S NCODE=$P($G(^ONCO(165.5,D0,2.1)),U,2)
|
|
S NCODE=$S(NCODE="":" ",NCODE'?.2NA:" ",$L(NCODE)<2:NCODE_$E(AASBLNK,1,2-$L(NCODE)),1:NCODE)
|
|
S PNCODE=NCODE
|
|
S MCODE=$P($G(^ONCO(165.5,D0,2.1)),U,3)
|
|
S MCODE=$S(MCODE="":" ",MCODE'?.1NA:" ",1:MCODE),PMCODE=MCODE
|
|
S GROUP=$P($G(^ONCO(165.5,D0,2.1)),U,4)
|
|
S GROUP=$S(GROUP="":" ",GROUP'?.2NA:" ",1:GROUP)
|
|
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:$L(GROUP)<2 GROUP=GROUP_$E(AASBLNK,1,2-$L(GROUP))
|
|
S PGROUP=GROUP
|
|
Q
|
|
FOLLOW ;
|
|
D INIT^ONCOANC4(D0,.AASRDSB1,.AASRHSR1,.AASRHRA1,.AASRXCH1,.AASRST1,.AASRXBR1,.AASROC1,1)
|
|
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
|
|
D INIT^ONCOANC4(D0,.AASRDSB2,.AASRHSR2,.AASRHRA2,.AASRXCH2,.AASRST2,.AASRXBR2,.AASROC2,2)
|
|
S ^TMP($J,D0,425)=AASRDSB2_AASRHSR2_AASRHRA2_AASRXCH2_AASRST2_AASRXBR2_AASROC2
|
|
D INIT^ONCOANC4(D0,.AASRDSB3,.AASRHSR3,.AASRHRA3,.AASRXCH3,.AASRST3,.AASRXBR3,.AASROC3,3)
|
|
S ^TMP($J,D0,425)=^TMP($J,D0,425)_AASRDSB3_AASRHSR3_AASRHRA3_AASRXCH3_AASRST3_AASRXBR3_AASROC3
|
|
D INIT^ONCOANC4(D0,.AASRDSB4,.AASRHSR4,.AASRHRA4,.AASRXCH4,.AASRST4,.AASRXBR4,.AASROC4,4)
|
|
S ^TMP($J,D0,425)=^TMP($J,D0,425)_AASRDSB4_AASRHSR4_AASRHRA4_AASRXCH4_AASRST4_AASRXBR4_AASROC4
|
|
Q
|
|
HANG ;
|
|
W !!
|
|
S DIR("T")=30 ; timeout override
|
|
S DIR("A",1)="I will hang for "_DIR("T")_" seconds while you set up the log file."
|
|
S DIR("A")="(Hit <CR> to start sooner, or enter '^' to abort)"
|
|
S DIR(0)="E" D ^DIR K DIR
|
|
Q
|
|
EDT(DOD) ;
|
|
N CNT,OSP S CNT=0
|
|
S OSP=$O(^ONCO(160.1,"C",DUZ(2),0))
|
|
I OSP="" S OSP=$O(^ONCO(160.1,0))
|
|
S CNT=$P($G(^ONCO(160.1,OSP,5)),U,1)
|
|
Q $S(DOD<88:2,DOD<+CNT:3,DOD<93:3,1:4)
|
|
MET(NODE) ;
|
|
N PIECE,VALUE S VALUE=""
|
|
F PIECE=14,15,16 D
|
|
.S VALUE=VALUE_$S($L($P(NODE,U,PIECE)):$P(NODE,U,PIECE),1:0)
|
|
Q VALUE
|