Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DGROUT2

DGROUT2.m

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