source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWDBA83.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 9.2 KB
Line 
1ORWDBA83 ; SLC/GDU - Billing Awareness - Phase I [10/18/04 10:52]
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**195**;Dec 17, 1997
3 ;
4 ;Enable Clinical Indicator Data Capture By Provider Parameter Module
5 ;ORWDBA83 - Assign the parameter to a selected provider and manually set
6 ; the CIDC by provider parameter to enable/disable the CIDC
7 ; functionality
8 ;
9 ;Local Variables
10 ;CNT Counter - Used to get count of providers who do not have
11 ; the parameter assigned to them.
12 ;DIR Input array variable for ^DIR
13 ;DTOUT Timeout indicator, output variable of ^DIR
14 ;DUOUT Up arrow indicator, output variable of ^DIR
15 ;OREM Error Message, output from FIND^DIC
16 ;ENT Entity the parameter is assigned to, input variable for
17 ; ADD^XPAR
18 ;FILE File Number of file searched, input variable for FIND^DIC
19 ;FLD Field Number of fields to be returned in oputput, input
20 ; variable for FIND^DIC
21 ;FLG Flags for search method and output format, input variable
22 ; for FIND^DIC
23 ;FST First, a control variable to help build DIR(0) in MT10P
24 ;HC Help Count, a control variable to help build DIR("?"
25 ; in MT10P.
26 ;ID Indentifier, input variable for FIND^DIC
27 ;IEN Internal Entry Number, standard FileMan variable for a
28 ; record's internal id number. Input variable for
29 ; FIND^DIC. Used to build ENT.
30 ;IND Index, input variable for FIND^DIC
31 ;INST Instance indicator, input variable for ENVAL^XPAR
32 ;IOF Clear Screen and move cursor to top of screen, standard
33 ; Kernal IO variable
34 ;NAME Provider Name, parsed from RF output array from FIND^DIC
35 ;NUM Maximum number of records to return, input variable for
36 ; FIND^DIC
37 ;NX0 Next group of providers prompt, used to help build DIR(0)
38 ;NXC Next group of providers count, used to help build DIR(0)
39 ;NXH Next group of providers help, used to help build DIR("?"
40 ;PAR The Name or IEN of a parameter in the PARAMETER DEFINITION
41 ; FILE, input variable for ADD^XPAR
42 ;RF Records Found, the array variable with the results found
43 ; by FIND^DIC
44 ;RFC Records Found Count, The first piece of the zero node in
45 ; the output array from FIND^DIC with the total number
46 ; records returned
47 ;ORSCR Screen, an input variable for FIND^DIC to filter out
48 ; records from the search.
49 ;SP Selected Provider, set to the value of Y when the user
50 ; selects a provider from the list of providers returned
51 ; by FIND^DIC
52 ;U FileMan standard variable for data delimiter, equals "^"
53 ;VAL Value of the parameter being added, input variable for
54 ; ADD^XPAR
55 ;X Standard FileMan work varaible
56 ;X1
57 ;Y Processed output of user selection, output variable for
58 ; ^DIR
59 ;
60 ;Global Variables
61 ;^XTV(8989.51 PARAMETER DEFINITION FILE, file # 8989.51
62 ;
63 ;External References
64 ;FIND^DIC FileMan silent database call, returns an array of records
65 ; matching or partly matching a value searched on.
66 ;^DIR FileMan general purpose response reader
67 ;KTG^ORWDBA8 Kills the temp globals
68 ;LISTA^ORWDBA8
69 ; Builds temp global ^TMP("ORPAL", a list of providers who
70 ; have the Enable CIDC parameter assigned to them.
71 ;LISTU^ORWDBA8
72 ; Builds temp global ^TMP("ORPUL", a list of providers who
73 ; do not have the Enable CIDC parameter assigned to them.
74 ;ADD^XPAR PARAMETER TOOLS, API to add a new parameter value
75 ;
76START ;Starting point of this program
77 N CNT,DIR,DTOUT,DUOUT,OREM,ENT,FILE,FLD,FLG,FST,HC,ID,IEN,IND,INST,NAME
78 N NUM,NX0,NXC,NXH,PAR,RF,RFC,ORSCR,SP,VAL,X,X1,Y
79 ;Ask user for provider
80 S DIR(0)=$P($T(FT0),";",3)
81 S DIR("A")=$P($T(FA),";",3)
82 S DIR("?",1)=$P($T(FH1),";",3)
83 S DIR("?",2)=$P($T(FH2),";",3)
84 S DIR("?",3)=$P($T(FH3),";",3)
85 S DIR("?")=$P($T(FH4),";",3)
86 D SCRHDR,^DIR
87 ;Process user entry, search for provider
88 I Y=""!($D(DTOUT))!($D(DUOUT)) G EXIT
89 S FILE=200,FLD="@;.01",FLG="CP",(ID,IEN,IND,SP)="",NUM="*",VAL=Y
90 S ORSCR="I $D(^XUSEC(""PROVIDER"",Y)"
91 S ORSCR("S")="I $D(^TMP(""ORPUL"",$J,""A"",Y))=1"
92 D FIND^DIC(FILE,IEN,FLD,FLG,VAL,NUM,IND,.ORSCR,ID,"RF","OREM")
93 S RFC=$P(RF("DILIST",0),U)
94 ;No matchs found alert user
95 I RFC=0 D ALERT G START
96 ;Single match found skip to parameter assign
97 I RFC=1 S SP=RFC D ASSIGN G START
98 ;10 or less matchs found, present for user selection
99 I RFC<10!(RFC=10) D LTE10P
100 ;More than 10 matchs found, present for user selection
101 I RFC>10 S FST=1 D MT10P
102 ;Process user selection from LTE10P or MT10P
103 I SP="Q" G EXIT
104 I SP="" D KILLVAR G START
105 D ASSIGN G START
106EXIT ;Exit point for this program
107 Q
108ALERT ;Alert the user that the selection returned no records.
109 K DIR,X1
110 S DIR(0)="E",X1=""
111 S DIR("A",1)=$P($T(UA1),";",3)_" "_VAL_"."
112 F X=2:1:5 S X1="UA"_X,DIR("A",X)=$P($T(@X1),";",3)
113 S DIR("A")=$P($T(UA6),";",3)
114 D SCRHDR,^DIR
115 D KILLVAR
116 Q
117ASSIGN ;Assign the parameter and enable/disable CIDC functionality
118 S IEN=$P(RF("DILIST",SP,0),U),NAME=$P(RF("DILIST",SP,0),U,2)
119 S DIR(0)=$P($T(SCO),";",3)_$P($T(PE),";",3)_";"_$P($T(PD),";",3)
120 S DIR("A")=$P($T(PA),";",3)
121 S DIR("?",1)=$P($T(PHE),";",3),DIR("?")=$P($T(PHE),";",3)
122 D SCRHDR
123 W !!,$P($T(M1),";",3)," ",NAME," ",$P($T(M2),";",3),!,$P($T(M3),";",3)
124 D ^DIR
125 I Y=""!($D(DTOUT))!($D(DUOUT)) Q
126 S VAL=$S(Y="E":1,1:0),ENT=IEN_";VA(200,",INST=1,OREM=""
127 S PAR=$QS($Q(^XTV(8989.51,"B","OR BILLING AWARENESS BY USER")),4)
128 D ADD^XPAR(ENT,PAR,INST,VAL,.OREM)
129 D KILLVAR,KTG,LISTA,LISTU
130 Q
131LTE10P ;If search returned a list less then or equal to 10
132 D SETDIR
133 F X=1:1:RFC S DIR(0)=DIR(0)_X_":"_$P(RF("DILIST",X,0),U,2)_";"
134 D SCRHDR,^DIR
135 I $D(DTOUT)!($D(DUOUT)) S SP="Q"
136 E S SP=Y
137 Q
138MT10P ;If search returned more then 10 providers
139 D SETDIR
140 S CNT=0,HC=1,(NXC,NX0,NXH,SP,X,Y)=""
141 F X=FST:1:10+(FST-1) Q:$D(RF("DILIST",X,0))=0 D
142 . S CNT=CNT+1
143 . S DIR(0)=DIR(0)_X_":"_$P(RF("DILIST",X,0),U,2)_";"
144 S NXC=RFC-X,NXC=$S(NXC>10:10,1:NXC)
145 S NX0=$P($P($T(D0N),";",3),"|",1)_NXC_$P($P($T(D0N),";",3),"|",2)
146 S NXH=$P($P($T(DHN),";",3),"|",1)_NXC_$P($P($T(DHN),";",3),"|",2)
147 S:CNT=10 DIR(0)=DIR(0)_";"_NX0
148 S:FST>10 DIR(0)=DIR(0)_";"_$P($T(D0P),";",3)
149 S:CNT=10 HC=HC+1,DIR("?",HC)=NXH
150 S:FST>10 HC=HC+1,DIR("?",HC)=$P($T(DHP),";",3)
151 D SCRHDR,^DIR
152 I $D(DTOUT)!($D(DUOUT)) S SP="Q" Q
153 I Y="N"!(Y="P") S FST=$S(Y="N":FST+10,1:FST-10) G MT10P
154 S SP=Y Q
155 ;
156SETDIR ;Set common values for DIR used by LTE10P and MT10P
157 K DIR
158 S DIR(0)=$P($T(SCO),";",3)
159 S DIR("?",1)=$P($T(DH),";",3)
160 S DIR("?")=$P($T(DHS),";",3)
161 S DIR("A")=$P($T(DA),";",3)
162 Q
163SCRHDR ;Screen Header
164 W:$D(IOF) @IOF
165 W !,$P($T(SH1),";",3),!,$P($T(SH2),";",3),!
166 Q
167KILLVAR ;Kill variables to prepare for next look up
168 K DIR,DTOUT,DUOUT,OREM,ENT,FILE,FLD,FLG,ID,IEN,IND,INST,NAME,NUM,NXC,NX0
169 K NXH,RF,RFC,ORSCR,SP,VAL,X,X1,Y
170 Q
171KTG ;Kill the temp globals used by this program
172 K ^TMP("ORPAL",$J),^TMP("ORPUL",$J) Q
173LISTA ;Build a list of providers with the parameter already assigned to them.
174 N ORERR,GBL,IEN,INST,LIST,PAR,X
175 S LIST="^TMP(""ORPAL"",$J,""A"")",(INST,GBL)=1,ORERR=""
176 S PAR=$QS($Q(^XTV(8989.51,"B","OR BILLING AWARENESS BY USER")),4)
177 D ENVAL^XPAR(LIST,PAR,INST,.ORERR,GBL)
178 S (IEN,X)="" F S X=$O(^TMP("ORPAL",$J,"A",X)) Q:X="" D
179 . S IEN=$P(X,";"),^TMP("ORPAL",$J,"B",IEN)=""
180 Q
181LISTU ;Build a list of providers who have not been assigned the parameter
182 N CNT,IEN
183 S IEN="",CNT=0,^TMP("ORPUL",$J,"A")=CNT
184 F S IEN=$O(^XUSEC("PROVIDER",IEN)) Q:IEN="" D
185 . I $D(^TMP("ORPAL",$J,"A",IEN_";VA(200,",1))=1 Q
186 . S CNT=CNT+1,^TMP("ORPUL",$J,"A")=CNT
187 . S ^TMP("ORPUL",$J,"A",IEN)=IEN_";VA(200,"
188 Q
189 ;;Text used to build options, user messages, and help
190FT0 ;;FO^1:40
191FA ;;Select the provider to assign the parameter
192FH1 ;;Enter the name/partial name of the provider to assign the parameter.
193FH2 ;;This is free text, 1 to 40 characters in length.
194FH3 ;;This search will only return those with the PROVIDER key and who
195FH4 ;;do not have the CIDC parameter assigned to them.
196SCO ;;SO^
197SH1 ;;Enable Clinical Indicator Data Capture By Provider Parameter Management
198SH2 ;;Assign and Enable/Disable Parameter By Individual Provider Option
199UA1 ;;Found no records matching the search criteria of
200UA2 ;;The reasons for this could be that during the search:
201UA3 ;; 1. The parameter is already assigned to any provider found.
202UA4 ;; 2. No providers found.
203UA5 ;; 3. No records found.
204UA6 ;;Please try again
205M1 ;;You have selected
206M2 ;;to assign the Enable Clinical Indicator Data
207M3 ;;Capture By Provider parameter to.
208PE ;;E:Assign parameter and Enable CIDC for this provider
209PD ;;D:Assign parameter and Disable CIDC for this provider
210PA ;;Assign the parameter to this provider
211PHE ;;Enter E to assign the parameter and enable CIDC for this provider.
212PHD ;;Enter D to assign the parameter and disable CIDC for this provider.
213D0N ;;N:Next | providers
214D0P ;;P:Previous 10 providers
215DH ;;Select the provider who the parameter will be assigned to.
216DHN ;;Enter N to get the next | providers.
217DHP ;;Enter P to get the previous 10 providers.
218DHS ;;Enter "^" to exit or the Enter key to return to provider lookup.
219DA ;;Select the provider to assign the parameter
Note: See TracBrowser for help on using the repository browser.