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

DGENA4.m

Go to the documentation of this file.
  1. DGENA4 ;ISA/KWP - Enrollment API - Retrieve data; 05/11/99
  1. ;;5.3;Registration;**232**;Aug 13, 1993
  1. ;Phase II API's
  1. CATEGORY(DFN,STATUS) ;
  1. ;Description: Returns ENROLLMENT CATEGORY from the patient's current
  1. ; enrollment.
  1. ;Input:
  1. ; DFN - Patient IEN
  1. ; STATUS - Optional. If passed will get the CATEGORY for
  1. ; this status otherwise the Current enrollment status is used,
  1. ;Output:
  1. ; Returns patients ENROLLMENT CATEGORY or the ENROLLMENT CATEGORY
  1. ; of the status passed if available
  1. ; otherwise defaults to "NOT ENROLLED" category.
  1. ; E-Enrolled
  1. ; N-Not Enrolled
  1. ; P-In Process
  1. ;
  1. I $G(STATUS)="" S STATUS=""
  1. N CATEGORY
  1. S:STATUS="" STATUS=$$STATUS^DGENA($G(DFN))
  1. Q:'STATUS "N"
  1. S CATEGORY=$P($G(^DGEN(27.15,STATUS,0)),"^",2)
  1. I CATEGORY="" Q "N"
  1. Q CATEGORY
  1. ;
  1. ENRSBGRP(DFN) ;
  1. ;Description: Returns ENROLLMENT SUBGROUP for patient's current
  1. ; enrollment. ENROLLMENT PRIORITY 7 will be the only priority
  1. ; group stratified into ENROLLMENT SUBGROUPS.
  1. ;Input:
  1. ; DFN - Patient IEN
  1. ;Output:
  1. ; Function Value - Returns the current ENROLLMENT SUBGROUP if defined
  1. ; otherwise returns NULL.
  1. ;
  1. N DGENRIEN
  1. S DGENRIEN=$$FINDCUR^DGENA($G(DFN))
  1. Q:'DGENRIEN ""
  1. Q $P($G(^DGEN(27.11,DGENRIEN,0)),"^",12)
  1. ;
  1. EXTCAT(CATEGORY) ;
  1. ;Description: Returns the external name for the defined ENROLLMENT
  1. ; CATEGORY flag.
  1. ;
  1. ;Input:
  1. ; CATEGORY - Category flag
  1. ;Output:
  1. ; Function Value - Returns the external name for the defined CATEGORY
  1. ; flag otherwise returns NULL.
  1. ;
  1. Q $$EXTERNAL^DILFD(27.15,.02,"F",CATEGORY)