OR494PIR ;HPS-CS/JSG - OR*3.0*494 POST INSTALL ROUTINE;SEP 27, 2018@13:00
;;3.0;ORDER ENTRY/RESULTS REPORTING;**494**;Sep 27, 2018;Build 4
;Examines the INTERVAL ITEM in the ORDER DIALOG file #101.41 to make the
;INTERVAL ITEM a required response when the NUMBER OF APPOINTMENTS ITEM
;is greater than one (1).
;
D MES^XPDUTL("Checking the ORDER DIALOG file for suitability to apply changes")
D MES^XPDUTL("to ORDER DIALOG SD RTC to modify the ITEM INTERVAL.")
S ORPIRIEN=$O(^ORD(101.41,"AB","SD RTC",0)) I 'ORPIRIEN D Q
.D MES^XPDUTL("ORDER DIALOG SD RTC missing from instance - no update.")
S ORPIRSEQ=$O(^ORD(101.41,ORPIRIEN,10,"B",20.5,0)) I 'ORPIRSEQ D Q
.D MES^XPDUTL("ITEM INTERVAL is not on the ORDER DIALOG SD RTC - no update.")
S ORPIRINT=$G(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3)) I ORPIRINT'="I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1" D Q
.D MES^XPDUTL("ITEM INTERVAL value is not as expected - no update.")
I $D(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,.1)) D Q
.D MES^XPDUTL("INPUT TRANSFORM already esists - no update.")
SET ;
S ^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3)=ORPIRINT_" S REQD=1"
S ^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,.1)="I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1,X<1 K X"
D MES^XPDUTL("ITEM INTERVAL value updated.")
END ;
K ORPIRIEN,ORPIRSEQ,ORPIRINT
Q
ROLL ;Reset INTERVAL ITEM to original value should the patch need to rolled back.
W !,"Checking the ORDER DIALOG file for suitability to roll back"
W !,"the patch change to the ITEM INTERVAL."
S ORPIRIEN=$O(^ORD(101.41,"AB","SD RTC",0)) I 'ORPIRIEN D Q
.W !,"ORDER DIALOG SD RTC missing from instance - no roll back."
S ORPIRSEQ=$O(^ORD(101.41,ORPIRIEN,10,"B",20.5,0)) I 'ORPIRSEQ D Q
.W !,"ITEM INTERVAL is not on the ORDER DIALOG SD RTC - no roll back."
S ORPIRINT=$G(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3)) I ORPIRINT'[" S REQD=1" D Q
.W !,"ITEM INTERVAL value is not as expected - no roll bacck."
BACK ;
S ^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3)="I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1"
I $D(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,.1)) K ^(.1)
W !!,"ITEM INTERVAL for SD RTC restored to pre-patch value:"
W !,"I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1"
K ORPIRIEN,ORPIRSEQ,ORPIRINT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOR494PIR 2230 printed Nov 22, 2024@17:36:43 Page 2
OR494PIR ;HPS-CS/JSG - OR*3.0*494 POST INSTALL ROUTINE;SEP 27, 2018@13:00
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**494**;Sep 27, 2018;Build 4
+2 ;Examines the INTERVAL ITEM in the ORDER DIALOG file #101.41 to make the
+3 ;INTERVAL ITEM a required response when the NUMBER OF APPOINTMENTS ITEM
+4 ;is greater than one (1).
+5 ;
+6 DO MES^XPDUTL("Checking the ORDER DIALOG file for suitability to apply changes")
+7 DO MES^XPDUTL("to ORDER DIALOG SD RTC to modify the ITEM INTERVAL.")
+8 SET ORPIRIEN=$ORDER(^ORD(101.41,"AB","SD RTC",0))
IF 'ORPIRIEN
Begin DoDot:1
+9 DO MES^XPDUTL("ORDER DIALOG SD RTC missing from instance - no update.")
End DoDot:1
QUIT
+10 SET ORPIRSEQ=$ORDER(^ORD(101.41,ORPIRIEN,10,"B",20.5,0))
IF 'ORPIRSEQ
Begin DoDot:1
+11 DO MES^XPDUTL("ITEM INTERVAL is not on the ORDER DIALOG SD RTC - no update.")
End DoDot:1
QUIT
+12 SET ORPIRINT=$GET(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3))
IF ORPIRINT'="I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1"
Begin DoDot:1
+13 DO MES^XPDUTL("ITEM INTERVAL value is not as expected - no update.")
End DoDot:1
QUIT
+14 IF $DATA(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,.1))
Begin DoDot:1
+15 DO MES^XPDUTL("INPUT TRANSFORM already esists - no update.")
End DoDot:1
QUIT
SET ;
+1 SET ^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3)=ORPIRINT_" S REQD=1"
+2 SET ^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,.1)="I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1,X<1 K X"
+3 DO MES^XPDUTL("ITEM INTERVAL value updated.")
END ;
+1 KILL ORPIRIEN,ORPIRSEQ,ORPIRINT
+2 QUIT
ROLL ;Reset INTERVAL ITEM to original value should the patch need to rolled back.
+1 WRITE !,"Checking the ORDER DIALOG file for suitability to roll back"
+2 WRITE !,"the patch change to the ITEM INTERVAL."
+3 SET ORPIRIEN=$ORDER(^ORD(101.41,"AB","SD RTC",0))
IF 'ORPIRIEN
Begin DoDot:1
+4 WRITE !,"ORDER DIALOG SD RTC missing from instance - no roll back."
End DoDot:1
QUIT
+5 SET ORPIRSEQ=$ORDER(^ORD(101.41,ORPIRIEN,10,"B",20.5,0))
IF 'ORPIRSEQ
Begin DoDot:1
+6 WRITE !,"ITEM INTERVAL is not on the ORDER DIALOG SD RTC - no roll back."
End DoDot:1
QUIT
+7 SET ORPIRINT=$GET(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3))
IF ORPIRINT'[" S REQD=1"
Begin DoDot:1
+8 WRITE !,"ITEM INTERVAL value is not as expected - no roll bacck."
End DoDot:1
QUIT
BACK ;
+1 SET ^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3)="I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1"
+2 IF $DATA(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,.1))
KILL ^(.1)
+3 WRITE !!,"ITEM INTERVAL for SD RTC restored to pre-patch value:"
+4 WRITE !,"I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1"
+5 KILL ORPIRIEN,ORPIRSEQ,ORPIRINT
+6 QUIT