1 | DGRP2 ;ALB/MRL,BRM - REGISTRATION SCREEN 2/CONTACT INFORMATION ;1:15 PM 10 Dec 2008
|
---|
2 | ;;5.3;Registration;**415,545,638,677,760,634**;Aug 13, 1993;Build 30
|
---|
3 | ; Modified from FOIA VISTA,
|
---|
4 | ; Copyright (C) 2007 WorldVistA
|
---|
5 | ;
|
---|
6 | ; This program is free software; you can redistribute it and/or modify
|
---|
7 | ; it under the terms of the GNU General Public License as published by
|
---|
8 | ; the Free Software Foundation; either version 2 of the License, or
|
---|
9 | ; (at your option) any later version.
|
---|
10 | ;
|
---|
11 | ; This program is distributed in the hope that it will be useful,
|
---|
12 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | ; GNU General Public License for more details.
|
---|
15 | ;
|
---|
16 | ; You should have received a copy of the GNU General Public License
|
---|
17 | ; along with this program; if not, write to the Free Software
|
---|
18 | ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
---|
19 | S DGRPS=2 D H^DGRPU F I=0,.24,57,1010.15 S DGRP(I)=$S($D(^DPT(DFN,I)):^(I),1:"")
|
---|
20 | S DGRPX=DGRP(0)
|
---|
21 | S (Z,DGRPW)=1 D WW^DGRPV W " Marital: " S Z=$S($D(^DIC(11,+$P(DGRPX,"^",5),0)):$E($P(^(0),"^",1),1,28),1:DGRPU),Z1=30 D WW1^DGRPV
|
---|
22 | ;S (Z,DGRPW)=1 D WW^DGRPV W " Sex: " S X=$P(DGRP(0),"^",2),Z=$S(X="M":"MALE",X="F":"FEMALE",1:DGRPU),Z1=31 D WW1^DGRPV
|
---|
23 | S DGD=$$DISP^DG1010P0(DGRP(0),11,0,1),DGNOCITY=DGUNK,DGD1=$$POINT^DG1010P0(DGRP(0),12,5,1,0,1)
|
---|
24 | W ?41,"POB: ",$E($S((DGNOCITY&DGUNK):"UNANSWERED",1:DGD_$S(($L(DGD)):", ",1:"")_DGD1),1,29)
|
---|
25 | ;S DGRPX=DGRP(0)
|
---|
26 | W !?4,"Religion: ",$S($D(^DIC(13,+$P(DGRPX,"^",8),0)):$P(^(0),"^",1),1:DGRPU),?41,"Father: ",$S($P(DGRP(.24),"^",1)]"":$E($P(DGRP(.24),"^",1),1,29),1:DGRPU)
|
---|
27 | S X=$P(DGRP(57),"^",4),X=$S(X']"":DGRPU,X="X":"NOT APPLICABLE",X=1:"PARA,",X=2:"QUAD,",X=3:"PARA,NON",1:"QUAD,NON"),X=$S("QP"[$E(X):X_"TRAUMATIC",1:X) W !?9,"SCI: ",X
|
---|
28 | W ?41,"Mother: ",$S($P(DGRP(.24),"^",2)]"":$E($P(DGRP(.24),"^",2),1,29),1:DGRPU)
|
---|
29 | W !,?35,"Mom's Maiden: ",$S($P(DGRP(.24),"^",3)]"":$E($P(DGRP(.24),"^",3),1,29),1:DGRPU)
|
---|
30 | W ! S Z=2 D WW^DGRPV W " Previous Care Date Location of Previous Care",!?4,"------------------ -------------------------" S DGRPX=DGRP(1010.15) I $P(DGRPX,"^",5)'="Y" S X="NONE INDICATED" W !?4,X,?28,X
|
---|
31 | E F I=1:1:4 S I1=$P(DGRPX,"^",I) X "I I#2 S Y=I1 X:Y]"""" ^DD(""DD"") W !?4,$S(Y]"""":Y,1:DGRPU)" I '(I#2) W ?28,$S($D(^DIC(4,+I1,0)):$P(^(0),"^",1),1:DGRPU)
|
---|
32 | ;
|
---|
33 | ; ** start of VOE change: DAOU,VA/CJS,WV/TOAD 1/5/2006 ** ;p634
|
---|
34 | ;
|
---|
35 | ; New VOE Patient fields
|
---|
36 | ;
|
---|
37 | ; insert 7 lines:
|
---|
38 | ;
|
---|
39 | I $G(DUZ("AG"))="E" D
|
---|
40 | . W !?4,"Veteran: ",$$GET1^DIQ(2,DFN,19902)
|
---|
41 | . W !,"Interpreter Language: "
|
---|
42 | . N IL S IL=""
|
---|
43 | . N I F I=1:1 S IL=$O(^DPT(DFN,19901,"B",IL)) Q:IL="" D
|
---|
44 | . . I I'=1 W ","
|
---|
45 | . . W $$GET1^DIQ(.85,IL,1)
|
---|
46 | ;
|
---|
47 | ; next three groups of lines have been conditionalized to only display
|
---|
48 | ; for VA agency code; also, refactored for clarity
|
---|
49 | ;
|
---|
50 | I $G(DUZ("AG"))="V" D
|
---|
51 | . W ! S Z=2 D WW^DGRPV
|
---|
52 | . W " Previous Care Date Location of Previous Care"
|
---|
53 | . W !?4,"------------------ -------------------------"
|
---|
54 | . S DGRPX=DGRP(1010.15)
|
---|
55 | . ;
|
---|
56 | . I $P(DGRPX,"^",5)'="Y" D
|
---|
57 | . . S X="NONE INDICATED"
|
---|
58 | . . W !?4,X,?28,X
|
---|
59 | . ;
|
---|
60 | . E F I=1:1:4 D
|
---|
61 | . . S I1=$P(DGRPX,"^",I)
|
---|
62 | . . X "I I#2 S Y=I1 X:Y]"""" ^DD(""DD"") W !?4,$S(Y]"""":Y,1:DGRPU)"
|
---|
63 | . . I '(I#2) W ?28,$S($D(^DIC(4,+I1,0)):$P(^(0),"^",1),1:DGRPU)
|
---|
64 | ;
|
---|
65 | ; ** end of VOE change **; p634
|
---|
66 | ;
|
---|
67 | W ! S Z=3 D WW^DGRPV W " Ethnicity: " D
|
---|
68 | .I '$O(^DPT(DFN,.06,0)) W "UNANSWERED" Q
|
---|
69 | .N NODE,NUM,ETHNIC
|
---|
70 | .S I=0
|
---|
71 | .F NUM=0:1 S I=+$O(^DPT(DFN,.06,I)) Q:'I D
|
---|
72 | ..S NODE=$G(^DPT(DFN,.06,I,0))
|
---|
73 | ..S X=$P($G(^DIC(10.2,+NODE,0)),"^",1)
|
---|
74 | ..S ETHNIC=$S(X="":"?????",1:X)
|
---|
75 | ..S X=$P($G(^DIC(10.3,+$P(NODE,"^",2),0)),"^",2)
|
---|
76 | ..S ETHNIC=ETHNIC_" ("_$S(X="":"?",1:X)_")"
|
---|
77 | ..I NUM S ETHNIC=", "_ETHNIC
|
---|
78 | ..I ($X+$L(ETHNIC))>IOM D W !?15
|
---|
79 | ...F S X=$P(ETHNIC," ",1)_" " Q:($X+$L(X))>IOM W X S ETHNIC=$P(ETHNIC," ",2,999)
|
---|
80 | ..W ETHNIC
|
---|
81 | W !?9,"Race: " D
|
---|
82 | .I '$O(^DPT(DFN,.02,0)) W "UNANSWERED" Q
|
---|
83 | .N NODE,NUM,RACE
|
---|
84 | .S I=0
|
---|
85 | .F NUM=0:1 S I=+$O(^DPT(DFN,.02,I)) Q:'I D
|
---|
86 | ..S NODE=$G(^DPT(DFN,.02,I,0))
|
---|
87 | ..S X=$P($G(^DIC(10,+NODE,0)),"^",1)
|
---|
88 | ..S RACE=$S(X="":"?????",1:X)
|
---|
89 | ..S X=$P($G(^DIC(10.3,+$P(NODE,"^",2),0)),"^",2)
|
---|
90 | ..S RACE=RACE_" ("_$S(X="":"?",1:X)_")"
|
---|
91 | ..I NUM S RACE=", "_RACE
|
---|
92 | ..I ($X+$L(RACE))>IOM D W !?15
|
---|
93 | ...F S X=$P(RACE," ",1)_" " Q:($X+$L(X))>IOM W X S RACE=$P(RACE," ",2,999)
|
---|
94 | ..W RACE
|
---|
95 | D GETS^DIQ(2,DFN_",",".351;.353;.354;.355","E","PDTHINFO")
|
---|
96 | W !!
|
---|
97 | W "<4> Date of Death Information"
|
---|
98 | W !,?5,"Date of Death: ",$G(PDTHINFO(2,DFN_",",.351,"E"))
|
---|
99 | W ?41,"Source of Notification: ",$G(PDTHINFO(2,DFN_",",.353,"E"))
|
---|
100 | W !,?5,"Updated Date/Time: ",$G(PDTHINFO(2,DFN_",",.354,"E"))
|
---|
101 | W ?41,"Last Edited By: ",$G(PDTHINFO(2,DFN_",",.355,"E")),!
|
---|
102 | K PDTHINFO
|
---|
103 | ;
|
---|
104 | ;Emergency Response Indicator
|
---|
105 | N DGEMRES S DGEMRES=$P($G(^DPT(DFN,.18)),"^")
|
---|
106 | S Z=5 D WW^DGRPV W " Emergency Response: "_$$EXTERNAL^DILFD(2,.181,,DGEMRES)
|
---|
107 | G ^DGRPP
|
---|