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

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1DGENA4 ;ISA/KWP - Enrollment API - Retrieve data; 05/11/99
2 ;;5.3;Registration;**232**;Aug 13, 1993
3 ;Phase II API's
4CATEGORY(DFN,STATUS) ;
5 ;Description: Returns ENROLLMENT CATEGORY from the patient's current
6 ; enrollment.
7 ;Input:
8 ; DFN - Patient IEN
9 ; STATUS - Optional. If passed will get the CATEGORY for
10 ; this status otherwise the Current enrollment status is used,
11 ;Output:
12 ; Returns patients ENROLLMENT CATEGORY or the ENROLLMENT CATEGORY
13 ; of the status passed if available
14 ; otherwise defaults to "NOT ENROLLED" category.
15 ; E-Enrolled
16 ; N-Not Enrolled
17 ; P-In Process
18 ;
19 I $G(STATUS)="" S STATUS=""
20 N CATEGORY
21 S:STATUS="" STATUS=$$STATUS^DGENA($G(DFN))
22 Q:'STATUS "N"
23 S CATEGORY=$P($G(^DGEN(27.15,STATUS,0)),"^",2)
24 I CATEGORY="" Q "N"
25 Q CATEGORY
26 ;
27ENRSBGRP(DFN) ;
28 ;Description: Returns ENROLLMENT SUBGROUP for patient's current
29 ; enrollment. ENROLLMENT PRIORITY 7 will be the only priority
30 ; group stratified into ENROLLMENT SUBGROUPS.
31 ;Input:
32 ; DFN - Patient IEN
33 ;Output:
34 ; Function Value - Returns the current ENROLLMENT SUBGROUP if defined
35 ; otherwise returns NULL.
36 ;
37 N DGENRIEN
38 S DGENRIEN=$$FINDCUR^DGENA($G(DFN))
39 Q:'DGENRIEN ""
40 Q $P($G(^DGEN(27.11,DGENRIEN,0)),"^",12)
41 ;
42EXTCAT(CATEGORY) ;
43 ;Description: Returns the external name for the defined ENROLLMENT
44 ; CATEGORY flag.
45 ;
46 ;Input:
47 ; CATEGORY - Category flag
48 ;Output:
49 ; Function Value - Returns the external name for the defined CATEGORY
50 ; flag otherwise returns NULL.
51 ;
52 Q $$EXTERNAL^DILFD(27.15,.02,"F",CATEGORY)
Note: See TracBrowser for help on using the repository browser.