source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNERPB.m@ 812

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

initial load of FOIAVistA 6/30/08 version

File size: 6.8 KB
Line 
1IBCNERPB ;DAOU/RO - IIV PAYER LINK REPORT ;AUG-2003
2 ;;2.0;INTEGRATED BILLING;**184,252,271**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ; IIV - Insurance Identification and Verification Interface
6 ;
7 ; Input parameters: N/A
8 ; Other relevant variables ZTSAVED for queueing:
9 ; IBCNERTN = "IBCNERPB" (current routine name for queueing the
10 ; COMPILE process)
11 ; ********
12 ; IBCNESPC("REP")=1 for Payer List report, 2 for Company List
13 ; IBCNESPC("PTYPE")=Payer type (1-no active ins linked, 2-at least 1 ins linked, 3-All Payers)
14 ; IBCNESPC("PSORT")=Primary Sort for Payer report
15 ; IBCNESPC("PPYR")=single Payer name or '' for all
16 ; IBCNESPC("PDET")=Ins detail on payer report (1-include list of ins,2-do not list)
17 ;
18 ; IBCNESPC("ITYPE")=Ins Company type (1-no payer link, 2-linked to payer, 3-All ins companies)
19 ; IBCNESPC("ISORT")=Primary Sort for Payer Insurance report
20 ; IBCNESPC("IMAT")=Partial matching Ins carriers
21 ; Only call this routine at a tag
22 Q
23 ;
24EN ; Main entry pt
25 ; Init vars
26 N STOP,IBCNERTN,POP,IBCNESPC
27 ;
28 S STOP=0
29 S IBCNERTN="IBCNERPB"
30 W @IOF
31 W !,"IIV Payer Link Report",!
32 W !,"In order for an Insurance Company to be eligible for electronic insurance"
33 W !,"eligibility communications via the IIV software, the Insurance Company"
34 W !,"needs to be linked to an appropriate payer from the National EDI Payer list."
35 W !,"The National EDI Payer list contains the names of the payers that are"
36 W !,"currently participating with the IIV process."
37 W !!,"This report option provides information to assist with finding unlinked"
38 W !,"insurance companies or payers, which can subsequently be linked through the"
39 W !,"INSURANCE COMPANY EDIT option."
40 ;
41 ; Report type
42R05 D RTYPE I STOP G:$$STOP EXIT G R05
43 S IBCNESPC("PPYR")=""
44 ; If rpt by ins company, go to questions
45 I $G(IBCNESPC("REP"))=2 G R120
46 ; Payer type params
47R20 D PAYER I STOP G:$$STOP EXIT G R05
48 I IBCNESPC("PPYR")'="" S IBCNESPC("PTYPE")=3 G R30
49 ; Payer details
50R25 D PTYPE I STOP G:$$STOP EXIT G R20
51 S IBCNESPC("PDET")=2 I IBCNESPC("PTYPE")=1 G R40
52 ; insurance company details
53R30 D PDET I STOP G:$$STOP EXIT G R25
54 I IBCNESPC("PPYR")'="" S IBCNESPC("ISORT")=1 G R100
55 ; Type of data to return param
56R40 D PSORT I STOP G:$$STOP EXIT G R20
57 G R100
58 ; Payer type params
59R120 D ITYPE^IBCNERPC I STOP G:$$STOP EXIT G R05
60 ; Partial Ins Name to include
61R130 D IMAT^IBCNERPC I STOP G:$$STOP EXIT G R120
62 I IBCNESPC("ITYPE")=1 S IBCNESPC("ISORT")=1 G R100
63 ; Type of data to return param
64R140 D ISORT^IBCNERPC I STOP G:$$STOP EXIT G R130
65 ; Select output device
66R100 ; Issue output width warning if not queued
67 I IBCNERTN="IBCNERPB",'$D(ZTQUEUED) W !!!,"*** This report is 132 characters wide ***",!
68 D DEVICE(IBCNERTN,.IBCNESPC) I STOP G:$$STOP EXIT G R05
69 G EXIT
70 ;
71EXIT ; Exit pt
72 Q
73 ;
74 ;
75COMPILE(IBCNERTN,IBCNESPC) ;
76 ; Entry point called from EN^XUTMDEVQ in either direct or queued mode.
77 ; Input params:
78 ; IBCNERTN = Routine name for ^TMP($J,...
79 ; IBCNESPC = Array passed by ref of the report params
80 ;
81 ; Init scratch globals
82 K ^TMP($J,IBCNERTN)
83 ; Compile
84 I IBCNERTN="IBCNERPB" D EN^IBCNERPC(IBCNERTN,.IBCNESPC)
85 ; Print
86 I '$G(ZTSTOP) D
87 . I IBCNERTN="IBCNERPB" D EN3^IBCNERPD(IBCNERTN,.IBCNESPC)
88 ; Close device
89 D ^%ZISC
90 ; Kill scratch globals
91 K ^TMP($J,IBCNERTN)
92 ; Purge task record
93 I $D(ZTQUEUED) S ZTREQ="@"
94 ;
95COMPILX ; COMPILE exit pt
96 Q
97 ;
98STOP() ; Determine if user wants to exit out of the whole option
99 ; Init vars
100 N DIR,X,Y,DIRUT
101 ;
102 W !
103 S DIR(0)="Y"
104 S DIR("A")="Do you want to exit out of this option entirely"
105 S DIR("B")="YES"
106 S DIR("?",1)=" Enter YES to immediately exit out of this option."
107 S DIR("?")=" Enter NO to return to the previous question."
108 D ^DIR K DIR
109 I $D(DIRUT) S (STOP,Y)=1 G STOPX
110 I 'Y S STOP=0
111 ;
112STOPX ; STOP exit pt
113 Q Y
114 ;
115RTYPE ; Prompt to allow users to select main report option
116 ; Init vars
117 N DIR,X,Y,DIRUT
118 ;
119 S DIR(0)="S^1:Payer List;2:Insurance Company List"
120 S DIR("A")="Select a report option"
121 S DIR("B")=1
122 S DIR("?",1)=" 1 - Payer List: This option lists the payers in the National"
123 S DIR("?",2)=" Payer list, and optionally provides information about"
124 S DIR("?",3)=" the insurance companies that are linked to that payer"
125 S DIR("?",4)=" 2 - Insurance"
126 S DIR("?",5)=" Company List: This option lists insurance companies and"
127 S DIR("?")=" optionally displays linked payer information"
128 D ^DIR K DIR
129 I $D(DIRUT) S STOP=1 G RTYPEX
130 S IBCNESPC("REP")=Y
131 ;
132RTYPEX ; RTYPE exit pt
133 Q
134 ;
135PTYPE ; Prompt to select Payer Type to include
136 ; Init vars
137 N DIR,X,Y,DIRUT
138 ;
139 S DIR(0)="S^1:Unlinked Payers;2:Linked Payers;3:ALL Payers"
140 S DIR("A")="Select the type of payers to display"
141 S DIR("B")="3"
142 S DIR("?",1)=" 1 - Only payers with no active insurance companies linked"
143 S DIR("?",2)=" 2 - Only payers with at least one insurance company linked"
144 S DIR("?")=" 3 - ALL Payers"
145 D ^DIR K DIR
146 I $D(DIRUT) S STOP=1 G PTYPEX
147 S IBCNESPC("PTYPE")=Y
148 ;
149PTYPEX ; TYPE exit pt
150 Q
151PAYER ; Select Payer - File #365.12
152 ; Init vars
153 NEW DIC,DTOUT,DUOUT,X,Y
154 ;
155 W !!!
156 S DIC(0)="ABEQ"
157 S DIC("A")=$$FO^IBCNEUT1("Select a Payer (RETURN for ALL Payers): ",39,"L")
158 ; Do not allow '~NO PAYER' or non-IIV payers
159 S DIC("S")="I ($P(^(0),U,1)'=""~NO PAYER""),$$PYRAPP^IBCNEUT5(""IIV"",$G(Y))'="""""
160 S DIC="^IBE(365.12,"
161 D ^DIC
162 I $D(DUOUT)!$D(DTOUT) S Y="" S STOP=1 G PAYERX
163 I Y=-1 S Y=""
164 S IBCNESPC("PPYR")=Y
165PAYERX ; Prompt for ending Payer value
166 Q
167PDET ; Prompt to select to display Insurance Company details to include
168 ; Init vars
169 N DIR,X,Y,DIRUT
170 ;
171 S DIR(0)="S^1:List linked insurance company detail;2:Do not list linked insurance company detail"
172 S DIR("A")="Select insurance company detail option"
173 S DIR("B")="1"
174 S DIR("?",1)=" 1 - Include a list of insurance companies linked to the payers"
175 S DIR("?")=" 2 - Do not list linked insurance companies, total number only"
176 D ^DIR K DIR
177 I $D(DIRUT) S STOP=1 G PDETEX
178 S IBCNESPC("PDET")=Y
179 ;
180PDETEX ; TYPE exit pt
181 Q
182 ;
183PSORT ; Prompt to allow users to select primary sort
184 ; Init vars
185 N DIR,X,Y,DIRUT
186 ;
187 S DIR(0)="S^1:Payer Name;2:VA National Payer ID;3:Nationally Enabled Status;4:Locally Enabled Status;5:# of Linked Insurance Companies"
188 S DIR("A")="Select the primary sort field"
189 S DIR("B")=1
190 S DIR("?")=" Select a data field by which this report should be primarily sorted."
191 D ^DIR K DIR
192 I $D(DIRUT) S STOP=1 G PSORTX
193 S IBCNESPC("PSORT")=Y
194 ;
195PSORTX ; SORT exit pt
196 Q
197 ;
198DEVICE(IBCNERTN,IBCNESPC) ; Device Handler and possible TaskManager calls
199 ;
200 ; Input params:
201 ; IBCNERTN = Routine name for ^TMP($J,...
202 ; IBCNESPC = Array passed by ref of the report params
203 ;
204 ; Init vars
205 N ZTRTN,ZTDESC,ZTSAVE,POP
206 ;
207 S ZTRTN="COMPILE^IBCNERPB("""_IBCNERTN_""",.IBCNESPC)"
208 S ZTDESC="IBCNE IIV Payer Link Report"
209 S ZTSAVE("IBCNESPC(")=""
210 S ZTSAVE("IBCNERTN")=""
211 D EN^XUTMDEVQ(ZTRTN,ZTDESC,.ZTSAVE)
212 I POP S STOP=1
213 ;
214DEVICEX ; DEVICE exit pt
215 Q
Note: See TracBrowser for help on using the repository browser.