ONC2PS18 ;HINES OIFO/RTK - Post-Install Routine for Patch ONC*2.2*18 ;07/25/23
;;2.2;ONCOLOGY;**18**;Jul 31, 2013;Build 5
;
D SCID558
SERV ;Test or Production url updates
N RC,ONCSYS
;DC production server Patch 18
S ONCSYS=$$PROD^XUPROD()
S:ONCSYS RC=$$UPDCSURL^ONCSAPIU("http://127.0.0.1:83/cgi_bin/oncsrv.exe")
;DC PRODUCTION SERVER
;S RC=$$UPDCSURL^ONCSAPIU("http://127.0.0.1:86/cgi_bin/oncsrv.exe")
;test server uRL
S:'ONCSYS RC=$$UPDCSURL^ONCSAPIU("http://127.0.0.1:81/cgi_bin/oncsrv.exe")
Q
;
SCID558 ;If there are any 'bad' 00558 Schema ID's, reset the Schema ID to NULL
D BMES^XPDUTL("Convert cases with incorrect Schema ID = 00558...")
N IEN,ONCDXVP,STAT,SCHMID,SCTOPCOD,SCTOPIEN,SCTOP,SCHIST,SCHST14
S ONCDXVP=3171231 F S ONCDXVP=$O(^ONCO(165.5,"ADX",ONCDXVP)) Q:ONCDXVP'>0 D
.S IEN=0 F S IEN=$O(^ONCO(165.5,"ADX",ONCDXVP,IEN)) Q:IEN'>0 D
..S STAT=$P($G(^ONCO(165.5,IEN,7)),"^",2) I STAT=3 Q
..S SCHMID=$P($G(^ONCO(165.5,IEN,"SSD1")),"^",1)
..S SCTOPIEN=$P($G(^ONCO(165.5,IEN,2)),U,1) I SCTOPIEN'="" S SCTOPCOD=$P($G(^ONCO(164,SCTOPIEN,0)),U,2),SCTOP=$P(SCTOPCOD,".",1)_$P(SCTOPCOD,".",2)
..S SCHIST=$P($G(^ONCO(165.5,IEN,2.2)),U,3) S SCHST14=$E(SCHIST,1,4)
..I SCHMID="00558" D CHECK558
Q
CHECK558 ;check if it is a correct 00558; if not reset to NULL
;ADNEXA UTERINE OTHER: C571-C574 HIST 8000-8700,8720-8790,9700,9701
N SCLEGIT S SCLEGIT=0
I "C571^C572^C573^C574"[SCTOP D I SCLEGIT=1 Q
.I ((SCHST14>7999)&(SCHST14<8701))!((SCHST14>8719)&(SCHST14<8791))!(SCHST14=9700)!(SCHST14=9701) S SCLEGIT=1 Q
S $P(^ONCO(165.5,IEN,"SSD1"),"^",1)=""
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONC2PS18 1618 printed Dec 13, 2024@02:21:55 Page 2
ONC2PS18 ;HINES OIFO/RTK - Post-Install Routine for Patch ONC*2.2*18 ;07/25/23
+1 ;;2.2;ONCOLOGY;**18**;Jul 31, 2013;Build 5
+2 ;
+3 DO SCID558
SERV ;Test or Production url updates
+1 NEW RC,ONCSYS
+2 ;DC production server Patch 18
+3 SET ONCSYS=$$PROD^XUPROD()
+4 if ONCSYS
SET RC=$$UPDCSURL^ONCSAPIU("http://127.0.0.1:83/cgi_bin/oncsrv.exe")
+5 ;DC PRODUCTION SERVER
+6 ;S RC=$$UPDCSURL^ONCSAPIU("http://127.0.0.1:86/cgi_bin/oncsrv.exe")
+7 ;test server uRL
+8 if 'ONCSYS
SET RC=$$UPDCSURL^ONCSAPIU("http://127.0.0.1:81/cgi_bin/oncsrv.exe")
+9 QUIT
+10 ;
SCID558 ;If there are any 'bad' 00558 Schema ID's, reset the Schema ID to NULL
+1 DO BMES^XPDUTL("Convert cases with incorrect Schema ID = 00558...")
+2 NEW IEN,ONCDXVP,STAT,SCHMID,SCTOPCOD,SCTOPIEN,SCTOP,SCHIST,SCHST14
+3 SET ONCDXVP=3171231
FOR
SET ONCDXVP=$ORDER(^ONCO(165.5,"ADX",ONCDXVP))
if ONCDXVP'>0
QUIT
Begin DoDot:1
+4 SET IEN=0
FOR
SET IEN=$ORDER(^ONCO(165.5,"ADX",ONCDXVP,IEN))
if IEN'>0
QUIT
Begin DoDot:2
+5 SET STAT=$PIECE($GET(^ONCO(165.5,IEN,7)),"^",2)
IF STAT=3
QUIT
+6 SET SCHMID=$PIECE($GET(^ONCO(165.5,IEN,"SSD1")),"^",1)
+7 SET SCTOPIEN=$PIECE($GET(^ONCO(165.5,IEN,2)),U,1)
IF SCTOPIEN'=""
SET SCTOPCOD=$PIECE($GET(^ONCO(164,SCTOPIEN,0)),U,2)
SET SCTOP=$PIECE(SCTOPCOD,".",1)_$PIECE(SCTOPCOD,".",2)
+8 SET SCHIST=$PIECE($GET(^ONCO(165.5,IEN,2.2)),U,3)
SET SCHST14=$EXTRACT(SCHIST,1,4)
+9 IF SCHMID="00558"
DO CHECK558
End DoDot:2
End DoDot:1
+10 QUIT
CHECK558 ;check if it is a correct 00558; if not reset to NULL
+1 ;ADNEXA UTERINE OTHER: C571-C574 HIST 8000-8700,8720-8790,9700,9701
+2 NEW SCLEGIT
SET SCLEGIT=0
+3 IF "C571^C572^C573^C574"[SCTOP
Begin DoDot:1
+4 IF ((SCHST14>7999)&(SCHST14<8701))!((SCHST14>8719)&(SCHST14<8791))!(SCHST14=9700)!(SCHST14=9701)
SET SCLEGIT=1
QUIT
End DoDot:1
IF SCLEGIT=1
QUIT
+5 SET $PIECE(^ONCO(165.5,IEN,"SSD1"),"^",1)=""
+6 QUIT