Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: OR494PIR

OR494PIR.m

Go to the documentation of this file.
  1. 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
  1. ;Examines the INTERVAL ITEM in the ORDER DIALOG file #101.41 to make the
  1. ;INTERVAL ITEM a required response when the NUMBER OF APPOINTMENTS ITEM
  1. ;is greater than one (1).
  1. ;
  1. D MES^XPDUTL("Checking the ORDER DIALOG file for suitability to apply changes")
  1. D MES^XPDUTL("to ORDER DIALOG SD RTC to modify the ITEM INTERVAL.")
  1. S ORPIRIEN=$O(^ORD(101.41,"AB","SD RTC",0)) I 'ORPIRIEN D Q
  1. .D MES^XPDUTL("ORDER DIALOG SD RTC missing from instance - no update.")
  1. S ORPIRSEQ=$O(^ORD(101.41,ORPIRIEN,10,"B",20.5,0)) I 'ORPIRSEQ D Q
  1. .D MES^XPDUTL("ITEM INTERVAL is not on the ORDER DIALOG SD RTC - no update.")
  1. S ORPIRINT=$G(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3)) I ORPIRINT'="I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1" D Q
  1. .D MES^XPDUTL("ITEM INTERVAL value is not as expected - no update.")
  1. I $D(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,.1)) D Q
  1. .D MES^XPDUTL("INPUT TRANSFORM already esists - no update.")
  1. SET ;
  1. S ^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3)=ORPIRINT_" S REQD=1"
  1. S ^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,.1)="I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1,X<1 K X"
  1. D MES^XPDUTL("ITEM INTERVAL value updated.")
  1. END ;
  1. K ORPIRIEN,ORPIRSEQ,ORPIRINT
  1. Q
  1. ROLL ;Reset INTERVAL ITEM to original value should the patch need to rolled back.
  1. W !,"Checking the ORDER DIALOG file for suitability to roll back"
  1. W !,"the patch change to the ITEM INTERVAL."
  1. S ORPIRIEN=$O(^ORD(101.41,"AB","SD RTC",0)) I 'ORPIRIEN D Q
  1. .W !,"ORDER DIALOG SD RTC missing from instance - no roll back."
  1. S ORPIRSEQ=$O(^ORD(101.41,ORPIRIEN,10,"B",20.5,0)) I 'ORPIRSEQ D Q
  1. .W !,"ITEM INTERVAL is not on the ORDER DIALOG SD RTC - no roll back."
  1. S ORPIRINT=$G(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3)) I ORPIRINT'[" S REQD=1" D Q
  1. .W !,"ITEM INTERVAL value is not as expected - no roll bacck."
  1. BACK ;
  1. S ^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,3)="I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1"
  1. I $D(^ORD(101.41,ORPIRIEN,10,ORPIRSEQ,.1)) K ^(.1)
  1. W !!,"ITEM INTERVAL for SD RTC restored to pre-patch value:"
  1. W !,"I +$$VAL^ORCD(""NUMBER OF APPOINTMENTS"")>1"
  1. K ORPIRIEN,ORPIRSEQ,ORPIRINT
  1. Q