ONCOAIP1 ;Hines OIFO/GWB [EE Abstract Edit Primary]; 08/29/01
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
;
SSS ;SYSTEMIC/SURGERY SEQUENCE (165.5,15)
Q:$P(^ONCO(165.5,D0,3.1),U,39)'=""
S S=$E($$GET1^DIQ(165.5,D0,58.6,"E"),1,2)
S SATF=$E($$GET1^DIQ(165.5,D0,58.7,"E"),1,2)
S SCP=$P($G(^ONCO(165.5,D0,3.1)),U,31)
S SCPATF=$P($G(^ONCO(165.5,D0,3.1)),U,32)
S SOTH=$P($G(^ONCO(165.5,D0,3.1)),U,33)
S SOTHATF=$P($G(^ONCO(165.5,D0,3.1)),U,34)
S C=$$GET1^DIQ(165.5,D0,53.2,"I")
S CATF=$$GET1^DIQ(165.5,D0,53.3,"I")
S H=$$GET1^DIQ(165.5,D0,54.2,"I")
S HATF=$$GET1^DIQ(165.5,D0,54.3,"I")
S I=$$GET1^DIQ(165.5,D0,55.2,"I")
S IATF=$$GET1^DIQ(165.5,D0,55.3,"I")
S HTE=$$GET1^DIQ(165.5,D0,153,"I")
I ((S="00")!(S=99)!(S=98)!(S=""))&((SATF="00")!(SATF=99)!(SATF=98)!(SATF=""))&((SCP=0)!(SCP="")!(SCP=9))&((SCPATF=0)!(SCPATF="")!(SCPATF=9))&((SOTH=0)!(SOTH=""))&((SOTHATF=0)!(SOTHATF="")) S SR=0
E S SR=1
S DST=$$GET1^DIQ(165.5,D0,152)
I ((DST="00/00/0000")!(DST="99/99/9999")!(DST="88/88/8888")!(DST="")) S ST=0
E S ST=1
I ($G(SR)&$G(ST)) D
.S SDT=$P($G(^ONCO(165.5,D0,3)),U,1)
.S:SDT'="" SSSEQ("S",SDT)="S",SSSEQ(SDT)="S"
.S SATFDT=$P($G(^ONCO(165.5,D0,3.1)),U,8)
.S:SATFDT'="" SSSEQ("S",SATFDT)="S",SSSEQ(SATFDT)="S"
.S SCPDT=$P($G(^ONCO(165.5,D0,3.1)),U,22)
.S:SCPDT'="" SSSEQ("S",SCPDT)="S",SSSEQ(SCPDT)="S"
.S SCPATFDT=$P($G(^ONCO(165.5,D0,3.1)),U,23)
.S:SCPATFDT'="" SSSEQ("S",SCPATFDT)="S",SSSEQ(SCPATFDT)="S"
.S SOTDT=$P($G(^ONCO(165.5,D0,3.1)),U,24)
.S:SOTDT'="" SSSEQ("S",SOTDT)="S",SSSEQ(SOTDT)="S"
.S SOTATFDT=$P($G(^ONCO(165.5,D0,3.1)),U,25)
.S:SOTATFDT'="" SSSEQ("S",SOTATFDT)="S",SSSEQ(SOTATFDT)="S"
.S CDT=$P($G(^ONCO(165.5,D0,3)),U,11)
.S:CDT'="" SSSEQ("SYS",CDT)="SYS",SSSEQ(CDT)="SYS"
.S CATFDT=$P($G(^ONCO(165.5,D0,3.1)),U,15)
.S:CATFDT'="" SSSEQ("SYS",CATFDT)="SYS",SSSEQ(CATFDT)="SYS"
.S HDT=$P($G(^ONCO(165.5,D0,3)),U,14)
.S:HDT'="" SSSEQ("SYS",HDT)="SYS",SSSEQ(HDT)="SYS"
.S HATFDT=$P($G(^ONCO(165.5,D0,3.1)),U,17)
.S:HATFDT'="" SSSEQ("SYS",HATFDT)="SYS",SSSEQ(HATFDT)="SYS"
.S IDT=$P($G(^ONCO(165.5,D0,3)),U,17)
.S:IDT'="" SSSEQ("SYS",IDT)="SYS",SSSEQ(IDT)="SYS"
.S IATFDT=$P($G(^ONCO(165.5,D0,3.1)),U,19)
.S:IATFDT'="" SSSEQ("SYS",IATFDT)="SYS",SSSEQ(IATFDT)="SYS"
.S HTEDT=$P($G(^ONCO(165.5,D0,3.1)),U,35)
.S:HTEDT'="" SSSEQ("SYS",HTEDT)="SYS",SSSEQ(HTEDT)="SYS"
.S FSDT=$O(SSSEQ("S",0)),FSYSDT=$O(SSSEQ("SYS",0))
.I FSDT=FSYSDT G EXIT
.S SSSEQ=$O(SSSEQ(0))
.I SSSEQ(SSSEQ)="SYS" S $P(^ONCO(165.5,D0,3.1),U,39)=2
.I SSSEQ(SSSEQ)="S" S $P(^ONCO(165.5,D0,3.1),U,39)=3
E D
.S $P(^ONCO(165.5,D0,3.1),U,39)=0
;
EXIT ;Exit
K S,SATF,SCP,SCPATF,SOTH,SOTHATF,C,CATF,H,HATF,I,IATF,HTE,SR,DST,ST
K SDT,SATFDT,SCPDT,SCPATFDT,SOTDT,SOTATFDT
K CDT,CATFDT,HDT,HATFDT,IDT,IATFDT,HTEDT
K SSSEQ,FSDT,FSYSDT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCOAIP1 2829 printed Dec 13, 2024@02:24:14 Page 2
ONCOAIP1 ;Hines OIFO/GWB [EE Abstract Edit Primary]; 08/29/01
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 ;
SSS ;SYSTEMIC/SURGERY SEQUENCE (165.5,15)
+1 if $PIECE(^ONCO(165.5,D0,3.1),U,39)'=""
QUIT
+2 SET S=$EXTRACT($$GET1^DIQ(165.5,D0,58.6,"E"),1,2)
+3 SET SATF=$EXTRACT($$GET1^DIQ(165.5,D0,58.7,"E"),1,2)
+4 SET SCP=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,31)
+5 SET SCPATF=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,32)
+6 SET SOTH=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,33)
+7 SET SOTHATF=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,34)
+8 SET C=$$GET1^DIQ(165.5,D0,53.2,"I")
+9 SET CATF=$$GET1^DIQ(165.5,D0,53.3,"I")
+10 SET H=$$GET1^DIQ(165.5,D0,54.2,"I")
+11 SET HATF=$$GET1^DIQ(165.5,D0,54.3,"I")
+12 SET I=$$GET1^DIQ(165.5,D0,55.2,"I")
+13 SET IATF=$$GET1^DIQ(165.5,D0,55.3,"I")
+14 SET HTE=$$GET1^DIQ(165.5,D0,153,"I")
+15 IF ((S="00")!(S=99)!(S=98)!(S=""))&((SATF="00")!(SATF=99)!(SATF=98)!(SATF=""))&((SCP=0)!(SCP="")!(SCP=9))&((SCPATF=0)!(SCPATF="")!(SCPATF=9))&((SOTH=0)!(SOTH=""))&((SOTHATF=0)!(SOTHATF=""))
SET SR=0
+16 IF '$TEST
SET SR=1
+17 SET DST=$$GET1^DIQ(165.5,D0,152)
+18 IF ((DST="00/00/0000")!(DST="99/99/9999")!(DST="88/88/8888")!(DST=""))
SET ST=0
+19 IF '$TEST
SET ST=1
+20 IF ($GET(SR)&$GET(ST))
Begin DoDot:1
+21 SET SDT=$PIECE($GET(^ONCO(165.5,D0,3)),U,1)
+22 if SDT'=""
SET SSSEQ("S",SDT)="S"
SET SSSEQ(SDT)="S"
+23 SET SATFDT=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,8)
+24 if SATFDT'=""
SET SSSEQ("S",SATFDT)="S"
SET SSSEQ(SATFDT)="S"
+25 SET SCPDT=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,22)
+26 if SCPDT'=""
SET SSSEQ("S",SCPDT)="S"
SET SSSEQ(SCPDT)="S"
+27 SET SCPATFDT=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,23)
+28 if SCPATFDT'=""
SET SSSEQ("S",SCPATFDT)="S"
SET SSSEQ(SCPATFDT)="S"
+29 SET SOTDT=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,24)
+30 if SOTDT'=""
SET SSSEQ("S",SOTDT)="S"
SET SSSEQ(SOTDT)="S"
+31 SET SOTATFDT=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,25)
+32 if SOTATFDT'=""
SET SSSEQ("S",SOTATFDT)="S"
SET SSSEQ(SOTATFDT)="S"
+33 SET CDT=$PIECE($GET(^ONCO(165.5,D0,3)),U,11)
+34 if CDT'=""
SET SSSEQ("SYS",CDT)="SYS"
SET SSSEQ(CDT)="SYS"
+35 SET CATFDT=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,15)
+36 if CATFDT'=""
SET SSSEQ("SYS",CATFDT)="SYS"
SET SSSEQ(CATFDT)="SYS"
+37 SET HDT=$PIECE($GET(^ONCO(165.5,D0,3)),U,14)
+38 if HDT'=""
SET SSSEQ("SYS",HDT)="SYS"
SET SSSEQ(HDT)="SYS"
+39 SET HATFDT=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,17)
+40 if HATFDT'=""
SET SSSEQ("SYS",HATFDT)="SYS"
SET SSSEQ(HATFDT)="SYS"
+41 SET IDT=$PIECE($GET(^ONCO(165.5,D0,3)),U,17)
+42 if IDT'=""
SET SSSEQ("SYS",IDT)="SYS"
SET SSSEQ(IDT)="SYS"
+43 SET IATFDT=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,19)
+44 if IATFDT'=""
SET SSSEQ("SYS",IATFDT)="SYS"
SET SSSEQ(IATFDT)="SYS"
+45 SET HTEDT=$PIECE($GET(^ONCO(165.5,D0,3.1)),U,35)
+46 if HTEDT'=""
SET SSSEQ("SYS",HTEDT)="SYS"
SET SSSEQ(HTEDT)="SYS"
+47 SET FSDT=$ORDER(SSSEQ("S",0))
SET FSYSDT=$ORDER(SSSEQ("SYS",0))
+48 IF FSDT=FSYSDT
GOTO EXIT
+49 SET SSSEQ=$ORDER(SSSEQ(0))
+50 IF SSSEQ(SSSEQ)="SYS"
SET $PIECE(^ONCO(165.5,D0,3.1),U,39)=2
+51 IF SSSEQ(SSSEQ)="S"
SET $PIECE(^ONCO(165.5,D0,3.1),U,39)=3
End DoDot:1
+52 IF '$TEST
Begin DoDot:1
+53 SET $PIECE(^ONCO(165.5,D0,3.1),U,39)=0
End DoDot:1
+54 ;
EXIT ;Exit
+1 KILL S,SATF,SCP,SCPATF,SOTH,SOTHATF,C,CATF,H,HATF,I,IATF,HTE,SR,DST,ST
+2 KILL SDT,SATFDT,SCPDT,SCPATFDT,SOTDT,SOTATFDT
+3 KILL CDT,CATFDT,HDT,HATFDT,IDT,IATFDT,HTEDT
+4 KILL SSSEQ,FSDT,FSYSDT
+5 QUIT