source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCIPAY.m@ 1604

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1IBCIPAY ;DSI/ESG - Extract data and create Ingenix Payor File ;11-JAN-2001
2 ;;2.0;INTEGRATED BILLING;**161**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5ENTRY ; Entry point for routine (or called from the top)
6 NEW IBCIRTN,STOP,IBCIPATH,IBCIFILE
7 D INIT
8 D INTRO
9 I STOP G EXIT
10 D GETPATH^IBCINPT ; get the file location & Open the file
11 I STOP G EXIT
12 D OUTPUT ; build the file & Close the file
13EXIT ;
14 ; Routine Exit
15 Q
16 ;
17 ;
18INIT ; Procedure to initialize some routine-wide variables
19 S IBCIRTN="IBCIPAY" ; routine name, IO handle
20 S STOP=0 ; stop flag
21 S IBCIFILE="IBCIPAY.DAT" ; name of file that gets created
22INITX ;
23 Q
24 ;
25 ;
26INTRO ; This procedure displays introductory text and asks if the user
27 ; wants to proceed with the creation of the PAYOR file.
28 ;
29 W @IOF
30 NEW Y,IBCIMSG,DIR,X,DTOUT,DUOUT,DIRUT,DIROUT
31 ;
32 S IBCIMSG(1)=" This option is responsible for creating the Payor File"
33 S IBCIMSG(2)=" for the ClaimsManager application from Ingenix. This"
34 S IBCIMSG(3)=" is a listing of the Insurance Companies that are currently"
35 S IBCIMSG(4)=" stored in VistA."
36 S IBCIMSG(5)=""
37 ;
38 DO EN^DDIOL(.IBCIMSG)
39 ;
40 ; Now for the user response
41 ;
42 S DIR(0)="Y"
43 S DIR("A")=" Do you wish to proceed"
44 S DIR("B")="NO"
45 DO ^DIR
46 I 'Y S STOP=1
47INTROX ;
48 Q
49 ;
50 ;
51OUTPUT ; This procedure displays a VistA "please wait" message to the user
52 ; while it loops through the "B" cross reference to the INSURANCE
53 ; COMPANY FILE (#36). The file is closed here and a confirmation
54 ; message is shown to the user.
55 ;
56 NEW INSNAME,COUNT,IEN,IBCIMSG,POP,X,X1,X2,X3,X4,Y
57 DO WAIT^DICD
58 ;
59 ; Use the file for writing
60 U IO
61 ;
62 ; loop through and write the data
63 S INSNAME="",COUNT=0
64 F S INSNAME=$O(^DIC(36,"B",INSNAME)) Q:INSNAME="" D
65 . S IEN=0
66 . F S IEN=$O(^DIC(36,"B",INSNAME,IEN)) Q:'IEN D
67 .. I $P($G(^DIC(36,IEN,0)),U,5) Q ; INACTIVE flag
68 .. I $P($G(^DIC(36,IEN,5)),U,1) Q ; SCHEDULED FOR DELETION flag
69 .. S X=IEN,X1=20,X4="T" W $$FILL^IBCIUT2
70 .. S X=INSNAME,X1=40,X4="T" W $$FILL^IBCIUT2
71 .. W !
72 .. S COUNT=COUNT+1
73 .. Q
74 . Q
75 ;
76 ; The file has been created so close it and tell the user
77 DO CLOSE^%ZISH(IBCIRTN)
78 U IO(0)
79 S IBCIMSG(1)=" There are "_COUNT_" records in the Payor File."
80 S IBCIMSG(2)=" The Payor File creation process is complete!"
81 S IBCIMSG(3)=""
82 S IBCIMSG(1,"F")="!!"
83 DO EN^DDIOL(.IBCIMSG)
84 ;
85OUTPUTX ;
86 Q
87 ;
Note: See TracBrowser for help on using the repository browser.