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

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

initial load of WorldVistAEHR

File size: 7.6 KB
Line 
1IBCREE ;ALB/ARH - RATES: CM ENTER/EDIT ;16-MAY-1996
2 ;;2.0;INTEGRATED BILLING;**52,106,115,223**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5EDITRT ; ACTION enter/edit rate types (399.3)
6 N DIC,DIE,DA,DR,X,Y,IBRTFN
7 W !!,"CAUTION: This is a standard file with entries released nationally, do not add or"
8 W !," modify unless necessary. Changing the Name or AR Category or if it is"
9 W !," a Third Party rate type will effect processing of claims."
10 W !!,"Enter/Edit a Rate Type:"
11 ;
12 S DIC="^DGCR(399.3,",DIC(0)="AELNQ" D ^DIC K DIC I Y<1 K X,Y Q
13 ;
14 S IBRTFN=+Y I $D(IBRTFNX) S IBRTFNX=+Y
15 ;
16 S DIE="^DGCR(399.3,",DA=+IBRTFN,DR=".01;.02;.04;.05;.08;.09;.03;.06" D ^DIE K DIE,DA,DR,X,Y
17 Q
18 ;
19EDITRS ; ACTION enter/edit rate schedules (363)
20 N DIC,DIE,DA,DR,X,Y,DINUM,DLAYGO,IBRSFN
21 W !!,"The Rate Schedule Adjustment is an M code field, it therefore requires"
22 W !,"programmer access to enter or edit (using Charge Master IRM Enter/Edit"
23 W !,"[IBCR CHARGE MASTER IRM] option. Contact IRM if this field needs to be modified."
24 W !!,"Enter/Edit a Rate Schedule:"
25 ;
26 S DINUM=$O(^IBE(363,"A"),-1),DINUM=$S(DINUM<1000:1001,1:DINUM+1) I 'DINUM!($D(^IBE(363,DINUM,0))) Q
27 S DLAYGO=363,DIC="^IBE(363,",DIC(0)="AELNQ" D ^DIC K DIC,DINUM,DLAYGO I Y<1 K X,Y Q
28 ;
29 S IBRSFN=+Y I $D(IBRSFNX) S IBRSFNX=+Y
30 ;
31 S DIE("NO^")="BACK"
32 S DIDEL=363,DIE="^IBE(363,",DA=+IBRSFN,DR=".01;.02;.03;.04;.05;.06;11" D ^DIE K DIE,DA,DR,X,Y,DIDEL
33 Q
34 ;
35EDITRSA ; OPTION enter/edit Rate Schedule Adjustment field (363,10) if DUZ="@"
36 N IBRS10,IBRS10A,DIR,DIC,DIE,DA,DR,X,Y,IBRSFN
37 I DUZ(0)'="@" W !,"This option requires programmer access (DUZ(0)=@).",! G ERSA1Q
38 ;
39 S DIC="^IBE(363,",DIC(0)="AENQ" D ^DIC K DIC S IBRSFN=+Y I Y<1 K X,Y Q
40 ;
41ERSA1 W !
42 S IBRS10=$G(^IBE(363,+IBRSFN,10))
43 I IBRS10="" W !,?7,"The base unit charges are not currently Adjusted.",!
44 I IBRS10'="" S X=100 X IBRS10 W !,?7,"If the base unit charge is $100,",!,?7,"this Adjustment will result in a charge of: $",$J(X,10,2),!!
45 S DIE="^IBE(363,",DA=+IBRSFN,DR="10" D ^DIE K DIE,DA,DR,X,Y
46 S IBRS10A=$G(^IBE(363,+IBRSFN,10))
47 I IBRS10A=IBRS10 W " ... no change"
48 I IBRS10A="" W !!,?7,"The base unit charges will not be modified."
49 S X=100 X IBRS10A W !!,?7,"If the base unit charge is $100,",!,?7,"this Adjustment will result in a charge of: $",$J(X,10,2),!
50 S DIR("?")="To Exit the option the correct Adjustment must be entered, i.e. must be able to enter Yes to this question.",DIR("?",1)="Enter either 'Y' or 'N'.",DIR("?",2)=" "
51 S DIR("?",3)="The Adjustment has an immediate effect on the charges for this rate."
52 S DIR(0)="Y",DIR("A")="Is this correct" D ^DIR K DIR I Y'=1 G ERSA1
53 ;
54 I $P($G(^DGCR(399.1,+$P(^IBE(363,+IBRSFN,0),"^",4),0)),"^")="PRESCRIPTION",IBRS10A["+" D
55 . W !,"The adjustment you entered may have included a dispensing fee or administrative"
56 . W !,"fee. If that is the case, please record the amount of the respective fee(s)"
57 . W !,"used in the adjustment calculation above."
58 . S DIE="^IBE(363,",DA=+IBRSFN,DR="1.01;1.02" D ^DIE
59 ;
60ERSA1Q Q
61 ;
62EDITRG ; enter/edit billing regions (363.31)
63 N DIC,DIE,DA,DR,X,Y,DLAYGO,IBRGFN,IBI
64 W !!,"Enter/Edit a Rate's Billing Regions:"
65 ;
66 S DLAYGO=363.31,DIC="^IBE(363.31,",DIC(0)="AELNQ" D ^DIC K DIC,DLAYGO I Y<1 K X,Y Q
67 ;
68 S IBRGFN=+Y D RESETDV^IBCREE2($P(Y,U,2))
69 ;
70 ; dr to only allow divisions or institutions not both
71 S DIDEL=363.31,DIE="^IBE(363.31,",DA=+IBRGFN,DR=".01;"_$S($O(^IBE(363.31,DA,21,0)):"",1:"11;S:$O(^IBE(363.31,DA,11,0)) Y=0;")_"21" D ^DIE K DIE,DR,X,Y,DIDEL
72 ;
73 I '$D(DA),+IBRGFN S IBI=0 F S IBI=$O(^IBE(363.1,IBI)) Q:'IBI D ; remove deleted regions from charge sets
74 . I +$P($G(^IBE(363.1,IBI,0)),U,7)=+IBRGFN S DIE="^IBE(363.1,",DA=+IBI,DR=".07///@" D ^DIE K DIE,DA,DR,X,Y
75 Q
76 ;
77EDITBR ; enter/edit billing rates (363.3)
78 N DIC,DIE,DA,DR,X,Y,DINUM,DLAYGO,IBX,IBBRFN
79 W !!,"Enter/Edit a Billing Rate: "
80 ;
81 S DINUM=$O(^IBE(363.3,"A"),-1),DINUM=$S(DINUM<1000:1001,1:DINUM+1) I 'DINUM!($D(^IBE(363.3,DINUM,0))) Q
82 S DLAYGO=363.3,DIC="^IBE(363.3,",DIC(0)="AELNQ" D ^DIC K DIC,DINUM,DLAYGO I Y<1 K X,Y Q
83 ;
84 S IBBRFN=+Y
85 ;
86 S DIE("NO^")="BACK"
87 S DR=".01;.02;.03////2;.05;I X=2 S Y=""@6"";.04;@6" ; VA Cost sets should not have a billable item
88 ;
89 S IBX=$$CHKBR^IBCREU1(+Y) I +IBX S DR=".02" D W !!
90 . W !!,"Only the Abbreviation may be edited, the Billing Rate Definition can not change:"
91 . I +$P(IBX,U,2) W !," - this Billing Rate definition was exported Nationally"
92 . I +$P(IBX,U,3) W !," - there are Charge Sets defined for this Billing Rate"
93 . I +$P(IBX,U,4) W !," - there are Charge Items defined for a Charge Set with this Billing Rate"
94 I '$P(IBX,U,3) W !,"This Billing Rate does not have any Charge Sets assigned.",!
95 ;
96 S DIDEL=363.3,DIE="^IBE(363.3,",DA=+IBBRFN D ^DIE K DIE,DA,DR,X,Y,DIDEL
97 Q
98 ;
99EDITCS ; enter/edit Charge Sets (363.1)
100 N DIC,DIE,DA,DR,X,Y,DINUM,DLAYGO,IBX,IBCSFN
101 W !!,"Enter/Edit a Charge Set:"
102 ;
103 S DINUM=$O(^IBE(363.1,"A"),-1),DINUM=$S(DINUM<1000:1001,1:DINUM+1) I 'DINUM!($D(^IBE(363.1,DINUM,0))) Q
104 S DLAYGO=363.1,DIC="^IBE(363.1,",DIC(0)="AELNQ" D ^DIC K DIC,DINUM,DLAYGO I Y<1 K X,Y Q
105 ;
106 S IBCSFN=+Y I $D(IBCSFNX) S IBCSFNX=+Y
107 I IBCSFN<1000 D RESETDV^IBCREE2($P(Y,U,2))
108 ;
109 S DR=".01;.02;.03;.04;.05;.06;.07"
110 S IBX=$$CHKCS^IBCREU1(+Y) I +IBX S DR=".04;.05;.06;.07" D W !!
111 . W !!,"Not all elements of this Charge Set may be edited:"
112 . I +$P(IBX,U,3) D Q
113 .. W !," - the Set name, Rate, and Billable Event may not be modified since this",!," Charge Set definition was exported nationally."
114 . I +$P(IBX,U,2) D S DR=".01;.03;"_DR
115 .. W !," - the Billing Rate may not change since the Charge Set has Charge Items."
116 ;
117 ;
118REDTCS S DIDEL=363.1,DIE="^IBE(363.1,",DA=+IBCSFN D ^DIE K DIE,DR,X,DIDEL
119 ;
120 I $D(DA),$D(Y)=0 S IBX=$$RQCS^IBCREU1(IBCSFN) I +IBX S DR="" W ! D G REDTCS
121 . I $P(IBX,U,2)=1 W !,"The Charge Set requires a Billing Rate.",! S DR=DR_".02;"
122 . I $P(IBX,U,3)=1 W !,"The Charge Set requires a Billable Event.",! S DR=DR_".03;"
123 . I $P(IBX,U,5) D S DR=DR_".05;"
124 .. W !,"This Charge Set requires a default Revenue Code:"
125 .. W !," - A VA Cost Charge Set requires a default Rev Code since there are no"
126 .. W !," Items to assign the rev code to",!
127 . I $P(IBX,U,4) D S DR=DR_".06;"
128 .. W !,"This Charge Set requires a default bedsection:"
129 .. W !," - a bedsection is required before a charge can be added to a bill"
130 .. W !," therefore a default bedsection is required for every Charge Set whose"
131 .. W !," charge item is not bedsection",!
132 ;
133 Q
134 ;
135EDITBI ; enter/edit billing items - NDC #, MISC (363.21)
136 N DIC,DIE,DIR,DA,DR,X,Y,DLAYGO,IBX,IBBIN,IBTYPE
137 W !!,"These are items that are billable but not found in other DHCP source files."
138 W !,"Items entered that already exist and have no associated charge, can be deleted.",!
139 ;
140 S DIR(0)="363.21,.02A",DIR("A")="Enter which type of Billable Item? " D ^DIR K DIR I Y<1 Q
141 S IBTYPE=+Y_U_Y(0)
142 ;
143EBI1 W !
144 ;
145 S DLAYGO=363.21,DIC="^IBA(363.21,",DIC(0)="AELQ",DIC("A")=$P(IBTYPE,U,2)_" Item: ",DIC("DR")=".02////"_+IBTYPE
146 S DIC("S")="I $P(^(0),U,2)="_+IBTYPE D ^DIC K DIC,DIE,DA,DR,DLAYGO I Y<1 K X,Y Q
147 S IBBIN=Y
148 ;
149 I +IBTYPE=1,+$P(IBBIN,U,3),$P(IBBIN,U,2)'?1N.N1"-"1N.N1"-"1N.N D G EBI1
150 . I $$DELBI(+IBBIN) W !," ... not added, invalid format (n-n-n)"
151 ;
152 I +$P(IBBIN,U,3) W " ... added" G EBI1
153 ;
154 I '$P(IBBIN,U,3) W " ... already exists" D G EBI1
155 . S IBX=+IBBIN_";IBA(363.21," I $O(^IBA(363.2,"B",IBX,0)) W " => can not delete, has Charge Items" Q
156 . S DIR(0)="Y",DIR("A")=" DELETE "_$P(IBTYPE,U,2)_" - "_$P(IBBIN,U,2) D ^DIR K DIR I Y'=1 W ?50," ... no change" Q
157 . I Y=1 I $$DELBI(+IBBIN) W ?50," ... deleted"
158 G EBI1
159 Q
160DELBI(DA) ;
161 N IBX,DIK S IBX=0 I $D(^IBA(363.21,+$G(DA),0)) S DIK="^IBA(363.21," D ^DIK K DA,DIK S IBX=1
162 Q IBX
Note: See TracBrowser for help on using the repository browser.