IBCIPAY ;DSI/ESG - Extract data and create Ingenix Payor File ;11-JAN-2001
;;2.0;INTEGRATED BILLING;**161**;21-MAR-94
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
ENTRY ; Entry point for routine (or called from the top)
NEW IBCIRTN,STOP,IBCIPATH,IBCIFILE
D INIT
D INTRO
I STOP G EXIT
D GETPATH^IBCINPT ; get the file location & Open the file
I STOP G EXIT
D OUTPUT ; build the file & Close the file
EXIT ;
; Routine Exit
Q
;
;
INIT ; Procedure to initialize some routine-wide variables
S IBCIRTN="IBCIPAY" ; routine name, IO handle
S STOP=0 ; stop flag
S IBCIFILE="IBCIPAY.DAT" ; name of file that gets created
INITX ;
Q
;
;
INTRO ; This procedure displays introductory text and asks if the user
; wants to proceed with the creation of the PAYOR file.
;
W @IOF
NEW Y,IBCIMSG,DIR,X,DTOUT,DUOUT,DIRUT,DIROUT
;
S IBCIMSG(1)=" This option is responsible for creating the Payor File"
S IBCIMSG(2)=" for the ClaimsManager application from Ingenix. This"
S IBCIMSG(3)=" is a listing of the Insurance Companies that are currently"
S IBCIMSG(4)=" stored in VistA."
S IBCIMSG(5)=""
;
DO EN^DDIOL(.IBCIMSG)
;
; Now for the user response
;
S DIR(0)="Y"
S DIR("A")=" Do you wish to proceed"
S DIR("B")="NO"
DO ^DIR
I 'Y S STOP=1
INTROX ;
Q
;
;
OUTPUT ; This procedure displays a VistA "please wait" message to the user
; while it loops through the "B" cross reference to the INSURANCE
; COMPANY FILE (#36). The file is closed here and a confirmation
; message is shown to the user.
;
NEW INSNAME,COUNT,IEN,IBCIMSG,POP,X,X1,X2,X3,X4,Y
DO WAIT^DICD
;
; Use the file for writing
U IO
;
; loop through and write the data
S INSNAME="",COUNT=0
F S INSNAME=$O(^DIC(36,"B",INSNAME)) Q:INSNAME="" D
. S IEN=0
. F S IEN=$O(^DIC(36,"B",INSNAME,IEN)) Q:'IEN D
.. I $P($G(^DIC(36,IEN,0)),U,5) Q ; INACTIVE flag
.. I $P($G(^DIC(36,IEN,5)),U,1) Q ; SCHEDULED FOR DELETION flag
.. S X=IEN,X1=20,X4="T" W $$FILL^IBCIUT2
.. S X=INSNAME,X1=40,X4="T" W $$FILL^IBCIUT2
.. W !
.. S COUNT=COUNT+1
.. Q
. Q
;
; The file has been created so close it and tell the user
DO CLOSE^%ZISH(IBCIRTN)
U IO(0)
S IBCIMSG(1)=" There are "_COUNT_" records in the Payor File."
S IBCIMSG(2)=" The Payor File creation process is complete!"
S IBCIMSG(3)=""
S IBCIMSG(1,"F")="!!"
DO EN^DDIOL(.IBCIMSG)
;
OUTPUTX ;
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCIPAY 2528 printed Nov 22, 2024@17:23:27 Page 2
IBCIPAY ;DSI/ESG - Extract data and create Ingenix Payor File ;11-JAN-2001
+1 ;;2.0;INTEGRATED BILLING;**161**;21-MAR-94
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
ENTRY ; Entry point for routine (or called from the top)
+1 NEW IBCIRTN,STOP,IBCIPATH,IBCIFILE
+2 DO INIT
+3 DO INTRO
+4 IF STOP
GOTO EXIT
+5 ; get the file location & Open the file
DO GETPATH^IBCINPT
+6 IF STOP
GOTO EXIT
+7 ; build the file & Close the file
DO OUTPUT
EXIT ;
+1 ; Routine Exit
+2 QUIT
+3 ;
+4 ;
INIT ; Procedure to initialize some routine-wide variables
+1 ; routine name, IO handle
SET IBCIRTN="IBCIPAY"
+2 ; stop flag
SET STOP=0
+3 ; name of file that gets created
SET IBCIFILE="IBCIPAY.DAT"
INITX ;
+1 QUIT
+2 ;
+3 ;
INTRO ; This procedure displays introductory text and asks if the user
+1 ; wants to proceed with the creation of the PAYOR file.
+2 ;
+3 WRITE @IOF
+4 NEW Y,IBCIMSG,DIR,X,DTOUT,DUOUT,DIRUT,DIROUT
+5 ;
+6 SET IBCIMSG(1)=" This option is responsible for creating the Payor File"
+7 SET IBCIMSG(2)=" for the ClaimsManager application from Ingenix. This"
+8 SET IBCIMSG(3)=" is a listing of the Insurance Companies that are currently"
+9 SET IBCIMSG(4)=" stored in VistA."
+10 SET IBCIMSG(5)=""
+11 ;
+12 DO EN^DDIOL(.IBCIMSG)
+13 ;
+14 ; Now for the user response
+15 ;
+16 SET DIR(0)="Y"
+17 SET DIR("A")=" Do you wish to proceed"
+18 SET DIR("B")="NO"
+19 DO ^DIR
+20 IF 'Y
SET STOP=1
INTROX ;
+1 QUIT
+2 ;
+3 ;
OUTPUT ; This procedure displays a VistA "please wait" message to the user
+1 ; while it loops through the "B" cross reference to the INSURANCE
+2 ; COMPANY FILE (#36). The file is closed here and a confirmation
+3 ; message is shown to the user.
+4 ;
+5 NEW INSNAME,COUNT,IEN,IBCIMSG,POP,X,X1,X2,X3,X4,Y
+6 DO WAIT^DICD
+7 ;
+8 ; Use the file for writing
+9 USE IO
+10 ;
+11 ; loop through and write the data
+12 SET INSNAME=""
SET COUNT=0
+13 FOR
SET INSNAME=$ORDER(^DIC(36,"B",INSNAME))
if INSNAME=""
QUIT
Begin DoDot:1
+14 SET IEN=0
+15 FOR
SET IEN=$ORDER(^DIC(36,"B",INSNAME,IEN))
if 'IEN
QUIT
Begin DoDot:2
+16 ; INACTIVE flag
IF $PIECE($GET(^DIC(36,IEN,0)),U,5)
QUIT
+17 ; SCHEDULED FOR DELETION flag
IF $PIECE($GET(^DIC(36,IEN,5)),U,1)
QUIT
+18 SET X=IEN
SET X1=20
SET X4="T"
WRITE $$FILL^IBCIUT2
+19 SET X=INSNAME
SET X1=40
SET X4="T"
WRITE $$FILL^IBCIUT2
+20 WRITE !
+21 SET COUNT=COUNT+1
+22 QUIT
End DoDot:2
+23 QUIT
End DoDot:1
+24 ;
+25 ; The file has been created so close it and tell the user
+26 DO CLOSE^%ZISH(IBCIRTN)
+27 USE IO(0)
+28 SET IBCIMSG(1)=" There are "_COUNT_" records in the Payor File."
+29 SET IBCIMSG(2)=" The Payor File creation process is complete!"
+30 SET IBCIMSG(3)=""
+31 SET IBCIMSG(1,"F")="!!"
+32 DO EN^DDIOL(.IBCIMSG)
+33 ;
OUTPUTX ;
+1 QUIT
+2 ;