DGOTHD ;SLC/SS,RM - OTHD (OTHER THAN HONORABLE DISCHARGE) APIs ;Feb 14, 2019@09:57
;;5.3;Registration;**952,977**;Aug 13, 1993;Build 177
;;Per VA Directive 6402, this routine should not be modified.
;
; Last Edited: SHRPE/RM - Feb 14, 2019@09:57
;
;ICR# TYPE DESCRIPTION
;----- ---- ---------------------
; 2056 Sup ^DIQ : GET1
;10061 Sup ELIG^VADPT
;
Q
;
;ask for the starting date for the ENTRY in file #33 (OTH ELIGIBILITY)
STRDATE(DGDFN) ;
I '$G(DGDFN) Q
N DGSTRDT,Y,DGEXPMH,DGIEN33
I '$$ISOTHD(DGDFN) Q
S DGIEN33=$$HASENTRY^DGOTHD2(DGDFN)
I DGIEN33 Q:$D(^DGOTH(33,DGIEN33,1))
S DGEXPMH=$$GET1^DIQ(2,DGDFN,.5501,"I")
S DGEXPMH=$$ISOTH(DGEXPMH)
Q:'DGEXPMH
D FRSTNTRY^DGOTHD1(DGDFN,DT,DGEXPMH)
Q
;
;Functionality:
; checks OTHD eligibility
;
;Parameters:
; DFN - patient's IEN in the file (#2)
;
;Return values:
; 0 - not eligible for OTHD
; 1 - eligible for OTHD
;
ISOTHD(DFN) ;
N VAEL,DGOTHD,X
D ELIG^VADPT
S DGOTHD=0
I +VAEL(1)>0,$$GET1^DIQ(8,+VAEL(1)_",",8)="EXPANDED MH CARE NON-ENROLLEE" S DGOTHD=1
Q DGOTHD
;
;retrieve the default EXPANDED MH CARE TYPE
GETEXPMH(DFN) ;
; Input:
; DFN - Patient IEN
;
; Output:
; EXPANDED MH CARE TYPE (File #2,Field #.5501)
;
N VAEL,X
I '$D(^DPT(DFN)) Q "-1^Patient not found"
D ELIG^VADPT
Q $P($G(VAEL(10)),U)
;
;this API returns the EXPANDED MH CARE TYPE
GETEXPR(DFN) ;
; Input:
; DFN - Patient IEN
;
; Output:
; RET - EXPANDED MH CARE TYPE
;
Q $$GETEXPMH(DFN)
;
ISOTH(DGEXP) ;
;DG*5.3*977 OTH-EXT
;Added OTH-EXT check
Q $S("/OTH-EXT/"[("/"_DGEXP_"/"):1,"/OTH-90/"[("/"_DGEXP_"/"):2,1:0)
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGOTHD 1722 printed Dec 13, 2024@02:46:45 Page 2
DGOTHD ;SLC/SS,RM - OTHD (OTHER THAN HONORABLE DISCHARGE) APIs ;Feb 14, 2019@09:57
+1 ;;5.3;Registration;**952,977**;Aug 13, 1993;Build 177
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ; Last Edited: SHRPE/RM - Feb 14, 2019@09:57
+5 ;
+6 ;ICR# TYPE DESCRIPTION
+7 ;----- ---- ---------------------
+8 ; 2056 Sup ^DIQ : GET1
+9 ;10061 Sup ELIG^VADPT
+10 ;
+11 QUIT
+12 ;
+13 ;ask for the starting date for the ENTRY in file #33 (OTH ELIGIBILITY)
STRDATE(DGDFN) ;
+1 IF '$GET(DGDFN)
QUIT
+2 NEW DGSTRDT,Y,DGEXPMH,DGIEN33
+3 IF '$$ISOTHD(DGDFN)
QUIT
+4 SET DGIEN33=$$HASENTRY^DGOTHD2(DGDFN)
+5 IF DGIEN33
if $DATA(^DGOTH(33,DGIEN33,1))
QUIT
+6 SET DGEXPMH=$$GET1^DIQ(2,DGDFN,.5501,"I")
+7 SET DGEXPMH=$$ISOTH(DGEXPMH)
+8 if 'DGEXPMH
QUIT
+9 DO FRSTNTRY^DGOTHD1(DGDFN,DT,DGEXPMH)
+10 QUIT
+11 ;
+12 ;Functionality:
+13 ; checks OTHD eligibility
+14 ;
+15 ;Parameters:
+16 ; DFN - patient's IEN in the file (#2)
+17 ;
+18 ;Return values:
+19 ; 0 - not eligible for OTHD
+20 ; 1 - eligible for OTHD
+21 ;
ISOTHD(DFN) ;
+1 NEW VAEL,DGOTHD,X
+2 DO ELIG^VADPT
+3 SET DGOTHD=0
+4 IF +VAEL(1)>0
IF $$GET1^DIQ(8,+VAEL(1)_",",8)="EXPANDED MH CARE NON-ENROLLEE"
SET DGOTHD=1
+5 QUIT DGOTHD
+6 ;
+7 ;retrieve the default EXPANDED MH CARE TYPE
GETEXPMH(DFN) ;
+1 ; Input:
+2 ; DFN - Patient IEN
+3 ;
+4 ; Output:
+5 ; EXPANDED MH CARE TYPE (File #2,Field #.5501)
+6 ;
+7 NEW VAEL,X
+8 IF '$DATA(^DPT(DFN))
QUIT "-1^Patient not found"
+9 DO ELIG^VADPT
+10 QUIT $PIECE($GET(VAEL(10)),U)
+11 ;
+12 ;this API returns the EXPANDED MH CARE TYPE
GETEXPR(DFN) ;
+1 ; Input:
+2 ; DFN - Patient IEN
+3 ;
+4 ; Output:
+5 ; RET - EXPANDED MH CARE TYPE
+6 ;
+7 QUIT $$GETEXPMH(DFN)
+8 ;
ISOTH(DGEXP) ;
+1 ;DG*5.3*977 OTH-EXT
+2 ;Added OTH-EXT check
+3 QUIT $SELECT("/OTH-EXT/"[("/"_DGEXP_"/"):1,"/OTH-90/"[("/"_DGEXP_"/"):2,1:0)
+4 ;