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

ORWDBA10.m

Go to the documentation of this file.
  1. ORWDBA10 ; SLC/GDU - Billing Awareness - Phase I [11/24/04 13:42]
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**195,261**;Dec 17, 1997
  1. ;Clinical Indicator Data Capture By Provider Parameter Module
  1. ;
  1. ;This program will enable or disable the CIDC functionality for all
  1. ;active providers. For the active providers without the CIDC parameter,
  1. ;this program will assign the CIDC parameter to them and enable or
  1. ;disable the CIDC functionality.
  1. ;
  1. ;The enabling or disabling of the CIDC functionality is based on the
  1. ;user selected value of an external variable passed to this program.
  1. ;
  1. ;External Variable:
  1. ; CIDC Clinical Indicator Data Capture
  1. ; A value of E for enable CIDC functionality.
  1. ; A value of D for disable CIDC functionality.
  1. ; Set by user selection in ORWDBA6 and passed to this
  1. ; program.
  1. ;Internal Variables:
  1. ; CNT Counter variable, used to build temporary global
  1. ; DIR Input array variable for ^DIR
  1. ; DT Standard Fileman/Kernel variable for current date
  1. ; DT is set, not newed or killed
  1. ; DTOUT Timeout indicator, output variable of ^DIR
  1. ; DUOUT Up arrow indicator, output variable of ^DIR
  1. ; OREM Error Message, output variable for XPAR
  1. ; IEN Internal Entry Number
  1. ; LIST Input variable of XPAR where output ENVAL^XAR
  1. ; will be stored
  1. ; PTD Provider Termination Date
  1. ; VAL Input variable of XPAR
  1. ; A value of 1 will enable CIDC functionality
  1. ; A value of 0 will disable CIDC functionality
  1. ; X Work variable
  1. ; Y Processed user selection, output variable of ^DIR
  1. ;External References
  1. ; ^DIR DBIA 10026
  1. ; ADD^XPAR DBIA 2263
  1. ; ENVAL^XPAR DBIA 2263
  1. ;
  1. EN(CIDC) ;Entry point for this program
  1. N CNT,DIR,DTOUT,DUOUT,OREM,IEN,LIST,PTD,VAL,X,Y
  1. K ^TMP($J,"OR","CIDC")
  1. S DT=$$DT^XLFDT
  1. ;Get list of clinicians with the CIDC functionality parameter assigned
  1. ;to them.
  1. S OREM="",LIST="^TMP($J,""OR"",""CIDC"",""A"")"
  1. D ENVAL^XPAR(LIST,"OR BILLING AWARENESS BY USER",1,.OREM,1)
  1. ;Build list of active clinicians who do not have the CIDC functionality
  1. ;parameter not assigned to them.
  1. S IEN="",(CNT,^TMP($J,"OR","CIDC","U",0))=0
  1. F S IEN=$O(^XUSEC("PROVIDER",IEN)) Q:IEN="" D
  1. . ;Skip to next provider is CIDC parameter assigned
  1. . I $D(^TMP($J,"OR","CIDC","A",IEN_";VA(200,",1))=1 Q
  1. . ;Skip to next provider if DISUSER set to yes
  1. . I $$GET1^DIQ(200,IEN,7)="YES" Q
  1. . ;Get provider termination date, skip to next provider if this date is
  1. . ;today's date or in the past.
  1. . S PTD=$$GET1^DIQ(200,IEN,9.2,"I")
  1. . I PTD'="",(PTD=DT)!(PTD<DT) Q
  1. . ;Add to list
  1. . S CNT=CNT+1
  1. . S ^TMP($J,"OR","CIDC","U",0)=CNT
  1. . S ^TMP($J,"OR","CIDC","U",CNT)=IEN_";VA(200,"
  1. ;Build and display user interface
  1. S DIR(0)="SX^;"_$P($T(OY),";",3)
  1. S DIR(0)=DIR(0)_$S(CIDC="E":$P($T(OYE),";",3),1:$P($T(OYD),";",3))_";"
  1. S DIR(0)=DIR(0)_$P($T(ON),";",3)
  1. S DIR(0)=DIR(0)_$S(CIDC="E":$P($T(ONE),";",3),1:$P($T(OND),";",3))
  1. S DIR("A",1)=$S(CIDC="E":$P($T(A2E),";",3),1:$P($T(A2D),";",3))
  1. S DIR("A",2)=$P($T(A3),";",3)
  1. S DIR("A")=$P($T(A4),";",3)
  1. S DIR("?",1)=$P($T(HY),";",3)
  1. S DIR("?",1)=DIR("?",1)_$S(CIDC="E":$P($T(HYE),";",3),1:$P($T(HYD),";",3))
  1. S DIR("?")=$P($T(HN),";",3)
  1. S DIR("?")=DIR("?")_$S(CIDC="E":$P($T(HNE),";",3),1:$P($T(HND),";",3))
  1. D SCRHDR,^DIR K DIR
  1. ;Process user's selection
  1. ;If the user selects no, times out, or enters "^" quit program
  1. I Y="NO"!($D(DTOUT))!($D(DUOUT)) W !!,$C(7),$P($T(CP),";",3) H 1 G EXIT
  1. ;Enable/disable CIDC parameter functionality.
  1. D SCRHDR
  1. W !!,$S(CIDC="E":$P($T(EP),";",3),1:$P($T(DP),";",3))
  1. S VAL=$S(CIDC="E":1,1:0)
  1. ;Enable/disable CIDC functionality for active providers with the parameter
  1. ;as per user selection
  1. S X="" F S X=$O(^TMP($J,"OR","CIDC","A",X)) Q:X="" D
  1. . W "."
  1. . D CHG^XPAR(X,"OR BILLING AWARENESS BY USER",1,VAL,.OREM)
  1. ;Assigning the CIDC parameter to active providers without it and enable/disable
  1. ;CIDC functionality as per user selection
  1. F X=1:1:^TMP($J,"OR","CIDC","U",0) D
  1. . W "."
  1. . D ADD^XPAR(^TMP($J,"OR","CIDC","U",X),"OR BILLING AWARENESS BY USER",1,VAL,.OREM)
  1. ;Alert the user the enabling/disabling CIDC functionality is done.
  1. S DIR("A")=$S(CIDC="E":$P($T(EC),";",3),1:$P($T(DC),";",3))
  1. S DIR(0)="E"
  1. D ^DIR K DIR
  1. EXIT ;Exit point of this routine
  1. K ^TMP($J,"OR","CIDC")
  1. Q
  1. ;
  1. SCRHDR ;Screen Header
  1. W:$D(IOF) @IOF
  1. W !,$P($T(SH),";",3)
  1. W !,$S(CIDC="E":$P($T(SHE),";",3),1:$P($T(SHD),";",3))
  1. Q
  1. ;Text for the user's interface
  1. SH ;;Enable Clinical Indicator Data Capture By Provider Parameter Management
  1. SHE ;;Enable Parameter For All Active Providers Option
  1. SHD ;;Disable Parameter For All Active Providers Option
  1. OY ;;YES:Enter YES to begin process to
  1. ON ;;NO:Enter NO to cancel process to
  1. OYE ;; enable CIDC
  1. ONE ;; enable CIDC and quit
  1. OYD ;; disable CIDC
  1. OND ;; disable CIDC and quit
  1. A1 ;;active providers do not have this parameter assigned to them.
  1. A2E ;;You have selected to enable Clinical Indictor Data Capture
  1. A2D ;;You have selected to disable Clinical Indicator Data Capture
  1. A3 ;;for all active providers. This may take some time.
  1. A4 ;;Are you sure you want to do this? (YES/NO - must be all cap)
  1. HY ;;Enter YES to begin the
  1. HN ;;Enter No or '^' to cancel the
  1. HYE ;; enable CIDC process.
  1. HNE ;; enable CIDC process and quit.
  1. HYD ;; disable CIDC process.
  1. HND ;; disable CIDC process and quit.
  1. EP ;;Now enabling CIDC functionality.
  1. EC ;;CIDC parameter functionality enabling complete.
  1. DP ;;Now disabling CIDC functionality.
  1. DC ;;CIDC parameter functionality disabling complete.
  1. CP ;;Process cancelled!