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

ORWDBA5.m

Go to the documentation of this file.
  1. ORWDBA5 ; SLC/GSS Billing Awareness ;12/9/04 12:02
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**195**;Dec 17, 1997
  1. ;
  1. ; ORWDBA5 contains code for the testing, enabling and disabling the
  1. ; Billing Awareness Master Switch which is tested by the GUI in order
  1. ; to know what to present to the user. Note also the BA by User
  1. ; switch which is coded in ORWDBA6, ORWDBA8, and ORWDBA10.
  1. ;
  1. BAMSTR ;Billing Awareness Master Switch via Parameter Setting
  1. N DIR,ENT,ORERR,INST,OPT,PAR
  1. D VARSET
  1. I $G(PAR)="" D Q
  1. . S ORERR="99;Clinical Indicator Data Capture Master Switch parameter not defined"
  1. . D ORERR
  1. D OPT
  1. Q
  1. ;
  1. VARSET ;Set variables - used by tags BAMSTR and CHKPS1
  1. ; ENT=Entity, INST=Instance, PAR=Parameter
  1. S ENT="SYS",INST=1
  1. S PAR=$O(^XTV(8989.51,"B","OR BILLING AWARENESS STATUS",0))
  1. Q
  1. ;
  1. OPT ;Functionality control
  1. D HDR
  1. I OPT="D" D DISABLE G OPT
  1. I OPT="E" D ENABLE G OPT
  1. Q
  1. ;
  1. ORERR ;Error trap message - pass error in via ORERR w/ 2nd piece being ER text
  1. S DIR(0)="F"
  1. S DIR("A")="Enter '^' to exit"
  1. S DIR("A",1)="ERROR:",DIR("A",2)=$P(ORERR,U,2)
  1. D ^DIR K DIR
  1. Q
  1. ;
  1. ENABLE ;Enable Billing Awareness Master Switch
  1. N DIR,Y
  1. ; Check and see if CIDC ancillary package installed
  1. S Y=$D(^XPD(9.7,"B","PX CLINICAL INDICATOR DATA CAPTURE 1.0"))
  1. I 'Y S ORERR="^The package 'PX CLINICAL INDICATOR DATA CAPTURE 1.0' must first be installed" D ORERR Q
  1. W !!,"You have selected to ENABLE Clinical Indicators Data Capture Functionality!",!
  1. S DIR(0)="Y"
  1. S DIR("A")="Are you sure you want to ENABLE Clinical Indicators Data Capture Functionality"
  1. S DIR("B")="N"
  1. S DIR("?")="To exit ENABLE enter '^'."
  1. S DIR("?",1)="To confirm ENABLING Clinical Indicators Data Capture Functionality enter 'Y' for Yes."
  1. S DIR("?",2)="To abort ENABLING enter 'N' for NO."
  1. D ^DIR K DIR
  1. I Y=0 K OPT Q
  1. D CHG^XPAR(ENT,PAR,INST,1,.ORERR)
  1. I $G(ORERR) D ORERR Q
  1. Q
  1. ;
  1. DISABLE ;Disable Billing Awareness Functionality
  1. N DIR
  1. W !!,"You have selected to DISABLE Clinical Indicators Data Capture Functionality!",!
  1. S DIR(0)="Y"
  1. S DIR("A")="Are you sure you want to DISABLE Clinical Indicators Data Capture Functionality"
  1. S DIR("B")="N"
  1. S DIR("?")="To exit DISABLE enter '^'."
  1. S DIR("?",1)="To confirm DISABLING Clinical Indicators Data Capture Functionality enter 'Y' for Yes."
  1. S DIR("?",2)="To abort DISABLING enter 'N' for NO."
  1. D ^DIR K DIR
  1. I Y=0 K OPT Q
  1. D CHG^XPAR(ENT,PAR,INST,0,.ORERR)
  1. I $G(ORERR) D ORERR Q
  1. Q
  1. ;
  1. HDR ;Screen Header, Switch Status, and Options
  1. N DIR
  1. D:'$D(IO)!('$D(IOF)) HOME^%ZIS
  1. W @IOF,"Enable/Disable Clinical Indicators Data Capture Master Switch"
  1. W !!,"Clinical Indicators Data Capture Master Switch is now *> ",$S($$CHKPS=0:"OFF",1:"ON")," <*"
  1. S DIR("?")="Enter Q to Quit"
  1. I $$CHKPS D
  1. . S DIR(0)="SX^D:Disable Clinical Indicators Data Capture Functionality;Q:Quit"
  1. . S DIR("?",1)="Enter D to disable capture of Clinical Indicators"
  1. E D
  1. . S DIR(0)="SX^E:Enable Clinical Indicators Capture Functionality;Q:Quit"
  1. . S DIR("?",2)="Enter E to enable the capture of Clinical Indicator data"
  1. S DIR("A")="Selection"
  1. D ^DIR K DIR S OPT=Y
  1. Q
  1. ;
  1. CHKPS() ;Check master switch parameter status
  1. ; Returns 0 if switch is OFF or 1 if ON
  1. ; If master switch not previously defined then defines it as 0
  1. ; For use via List Mgr (thus error messages)
  1. N ORERR,VAL
  1. I $G(PAR)="" D Q
  1. . S ORERR="99;Clinical Indicator Data Capture Master Switch parameter not defined"
  1. . D ORERR
  1. S VAL=$$GET^XPAR(ENT,PAR,INST)
  1. I VAL="" D ADD^XPAR(ENT,PAR,INST,0) S VAL=$$GET^XPAR(ENT,PAR,INST,.ORERR)
  1. I $G(ORERR) D ORERR Q ""
  1. Q VAL
  1. ;
  1. CHKPS1() ;Check master switch parameter status
  1. ; Used by RPC and BA status check in ORWDBA1 (BASTATUS & BASTAT)
  1. N ENT,ORERR,INST,PAR,VAL
  1. D VARSET
  1. ; Return BA Master Switch is off if parameter is not defined/set-up
  1. I $G(PAR)="" Q 0
  1. S VAL=$$GET^XPAR(ENT,PAR,INST)
  1. I VAL="" D ADD^XPAR(ENT,PAR,INST,0) S VAL=$$GET^XPAR(ENT,PAR,INST,.ORERR)
  1. ; If there's an error then return BA Master Switch is off
  1. I $G(ORERR) Q 0
  1. Q VAL