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

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

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1VAFHLZSN ;ALB/CM,JLU-PATIENT SENSITIVITY SEGMENT ;12/31/97
2 ;;5.3;Registration;**149**;Aug 13, 1993
3EN(DFN) ;Returns ZSN segment
4 ;
5 ;Input: Required Variable
6 ;
7 ; DFN - IEN in the PATIENT file (#2)
8 ;
9 ;Output:
10 ; if DFN is not passed
11 ; First piece - -1
12 ; Second piece - "NO DFN"
13 ; if no patient for DFN
14 ; First piece - -1
15 ; Second piece - "PATIENT NOT IN DATABASE"
16 ; if Patient is known
17 ; First piece - "ZSN"
18 ; Second piece - Field #2 of File #38.1 (Internal value)
19 ; Third piece - Field #3 of File #38.1 (External value)
20 ; Forth piece - Field #4 of File #38.1 (HL7 format)
21 ;
22 ; **Assumes all HL7 variables are defined***
23 ;
24 N VAFLOCAL,FS,DIC,DR,DA,DIQ,SECURITY,LOCUSER,LOCDATE,RETURN
25 S FS=HL("FS")
26 I $G(DFN)="" Q "-1^NO DFN"
27 I $G(^DPT(DFN,0))="" Q "-1^PATIENT NOT IN DATABASE"
28 S DIC=38.1,DR="2;3;4",DA=DFN,DIQ="VAFLOCAL",DIQ(0)="IE"
29 D EN^DIQ1
30 S SECURITY=$$HLQ^VAFHUTL($G(VAFLOCAL(38.1,DFN,2,"I")))
31 S LOCUSER=$$HLQ^VAFHUTL($G(VAFLOCAL(38.1,DFN,3,"I")))
32 S LOCDATE=$G(VAFLOCAL(38.1,DFN,4,"I"))
33 I LOCDATE]"" S LOCDATE=$$HLDATE^HLFNC(LOCDATE,"TS")
34 E S LOCDATE=$$HLQ^VAFHUTL(LOCDATE)
35 S RETURN="ZSN"_FS_SECURITY_FS_LOCUSER_FS_LOCDATE
36 Q RETURN
Note: See TracBrowser for help on using the repository browser.