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

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1DGROUT2 ;DJH/AMA - ROM UTILITIES CONTINUED ; 28 Apr 2004 12:28 PM
2 ;;5.3;Registration;**533,572**;Aug 13, 1993
3 ;
4 ; This routine contains generic calls for use throughout DGRO*.
5 ;
6 QUIT ;no direct entry
7 ;
8GETPAT(DGDFN,DGPAT) ;retrieve patient identifying information
9 ;Used to obtain identifying information for a patient in the
10 ;PATIENT (#2) file and place it in an array format.
11 ; Called from BLDQRY^DGROHLQ
12 ;
13 ; NOTE: Direct global reference of patient's zero node in the
14 ; PATIENT (#2) file is supported by DBIA #10035
15 ;
16 ; Input:
17 ; DGDFN - (required) ien of patient in PATIENT (#2) file
18 ;
19 ; Output:
20 ; Function Value - returns 1 on success, 0 on failure
21 ; DGPAT - output array containing patient identifying information
22 ; on success, pass by reference. Array subscripts are:
23 ; "DFN" - ien PATIENT (#2) file
24 ; "NAME" - patient name
25 ; "SSN" - patient Social Security Number
26 ; "DOB" - patient date of birth (FM format)
27 ; "SEX" - patient sex
28 ;
29 N DGNODE,RESULT
30 ;
31 S RESULT=0
32 I $G(DGDFN)>0,$D(^DPT(DGDFN,0)) D
33 . S DGPAT("DFN")=DGDFN
34 . S DGPAT("NAME")=$$GET1^DIQ(2,DGDFN,.01)
35 . S DGPAT("SEX")=$$GET1^DIQ(2,DGDFN,.02)
36 . S DGPAT("DOB")=$$GET1^DIQ(2,DGDFN,.03,"I") ;* DG*5.3*572
37 . S DGPAT("SSN")=$$GET1^DIQ(2,DGDFN,.09)
38 . S RESULT=1 ;success
39 ;
40 Q RESULT
41 ;
42GETDFN(DGICN,DGDOB,DGSSN) ;Convert ICN to DFN after verifying DOB and SSN
43 ;Called from RCVQRY^DGROHLR
44 ; Supported DBIA #2701: The supported DBIA is used to retrieve the
45 ; pointer (DFN) to the PATIENT (#2) file for a
46 ; given ICN.
47 ;
48 ; Input:
49 ; DGICN - Integrated Control Number with or without checksum
50 ; DGDOB - Date of Birth in FileMan format
51 ; DGSSN - Social Security Number with no delimiters
52 ;
53 ; Output:
54 ; Function Value - DFN on success, 0 on failure
55 ;
56 N DGDFN ;pointer to patient
57 N DGDPT ;patient data array
58 N DGRSLT ;function value
59 ;
60 S DGRSLT=0
61 S DGICN=+$G(DGICN)
62 S DGDOB=+$G(DGDOB)
63 S DGSSN=+$G(DGSSN)
64 I DGICN D ;drops out of block on first failure ;DG*5.3*572 removed SSN & DOB
65 . S DGDFN=+$$GETDFN^MPIF001(DGICN)
66 . Q:(DGDFN'>0)
67 . S DGRSLT=DGDFN
68 Q DGRSLT
Note: See TracBrowser for help on using the repository browser.