ONC2PS06 ;Hines OIFO/RTK - Post-Install Routine for Patch ONC*2.2*6 ;08/31/16
;;2.2;ONCOLOGY;**6**;Jul 31, 2013;Build 10
;
;N RC
;NEW Washington DC production server.
S RC=$$UPDCSURL^ONCSAPIU("http://127.0.0.1:83/cgi_bin/oncsrv.exe")
;NEW Washington DC test server, comment out for final release.
;S RC=$$UPDCSURL^ONCSAPIU("http://127.0.0.1:81/cgi_bin/oncsrv.exe")
;
D CNVSBY,CNVTNM
Q
CNVSBY ;Conversion of TNM Clin Staged By and TNM Path Staged By codes
;
D BMES^XPDUTL("Begin re-indexing of 'STAGED BY CLINICAL' [#165.5,#19]")
D MES^XPDUTL("and 'STAGED BY PATHOLOGIC' [#165.5,#89] fields...")
N IEN,ONCCLSBY,ONCPASBY S ZZDOTS=0
F IEN=0:0 S IEN=$O(^ONCO(165.5,IEN)) Q:IEN'>0 D
.I $P($G(^ONCO(165.5,IEN,25)),U,19)="Y" Q ;check if already converted
.S ONCCLSBY=$P($G(^ONCO(165.5,IEN,3)),U,32) I ONCCLSBY'="" D CLINSB
.S ONCPASBY=$P($G(^ONCO(165.5,IEN,2.1)),U,5) I ONCPASBY'="" D PATHSB
.S $P(^ONCO(165.5,IEN,25),U,19)="Y" ;set new converted field
.S ZZDOTS=ZZDOTS+1 I ZZDOTS#500=0 W "."
.Q
D MES^XPDUTL("Completed...")
K ONCLINT,ONCLINN,ONCLINM,ONCLINSG,ONCPATHT,ONCPATHN,ONCPATHM,ONCPATHG
K ZZDOTS Q
;
CLINSB ;
I ONCCLSBY=0 S $P(^ONCO(165.5,IEN,3),U,32)=1 Q
I ONCCLSBY=1!(ONCCLSBY=4) S $P(^ONCO(165.5,IEN,3),U,32)=2 Q
I ONCCLSBY=2 S $P(^ONCO(165.5,IEN,3),U,32)=6 Q
I ONCCLSBY=3 S $P(^ONCO(165.5,IEN,3),U,32)=7 Q
I ONCCLSBY=5 S $P(^ONCO(165.5,IEN,3),U,32)=8 Q
I ONCCLSBY=6 S $P(^ONCO(165.5,IEN,3),U,32)=9 Q
I ONCCLSBY=7 S $P(^ONCO(165.5,IEN,3),U,32)=11 Q
I ONCCLSBY=8 S $P(^ONCO(165.5,IEN,3),U,32)=13 Q
I ONCCLSBY=9 D
.S ONCLINT=$P($G(^ONCO(165.5,IEN,2)),U,25)
.S ONCLINN=$P($G(^ONCO(165.5,IEN,2)),U,26)
.S ONCLINM=$P($G(^ONCO(165.5,IEN,2)),U,27)
.S ONCLINSG=$P($G(^ONCO(165.5,IEN,2)),U,20)
.I ONCLINT="",ONCLINN="",ONCLINM="",ONCLINSG="" S $P(^ONCO(165.5,IEN,3),U,32)=1 Q
.I ONCLINT="X",ONCLINN="X",ONCLINM="X",ONCLINSG=99 S $P(^ONCO(165.5,IEN,3),U,32)=1 Q
.I ONCLINT=88,ONCLINN=88,ONCLINM=88,ONCLINSG=88 S $P(^ONCO(165.5,IEN,3),U,32)=13 Q
.S $P(^ONCO(165.5,IEN,3),U,32)=14 Q
.Q
Q
;
PATHSB ;
I ONCPASBY=0 S $P(^ONCO(165.5,IEN,2.1),U,5)=1 Q
I ONCPASBY=1!(ONCPASBY=4) S $P(^ONCO(165.5,IEN,2.1),U,5)=2 Q
I ONCPASBY=2 S $P(^ONCO(165.5,IEN,2.1),U,5)=6 Q
I ONCPASBY=3 S $P(^ONCO(165.5,IEN,2.1),U,5)=7 Q
I ONCPASBY=5 S $P(^ONCO(165.5,IEN,2.1),U,5)=8 Q
I ONCPASBY=6 S $P(^ONCO(165.5,IEN,2.1),U,5)=9 Q
I ONCPASBY=7 S $P(^ONCO(165.5,IEN,2.1),U,5)=11 Q
I ONCPASBY=8 S $P(^ONCO(165.5,IEN,2.1),U,5)=13 Q
I ONCPASBY=9 D
.S ONCPATHT=$P($G(^ONCO(165.5,IEN,2.1)),U,1)
.S ONCPATHN=$P($G(^ONCO(165.5,IEN,2.1)),U,2)
.S ONCPATHM=$P($G(^ONCO(165.5,IEN,2.1)),U,3)
.S ONCPATHG=$P($G(^ONCO(165.5,IEN,2.1)),U,4)
.I ONCPATHT="",ONCPATHN="",ONCPATHM="",ONCPATHG="" S $P(^ONCO(165.5,IEN,2.1),U,5)=1 Q
.I ONCPATHT="X",ONCPATHN="X",ONCPATHM="X",ONCPATHG=99 S $P(^ONCO(165.5,IEN,2.1),U,5)=1 Q
.I ONCPATHT=88,ONCPATHN=88,ONCPATHM=88,ONCPATHG=88 S $P(^ONCO(165.5,IEN,2.1),U,5)=13 Q
.S $P(^ONCO(165.5,IEN,2.1),U,5)=14 Q
.Q
Q
;
CNVTNM ;
;
D BMES^XPDUTL("Begin re-indexing of CLINICAL and PATHOLOGIC TNM fields")
N IEN,CLINT,CLINN,CLINM,PATHT,PATHN,PATHM S ZZDOTS=0
F IEN=0:0 S IEN=$O(^ONCO(165.5,IEN)) Q:IEN'>0 D
.I $P($G(^ONCO(165.5,IEN,25)),U,20)="Y" Q ;check if already converted
.S CLINT=$P($G(^ONCO(165.5,IEN,2)),U,25) I CLINT'="",CLINT'=88 D CT
.S CLINN=$P($G(^ONCO(165.5,IEN,2)),U,26) I CLINN'="",CLINN'=88 D CN
.S CLINM=$P($G(^ONCO(165.5,IEN,2)),U,27) I CLINM'="",CLINM'=88 D CM
.S PATHT=$P($G(^ONCO(165.5,IEN,2.1)),U,1) I PATHT'="",PATHT'=88 D PT
.S PATHN=$P($G(^ONCO(165.5,IEN,2.1)),U,2) I PATHN'="",PATHN'=88 D PN
.S PATHM=$P($G(^ONCO(165.5,IEN,2.1)),U,3) I PATHM'="",PATHM'=88 D PM
.S $P(^ONCO(165.5,IEN,25),U,20)="Y" ;set new converted field
.S ZZDOTS=ZZDOTS+1 I ZZDOTS#500=0 W "."
D MES^XPDUTL("...Completed...")
K CLINT,CLINN,CLINM,PATHT,PATHN,PATHM,ZZDOTS Q
;
CT ;
I CLINT="A" S $P(^ONCO(165.5,IEN,2),U,25)="pA" Q
I CLINT="IS" S $P(^ONCO(165.5,IEN,2),U,25)="pIS" Q
I CLINT="ISPU"!(CLINT="SU") S $P(^ONCO(165.5,IEN,2),U,25)="pISU" Q
I CLINT="ISPD"!(CLINT="SD") S $P(^ONCO(165.5,IEN,2),U,25)="pISD" Q
S $P(^ONCO(165.5,IEN,2),U,25)="c"_CLINT Q
Q
;
CN ;
S $P(^ONCO(165.5,IEN,2),U,26)="c"_CLINN Q
Q
;
CM ;
S $P(^ONCO(165.5,IEN,2),U,27)="c"_CLINM Q
Q
;
PT ;
I PATHT="ISPU"!(PATHT="SU") S $P(^ONCO(165.5,IEN,2.1),U,1)="pISU" Q
I PATHT="ISPD"!(PATHT="SD") S $P(^ONCO(165.5,IEN,2.1),U,1)="pISD" Q
S $P(^ONCO(165.5,IEN,2.1),U,1)="p"_PATHT Q
Q
;
PN ;
I PATHN="0(I-)" S $P(^ONCO(165.5,IEN,2.1),U,2)="p0I-" Q
I PATHN="0(I+)" S $P(^ONCO(165.5,IEN,2.1),U,2)="p0I+" Q
I PATHN="0(MOL-)" S $P(^ONCO(165.5,IEN,2.1),U,2)="p0M-" Q
I PATHN="0(MOL+)" S $P(^ONCO(165.5,IEN,2.1),U,2)="p0M+" Q
S $P(^ONCO(165.5,IEN,2.1),U,2)="p"_PATHN Q
Q
PM ;
I PATHM=0 S $P(^ONCO(165.5,IEN,2.1),U,3)="c0" Q
S $P(^ONCO(165.5,IEN,2.1),U,3)="p"_PATHM Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONC2PS06 4924 printed Nov 22, 2024@17:31:49 Page 2
ONC2PS06 ;Hines OIFO/RTK - Post-Install Routine for Patch ONC*2.2*6 ;08/31/16
+1 ;;2.2;ONCOLOGY;**6**;Jul 31, 2013;Build 10
+2 ;
+3 ;N RC
+4 ;NEW Washington DC production server.
+5 SET RC=$$UPDCSURL^ONCSAPIU("http://127.0.0.1:83/cgi_bin/oncsrv.exe")
+6 ;NEW Washington DC test server, comment out for final release.
+7 ;S RC=$$UPDCSURL^ONCSAPIU("http://127.0.0.1:81/cgi_bin/oncsrv.exe")
+8 ;
+9 DO CNVSBY
DO CNVTNM
+10 QUIT
CNVSBY ;Conversion of TNM Clin Staged By and TNM Path Staged By codes
+1 ;
+2 DO BMES^XPDUTL("Begin re-indexing of 'STAGED BY CLINICAL' [#165.5,#19]")
+3 DO MES^XPDUTL("and 'STAGED BY PATHOLOGIC' [#165.5,#89] fields...")
+4 NEW IEN,ONCCLSBY,ONCPASBY
SET ZZDOTS=0
+5 FOR IEN=0:0
SET IEN=$ORDER(^ONCO(165.5,IEN))
if IEN'>0
QUIT
Begin DoDot:1
+6 ;check if already converted
IF $PIECE($GET(^ONCO(165.5,IEN,25)),U,19)="Y"
QUIT
+7 SET ONCCLSBY=$PIECE($GET(^ONCO(165.5,IEN,3)),U,32)
IF ONCCLSBY'=""
DO CLINSB
+8 SET ONCPASBY=$PIECE($GET(^ONCO(165.5,IEN,2.1)),U,5)
IF ONCPASBY'=""
DO PATHSB
+9 ;set new converted field
SET $PIECE(^ONCO(165.5,IEN,25),U,19)="Y"
+10 SET ZZDOTS=ZZDOTS+1
IF ZZDOTS#500=0
WRITE "."
+11 QUIT
End DoDot:1
+12 DO MES^XPDUTL("Completed...")
+13 KILL ONCLINT,ONCLINN,ONCLINM,ONCLINSG,ONCPATHT,ONCPATHN,ONCPATHM,ONCPATHG
+14 KILL ZZDOTS
QUIT
+15 ;
CLINSB ;
+1 IF ONCCLSBY=0
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=1
QUIT
+2 IF ONCCLSBY=1!(ONCCLSBY=4)
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=2
QUIT
+3 IF ONCCLSBY=2
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=6
QUIT
+4 IF ONCCLSBY=3
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=7
QUIT
+5 IF ONCCLSBY=5
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=8
QUIT
+6 IF ONCCLSBY=6
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=9
QUIT
+7 IF ONCCLSBY=7
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=11
QUIT
+8 IF ONCCLSBY=8
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=13
QUIT
+9 IF ONCCLSBY=9
Begin DoDot:1
+10 SET ONCLINT=$PIECE($GET(^ONCO(165.5,IEN,2)),U,25)
+11 SET ONCLINN=$PIECE($GET(^ONCO(165.5,IEN,2)),U,26)
+12 SET ONCLINM=$PIECE($GET(^ONCO(165.5,IEN,2)),U,27)
+13 SET ONCLINSG=$PIECE($GET(^ONCO(165.5,IEN,2)),U,20)
+14 IF ONCLINT=""
IF ONCLINN=""
IF ONCLINM=""
IF ONCLINSG=""
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=1
QUIT
+15 IF ONCLINT="X"
IF ONCLINN="X"
IF ONCLINM="X"
IF ONCLINSG=99
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=1
QUIT
+16 IF ONCLINT=88
IF ONCLINN=88
IF ONCLINM=88
IF ONCLINSG=88
SET $PIECE(^ONCO(165.5,IEN,3),U,32)=13
QUIT
+17 SET $PIECE(^ONCO(165.5,IEN,3),U,32)=14
QUIT
+18 QUIT
End DoDot:1
+19 QUIT
+20 ;
PATHSB ;
+1 IF ONCPASBY=0
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=1
QUIT
+2 IF ONCPASBY=1!(ONCPASBY=4)
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=2
QUIT
+3 IF ONCPASBY=2
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=6
QUIT
+4 IF ONCPASBY=3
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=7
QUIT
+5 IF ONCPASBY=5
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=8
QUIT
+6 IF ONCPASBY=6
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=9
QUIT
+7 IF ONCPASBY=7
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=11
QUIT
+8 IF ONCPASBY=8
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=13
QUIT
+9 IF ONCPASBY=9
Begin DoDot:1
+10 SET ONCPATHT=$PIECE($GET(^ONCO(165.5,IEN,2.1)),U,1)
+11 SET ONCPATHN=$PIECE($GET(^ONCO(165.5,IEN,2.1)),U,2)
+12 SET ONCPATHM=$PIECE($GET(^ONCO(165.5,IEN,2.1)),U,3)
+13 SET ONCPATHG=$PIECE($GET(^ONCO(165.5,IEN,2.1)),U,4)
+14 IF ONCPATHT=""
IF ONCPATHN=""
IF ONCPATHM=""
IF ONCPATHG=""
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=1
QUIT
+15 IF ONCPATHT="X"
IF ONCPATHN="X"
IF ONCPATHM="X"
IF ONCPATHG=99
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=1
QUIT
+16 IF ONCPATHT=88
IF ONCPATHN=88
IF ONCPATHM=88
IF ONCPATHG=88
SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=13
QUIT
+17 SET $PIECE(^ONCO(165.5,IEN,2.1),U,5)=14
QUIT
+18 QUIT
End DoDot:1
+19 QUIT
+20 ;
CNVTNM ;
+1 ;
+2 DO BMES^XPDUTL("Begin re-indexing of CLINICAL and PATHOLOGIC TNM fields")
+3 NEW IEN,CLINT,CLINN,CLINM,PATHT,PATHN,PATHM
SET ZZDOTS=0
+4 FOR IEN=0:0
SET IEN=$ORDER(^ONCO(165.5,IEN))
if IEN'>0
QUIT
Begin DoDot:1
+5 ;check if already converted
IF $PIECE($GET(^ONCO(165.5,IEN,25)),U,20)="Y"
QUIT
+6 SET CLINT=$PIECE($GET(^ONCO(165.5,IEN,2)),U,25)
IF CLINT'=""
IF CLINT'=88
DO CT
+7 SET CLINN=$PIECE($GET(^ONCO(165.5,IEN,2)),U,26)
IF CLINN'=""
IF CLINN'=88
DO CN
+8 SET CLINM=$PIECE($GET(^ONCO(165.5,IEN,2)),U,27)
IF CLINM'=""
IF CLINM'=88
DO CM
+9 SET PATHT=$PIECE($GET(^ONCO(165.5,IEN,2.1)),U,1)
IF PATHT'=""
IF PATHT'=88
DO PT
+10 SET PATHN=$PIECE($GET(^ONCO(165.5,IEN,2.1)),U,2)
IF PATHN'=""
IF PATHN'=88
DO PN
+11 SET PATHM=$PIECE($GET(^ONCO(165.5,IEN,2.1)),U,3)
IF PATHM'=""
IF PATHM'=88
DO PM
+12 ;set new converted field
SET $PIECE(^ONCO(165.5,IEN,25),U,20)="Y"
+13 SET ZZDOTS=ZZDOTS+1
IF ZZDOTS#500=0
WRITE "."
End DoDot:1
+14 DO MES^XPDUTL("...Completed...")
+15 KILL CLINT,CLINN,CLINM,PATHT,PATHN,PATHM,ZZDOTS
QUIT
+16 ;
CT ;
+1 IF CLINT="A"
SET $PIECE(^ONCO(165.5,IEN,2),U,25)="pA"
QUIT
+2 IF CLINT="IS"
SET $PIECE(^ONCO(165.5,IEN,2),U,25)="pIS"
QUIT
+3 IF CLINT="ISPU"!(CLINT="SU")
SET $PIECE(^ONCO(165.5,IEN,2),U,25)="pISU"
QUIT
+4 IF CLINT="ISPD"!(CLINT="SD")
SET $PIECE(^ONCO(165.5,IEN,2),U,25)="pISD"
QUIT
+5 SET $PIECE(^ONCO(165.5,IEN,2),U,25)="c"_CLINT
QUIT
+6 QUIT
+7 ;
CN ;
+1 SET $PIECE(^ONCO(165.5,IEN,2),U,26)="c"_CLINN
QUIT
+2 QUIT
+3 ;
CM ;
+1 SET $PIECE(^ONCO(165.5,IEN,2),U,27)="c"_CLINM
QUIT
+2 QUIT
+3 ;
PT ;
+1 IF PATHT="ISPU"!(PATHT="SU")
SET $PIECE(^ONCO(165.5,IEN,2.1),U,1)="pISU"
QUIT
+2 IF PATHT="ISPD"!(PATHT="SD")
SET $PIECE(^ONCO(165.5,IEN,2.1),U,1)="pISD"
QUIT
+3 SET $PIECE(^ONCO(165.5,IEN,2.1),U,1)="p"_PATHT
QUIT
+4 QUIT
+5 ;
PN ;
+1 IF PATHN="0(I-)"
SET $PIECE(^ONCO(165.5,IEN,2.1),U,2)="p0I-"
QUIT
+2 IF PATHN="0(I+)"
SET $PIECE(^ONCO(165.5,IEN,2.1),U,2)="p0I+"
QUIT
+3 IF PATHN="0(MOL-)"
SET $PIECE(^ONCO(165.5,IEN,2.1),U,2)="p0M-"
QUIT
+4 IF PATHN="0(MOL+)"
SET $PIECE(^ONCO(165.5,IEN,2.1),U,2)="p0M+"
QUIT
+5 SET $PIECE(^ONCO(165.5,IEN,2.1),U,2)="p"_PATHN
QUIT
+6 QUIT
PM ;
+1 IF PATHM=0
SET $PIECE(^ONCO(165.5,IEN,2.1),U,3)="c0"
QUIT
+2 SET $PIECE(^ONCO(165.5,IEN,2.1),U,3)="p"_PATHM
QUIT
+3 QUIT