source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SDAMEP2.m@ 940

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

initial load of FOIAVistA 6/30/08 version

File size: 4.0 KB
Line 
1SDAMEP2 ;ALB/CAW - Extended Display (Patient Data) ; 11/13/02
2 ;;5.3;Scheduling;**258,325**;Aug 13, 1993
3 ;
4PDATA ; Patient Data
5 F SD=0,.11,.13,.32,.321,.36,.52 S SD(SD)=$G(^DPT(DFN,SD))
6 S SD("CV")=$$CVEDT^DGCV(DFN,SDT)
7 S VAIP("D")="L",VAIP("L")="" D INP^DGPMV10
8 S SDFSTCOL=16,SDSECCOL=60
9 S X="" D SET^SDAMEP1($$SETSTR^VALM1("*** Patient Information ***",X,25,30))
10 D CNTRL^VALM10(SDLN,25,30,IOINHI,IOINORM)
11PTDOB ; Date of Birth and SSN Info
12 ;
13 S X="",X=$$SETSTR^VALM1("Date of Birth:",X,1,14)
14 S X=$$SETSTR^VALM1($$FTIME^VALM1($P(SD(0),U,3)),X,SDFSTCOL,18)
15 S X=$$SETSTR^VALM1(" ID:",X,55,4)
16 S X=$$SETSTR^VALM1(VA("PID"),X,SDSECCOL,20)
17 D SET^SDAMEP1(X)
18PTSEX ; Sex and Marital Status Info
19 ;
20 S X="",X=$$SETSTR^VALM1("Sex:",X,11,4)
21 S X=$$SETSTR^VALM1($S($P(SD(0),U,2)="F":"FEMALE",$P(SD(0),U,2)="M":"MALE",1:"UNKNOWN"),X,SDFSTCOL,18)
22 S X=$$SETSTR^VALM1("Marital Status:",X,44,15)
23 S X=$$SETSTR^VALM1($P($G(^DIC(11,+$P(SD(0),U,5),0)),U),X,SDSECCOL,20)
24 D SET^SDAMEP1(X)
25PTREL ; Religious Pref. Info
26 ;
27 S X="",X=$$SETSTR^VALM1("Religious Pref.:",X,43,16)
28 S X=$$SETSTR^VALM1($P($G(^DIC(13,+$P(SD(0),U,8),0)),U),X,SDSECCOL,20)
29 D SET^SDAMEP1(X)
30PTMT ; Means Test Info
31 ;
32 S SDMT=$$LST^DGMTU(DFN),X="" G:$P(SDMT,U,4)="N" PTCO I +SDMT D G PTMTQ
33 .S X=$$SETSTR^VALM1("Means Test:",X,4,11)
34 .S X=$$SETSTR^VALM1($P($$FMT^SDUTL2(DFN),U),X,SDFSTCOL,20)
35 .S X=$$SETSTR^VALM1("Last Means Test:",X,43,16)
36 .S X=$$SETSTR^VALM1($$FDATE^VALM1($P(SDMT,U,2)),X,SDSECCOL,20)
37PTCO S SDMT=$$LST^DGMTU(DFN,"",2),X="" I +SDMT D
38 .S X=$$SETSTR^VALM1("Co-Pay Test:",X,3,12)
39 .S X=$$SETSTR^VALM1($P($$FCO^SDUTL2(DFN),U,2),X,SDFSTCOL,10)
40 .S X=$$SETSTR^VALM1("Last Co-Pay Test:",X,42,17)
41 .S X=$$SETSTR^VALM1($$FDATE^VALM1($P(SDMT,U,2)),X,SDSECCOL,20)
42PTMTQ D SET^SDAMEP1(X)
43PTELG ; Primary Eligibility and Period of Service Info
44 ;
45 S X="",X=$$SETSTR^VALM1("Primary Elig.:",X,1,14)
46 S X=$$SETSTR^VALM1($P($G(^DIC(8,+$P(SD(.36),U),0)),U,6),X,SDFSTCOL,21)
47 S X=$$SETSTR^VALM1("POS:",X,55,4)
48 S X=$$SETSTR^VALM1($P($G(^DIC(21,+$P(SD(.32),U,3),0)),U),X,SDSECCOL,20)
49 D SET^SDAMEP1(X)
50PTADD ; Patient Address
51 ;
52 S X="",X=($$SETSTR^VALM1("Address:",X,7,8))
53 S X=$$SETSTR^VALM1("Phone:",X,53,6)
54 S X=$$SETSTR^VALM1($P(SD(.13),U),X,SDSECCOL,20)
55 D SET^SDAMEP1(X)
56 S X="",X=($$SETSTR^VALM1($P(SD(.11),U),X,10,30))
57 D SET^SDAMEP1(X)
58 S X=""
59 I $P(SD(.11),U,2)'="" D
60 .S X="",X=($$SETSTR^VALM1($P(SD(.11),U,2),X,10,30))
61 D:X'="" SET^SDAMEP1(X)
62 N SDZIP S SDZIP=$P(SD(.11),U,12) S:$E(SDZIP,6,10)'="" SDZIP=$E(SDZIP,1,5)_"-"_$E(SDZIP,6,10)
63 S X="" D SET^SDAMEP1($$SETSTR^VALM1($P(SD(.11),U,4)_", "_$P($G(^DIC(5,+$P(SD(.11),U,5),0)),U)_" "_SDZIP,X,10,45))
64PTEXP ; Radiation and Status
65 ;
66 S X="",X=$$SETSTR^VALM1("Radiation Exposure:",X,1,19)
67 S X=$$SETSTR^VALM1($$FYNUNK^SDUTL2($P(SD(.321),U,3)),X,21,7)
68 S X=$$SETSTR^VALM1("Status:",X,52,7)
69 S A=$S("^3^5^"[("^"_+DGPMVI(2)_"^"):0,1:+DGPMVI(2)),SDST=$S('A:"IN",1:"")_"ACTIVE ",SDSTA=$S("^4^5^"[("^"_+DGPMVI(2)_"^"):"LODGER",1:"INPATIENT")
70 I '$D(^DGPM("C",DFN)) S SDST="NO INPT./LOD. ACT.",SDSTA=""
71 S X=$$SETSTR^VALM1(SDST_SDSTA,X,SDSECCOL,20)
72 D SET^SDAMEP1(X)
73PTPOW ; Prisoner of War Info and Last Admission Date
74 ;
75 S X="",X=$$SETSTR^VALM1("Prisoner of War:",X,4,16)
76 S X=$$SETSTR^VALM1($$FYNUNK^SDUTL2($P(SD(.52),U,5)),X,21,7)
77 S X=$$SETSTR^VALM1("Last Admit/Lodger Date:",X,36,23)
78 I +DGPMVI(13,1) S X=$$SETSTR^VALM1($$FTIME^VALM1(+DGPMVI(13,1)),X,SDSECCOL,18)
79 D SET^SDAMEP1(X)
80PTAO ; Agent Orange Exposure and Last Discharge Date
81 S X="",X=$$SETSTR^VALM1("AO Exposure:",X,8,12)
82 S X=$$SETSTR^VALM1($$FYNUNK^SDUTL2($P(SD(.321),U,2)),X,21,7)
83 S X=$$SETSTR^VALM1("Last Disch./Lodger Date:",X,35,24)
84 S SDDISCH=+$G(^DGPM(+DGPMVI(17),0))
85 I +SDDISCH S X=$$SETSTR^VALM1($$FTIME^VALM1(SDDISCH),X,SDSECCOL,18)
86 D SET^SDAMEP1(X)
87CV ;Combat vet
88 S X="",X=$$SETSTR^VALM1("Combat Veteran:",X,5,15)
89 S X=$$SETSTR^VALM1($$FYNUNK^SDUTL2($S($P(SD("CV"),U,1)>0:"Y",1:"N")),X,21,7)
90 S X=$$SETSTR^VALM1("Combat Veteran End Date:",X,35,24)
91 I $P(SD("CV"),U,1)>0 D
92 .S X=$$SETSTR^VALM1($$FTIME^VALM1($P(SD("CV"),U,2)),X,SDSECCOL,18)
93 E S X=$$SETSTR^VALM1("N/A",X,SDSECCOL,3)
94 D SET^SDAMEP1(X)
95 D SET^SDAMEP1("")
96 Q
Note: See TracBrowser for help on using the repository browser.