source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWPFSS0.m@ 1353

Last change on this file since 1353 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1ORWPFSS0 ;SCL/GDU - CPRS PFSS Parameter Maintainance;[02/24/05 13:13] ;2/28/05 09:51
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**215**;Dec 17, 1997
3 ;Routine to maintain the ORWPFSS ACTIVE Parameter. This parameter will
4 ;determine if CPRS GUI will perform the activities required for PFSS.
5 ;
6 ;Local Variables
7 ; DIR - Input array varaible for ^DIR
8 ; DTOUT - Output variable for ^DIR, timeout indicator
9 ; DUOUT - Output variable for ^DIR, up arrow indicator
10 ; EC - Error Code
11 ; PC - Parameter Check
12 ; PFSS - Output variable for $$GET^XPAR,
13 ; Current value of PFSS parameter
14 ; 1 for active
15 ; 0 for inactive
16 ; Null for not on file
17 ; OREM - Output variable for ^XPAR, error code and text
18 ; Y - Output variable for ^DIR, contains processed value of user
19 ; input.
20 ;
21 ;External references
22 ; HOME^%ZIS DBIA 10086, User console device set up
23 ; ^DIR DBIA 10026, FileMan user input reader
24 ; $$GET^XPAR DBIA 2263, Get current value of parameter
25 ; ADD^XPAR DBIA 2263, Add new parameter
26 ; GET^XPAR DBIA 2263, Change current value of parameter
27 ;
28EN ;Routine entry point
29 N DIR,DTOUT,DUOUT,EC,PC,PFSS,OREM,Y
30 D:'$D(IO)!('$D(IOF)) HOME^%ZIS
31 W @IOF,$P($T(SH),";",3)
32 ; SUGGEST REPLACING PATCH CHECK WITH +$$SWSTAT^IBBAPI() CHECK
33 ;Check for required patch, if missing alert user and quit
34 ;Next 2 lines remarked out, to be implemented with release of 215
35 ;To be removed with release of 228
36 ;S PC=+$$PATCH^XPDUTL("OR*3.0*228")
37 ;I PC=0 S EC=1 D ERTRAP Q
38 ;Get current value of ORWPFSS ACTIVE parameter
39 S PFSS=$$GET^XPAR("SYS","ORWPFSS ACTIVE",1,"I")
40 ;If it does not exist add and default to inactive
41 ;If error occurs during parameter add, alert user and quit
42 I PFSS="" D I OREM>0 Q
43 . D ADD^XPAR("SYS","ORWPFSS ACTIVE",1,0,.OREM)
44 . I OREM>0 S EC=2 D ERTRAP
45 S DIR(0)="Y"
46 I PFSS=1 D
47 . ;If active present option to set PFSS to inactive
48 . ;Confirm the user's selection
49 . ;If error occurs during deactivation, alert user
50 . W !!,$P($T(AM0),";",3),!,$P($T(AM1),";",3)
51 . D ^DIR I Y=0!($D(DTOUT))!($D(DUOUT)) Q
52 . W !!,$P($T(AM2),";",3)
53 . D ^DIR I Y=0!($D(DTOUT))!($D(DUOUT)) Q
54 . D CHG^XPAR("SYS","ORWPFSS ACTIVE",1,0,.OREM)
55 . I OREM>0 S EC=4 D ERTRAP Q
56 . W !!,$P($T(AM3),";",3)
57 . S DIR(0)="E" D ^DIR
58 E D
59 . ;If inactive present option to set active
60 . ;Confirm the user's selection
61 . ;If errors occurs during activation, alert user
62 . W !!,$P($T(IM0),";",3),!,$P($T(IM1),";",3)
63 . D ^DIR I Y=0!($D(DTOUT))!($D(DUOUT)) Q
64 . W !!,$P($T(IM2),";",3)
65 . D ^DIR I Y=0!($D(DTOUT))!($D(DUOUT)) Q
66 . D CHG^XPAR("SYS","ORWPFSS ACTIVE",1,1,.OREM)
67 . I OREM>0 S EC=3 D ERTRAP Q
68 . W !!,$P($T(IM3),";",3)
69 . S DIR(0)="E" D ^DIR
70 Q
71 ;
72ERTRAP ;Error Trap, processes various errors and alerts the user
73 I EC=1 W !!,$P($T(EM1),";",3),!,$P($T(EM2),";",3)
74 I EC=2 W !!,$P($T(EM3),";",3)
75 I EC=3 W !!,$P($T(EM4),";",3)
76 I EC=4 W !!,$P($T(EM5),";",3)
77 S DIR(0)="E"
78 I EC>1 W !!,$P($T(EM6),";",3)," ",$P(OREM,U)," ",$P($T(EM7),";",3)," ",$P(OREM,U,2)
79 W !!,$P($T(EM8),";",3)
80 D ^DIR
81 Q
82 ;
83 ;USER INTERFACE TEXT
84EM1 ;;Required patch OR*3.0*228 is not installed. It must be installed
85EM2 ;;before this option can be run.
86EM3 ;;Error adding parameter ORWPFSS ACTIVE
87EM4 ;;Error activating parameter ORWPFSS ACTIVE
88EM5 ;;Error deactivating parameter ORWPFSS ACTIVE
89EM6 ;;Error code:
90EM7 ;;Error Description:
91EM8 ;;Please report this problem to your support staff.
92SH ;;CPRS - Activate/Deactivate PFSS
93IM0 ;;PFSS for CPRS is >> INACTIVE <<
94IM1 ;;Do you want to activate PFSS for CPRS?
95IM2 ;;Are you sure you want to activate PFSS for CPRS?
96IM3 ;;PFSS is now active for CPRS.
97AM0 ;;PFSS for CPRS is >> ACTIVE <<
98AM1 ;;Do you want to deactivate PFSS for CPRS?
99AM2 ;;Are you sure you want to deactivate PFSS for CPRS?
100AM3 ;;PFSS is now inactive for CPRS.
Note: See TracBrowser for help on using the repository browser.