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

ORWDBA18.m

Go to the documentation of this file.
  1. ORWDBA18 ; SLC/GDU - Billing Awareness - Phase I [10/18/04 10:30]
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**195**;Dec 17, 1997
  1. ;
  1. ;Enable Billing Awareness By User Parameter Module
  1. ;ORWDBA18 - Assign the parameter utilities
  1. ;
  1. SETUP ;Run temp global kill, build assigned list, build unassigned list
  1. D KTG,LISTA,LISTU Q
  1. ;
  1. KTG ;Kill the temp globals used by this program
  1. K ^TMP("ORPAL",$J),^TMP("ORPUL",$J) Q
  1. LISTA ;Build a list of providers with the parameter already assigned to them.
  1. N ORERR,PIV,NAME,X
  1. S (ORERR,X)="",U="^"
  1. D ENVAL^XPAR("^TMP(""ORPAL"",$J,""A"")","OR BILLING AWARENESS BY USER",1,.ORERR,1)
  1. Q:^TMP("ORPAL",$J,"A")=0
  1. F S X=$O(^TMP("ORPAL",$J,"A",X)) Q:X="" D
  1. . S IEN=$P(X,";"),PIV=^TMP("ORPAL",$J,"A",X,1)
  1. . S NAME=$$GET1^DIQ(200,IEN,.01)
  1. . S ^TMP("ORPAL",$J,"B",IEN)=NAME_U_PIV
  1. Q
  1. LISTU ;Build a list of providers who have not been assigned the parameter
  1. N CNT,IEN,PRVKEY,NAME
  1. S (NAME,IEN,PRVKEY)="",(CNT,^TMP("ORPUL",$J,"A"))=0
  1. F S NAME=$O(^VA(200,"B",NAME)) Q:NAME="" D
  1. . S IEN=$QS($Q(^VA(200,"B",NAME)),4)
  1. . S PRVKEY=$$PRVKEY^ORWDBA1(IEN) ;Check for provider key
  1. . I PRVKEY=0 Q ;If not a provider quit
  1. . I $D(^TMP("ORPAL",$J,"B",IEN))=1 Q ;If already assigned quit
  1. . ;Build ^TMP("ORPUL"
  1. . S CNT=CNT+1,^TMP("ORPUL",$J,"A")=CNT
  1. . S ^TMP("ORPUL",$J,"B",CNT)=NAME_U_IEN
  1. . S ^TMP("ORPUL",$J,"C",NAME)=CNT
  1. Q
  1. ALERT ;Alert the user, all providers have been assigned the parameter
  1. ;Kill temp globals and quit
  1. N DIR
  1. D SCRHDR S DIR(0)="E"
  1. W !!,$P($T(ALLPA),";",2),!!
  1. D ^DIR K DIR
  1. D KTG Q
  1. ;
  1. DISPRV ;Displays the providers in the unassigned list for user selection
  1. ;PRVNAME is set to null in ORWDBA8 and is reset based on user selection
  1. ;Selection of Q for quit, timeout, and up arrow will set PRVNAME to Q
  1. ;Selection of provider will set PRVNAME to the selected provider's name
  1. ;Prepare for display of providers
  1. ;N CNT,DIR,DTOUT,DUOUT,FST,HC,U,X,Y
  1. S FST=1,U="^"
  1. DPO ;Display process starts here
  1. D SCRHDR
  1. S (X,Y)="",CNT=0,HC=1,DIR(0)=$P($T(SOOPT),";",3)
  1. F X=FST:1:10+(FST-1) Q:$D(^TMP("ORPUL",$J,"B",X))=0 D
  1. . S CNT=CNT+1 S:CNT>10 CNT=1
  1. . S DIR(0)=DIR(0)_CNT_":"_$P(^TMP("ORPUL",$J,"B",X),U)_";"
  1. S:CNT=10 DIR(0)=DIR(0)_";"_$P($T(D0N),";",3)
  1. S:FST>10 DIR(0)=DIR(0)_";"_$P($T(D0P),";",3)
  1. S DIR(0)=DIR(0)_";"_$P($TEXT(D0Q),";",3)
  1. S DIR("A")=$P($T(DA),";",3)
  1. S DIR("?",HC)=$P($T(DH),";",3)
  1. S:CNT=10 HC=HC+1,DIR("?",HC)=$P($T(DHN),";",3)
  1. S:FST>10 HC=HC+1,DIR("?",HC)=$P($T(DHP),";",3)
  1. S DIR("?")=$P($T(DHQ),";",3)
  1. D ^DIR K DIR
  1. I Y="Q"!(Y="")!($D(DTOUT))!($D(DUOUT)) S PRVNAME="Q" Q
  1. I Y="N"!(Y="P") S FST=$S(Y="N":FST+10,1:FST-10) G DPO
  1. S PRVNAME=Y(0) Q
  1. CONMAS ;Confirm the mass assignment of the parameter
  1. ;MRC is set to null and ORWDBA8 and reset based on user selection here
  1. ;DIR array is set to values based on user selection in ORWDBA8
  1. ;Selection of NO, timeout, and up arrow will set MRC=0
  1. ;Selection of YES will set MRC=1
  1. S Y="" D SCRHDR,^DIR K DIR I Y="NO"!($D(DTOUT))!($D(DUOUT)) S MRC=0 Q
  1. S MRC=1 Q
  1. MASASN ;Mass Assignment of the parameter
  1. ;SEL is set in ORWDBA8 by user selection.
  1. ;SEL="E", the parameter is set to 1 to enable Billing Data Capture
  1. ;SEL="D", the parameter is set to 0 to disable Billing Data Capture
  1. N DIR,ENT,ORERR,INST,PAR,U,VAL,X
  1. S (ENT,X)="",U="^",INST=1,VAL=$S(SEL="E":1,1:0)
  1. S PAR=$QS($Q(^XTV(8989.1,"B","OR BILLING AWARENESS BY USER")),4)
  1. D SCRHDR W !!
  1. F X=1:1:^TMP("ORPUL",$J,"A") D
  1. . W "."
  1. . S ENT=$P(^TMP("ORPUL",$J,"B",X),U,2)_";VA(200,"
  1. . D ADD^XPAR(ENT,PAR,INST,VAL,.ORERR)
  1. S DIR(0)="E",DIR("A")=$S(SEL="E":$P($T(MEC),";",3),1:$P($T(MDC),";",3))
  1. D ^DIR K DIR Q
  1. SCRHDR ;Screen Header
  1. W:$D(IOF) @IOF
  1. W !,$P($T(SH),";",3),!
  1. W:SEL="" $P($T(SHA),";",3)
  1. W:SEL="E" $P($T(SHAE),";",3)
  1. W:SEL="D" $P($T(SHAD),";",3)
  1. W:SEL="I" $P($T(SHAI),";",3)
  1. Q
  1. ;;Text for user messages, selection options, user help
  1. ALLPA ;;All providers have been assigned the parameter.
  1. SOOPT ;;SO^
  1. SXOPT ;;SX^
  1. SH ;;Enable Clinical Indicator Data Capture By Provider Parameter Management
  1. SHA ;;Assign Parameter To Provider Option
  1. SHAE ;;Assign/Enable Parameter For All Providers Option
  1. SHAD ;;Assign/Disable Parameter For All Providers Option
  1. SHAI ;;Assign and Enable/Disable Parameter By Individual Provider Option
  1. MMPA ;;All providers have the Enable CIDC By User parameter assigned.
  1. DH ;;Select the provider who the parameter will be assigned to.
  1. DHN ;;Enter N to get the next 10 providers in the list.
  1. DHP ;;Enter P to get the previous 10 providers in the list.
  1. DHQ ;;Enter Q to quit and return to previous menu.
  1. D0N ;;N:Next 10 providers
  1. D0P ;;P:Previous 10 providers
  1. D0Q ;;Q:Quit
  1. DA ;;Select the provider to assign the parameter
  1. MEP ;;Now assigning and enabling the Clinical Indicatr Data Capture parameter
  1. MEC ;;Assignment and enable Clinical Indicator Data Capture complete
  1. MDP ;;Now assigning and disabling the Clinical Indicator Data Capture parameter
  1. MDC ;;Assignment and disable Clinical Indicator Data Capture complete