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

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

initial load of FOIAVistA 6/30/08 version

File size: 4.7 KB
Line 
1IBCNEPY ;DAOU/BHS - IIV PAYER EDIT OPTION ;28-JUN-2002
2 ;;2.0;INTEGRATED BILLING;**184**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ; Call only from a tag
6 Q
7 ;
8EN ; Main entry point
9 ; Input: n/a
10 ; Output: Modifies entries in the Payer File (#365.12)
11 ;
12 ; Initialize variables
13 NEW PYRIEN
14 ;
15 D CLRSCRN
16 F S PYRIEN=$$PAYER() Q:'PYRIEN D EDIT(PYRIEN)
17 ;
18ENX ; EN exit point
19 Q
20 ;
21 ;
22CLRSCRN ;
23 W @IOF
24 W !?35,"Payer Edit"
25 W !!?1,"This option allows you to view the data in the Payer file for a particular"
26 W !?1,"Payer. You may only edit local flags. Most of the fields in the Payer file"
27 W !?1,"are not editable. This data comes into VistA electronically. If an"
28 W !?1,"application has been deactivated, the local flag cannot be edited."
29 Q
30 ;
31 ;
32EDIT(IEN) ; Modify Payer application settings
33 ; Input: IEN - key to Payer File (#365.12)
34 ; Output: Modifies entries in the Payer File
35 ;
36 ; Initialize variables
37 NEW IBDATA,LN,APPIEN
38 ;
39 S LN=26
40 ; Display non-editable fields:
41 ; Payer Name, VA National ID, CMS National ID, Date/Time Created,
42 ; EDI ID Number - Prof., EDI ID Number - Inst.
43 S IBDATA=$G(^IBE(365.12,+IEN,0))
44 ;
45 D CLRSCRN
46 W !!,$$FO^IBCNEUT1("Payer Name: ",LN,"R"),$P(IBDATA,U,1)
47 W !,$$FO^IBCNEUT1("VA National ID: ",LN,"R"),$P(IBDATA,U,2)
48 W !,$$FO^IBCNEUT1("CMS National ID: ",LN,"R"),$P(IBDATA,U,3)
49 W !,$$FO^IBCNEUT1("Inst Electronic Bill ID: ",LN,"R"),$P(IBDATA,U,6)
50 W !,$$FO^IBCNEUT1("Prof Electronic Bill ID: ",LN,"R"),$P(IBDATA,U,5)
51 W !,$$FO^IBCNEUT1("Date/Time Created: ",LN,"R"),$$FMTE^XLFDT($P(IBDATA,U,4),"5Z")
52 ;
53 ; Select Payer application - from those set up for Payer ONLY
54 S APPIEN=$$PYRAPP(+IEN) I APPIEN D APPEDIT(+IEN,+APPIEN)
55 ;
56 Q
57 ;
58APPEDIT(PIEN,AIEN) ; Modify Payer application settings
59 ; Input: PIEN - key to Payer File (#365.12),
60 ; AIEN - key to Payer Application File (#365.13)
61 ; Output: Modifies entries in the Payer File
62 ;
63 ; Initialize variables
64 NEW IBNODE,LN,FDA,DR,DA,DTOUT,DIE,DIRUT,DIR,X,Y
65 ;
66 ; Determine if the application is already defined for the Payer
67 S LN=35
68 S IBNODE=$G(^IBE(365.12,+PIEN,1,+AIEN,0))
69 ;
70 I IBNODE="" W !,"Payer Application not found - ERROR!" S DIR(0)="E" D ^DIR K DIR G APPEDX
71 ;
72 ; Display non-editable fields:
73 ; National Active, Id Requires Subscriber ID, Use SSN for Subscriber ID
74 ; Transmit SSN
75 W !,$$FO^IBCNEUT1("Payer Application: ",LN,"R"),$P($G(^IBE(365.13,+$P(IBNODE,U),0)),U)
76 W !,$$FO^IBCNEUT1("National Active: ",LN,"R"),$S(+$P(IBNODE,U,2):"Active",1:"Not Active")
77 W !,$$FO^IBCNEUT1("Id Requires Subscriber ID: ",LN,"R"),$S(+$P(IBNODE,U,8):"YES",1:"NO")
78 W !,$$FO^IBCNEUT1("Use SSN for Subscriber ID: ",LN,"R"),$S(+$P(IBNODE,U,9):"YES",1:"NO")
79 W !,$$FO^IBCNEUT1("Transmit SSN: ",LN,"R"),$S(+$P(IBNODE,U,10):"YES",1:"NO")
80 W !,$$FO^IBCNEUT1("Future Service Days: ",LN,"R"),$P(IBNODE,U,14)
81 W !,$$FO^IBCNEUT1("Past Service Days: ",LN,"R"),$P(IBNODE,U,15)
82 ; Display deactivation info only when it exists
83 I +$P(IBNODE,U,11) D G APPEDX
84 . W !,$$FO^IBCNEUT1("Deactivated: ",LN,"R"),$S(+$P(IBNODE,U,11):"YES",1:"NO")
85 . W !,$$FO^IBCNEUT1("Deactivation Date/Time: ",LN,"R"),$S(+$P(IBNODE,U,12):$$FMTE^XLFDT($P(IBNODE,U,12),"5Z"),1:"")
86 . ; Local Active is non-editable if application is deactivated
87 . W !,$$FO^IBCNEUT1("Local Active: ",LN,"R"),$S(+$P(IBNODE,U,3):"Active",1:"Not Active")
88 ;
89 ; Allow user to edit Local Active flag
90 ; Also file the user who edited this local flag and the date/time
91 S DR=".03 Local Active;.04////"_$G(DUZ)_";.05////"_$$NOW^XLFDT
92 S DIE="^IBE(365.12,"_+PIEN_",1,"
93 S DA=+AIEN,DA(1)=+PIEN
94 D ^DIE
95 ;
96APPEDX Q
97 ;
98PAYER() ; Select Payer - File #365.12
99 ; Init vars
100 NEW DIC,DTOUT,DUOUT,X,Y
101 ;
102 W !!!
103 S DIC(0)="ABEQ"
104 S DIC("A")=$$FO^IBCNEUT1("Payer Name: ",15,"R")
105 ; Do not allow editing of '~NO PAYER' entry
106 S DIC("S")="I $P(^(0),U,1)'=""~NO PAYER"""
107 S DIC="^IBE(365.12,"
108 D ^DIC
109 I $D(DUOUT)!$D(DTOUT)!(Y<1) S Y=""
110 ;
111 Q $P(Y,U,1)
112 ;
113PYRAPP(PIEN) ; Select Payer Application - based on values in File #365.121
114 ; Init vars
115 NEW DIC,DTOUT,DUOUT,X,Y,APPIEN
116 ;
117 ; If no applications are defined for this Payer, quit with message
118 I $O(^IBE(365.12,+PIEN,1,0))="" W !!,"There are no applications associated with this Payer!" S DIR="E" D ^DIR K DIR Q ""
119 ;
120 W !
121 ; If applications are defined for this Payer, allow user to select
122 S DIC(0)="ABEQ"
123 S DIC("A")=$$FO^IBCNEUT1("Payer Application: ",35,"R")
124 S DIC="^IBE(365.12,"_+PIEN_",1,"
125 ;
126 ; if only one application defined, then default that one
127 I $P($G(^IBE(365.12,+PIEN,1,0)),U,4)=1 D
128 . S APPIEN=$O(^IBE(365.12,+PIEN,1,0)) Q:'APPIEN
129 . S APPIEN=$P($G(^IBE(365.12,+PIEN,1,APPIEN,0)),U,1) Q:'APPIEN
130 . S DIC("B")=$P($G(^IBE(365.13,APPIEN,0)),U,1)
131 . Q
132 D ^DIC
133 I $D(DTOUT)!$D(DUOUT)!(Y<1) S Y=""
134 ;
135 Q $P(Y,U,1)
136 ;
Note: See TracBrowser for help on using the repository browser.