source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNLGEDM.m@ 1076

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

initial load of WorldVistAEHR

File size: 1.1 KB
Line 
1SPNLGEDM ; ISC-SF/GMB - SCD GATHER DEMOGRAPHICS DATA;23 MAY 94 [ 07/11/94 8:18 AM ] ;6/23/95 12:09
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3EXTRACT(DFN,FDATE,TDATE,CLEARTXT,ABORT) ;
4 ; DFN Patient's internal entry number in the Patient file
5 ; FDATE "From" date
6 ; TDATE "Thru" date, default=today
7 ; CLEARTXT 1=translate all codes to their meaning,
8 ; 0=don't translate codes (default=0)
9 N VADM,VAEL,VASV,VASE,VAPA,SSN,DEMDATA,ELIGDATA,SVCDATA,ADDRDATA
10 Q:'$D(^DPT(DFN,0))
11 D DEM^VADPT ; DOB,Sex,Date of Death
12 ; ; (DOB has 00 for days)
13 S DEMDATA=$E($P(VADM(3),U,1),1,5)_"00^"_$P(VADM(5),U,1)_"^"_$P(VADM(6),U,1)
14 D ELIG^VADPT ; External, not code: Eligibility,Period of Service,Means Test Status
15 S ELIGDATA=$P(VAEL(1),U,2)_"^"_$P(VAEL(2),U,2)_"^"_$P(VAEL(9),U,2)
16 D SVC^VADPT
17 S SVCDATA=$P(VASV(6,5),U,1) ; Service Separation Date
18 D ADD^VADPT ; line1,line2,line3,city,state,zip,phone
19 ; ; (state is ptr to STATE file)
20 S ADDRDATA=VAPA(1)_"^"_VAPA(2)_"^"_VAPA(3)_"^"_VAPA(4)_"^"_$P(VAPA(5),U,1)_"^"_VAPA(6)_"^"_VAPA(8)
21 D ADDREC^SPNLGE("DM",DEMDATA_"^"_ELIGDATA_"^"_SVCDATA_"^"_ADDRDATA)
22 Q
Note: See TracBrowser for help on using the repository browser.