29 lines
993 B
Mathematica
29 lines
993 B
Mathematica
ONCOCOFA ;Hines OIFO - COMPUTED FIELDS FOR FOLLOW-UP ;6/23/93 09:59
|
|
;;2.11;ONCOLOGY;**25,44,46**;Mar 07, 1995;Build 39
|
|
;
|
|
MTS ;Multiple TUMOR STATUS within FOLLOWUP
|
|
;Called by FHC^ONCODLF,FHP^ONCODLF
|
|
N JTOT,JACT,K,XY,PDIAGDT
|
|
I '$D(^ONCO(165.5,"C",D0)) W ?30,"NO Primaries Defined",! Q
|
|
S PD0=0,(JTOT,JACT)=0
|
|
F S PD0=$O(^ONCO(165.5,"C",D0,PD0)) Q:PD0'>0 I $$DIV^ONCFUNC(PD0)=DUZ(2) S PDIAGDT=$P($G(^ONCO(165.5,PD0,0)),U,16) S JTOT=JTOT+1 I PDIAGDT,PDIAGDT'>FDAT S JACT=JACT+1,XY(JACT)=PD0
|
|
D MTSWLP
|
|
Q
|
|
;
|
|
MTSWLP ;Multiple tumor status write loop - called from MTS if >1 primary
|
|
N K
|
|
F K=1:1:JACT D
|
|
.N PD0,ST,ST1,TD1,TS
|
|
.S PD0=XY(K)
|
|
.S ST=$$GETVAL^ONCOU(165.5,PD0,.01)
|
|
.S ST1=$$GETVAL^ONCOU(165.5,PD0,20) S:ST1'="" ST=ST1
|
|
.S TD1=+$O(^ONCO(165.5,PD0,"TS","B",+FDAT,0))
|
|
.S TS="" S:TD1 TS=$$GETVAL^ONCOU(165.5,PD0,73,TD1,.02)
|
|
.K DOTS S $P(DOTS,".",30-$L(ST))="."
|
|
.W !?2,ST,$G(DOTS),": ",$S(TS="":"Tumor Status not stated",1:TS) W:K=JACT !
|
|
Q
|
|
;
|
|
EX ;EXIT
|
|
K PA,PB,PC,PD,PE,PL,X0
|
|
Q
|