- DGENA4 ;ISA/KWP - Enrollment API - Retrieve data; 05/11/99
- ;;5.3;Registration;**232**;Aug 13, 1993
- ;Phase II API's
- CATEGORY(DFN,STATUS) ;
- ;Description: Returns ENROLLMENT CATEGORY from the patient's current
- ; enrollment.
- ;Input:
- ; DFN - Patient IEN
- ; STATUS - Optional. If passed will get the CATEGORY for
- ; this status otherwise the Current enrollment status is used,
- ;Output:
- ; Returns patients ENROLLMENT CATEGORY or the ENROLLMENT CATEGORY
- ; of the status passed if available
- ; otherwise defaults to "NOT ENROLLED" category.
- ; E-Enrolled
- ; N-Not Enrolled
- ; P-In Process
- ;
- I $G(STATUS)="" S STATUS=""
- N CATEGORY
- S:STATUS="" STATUS=$$STATUS^DGENA($G(DFN))
- Q:'STATUS "N"
- S CATEGORY=$P($G(^DGEN(27.15,STATUS,0)),"^",2)
- I CATEGORY="" Q "N"
- Q CATEGORY
- ;
- ENRSBGRP(DFN) ;
- ;Description: Returns ENROLLMENT SUBGROUP for patient's current
- ; enrollment. ENROLLMENT PRIORITY 7 will be the only priority
- ; group stratified into ENROLLMENT SUBGROUPS.
- ;Input:
- ; DFN - Patient IEN
- ;Output:
- ; Function Value - Returns the current ENROLLMENT SUBGROUP if defined
- ; otherwise returns NULL.
- ;
- N DGENRIEN
- S DGENRIEN=$$FINDCUR^DGENA($G(DFN))
- Q:'DGENRIEN ""
- Q $P($G(^DGEN(27.11,DGENRIEN,0)),"^",12)
- ;
- EXTCAT(CATEGORY) ;
- ;Description: Returns the external name for the defined ENROLLMENT
- ; CATEGORY flag.
- ;
- ;Input:
- ; CATEGORY - Category flag
- ;Output:
- ; Function Value - Returns the external name for the defined CATEGORY
- ; flag otherwise returns NULL.
- ;
- Q $$EXTERNAL^DILFD(27.15,.02,"F",CATEGORY)
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGENA4 1641 printed Jan 18, 2025@03:43:01 Page 2
- DGENA4 ;ISA/KWP - Enrollment API - Retrieve data; 05/11/99
- +1 ;;5.3;Registration;**232**;Aug 13, 1993
- +2 ;Phase II API's
- CATEGORY(DFN,STATUS) ;
- +1 ;Description: Returns ENROLLMENT CATEGORY from the patient's current
- +2 ; enrollment.
- +3 ;Input:
- +4 ; DFN - Patient IEN
- +5 ; STATUS - Optional. If passed will get the CATEGORY for
- +6 ; this status otherwise the Current enrollment status is used,
- +7 ;Output:
- +8 ; Returns patients ENROLLMENT CATEGORY or the ENROLLMENT CATEGORY
- +9 ; of the status passed if available
- +10 ; otherwise defaults to "NOT ENROLLED" category.
- +11 ; E-Enrolled
- +12 ; N-Not Enrolled
- +13 ; P-In Process
- +14 ;
- +15 IF $GET(STATUS)=""
- SET STATUS=""
- +16 NEW CATEGORY
- +17 if STATUS=""
- SET STATUS=$$STATUS^DGENA($GET(DFN))
- +18 if 'STATUS
- QUIT "N"
- +19 SET CATEGORY=$PIECE($GET(^DGEN(27.15,STATUS,0)),"^",2)
- +20 IF CATEGORY=""
- QUIT "N"
- +21 QUIT CATEGORY
- +22 ;
- ENRSBGRP(DFN) ;
- +1 ;Description: Returns ENROLLMENT SUBGROUP for patient's current
- +2 ; enrollment. ENROLLMENT PRIORITY 7 will be the only priority
- +3 ; group stratified into ENROLLMENT SUBGROUPS.
- +4 ;Input:
- +5 ; DFN - Patient IEN
- +6 ;Output:
- +7 ; Function Value - Returns the current ENROLLMENT SUBGROUP if defined
- +8 ; otherwise returns NULL.
- +9 ;
- +10 NEW DGENRIEN
- +11 SET DGENRIEN=$$FINDCUR^DGENA($GET(DFN))
- +12 if 'DGENRIEN
- QUIT ""
- +13 QUIT $PIECE($GET(^DGEN(27.11,DGENRIEN,0)),"^",12)
- +14 ;
- EXTCAT(CATEGORY) ;
- +1 ;Description: Returns the external name for the defined ENROLLMENT
- +2 ; CATEGORY flag.
- +3 ;
- +4 ;Input:
- +5 ; CATEGORY - Category flag
- +6 ;Output:
- +7 ; Function Value - Returns the external name for the defined CATEGORY
- +8 ; flag otherwise returns NULL.
- +9 ;
- +10 QUIT $$EXTERNAL^DILFD(27.15,.02,"F",CATEGORY)