- DGROUT2 ;DJH/AMA - ROM UTILITIES CONTINUED ; 28 Apr 2004 12:28 PM
- ;;5.3;Registration;**533,572,1015**;Aug 13, 1993;Build 21
- ;
- ; This routine contains generic calls for use throughout DGRO*.
- ;
- QUIT ;no direct entry
- ;
- GETPAT(DGDFN,DGPAT) ;retrieve patient identifying information
- ;Used to obtain identifying information for a patient in the
- ;PATIENT (#2) file and place it in an array format.
- ; Called from BLDQRY^DGROHLQ
- ;
- ; NOTE: Direct global reference of patient's zero node in the
- ; PATIENT (#2) file is supported by DBIA #10035
- ;
- ; Input:
- ; DGDFN - (required) ien of patient in PATIENT (#2) file
- ;
- ; Output:
- ; Function Value - returns 1 on success, 0 on failure
- ; DGPAT - output array containing patient identifying information
- ; on success, pass by reference. Array subscripts are:
- ; "DFN" - ien PATIENT (#2) file
- ; "NAME" - patient name
- ; "SSN" - patient Social Security Number
- ; "DOB" - patient date of birth (FM format)
- ; "SEX" - patient sex
- ;
- N DGNODE,RESULT
- ;
- S RESULT=0
- I $G(DGDFN)>0,$D(^DPT(DGDFN,0)) D
- . S DGPAT("DFN")=DGDFN
- . S DGPAT("NAME")=$$GET1^DIQ(2,DGDFN,.01)
- . S DGPAT("SEX")=$$GET1^DIQ(2,DGDFN,.02)
- . S DGPAT("DOB")=$$GET1^DIQ(2,DGDFN,.03,"I") ;* DG*5.3*572
- . S DGPAT("SSN")=$$GET1^DIQ(2,DGDFN,.09)
- . S RESULT=1 ;success
- ;
- Q RESULT
- ;
- GETDFN(DGICN,DGDOB,DGSSN) ;Convert ICN to DFN after verifying DOB and SSN
- ;Called from RCVQRY^DGROHLR
- ; Supported DBIA #2701: The supported DBIA is used to retrieve the
- ; pointer (DFN) to the PATIENT (#2) file for a
- ; given ICN.
- ;
- ; Input:
- ; DGICN - Integrated Control Number with or without checksum
- ; DGDOB - Date of Birth in FileMan format
- ; DGSSN - Social Security Number with no delimiters
- ;
- ; Output:
- ; Function Value - DFN on success, 0 on failure
- ;
- N DGDFN ;pointer to patient
- N DGDPT ;patient data array
- N DGRSLT ;function value
- ;
- S DGRSLT=0
- S DGICN=+$G(DGICN)
- S DGDOB=+$G(DGDOB)
- S DGSSN=+$G(DGSSN)
- I DGICN D ;drops out of block on first failure ;DG*5.3*572 removed SSN & DOB
- . S DGDFN=+$$GETDFN^MPIF001(DGICN)
- . Q:(DGDFN'>0)
- . S DGRSLT=DGDFN
- Q DGRSLT
- DGROUT2 ;DJH/AMA - ROM UTILITIES CONTINUED ; 28 Apr 2004 12:28 PM
- +1 ;;5.3;Registration;**533,572,1015**;Aug 13, 1993;Build 21
- +2 ;
- +3 ; This routine contains generic calls for use throughout DGRO*.
- +4 ;
- +5 ;no direct entry
- QUIT
- +6 ;
- GETPAT(DGDFN,DGPAT) ;retrieve patient identifying information
- +1 ;Used to obtain identifying information for a patient in the
- +2 ;PATIENT (#2) file and place it in an array format.
- +3 ; Called from BLDQRY^DGROHLQ
- +4 ;
- +5 ; NOTE: Direct global reference of patient's zero node in the
- +6 ; PATIENT (#2) file is supported by DBIA #10035
- +7 ;
- +8 ; Input:
- +9 ; DGDFN - (required) ien of patient in PATIENT (#2) file
- +10 ;
- +11 ; Output:
- +12 ; Function Value - returns 1 on success, 0 on failure
- +13 ; DGPAT - output array containing patient identifying information
- +14 ; on success, pass by reference. Array subscripts are:
- +15 ; "DFN" - ien PATIENT (#2) file
- +16 ; "NAME" - patient name
- +17 ; "SSN" - patient Social Security Number
- +18 ; "DOB" - patient date of birth (FM format)
- +19 ; "SEX" - patient sex
- +20 ;
- +21 NEW DGNODE,RESULT
- +22 ;
- +23 SET RESULT=0
- +24 IF $GET(DGDFN)>0
- IF $DATA(^DPT(DGDFN,0))
- Begin DoDot:1
- +25 SET DGPAT("DFN")=DGDFN
- +26 SET DGPAT("NAME")=$$GET1^DIQ(2,DGDFN,.01)
- +27 SET DGPAT("SEX")=$$GET1^DIQ(2,DGDFN,.02)
- +28 ;* DG*5.3*572
- SET DGPAT("DOB")=$$GET1^DIQ(2,DGDFN,.03,"I")
- +29 SET DGPAT("SSN")=$$GET1^DIQ(2,DGDFN,.09)
- +30 ;success
- SET RESULT=1
- End DoDot:1
- +31 ;
- +32 QUIT RESULT
- +33 ;
- GETDFN(DGICN,DGDOB,DGSSN) ;Convert ICN to DFN after verifying DOB and SSN
- +1 ;Called from RCVQRY^DGROHLR
- +2 ; Supported DBIA #2701: The supported DBIA is used to retrieve the
- +3 ; pointer (DFN) to the PATIENT (#2) file for a
- +4 ; given ICN.
- +5 ;
- +6 ; Input:
- +7 ; DGICN - Integrated Control Number with or without checksum
- +8 ; DGDOB - Date of Birth in FileMan format
- +9 ; DGSSN - Social Security Number with no delimiters
- +10 ;
- +11 ; Output:
- +12 ; Function Value - DFN on success, 0 on failure
- +13 ;
- +14 ;pointer to patient
- NEW DGDFN
- +15 ;patient data array
- NEW DGDPT
- +16 ;function value
- NEW DGRSLT
- +17 ;
- +18 SET DGRSLT=0
- +19 SET DGICN=+$GET(DGICN)
- +20 SET DGDOB=+$GET(DGDOB)
- +21 SET DGSSN=+$GET(DGSSN)
- +22 ;drops out of block on first failure ;DG*5.3*572 removed SSN & DOB
- IF DGICN
- Begin DoDot:1
- +23 SET DGDFN=+$$GETDFN^MPIF001(DGICN)
- +24 IF (DGDFN'>0)
- QUIT
- +25 SET DGRSLT=DGDFN
- End DoDot:1
- +26 QUIT DGRSLT