source: FOIAVistA/trunk/r/BENEFICIARY_TRAVEL-DGBT/DGBT2.m@ 1458

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1DGBT2 ;ALB/GAH - BENEFICIARY TRAVEL SCREEN 2 ; 10/11/2006
2 ;;1.0;Beneficiary Travel;**7,8,13**;September 25, 2001;Build 11
3 Q
4SCREEN ;
5 W @IOF
6 W !?18,"Beneficiary Travel Claim Information <Screen 2>"
7 D PID^VADPT6 W !!?8,"Name: ",VADM(1),?42,"PT ID: ",VA("PID"),?64,"DOB: ",$P(VADM(3),"^",2)
8 D PAST,ADM
9 W !!?2,"Visits For: " W $P(DGBTDTE,"@")
10 S DGBTAS="" S:DGBTAD DGBTAS=$S($P(DGBTDD,".")=$P(DGBTDTI,"."):"D",$P(DGBTAD,".")=$P(DGBTDTI,"."):"A",$P(DGBTAD,".")&'$P(DGBTDD,"."):"I",$P(DGBTAD,".")&($P(DGBTDTI,".")'>$P(DGBTDD,".")):"II",1:"")
11 I DGBTAS]"" W $S(DGBTAS="A":" * * * * ADMITTED ON THIS DATE * * * *",DGBTAS="D":" * * * * DISCHARGED ON THIS DATE * * * *",DGBTAS="I":" * * * * CURRENTLY AN INPATIENT * * * *",DGBTAS="II":" * * * INPATIENT STATUS * * *",1:"")
12 I DGBTAS]"" W !!," Admitted On: " S Y=+DGBTAD X ^DD("DD") W Y K Y W:$D(^DPT(DFN,.1)) ?40,"Ward Location: ",^DPT(DFN,.1) I DGBTDD W ?40,"Discharge Date: " S Y=+DGBTDD X ^DD("DD") W Y K Y
13 W !!,"Appointments: " W:'$D(DGBTCL) "NONE RECORDED FOR THIS DATE"
14 D
15 . I $D(DGBTCL("ERROR")) W ?14,DGBTCL("ERROR") Q
16 . I $D(DGBTCL) F I=0:0 S I=$O(DGBTCL(I)) Q:'I D APPT
17 N DGVAL,DGCBK,DGDT1
18 ;
19 S DGVAL("DFN")=DFN,DGVAL("BDT")=DGBTDTI\1,DGVAL("EDT")=DGVAL("BDT")_".9999"
20 S DGCBK="I $P(SDOE0,U,8)=2 D WRTVIS^DGBT2(SDOE0) S DGDT1=+SDOE0",DGDT1=""
21 D SCAN^DGSDU("PATIENT/DATE",.DGVAL,"",DGCBK,1,.DGQUERY)
22EXIT ;
23 K VAIP
24 Q
25 ;
26WRTVIS(DGBTCSN) ;
27 S:$S('DGDT1:0,1:+SDOE0'=DGDT1) SDSTOP=1
28 I '$G(DGDT1) W !!?45,"Elig for Visit:",?65,"Appt Type:",!?45,"______________",?65,"_________",!!,"Clinic Stop: "
29 I 'SDSTOP D
30 .N DGBTCS
31 .S:$P(DGBTCSN,U,3) DGBTCS=$P(DGBTCSN,U,3)
32 .W ?14,$E($S($D(^DIC(40.7,+$P($G(DGBTCSN),U,3),0)):$P(^(0),U),1:"Unknown"),1,20),?45,$S($D(^DIC(8,+$P(DGBTCSN,U,13),0)):$E($P(^(0),U),1,18),1:"")
33 .D STOP
34 Q
35 ;
36ADM S DGBTAN=$S($D(^DPT(DFN,.105)):^(.105),1:"")
37 I 'DGBTAN D NOW^%DTC S DGBTDI=+$O(^DGPM("ATID3",DFN,9999999.9999999-%)),DGBTDN=+$O(^(DGBTDI,0)),DGBTAN=$S($D(^DGPM(DGBTDN,0)):$P(^(0),"^",14),1:"")
38 S DGBTAD=$S($D(^DGPM(+DGBTAN,0)):^(0),1:""),DGBTDD=$S($D(^DGPM(+$P(DGBTAD,"^",17),0)):^(0),1:"")
39 K %,DGBTDI,DGBTDN Q
40STOP I $D(DGBTCS) W ?65,$E($S($D(^SD(409.1,+$P(DGBTCSN,"^",10),0)):$P(^(0),"^"),1:"REGULAR"),1,15),!
41 Q
42APPT ;
43 I $D(DGBTCL) D
44 .W ?14,$P(DGBTCL(I),U)," ("_$$FMTE^DILIBF(I,"5U")_")"
45 .S X=$P(DGBTCL(I),U,2)
46 .W ?50,$S(X["NT":"NO ACTION TAKEN",X["N":"NO-SHOW",X["C":"CANCELLED",1:"")
47 .W ?66,$P("C&P^10-10^SCHED.^UNSCHED.",U,+$P(DGBTCL(I),U,3))
48 .W ?73,$S($D(^SD(409.1,+$P(DGBTCL(I),U,4),0)):$P(^SD(409.1,+$P(DGBTCL(I),U,4),0),U),1:"REGULAR"),!
49 Q
50PAST W:'$O(^DGBT(392,"AI",DFN,9999999.99999-DGBTDTI)) !!,"Past Claims: NONE RECORDED" I $O(^DGBT(392,"AI",DFN,9999999.99999-DGBTDTI)) W !!?14,"Date/Time",?35,"Account",?55,"Deductible",?69,"Amt. Paid",!!,"Past Claims: "
51 S J=0 F DGBTP=9999999.99999-DGBTDTI:0 S DGBTP=$O(^DGBT(392,"AI",DFN,DGBTP)) Q:'DGBTP S DGBTPDT=^DGBT(392,"AI",DFN,DGBTP),VADAT("W")=DGBTPDT D ^VADATE W ?14,VADATE("E") D ACCT S J=J+1 Q:J=5
52 Q
53ACCT W ?35,$S($P(^DGBT(392,DGBTPDT,0),"^",6):$E($P(^DGBT(392.3,$P(^(0),"^",6),0),"^"),1,15),1:"") D AMT
54 Q
55AMT N X3 ;Fresh copy for COMMA^%DTC. Leftovers causing error.
56 S X=$P(^DGBT(392,DGBTPDT,0),"^",9),X2="2$" D COMMA^%DTC W ?54,X S X=$P(^(0),"^",10) D COMMA^%DTC W ?67,X,! K VADAT,VADATE,X,X2
57 Q
Note: See TracBrowser for help on using the repository browser.