[613] | 1 | IBACVA ;ALB/CPM - PROCESS CHAMPVA PATIENT MOVEMENTS ; 27-JUL-93
|
---|
| 2 | ;;Version 2.0 ; INTEGRATED BILLING ;**27**; 21-MAR-94
|
---|
| 3 | ;;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
| 4 | ;
|
---|
| 5 | PROC ; Process patient movements for CHAMPVA inpatients.
|
---|
| 6 | ;
|
---|
| 7 | ; - quit if the software is not fully installed
|
---|
| 8 | I '$$ON^IBACVA2() G PROCQ
|
---|
| 9 | ;
|
---|
| 10 | ; - send bulletin for CHAMPVA admissions
|
---|
| 11 | I DGPMP="",$P(DGPMA,"^",2)=1 D ADM^IBACVA2 G PROCQ
|
---|
| 12 | ;
|
---|
| 13 | ; - determine if admission has been billed
|
---|
| 14 | S IBCVAPM=$P($S(DGPMA:DGPMA,1:DGPMP),"^",14)
|
---|
| 15 | S IBCVA=$P(+$G(^DGPM(IBCVAPM,0)),".")
|
---|
| 16 | S:'IBCVA IBCVA=+DGPMP\1
|
---|
| 17 | S IBBILLED=$$PREV^IBACVA1(DFN,IBCVA,IBCVAPM)
|
---|
| 18 | ;
|
---|
| 19 | ; - if admission was deleted, cancel the charge (if billed)
|
---|
| 20 | I DGPMA="",$P(DGPMP,"^",2)=1 G:'IBBILLED PROCQ D G PROCQ
|
---|
| 21 | .S IBCRES=$O(^IBE(350.3,"B","CHAMPVA ADMISSION DELETED",0))
|
---|
| 22 | .S:'IBCRES IBCRES=24
|
---|
| 23 | .D UPSTAT^IBECEAU4(IBBILLED),DEL^IBACVA2(DFN,IBBILLED,+DGPMP)
|
---|
| 24 | ;
|
---|
| 25 | ; - if delete a discharge -> bulletin
|
---|
| 26 | I DGPMA="",$P(DGPMP,"^",2)=3 D WARN^IBACVA2(+DGPMP,0) G PROCQ
|
---|
| 27 | ;
|
---|
| 28 | ; - if edit a discharge, change date -> bulletin
|
---|
| 29 | I DGPMA,DGPMP,$P(DGPMA,"^",2)=3,$P(+DGPMA,".")'=$P(+DGPMP,".") D WARN^IBACVA2(+DGPMP,+DGPMA) G PROCQ
|
---|
| 30 | ;
|
---|
| 31 | ; - if discharged, bill the subsistence charge
|
---|
| 32 | I DGPMP="",$P(DGPMA,"^",2)=3,'IBBILLED D
|
---|
| 33 | .S IBSL=IBCVAPM,IBBDT=$$FMTH^XLFDT(IBCVA,1),IBEDT=$$FMTH^XLFDT(+DGPMA\1,1)
|
---|
| 34 | .D BILL^IBACVA1
|
---|
| 35 | ;
|
---|
| 36 | PROCQ K IBY,IBFAC,IBSITE,IBSERV,IBSL,IBCHGT,IBBILLED,IBBDT,IBEDT,IBD,IBDT
|
---|
| 37 | K IBCHG,IBFR,IBTO,IBATYP,IBLIM,IBN,IBUNIT,IBCVA,IBBILLED,IBCVAPM
|
---|
| 38 | K %H,VA,VAIP,VAERR,X
|
---|
| 39 | Q
|
---|