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

ORWPFSS0.m

Go to the documentation of this file.
  1. ORWPFSS0 ;SCL/GDU - CPRS PFSS Parameter Maintainance;[02/24/05 13:13] ;2/28/05 09:51
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**215**;Dec 17, 1997
  1. ;Routine to maintain the ORWPFSS ACTIVE Parameter. This parameter will
  1. ;determine if CPRS GUI will perform the activities required for PFSS.
  1. ;
  1. ;Local Variables
  1. ; DIR - Input array varaible for ^DIR
  1. ; DTOUT - Output variable for ^DIR, timeout indicator
  1. ; DUOUT - Output variable for ^DIR, up arrow indicator
  1. ; EC - Error Code
  1. ; PC - Parameter Check
  1. ; PFSS - Output variable for $$GET^XPAR,
  1. ; Current value of PFSS parameter
  1. ; 1 for active
  1. ; 0 for inactive
  1. ; Null for not on file
  1. ; OREM - Output variable for ^XPAR, error code and text
  1. ; Y - Output variable for ^DIR, contains processed value of user
  1. ; input.
  1. ;
  1. ;External references
  1. ; HOME^%ZIS DBIA 10086, User console device set up
  1. ; ^DIR DBIA 10026, FileMan user input reader
  1. ; $$GET^XPAR DBIA 2263, Get current value of parameter
  1. ; ADD^XPAR DBIA 2263, Add new parameter
  1. ; GET^XPAR DBIA 2263, Change current value of parameter
  1. ;
  1. EN ;Routine entry point
  1. N DIR,DTOUT,DUOUT,EC,PC,PFSS,OREM,Y
  1. D:'$D(IO)!('$D(IOF)) HOME^%ZIS
  1. W @IOF,$P($T(SH),";",3)
  1. ; SUGGEST REPLACING PATCH CHECK WITH +$$SWSTAT^IBBAPI() CHECK
  1. ;Check for required patch, if missing alert user and quit
  1. ;Next 2 lines remarked out, to be implemented with release of 215
  1. ;To be removed with release of 228
  1. ;S PC=+$$PATCH^XPDUTL("OR*3.0*228")
  1. ;I PC=0 S EC=1 D ERTRAP Q
  1. ;Get current value of ORWPFSS ACTIVE parameter
  1. S PFSS=$$GET^XPAR("SYS","ORWPFSS ACTIVE",1,"I")
  1. ;If it does not exist add and default to inactive
  1. ;If error occurs during parameter add, alert user and quit
  1. I PFSS="" D I OREM>0 Q
  1. . D ADD^XPAR("SYS","ORWPFSS ACTIVE",1,0,.OREM)
  1. . I OREM>0 S EC=2 D ERTRAP
  1. S DIR(0)="Y"
  1. I PFSS=1 D
  1. . ;If active present option to set PFSS to inactive
  1. . ;Confirm the user's selection
  1. . ;If error occurs during deactivation, alert user
  1. . W !!,$P($T(AM0),";",3),!,$P($T(AM1),";",3)
  1. . D ^DIR I Y=0!($D(DTOUT))!($D(DUOUT)) Q
  1. . W !!,$P($T(AM2),";",3)
  1. . D ^DIR I Y=0!($D(DTOUT))!($D(DUOUT)) Q
  1. . D CHG^XPAR("SYS","ORWPFSS ACTIVE",1,0,.OREM)
  1. . I OREM>0 S EC=4 D ERTRAP Q
  1. . W !!,$P($T(AM3),";",3)
  1. . S DIR(0)="E" D ^DIR
  1. E D
  1. . ;If inactive present option to set active
  1. . ;Confirm the user's selection
  1. . ;If errors occurs during activation, alert user
  1. . W !!,$P($T(IM0),";",3),!,$P($T(IM1),";",3)
  1. . D ^DIR I Y=0!($D(DTOUT))!($D(DUOUT)) Q
  1. . W !!,$P($T(IM2),";",3)
  1. . D ^DIR I Y=0!($D(DTOUT))!($D(DUOUT)) Q
  1. . D CHG^XPAR("SYS","ORWPFSS ACTIVE",1,1,.OREM)
  1. . I OREM>0 S EC=3 D ERTRAP Q
  1. . W !!,$P($T(IM3),";",3)
  1. . S DIR(0)="E" D ^DIR
  1. Q
  1. ;
  1. ERTRAP ;Error Trap, processes various errors and alerts the user
  1. I EC=1 W !!,$P($T(EM1),";",3),!,$P($T(EM2),";",3)
  1. I EC=2 W !!,$P($T(EM3),";",3)
  1. I EC=3 W !!,$P($T(EM4),";",3)
  1. I EC=4 W !!,$P($T(EM5),";",3)
  1. S DIR(0)="E"
  1. I EC>1 W !!,$P($T(EM6),";",3)," ",$P(OREM,U)," ",$P($T(EM7),";",3)," ",$P(OREM,U,2)
  1. W !!,$P($T(EM8),";",3)
  1. D ^DIR
  1. Q
  1. ;
  1. ;USER INTERFACE TEXT
  1. EM1 ;;Required patch OR*3.0*228 is not installed. It must be installed
  1. EM2 ;;before this option can be run.
  1. EM3 ;;Error adding parameter ORWPFSS ACTIVE
  1. EM4 ;;Error activating parameter ORWPFSS ACTIVE
  1. EM5 ;;Error deactivating parameter ORWPFSS ACTIVE
  1. EM6 ;;Error code:
  1. EM7 ;;Error Description:
  1. EM8 ;;Please report this problem to your support staff.
  1. SH ;;CPRS - Activate/Deactivate PFSS
  1. IM0 ;;PFSS for CPRS is >> INACTIVE <<
  1. IM1 ;;Do you want to activate PFSS for CPRS?
  1. IM2 ;;Are you sure you want to activate PFSS for CPRS?
  1. IM3 ;;PFSS is now active for CPRS.
  1. AM0 ;;PFSS for CPRS is >> ACTIVE <<
  1. AM1 ;;Do you want to deactivate PFSS for CPRS?
  1. AM2 ;;Are you sure you want to deactivate PFSS for CPRS?
  1. AM3 ;;PFSS is now inactive for CPRS.