source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWDBA12.m@ 1353

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

initial load of FOIAVistA 6/30/08 version

File size: 7.9 KB
Line 
1ORWDBA12 ; SLC/GDU - Billing Awareness - Phase I [10/18/04 10:24]
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**195**;Dec 17, 1997
3 ;
4 ;Enable Clinical Indicator Data Capture By Provider Parameter Module
5 ;ORWDBA12 - Delete the assigned parameter
6 ;
7 ;This program is used to delete the assigned parameter of a selected
8 ;provider.
9 ;
10 ;Programs Called:
11 ; GETS^DIQ Silent FileMan DBS call to get provider information
12 ; ^DIR General purpose response reader
13 ; DEL^XPAR Deletes the selected parameter
14 ; ENVAL^XPAR Returns list of records related to the parameter
15 ;
16 ;Variables used:
17 ; BAEI Billing Awareness Enabled Parameter Internal value
18 ; DIR Input array variable for ^DIR
19 ; DTOUT Timeout indicator output variable for ^DIR
20 ; DUOUT Up Arrow '^' indictor output variable for ^DIR
21 ; ENT Enitity, input variable for ^XPAR
22 ; ORERR Error, output variable for ^XPAR, and ^DIQ
23 ; FILE File number, input variable for ^DIQ
24 ; FLD Field number, input variable for ^DIQ
25 ; FLG Flag, input parameters variable for ^DIQ
26 ; FST Work variable controls build of user selection display
27 ; GBL Global, input parameter to direct ^XPAR output to a global
28 ; HC Help Count, work variable to set help text lines for ^DIR
29 ; INST Instance, input variable for ^XPAR
30 ; LIST List, output variable for ^XPAR
31 ; OPTCNT Option Count, counter variable to build options display
32 ; input variable for ^DIR
33 ; PAR Parameter, IEN of the parameter being worked with, input
34 ; variable for ^XPAR
35 ; PRVCNT Provider Count, counter variable to determine the number
36 ; of providers with the parameter assigned to them
37 ; PRVIEN Provider IEN, the internal entry number of the provider
38 ; PRVNAME Provider Name, the name of the provider
39 ; RF Record Found, output variable for ^DIQ
40 ; SELKEY Selected Key, work variable the IEN of the temp global
41 ; indicating the user's selection.
42 ; U Delemiter variable, defaulted to ^
43 ; X Standard work variable
44 ; Y Processed user selection output variable for ^DIC
45 ;
46 ;Globals Used:
47 ;^XTV(8989.51,"B"
48 ; Standard B index for the Parameters file.
49 ; ^XTV(8989.51,"B",Parameter Name,Parameter IEN)
50 ;^TMP("ORPAL",$J
51 ; Multipurpose temp global used for the delete process
52 ; Output global for ^XPAR
53 ; ^TMP("ORPAL",$J,"A")=total records returned
54 ; ^TMP("ORPAL",$J,"A",Provider IEN_";VA(200,",1)=parameter value
55 ; First pass processing of ^XPAR output
56 ; ^TMP("ORPAL",$J,"B",Provider Name)=IEN^param value
57 ; Second pass processing of ^XPAR output, work data for program
58 ; ^TMP("ORPAL",$J,"C",Record Count)=Name^IEN^param value
59 ; Third pass processing of ^XPAR output, input data for ^DIR, used
60 ; to create the user selection interface
61 ; ^TMP("ORPAL",$J,"D",Provider Name)=Record Count from "C"
62MAIN ;Main starting point for the delete assigned Enable BA By User
63 ;process
64 N BAEI,DIR,DTOUT,DUOUT,ENT,ORERR,FILE,FLD,FLG,FST,GBL,HC,INST,LIST
65 N OPTCNT,PAR,PRVCNT,PRVIEN,PRVNAME,RF,SELKEY,U,X,Y
66 K ^TMP("ORPAL",$J),^TMP("SPL",$J)
67 S U="^",(INST,GBL)=1
68 S PAR=$QS($Q(^XTV(8989.51,"B","OR BILLING AWARENESS BY USER")),4)
69BLDLST ;Build list of providers with the Enable CIDC By User parameter already
70 ;assigned to them.
71 S LIST="^TMP(""ORPAL"",$J,""A"")"
72 D ENVAL^XPAR(LIST,PAR,INST,.ORERR,GBL)
73 I ^TMP("ORPAL",$J,"A")=0 D G EXIT
74 . D SCRHDR
75 . S DIR(0)="E"
76 . S DIR("A",1)=$P($T(NPA1),";",2)
77 . S DIR("A",2)=$P($T(NPA2),";",2)
78 . S DIR("A",3)=$P($T(NPA3),";",2)
79 . S DIR("A")=$P($T(NPA4),";",2)
80 . W !!! D ^DIR K DIR
81 S FILE=200,FLD=.01,(BAEI,FLG,PRVIEN,PRVNAME,X)=""
82 F S X=$O(^TMP("ORPAL",$J,"A",X)) Q:X="" D
83 . S PRVIEN=$P(X,";")
84 . S BAEI=^TMP("ORPAL",$J,"A",X,1)
85 . K RF,ERR
86 . D GETS^DIQ(FILE,PRVIEN,FLD,FLG,"RF","ERR")
87 . S PRVNAME=RF(FILE,PRVIEN_",",.01)
88 . S ^TMP("ORPAL",$J,"B",PRVNAME)=PRVIEN_U_BAEI
89 S PRVNAME="",PRVCNT=0
90 F S PRVNAME=$O(^TMP("ORPAL",$J,"B",PRVNAME)) Q:PRVNAME="" D
91 . S PRVCNT=PRVCNT+1
92 . S ^TMP("ORPAL",$J,"C",PRVCNT)=PRVNAME_U_^TMP("ORPAL",$J,"B",PRVNAME)
93 S PRVNAME="",PRVCNT=0
94 F S PRVCNT=$O(^TMP("ORPAL",$J,"C",PRVCNT)) Q:PRVCNT="" D
95 . S PRVNAME=$P(^TMP("ORPAL",$J,"C",PRVCNT),U)
96 . S ^TMP("ORPAL",$J,"D",PRVNAME)=PRVCNT
97 S FST=1 ;Prepare for display
98DISOPT ;Display the list of providers with the Enable BDC By User parameter
99 ;assigned to them. The user selects from this list the provider
100 ;whose parameter is to be deleted.
101DO1 S FST=1 ;Prepare for display
102DO2 D SCRHDR ;Display starts here
103 S (OPTCNT,PRVNAME,X)="",DIR(0)="SO"_U
104 F X=FST:1:10+(FST-1) Q:$D(^TMP("ORPAL",$J,"C",X))=0 D
105 . S OPTCNT=OPTCNT+1
106 . S:OPTCNT>10 OPTCNT=1
107 . S PRVNAME=$P(^TMP("ORPAL",$J,"C",X),U)
108 . S DIR(0)=DIR(0)_OPTCNT_":"_PRVNAME_";"
109 S:OPTCNT=10 DIR(0)=DIR(0)_";"_$P($T(D0N),";",2)
110 S:FST>10 DIR(0)=DIR(0)_";"_$P($T(D0P),";",2)
111 S DIR(0)=DIR(0)_";"_$P($T(D0Q),";",2)
112 S HC=1,DIR("?",HC)=$P($T(DHD),";",2)
113 S:OPTCNT=10 HC=HC+1,DIR("?",HC)=$P($T(DHN),";",2)
114 S:FST>10 HC=HC+1,DIR("?",HC)=$P($T(DHP),";",2)
115 S DIR("A")=$P($T(DAD),";",2)
116 S DIR("?")=$P($T(DHQ),";",2)
117 D ^DIR K DIR
118 I Y="Q"!(Y="")!($D(DTOUT))!($D(DUOUT)) G EXIT
119 I Y="N" S FST=FST+10 G DO2
120 I Y="P" S FST=FST-10 G DO2
121 S PRVNAME=Y(0),(SELKEY,PRVIEN)=""
122 S SELKEY=^TMP("ORPAL",$J,"D",PRVNAME)
123 S PRVIEN=$P(^TMP("ORPAL",$J,"C",SELKEY),U,2)
124 S BAEI=$P(^TMP("ORPAL",$J,"C",SELKEY),U,3)
125DELETE ;Confirm the selected provider and delete the selected provider's
126 ;assigned Enable BDC By User parameter
127 D SCRHDR
128 W !!,$P($P($T(DPM),";",2),"|"),PRVNAME,$P($P($T(DPM),";",2),"|",2)
129 I BAEI=1 W !,$P($T(DPEM),";",2)
130 E W !,$P($T(DPDM),";",2)
131 S DIR(0)="Y"
132 S DIR("A")=$P($T(DPA),";",2)
133 S DIR("B")="N"
134 S DIR("?",1)=$P($T(DPHY),";",2)
135 S DIR("?")=$P($T(DPHN),";",2)
136 D ^DIR K DIR
137 I $D(DTOUT)!($D(DUOUT)) Q
138 I Y=1 D
139 . S ENT=PRVIEN_";VA(200,"
140 . D DEL^XPAR(ENT,PAR,INST,.ORERR)
141AGAIN ;Ask the user if they want to do the delete process again.
142 S DIR(0)="Y"
143 S DIR("A")=$P($T(ADA),";",2)
144 S DIR("B")="N"
145 S DIR("?",1)=$P($T(ADHY),";",2)
146 S DIR("?")=$P($T(ADHN),";",2)
147 W !! D ^DIR K DIR
148 I Y=1 G MAIN
149 G EXIT
150NPA ;No Parameter Set
151 ;Error trap for no Enable BDC By User parameter are currently assigned
152 D SCRHDR
153 S DIR(0)="E"
154 S DIR("A",1)=$P($T(NPA1),";",2)
155 S DIR("A",2)=$P($T(NPA2),";",2)
156 S DIR("A",3)=$P($T(NPA3),";",2)
157 S DIR("A")=$P($T(NPA4),";",2)
158EXIT ;Common exit point for this program
159 K ^TMP("ORPAL",$J)
160 Q
161SCRHDR ;Screen Header Display
162 W:$D(IOF) @IOF
163 W !,"Enable Clinical Indicator Data Capture By Provider Parameter Management"
164 W !,"Delete Assigned Parameter"
165 Q
166 ;Text for the user prompt in NPA
167NPA1 ;No providers currently have the parameter assigned to them.
168NPA2 ;You will need to select the 'Assign parameter to provider' option and
169NPA3 ;assign this parameter to the providers.
170NPA4 ;Press the return key or '^' to continue
171 ;This is the text to build the DIR variables for use with ^DIR in
172 ;DISOPT
173D0N ;N:Next 10 Providers
174D0P ;P:Previous 10 Providers
175D0Q ;Q:Quit
176DAD ;Select the provider to delete the assigned parameter
177DHD ;Select the provider whose assigned parameter value is to be deleted.
178DHN ;Enter N for the next 10 providers in the list.
179DHP ;Enter P for the previous 10 providers in the list.
180DHQ ;Enter Q to quit and return to the previous menu
181 ;This is the text to build the DIR variable for use with ^DIR in DELETE
182 ;and the user message.
183DPM ;You have selected | to delete.
184DPEM ;Clinical Indicator Data Capture for this provider is currently enabled.
185DPDM ;Clinical Indicator Data Capture for this provider is currently disabled.
186DPA ;Are you sure that you want to delete this provider's parameter
187DPHY ;Enter Y for Yes to confirm deletion of this provider's parameter.
188DPHN ;Enter N for No to not delete this provider's parameter.
189 ;This is the text to build the DIR variable for use with ^DIR in AGAIN
190ADA ;Delete another provider's parameter
191ADHY ;Enter Y for Yes to delete another provider's parameter.
192ADHN ;Enter N for No to not delete another provider's parameter.
Note: See TracBrowser for help on using the repository browser.