source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDPPAT2.m@ 1489

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

initial load of WorldVistAEHR

File size: 4.4 KB
Line 
1SDPPAT2 ;ALB/CAW-Patient Profile (Generic Patient Info)-Screen 2;5/4/92
2 ;;5.3;Scheduling;**6,113,244**;Aug 13, 1993
3 ;
4 ;
5ADDR ; Address and Phone Headers
6 ;
7 S X="",X=$$SETSTR^VALM1("**Address**",X,13,11)
8 S X=$$SETSTR^VALM1("**Phone**",X,52,9)
9 D SET^SDPPAT1(X)
10LINE1 ; Line 1 of address
11 ;
12 S X="",X=$$SETSTR^VALM1($P(SD(.11),U),X,10,29)
13 S X=$$SETSTR^VALM1("Residence:",X,48,10)
14 S X=$$SETSTR^VALM1($P(SD(.13),U),X,SDSECCOL,20)
15 D SET^SDPPAT1(X)
16LINE2 ; Line 2 of address
17 ;
18 S X="" I $P(SD(.11),U,2)'="" D
19 .S X=$$SETSTR^VALM1($P(SD(.11),U,2),X,10,29)
20 I $P(SD(.13),U,2)'="" D
21 .S X=$$SETSTR^VALM1("Work:",X,53,5)
22 .S X=$$SETSTR^VALM1($P(SD(.13),U,2),X,SDSECCOL,20)
23 D:X'="" SET^SDPPAT1(X)
24LINE3 ; Line 3 of address
25 ;
26 I $P(SD(.11),U,3)'="" D
27 .S X="",X=$$SETSTR^VALM1($P(SD(.11),U,3),X,10,29)
28 .D SET^SDPPAT1(X)
29LINE4 ; Line 4 of address (City, State, Zip)
30 ;
31 N SDZIP
32 S X="" I SD(.11)'="" S SDZIP=$P(SD(.11),U,12) S:$E(SDZIP,6,9)'="" SDZIP=$E(SDZIP,1,5)_"-"_$E(SDZIP,6,9) D
33 .S X=$$SETSTR^VALM1(($P(SD(.11),U,4)_", "_$P($G(^DIC(5,+$P(SD(.11),U,5),0)),U,2)_" "_SDZIP),X,10,40)
34 .S X=$$SETSTR^VALM1("County:",X,51,7)
35 .S X=$$SETSTR^VALM1($P($G(^DIC(5,+$P(SD(.11),U,5),1,+$P(SD(.11),U,7),0)),U),X,SDSECCOL,20)
36 D SET^SDPPAT1(X)
37TADDR ; Address and Phone Headers
38 ;
39 S X=""
40 I ($P(SD(.121),U,7)&($P(SD(.121),U,8)>DT))!($P(SD(.121),U,7)&('$P(SD(.121),U,8))) D
41 .S X=$$SETSTR^VALM1("**Temp. Address**",X,9,17)
42 .S X=$$SETSTR^VALM1("**Temp. Phone**",X,48,15)
43 .D SET^SDPPAT1(X)
44TLINE1 .; Line 1 of address
45 .S X="",X=$$SETSTR^VALM1($P(SD(.121),U),X,10,29)
46 .S X=$$SETSTR^VALM1("Residence:",X,48,10)
47 .S X=$$SETSTR^VALM1($P(SD(.121),U,10),X,SDSECCOL,20)
48 .D SET^SDPPAT1(X)
49TLINE2 .; Line 2 of address
50 .I $P(SD(.121),U,2)'="" D
51 ..S X="",X=$$SETSTR^VALM1($P(SD(.121),U,2),X,10,29)
52 ..D SET^SDPPAT1(X)
53TLINE3 .; Line 3 of address
54 .I $P(SD(.121),U,3)'="" D
55 ..S X="",X=$$SETSTR^VALM1($P(SD(.121),U,3),X,10,29)
56 ..D SET^SDPPAT1(X)
57TLINE4 .; Line 4 of address (City, State, Zip)
58 .N SDZIP
59 .S X="" I SD(.121)'="" S SDZIP=$P(SD(.121),U,12) S:$E(SDZIP,6,9)'="" SDZIP=$E(SDZIP,1,5)_"-"_$E(SDZIP,6,9) D
60 ..S X=$$SETSTR^VALM1(($P(SD(.121),U,4)_", "_$P($G(^DIC(5,+$P(SD(.121),U,5),0)),U,2)_" "_SDZIP),X,10,40)
61 ..S X=$$SETSTR^VALM1("County:",X,51,7)
62 ..S X=$$SETSTR^VALM1($P($G(^DIC(5,+$P(SD(.121),U,5),1,+$P(SD(.121),U,11),0)),U),X,SDSECCOL,20)
63 .D SET^SDPPAT1(X)
64 D SET^SDPPAT1("")
65RAD ; Radiation Exposure and Prisoner of War
66 ;
67 S X="",X=$$SETSTR^VALM1("Radiation Exposure:",X,2,19)
68 S X=$$SETSTR^VALM1($S($P(SD(.321),U,3)="N":"NO",$P(SD(.321),U,3)="Y":"YES",1:"UNKNOWN"),X,SDFSTCOL,7)
69 S X=$$SETSTR^VALM1("Prisoner of War:",X,43,16)
70 S X=$$SETSTR^VALM1($S($P(SD(.52),U,5)="N":"NO",$P(SD(.52),U,5)="Y":"YES",1:"UNKNOWN"),X,SDSECCOL,7)
71 D SET^SDPPAT1(X)
72AO ; Agent Orange Exposure and Vietnam Service
73 ;
74 S X="",X=$$SETSTR^VALM1("Agent Orange Exp.:",X,3,18)
75 S X=$$SETSTR^VALM1($S($P(SD(.321),U,2)="N":"NO",$P(SD(.321),U,2)="Y":"YES",1:"UNKNOWN"),X,SDFSTCOL,7)
76 S X=$$SETSTR^VALM1("Vietnam Service:",X,43,16)
77 S X=$$SETSTR^VALM1($S($P(SD(.321),U)="N":"NO",$P(SD(.321),U)="Y":"YES",1:"UNKNOWN"),X,SDSECCOL,7)
78 D SET^SDPPAT1(X)
79 ;
80NTR ; Nose and Throat Radium Exposure
81 ;
82 K SDNTR
83 S X="",X=$$SETSTR^VALM1("N/T Radium:",X,10,11)
84 ;get current NTR by using supported API (DBIA #3457)
85 S X=$$SETSTR^VALM1($S($$GETCUR^DGNTAPI(DFN,"SDNTR")>0:$G(SDNTR("INTRP")),1:"UNKNOWN"),X,SDFSTCOL,45)
86 K SDNTR
87 D SET^SDPPAT1(X)
88 ;
89POS ; Period of Service
90 ;
91 S X="",X=$$SETSTR^VALM1("Period of Service:",X,3,18)
92 S X=$$SETSTR^VALM1($P($G(^DIC(21,+$P(SD(.32),U,3),0)),U),X,SDFSTCOL,30)
93 D SET^SDPPAT1(X)
94SC ; Sevice Connected and Percentage
95 ;
96 S X="",X=$$SETSTR^VALM1("Service Connected:",X,3,18)
97 S X=$$SETSTR^VALM1($S($P(SD(.3),U)="N":"NO",$P(SD(.3),U)="Y":"YES",1:"UNKNOWN"),X,SDFSTCOL,7)
98 I $P(SD(.3),U)'="Y" D SET^SDPPAT1(X),SDQ Q
99 S X=$$SETSTR^VALM1("Percentage:",X,48,11)
100 S X=$$SETSTR^VALM1($P(SD(.3),U,2)_"%",X,SDSECCOL,4)
101 D SET^SDPPAT1(X)
102SDQ ; Final set of page if no service connection
103 ;
104 F CNT=SDLN:1:25 D SET^SDPPAT1("")
105 Q:'$D(SDCNT)
106DIS ; Disabilities
107 ;
108 S X="",X=$$SETSTR^VALM1("Rated Disabilities:",X,7,19)
109 D SET^SDPPAT1(X)
110 S CNT=0 F S CNT=$O(SDDIS(CNT)) Q:'CNT!('$D(SDCNT(+CNT))) D
111 .I '$D(SDDIS(CNT+1)) D SET^SDPPAT1(SDDIS(CNT)) Q
112 .I $L(SDDIS(CNT))<80,(SDCNT(CNT+1)+$L(SDDIS(CNT))>79) D SET^SDPPAT1(SDDIS(CNT)) K SDDIS(CNT) Q
113 .I SDLN=24&($D(SDDIS(CNT))) D SET^SDPPAT1("...this patient has more 'disabilities' that are not listed") K SDCNT Q
114 .S SDDIS(CNT+1)=SDDIS(CNT)_", "_$G(SDDIS(CNT+1))
115 K SDDIS
116 D SET^SDPPAT1("")
117 Q
Note: See TracBrowser for help on using the repository browser.