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

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1IBACVA ;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 ;
5PROC ; 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 ;
36PROCQ 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
Note: See TracBrowser for help on using the repository browser.