source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGRRPSD1.m@ 1742

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1DGRRPSD1 ; ALB/SGG - rtnDGRR PatientServices Demographics Primary ;09/30/03 ; Compiled February 3, 2004 17:14:03
2 ;;5.3;Registration;**557**;Aug 13, 1993
3 ;
4DOC ;<DataSet Name='PrimaryDemographics'
5 ;[2] .02 SEX (RSa), [0;2]
6 ;[2] .05 MARITAL STATUS (RP11'a), [0;5]
7 ;[2] .351 DATE OF DEATH (DXa), [.35;1]
8 ;[2] .352 DEATH ENTERED BY (P200'), [.35;2]
9 ;[38.1] 2 SECURITY LEVEL (RSX), [0;2]
10 ;[2] .08 RELIGIOUS PREFERENCE (P13'a), [0;8]
11 ;[2] .091 REMARKS (F), [0;10]
12 ;
13GETPSARY(PSARRAY) ;
14 NEW CNT
15 SET CNT=$G(CNT)+1,PSARRAY(CNT)="<DataSet Name='PrimaryDemographics'"
16 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^Gender^"_$$GENDER()
17 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^MaritalStatus^"_$$MARISTAT()
18 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^DateOfDeath^"_$$PATDOD()
19 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^DeathEnteredBy^"_$$DODENTBY()
20 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^DeathEnteredByVPID^"_$$DODVPID()
21 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^SecurityLevel^"_$$SECURLVL()
22 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^ReligiousPreference^"_$$RELIPREF()
23 SET CNT=$G(CNT)+1,PSARRAY(CNT)="^Remarks^"_$$REMARKS()
24 SET CNT=$G(CNT)+1,PSARRAY(CNT)="></DataSet>"_"^^^1"
25 QUIT
26 ;
27GENDER() ;
28 NEW DATA
29 SET DATA=$P(GLOB(0),"^",2)
30 QUIT $S(DATA="M":"MALE",DATA="F":"FEMALE",1:"")
31 ;
32MARISTAT() ;
33 NEW DATA
34 SET DATA=$P(GLOB(0),"^",5)
35 QUIT $S(DATA="":"",1:$P($G(^DIC(11,DATA,0)),"^",1))
36 ;
37PATDOD() ;
38 QUIT $P(GLOB(.35),"^",1)
39 ;
40DODENTBY() ;
41 NEW DATA
42 SET DATA=$P(GLOB(.35),"^",2)
43 IF DATA'="" SET DATA=$P($G(^VA(200,DATA,0)),"^",1)
44 QUIT DATA
45 ;
46DODVPID() ;
47 QUIT $$VPID^XUPS($P(GLOB(.35),"^",2))
48 ;
49SECURLVL() ;
50 QUIT $S($P($G(^DGSL(38.1,PTID,0)),"^",2)=1:"SENSITIVE",1:"NON-SENSITIVE")
51 ;
52RELIPREF() ;
53 NEW DATA
54 SET DATA=$P(GLOB(0),"^",8)
55 QUIT $S(DATA="":"",1:$P($G(^DIC(13,DATA,0)),"^",1))
56 ;
57REMARKS() ;
58 QUIT $P(GLOB(0),"^",10)
Note: See TracBrowser for help on using the repository browser.