[613] | 1 | ORWDBA5 ; SLC/GSS Billing Awareness ;12/9/04 12:02
|
---|
| 2 | ;;3.0;ORDER ENTRY/RESULTS REPORTING;**195**;Dec 17, 1997
|
---|
| 3 | ;
|
---|
| 4 | ; ORWDBA5 contains code for the testing, enabling and disabling the
|
---|
| 5 | ; Billing Awareness Master Switch which is tested by the GUI in order
|
---|
| 6 | ; to know what to present to the user. Note also the BA by User
|
---|
| 7 | ; switch which is coded in ORWDBA6, ORWDBA8, and ORWDBA10.
|
---|
| 8 | ;
|
---|
| 9 | BAMSTR ;Billing Awareness Master Switch via Parameter Setting
|
---|
| 10 | N DIR,ENT,ORERR,INST,OPT,PAR
|
---|
| 11 | D VARSET
|
---|
| 12 | I $G(PAR)="" D Q
|
---|
| 13 | . S ORERR="99;Clinical Indicator Data Capture Master Switch parameter not defined"
|
---|
| 14 | . D ORERR
|
---|
| 15 | D OPT
|
---|
| 16 | Q
|
---|
| 17 | ;
|
---|
| 18 | VARSET ;Set variables - used by tags BAMSTR and CHKPS1
|
---|
| 19 | ; ENT=Entity, INST=Instance, PAR=Parameter
|
---|
| 20 | S ENT="SYS",INST=1
|
---|
| 21 | S PAR=$O(^XTV(8989.51,"B","OR BILLING AWARENESS STATUS",0))
|
---|
| 22 | Q
|
---|
| 23 | ;
|
---|
| 24 | OPT ;Functionality control
|
---|
| 25 | D HDR
|
---|
| 26 | I OPT="D" D DISABLE G OPT
|
---|
| 27 | I OPT="E" D ENABLE G OPT
|
---|
| 28 | Q
|
---|
| 29 | ;
|
---|
| 30 | ORERR ;Error trap message - pass error in via ORERR w/ 2nd piece being ER text
|
---|
| 31 | S DIR(0)="F"
|
---|
| 32 | S DIR("A")="Enter '^' to exit"
|
---|
| 33 | S DIR("A",1)="ERROR:",DIR("A",2)=$P(ORERR,U,2)
|
---|
| 34 | D ^DIR K DIR
|
---|
| 35 | Q
|
---|
| 36 | ;
|
---|
| 37 | ENABLE ;Enable Billing Awareness Master Switch
|
---|
| 38 | N DIR,Y
|
---|
| 39 | ; Check and see if CIDC ancillary package installed
|
---|
| 40 | S Y=$D(^XPD(9.7,"B","PX CLINICAL INDICATOR DATA CAPTURE 1.0"))
|
---|
| 41 | I 'Y S ORERR="^The package 'PX CLINICAL INDICATOR DATA CAPTURE 1.0' must first be installed" D ORERR Q
|
---|
| 42 | W !!,"You have selected to ENABLE Clinical Indicators Data Capture Functionality!",!
|
---|
| 43 | S DIR(0)="Y"
|
---|
| 44 | S DIR("A")="Are you sure you want to ENABLE Clinical Indicators Data Capture Functionality"
|
---|
| 45 | S DIR("B")="N"
|
---|
| 46 | S DIR("?")="To exit ENABLE enter '^'."
|
---|
| 47 | S DIR("?",1)="To confirm ENABLING Clinical Indicators Data Capture Functionality enter 'Y' for Yes."
|
---|
| 48 | S DIR("?",2)="To abort ENABLING enter 'N' for NO."
|
---|
| 49 | D ^DIR K DIR
|
---|
| 50 | I Y=0 K OPT Q
|
---|
| 51 | D CHG^XPAR(ENT,PAR,INST,1,.ORERR)
|
---|
| 52 | I $G(ORERR) D ORERR Q
|
---|
| 53 | Q
|
---|
| 54 | ;
|
---|
| 55 | DISABLE ;Disable Billing Awareness Functionality
|
---|
| 56 | N DIR
|
---|
| 57 | W !!,"You have selected to DISABLE Clinical Indicators Data Capture Functionality!",!
|
---|
| 58 | S DIR(0)="Y"
|
---|
| 59 | S DIR("A")="Are you sure you want to DISABLE Clinical Indicators Data Capture Functionality"
|
---|
| 60 | S DIR("B")="N"
|
---|
| 61 | S DIR("?")="To exit DISABLE enter '^'."
|
---|
| 62 | S DIR("?",1)="To confirm DISABLING Clinical Indicators Data Capture Functionality enter 'Y' for Yes."
|
---|
| 63 | S DIR("?",2)="To abort DISABLING enter 'N' for NO."
|
---|
| 64 | D ^DIR K DIR
|
---|
| 65 | I Y=0 K OPT Q
|
---|
| 66 | D CHG^XPAR(ENT,PAR,INST,0,.ORERR)
|
---|
| 67 | I $G(ORERR) D ORERR Q
|
---|
| 68 | Q
|
---|
| 69 | ;
|
---|
| 70 | HDR ;Screen Header, Switch Status, and Options
|
---|
| 71 | N DIR
|
---|
| 72 | D:'$D(IO)!('$D(IOF)) HOME^%ZIS
|
---|
| 73 | W @IOF,"Enable/Disable Clinical Indicators Data Capture Master Switch"
|
---|
| 74 | W !!,"Clinical Indicators Data Capture Master Switch is now *> ",$S($$CHKPS=0:"OFF",1:"ON")," <*"
|
---|
| 75 | S DIR("?")="Enter Q to Quit"
|
---|
| 76 | I $$CHKPS D
|
---|
| 77 | . S DIR(0)="SX^D:Disable Clinical Indicators Data Capture Functionality;Q:Quit"
|
---|
| 78 | . S DIR("?",1)="Enter D to disable capture of Clinical Indicators"
|
---|
| 79 | E D
|
---|
| 80 | . S DIR(0)="SX^E:Enable Clinical Indicators Capture Functionality;Q:Quit"
|
---|
| 81 | . S DIR("?",2)="Enter E to enable the capture of Clinical Indicator data"
|
---|
| 82 | S DIR("A")="Selection"
|
---|
| 83 | D ^DIR K DIR S OPT=Y
|
---|
| 84 | Q
|
---|
| 85 | ;
|
---|
| 86 | CHKPS() ;Check master switch parameter status
|
---|
| 87 | ; Returns 0 if switch is OFF or 1 if ON
|
---|
| 88 | ; If master switch not previously defined then defines it as 0
|
---|
| 89 | ; For use via List Mgr (thus error messages)
|
---|
| 90 | N ORERR,VAL
|
---|
| 91 | I $G(PAR)="" D Q
|
---|
| 92 | . S ORERR="99;Clinical Indicator Data Capture Master Switch parameter not defined"
|
---|
| 93 | . D ORERR
|
---|
| 94 | S VAL=$$GET^XPAR(ENT,PAR,INST)
|
---|
| 95 | I VAL="" D ADD^XPAR(ENT,PAR,INST,0) S VAL=$$GET^XPAR(ENT,PAR,INST,.ORERR)
|
---|
| 96 | I $G(ORERR) D ORERR Q ""
|
---|
| 97 | Q VAL
|
---|
| 98 | ;
|
---|
| 99 | CHKPS1() ;Check master switch parameter status
|
---|
| 100 | ; Used by RPC and BA status check in ORWDBA1 (BASTATUS & BASTAT)
|
---|
| 101 | N ENT,ORERR,INST,PAR,VAL
|
---|
| 102 | D VARSET
|
---|
| 103 | ; Return BA Master Switch is off if parameter is not defined/set-up
|
---|
| 104 | I $G(PAR)="" Q 0
|
---|
| 105 | S VAL=$$GET^XPAR(ENT,PAR,INST)
|
---|
| 106 | I VAL="" D ADD^XPAR(ENT,PAR,INST,0) S VAL=$$GET^XPAR(ENT,PAR,INST,.ORERR)
|
---|
| 107 | ; If there's an error then return BA Master Switch is off
|
---|
| 108 | I $G(ORERR) Q 0
|
---|
| 109 | Q VAL
|
---|