DGOTHMG1 ;SHRPE/YMG - OTH Management actions ;04/30/19
;;5.3;Registration;**952**;Aug 13, 1993;Build 160
;;Per VA Directive 6402, this routine should not be modified.
;
Q
;
SP ; select patient
;
; DGDFN, DGIEN33, and DSPMODE are defined in ^DGOTHMGT
;
N DIC,DTOUT,DUOUT,X,Y
D FULL^VALM1
S VALMBCK="R"
S DIC="^DGOTH(33,",DIC(0)="AEQZV",DIC("A")="Select OTH Eligibility Patient: "
;screen out all that are not active or not OTH-90
S DIC("S")="I $P(^(0),U,2)=1,$$GET1^DIQ(2,$P(^(0),U)_"","",.5501,""I"")=""OTH-90"""
D ^DIC K DIC
I +Y>0 D
.S DGIEN33=+Y,DGDFN=+Y(0)
.D BLD^DGOTHMGT(DSPMODE) ; rebuild list
.D BLDHDR^DGOTHMGT(DSPMODE) ; rebuild header
.Q
Q
;
PI ; patient inquiry
;
; DGDFN and DGIEN33 are defined in ^DGOTHMGT
;
D FULL^VALM1
D CLEAR^VALM1
S VALMBCK="R"
D PATDISP^DGOTHINQ
D ASKCONT^DGOTHMG2
Q
;
VD ; view denied requests
;
; DGSVDDF and DSPMODE are defined in ^DGOTHMGT
;
S VALMBCK="R"
S DSPMODE=1
; change caption
K VALMDDF M VALMDDF=DGSVDDF("D") D CHGCAP^VALM("LINE","Line") ; use CHGCAP^VALM to reload VALMDDF array
D BLD^DGOTHMGT(DSPMODE) ; rebuild list
D BLDHDR^DGOTHMGT(DSPMODE) ; rebuild header
Q
;
VA ; view approved requests
;
; DGSVDDF and DSPMODE are defined in ^DGOTHMGT
;
S VALMBCK="R"
S DSPMODE=0
; change caption
K VALMDDF M VALMDDF=DGSVDDF("A") D CHGCAP^VALM("LINE","Line") ; use CHGCAP^VALM to reload VALMDDF array
D BLD^DGOTHMGT(DSPMODE) ; rebuild list
D BLDHDR^DGOTHMGT(DSPMODE) ; rebuild header
Q
;
SD ; show request details
;
; DGIEN33 and DSPMODE are defined in ^DGOTHMGT
;
N DATASTR,DENIEN,DGIEN365,DGIEN90,SEL,Z
D FULL^VALM1
S VALMBCK="R"
D EN^VALM2($G(XQORNOD(0)),"S")
S SEL=$O(VALMY("")) I 'SEL Q
I DSPMODE D
.; denied request
.S DENIEN=$G(@VALMAR@("IDX",SEL,SEL))
.S DATASTR=$$GETDEN^DGOTHUT1(DGIEN33,DENIEN) I +DATASTR<0 W !!,"Error: ",$P(DATASTR,U,2) Q
.W !!,$$CJ^XLFSTR("Denied authorization request details",80)
.W !,$$CJ^XLFSTR("------------------------------------",80)
.W !," Request #: ",$P(DATASTR,U)
.W !,"Date request submitted: ",$$FMTE^XLFDT($P(DATASTR,U,2))
.W !," Authorization comment: ",$P(DATASTR,U,3)
.W !," Request entered on: ",$$FMTE^XLFDT($P(DATASTR,U,5))
.W !," Request entered by: ",$P(DATASTR,U,4)
.;W !," Facility: ",$$NAME^XUAF4($P(DATASTR,U,6))
.W !," Facility: ",$P(DATASTR,U,6)
.W !
.Q
I 'DSPMODE D
.; approved request
.S Z=$G(@VALMAR@("IDX",SEL,SEL)),DGIEN365=$P(Z,U),DGIEN90=$P(Z,U,2)
.S DATASTR=$$GETAUTH^DGOTHUT1(DGIEN33,DGIEN365,DGIEN90) I +DATASTR<0 W !!,"Error: ",$P(DATASTR,U,2) Q
.I $P(DATASTR,U,2)=1 D
..W !!,$$CJ^XLFSTR("Period details",80)
..W !,$$CJ^XLFSTR("--------------",80)
..Q
.I $P(DATASTR,U,2)'=1 D
..W !!,$$CJ^XLFSTR("Approved authorization request details",80)
..W !,$$CJ^XLFSTR("--------------------------------------",80)
..Q
.W !," 365 day period number: ",$P(DATASTR,U)
.W !," 90 day period number: ",$P(DATASTR,U,2)
.W !," Start date: ",$$FMTE^XLFDT($P(DATASTR,U,3))
.I $P(DATASTR,U,2)'=1 D
..W !," Date request submitted: ",$$FMTE^XLFDT($P(DATASTR,U,4))
..W !," Authorized by: ",$P(DATASTR,U,8)
..W !,"Authorization received date: ",$$FMTE^XLFDT($P(DATASTR,U,5))
..Q
.W !," Entered / edited on: ",$$FMTE^XLFDT($P(DATASTR,U,7))
.W !," Entered / edited by: ",$P(DATASTR,U,6)
.;W !," Facility: ",$$NAME^XUAF4($P(DATASTR,U,9))
.W !," Facility: ",$P(DATASTR,U,9)
.Q
D ASKCONT^DGOTHMG2
Q
;
PR ; show pending request
;
; DGDFN is defined in ^DGOTHMGT
;
N DATASTR
D FULL^VALM1
S VALMBCK="R"
S DATASTR=$$GETPEND^DGOTHUT1(DGDFN)
I +DATASTR'>0 W !!,"Error: ",$P(DATASTR,U,2)
I +DATASTR>0 D
.W !!,$$CJ^XLFSTR("Pending authorization request details",80)
.W !,$$CJ^XLFSTR("-------------------------------------",80)
.W !,"Date request submitted: ",$$FMTE^XLFDT($P(DATASTR,U,2))
.W !," Request entered on: ",$$FMTE^XLFDT($P(DATASTR,U,4))
.W !," Request entered by: ",$P(DATASTR,U,3)
.;W !," Facility: ",$$NAME^XUAF4($P(DATASTR,U,5))
.W !," Facility: ",$P(DATASTR,U,5)
.Q
D ASKCONT^DGOTHMG2
Q
;
CHKKEY(DGKEY) ; check if current user has a given security key
;
; DGKEY - name of the security key to check
;
; assumes that DUZ is defined
;
; returns 1 if user has the key in question, 0 otherwise
;
N RES
D OWNSKEY^XUSRB(.RES,DGKEY)
Q RES(0)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGOTHMG1 4569 printed Oct 16, 2024@18:47:32 Page 2
DGOTHMG1 ;SHRPE/YMG - OTH Management actions ;04/30/19
+1 ;;5.3;Registration;**952**;Aug 13, 1993;Build 160
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 QUIT
+5 ;
SP ; select patient
+1 ;
+2 ; DGDFN, DGIEN33, and DSPMODE are defined in ^DGOTHMGT
+3 ;
+4 NEW DIC,DTOUT,DUOUT,X,Y
+5 DO FULL^VALM1
+6 SET VALMBCK="R"
+7 SET DIC="^DGOTH(33,"
SET DIC(0)="AEQZV"
SET DIC("A")="Select OTH Eligibility Patient: "
+8 ;screen out all that are not active or not OTH-90
+9 SET DIC("S")="I $P(^(0),U,2)=1,$$GET1^DIQ(2,$P(^(0),U)_"","",.5501,""I"")=""OTH-90"""
+10 DO ^DIC
KILL DIC
+11 IF +Y>0
Begin DoDot:1
+12 SET DGIEN33=+Y
SET DGDFN=+Y(0)
+13 ; rebuild list
DO BLD^DGOTHMGT(DSPMODE)
+14 ; rebuild header
DO BLDHDR^DGOTHMGT(DSPMODE)
+15 QUIT
End DoDot:1
+16 QUIT
+17 ;
PI ; patient inquiry
+1 ;
+2 ; DGDFN and DGIEN33 are defined in ^DGOTHMGT
+3 ;
+4 DO FULL^VALM1
+5 DO CLEAR^VALM1
+6 SET VALMBCK="R"
+7 DO PATDISP^DGOTHINQ
+8 DO ASKCONT^DGOTHMG2
+9 QUIT
+10 ;
VD ; view denied requests
+1 ;
+2 ; DGSVDDF and DSPMODE are defined in ^DGOTHMGT
+3 ;
+4 SET VALMBCK="R"
+5 SET DSPMODE=1
+6 ; change caption
+7 ; use CHGCAP^VALM to reload VALMDDF array
KILL VALMDDF
MERGE VALMDDF=DGSVDDF("D")
DO CHGCAP^VALM("LINE","Line")
+8 ; rebuild list
DO BLD^DGOTHMGT(DSPMODE)
+9 ; rebuild header
DO BLDHDR^DGOTHMGT(DSPMODE)
+10 QUIT
+11 ;
VA ; view approved requests
+1 ;
+2 ; DGSVDDF and DSPMODE are defined in ^DGOTHMGT
+3 ;
+4 SET VALMBCK="R"
+5 SET DSPMODE=0
+6 ; change caption
+7 ; use CHGCAP^VALM to reload VALMDDF array
KILL VALMDDF
MERGE VALMDDF=DGSVDDF("A")
DO CHGCAP^VALM("LINE","Line")
+8 ; rebuild list
DO BLD^DGOTHMGT(DSPMODE)
+9 ; rebuild header
DO BLDHDR^DGOTHMGT(DSPMODE)
+10 QUIT
+11 ;
SD ; show request details
+1 ;
+2 ; DGIEN33 and DSPMODE are defined in ^DGOTHMGT
+3 ;
+4 NEW DATASTR,DENIEN,DGIEN365,DGIEN90,SEL,Z
+5 DO FULL^VALM1
+6 SET VALMBCK="R"
+7 DO EN^VALM2($GET(XQORNOD(0)),"S")
+8 SET SEL=$ORDER(VALMY(""))
IF 'SEL
QUIT
+9 IF DSPMODE
Begin DoDot:1
+10 ; denied request
+11 SET DENIEN=$GET(@VALMAR@("IDX",SEL,SEL))
+12 SET DATASTR=$$GETDEN^DGOTHUT1(DGIEN33,DENIEN)
IF +DATASTR<0
WRITE !!,"Error: ",$PIECE(DATASTR,U,2)
QUIT
+13 WRITE !!,$$CJ^XLFSTR("Denied authorization request details",80)
+14 WRITE !,$$CJ^XLFSTR("------------------------------------",80)
+15 WRITE !," Request #: ",$PIECE(DATASTR,U)
+16 WRITE !,"Date request submitted: ",$$FMTE^XLFDT($PIECE(DATASTR,U,2))
+17 WRITE !," Authorization comment: ",$PIECE(DATASTR,U,3)
+18 WRITE !," Request entered on: ",$$FMTE^XLFDT($PIECE(DATASTR,U,5))
+19 WRITE !," Request entered by: ",$PIECE(DATASTR,U,4)
+20 ;W !," Facility: ",$$NAME^XUAF4($P(DATASTR,U,6))
+21 WRITE !," Facility: ",$PIECE(DATASTR,U,6)
+22 WRITE !
+23 QUIT
End DoDot:1
+24 IF 'DSPMODE
Begin DoDot:1
+25 ; approved request
+26 SET Z=$GET(@VALMAR@("IDX",SEL,SEL))
SET DGIEN365=$PIECE(Z,U)
SET DGIEN90=$PIECE(Z,U,2)
+27 SET DATASTR=$$GETAUTH^DGOTHUT1(DGIEN33,DGIEN365,DGIEN90)
IF +DATASTR<0
WRITE !!,"Error: ",$PIECE(DATASTR,U,2)
QUIT
+28 IF $PIECE(DATASTR,U,2)=1
Begin DoDot:2
+29 WRITE !!,$$CJ^XLFSTR("Period details",80)
+30 WRITE !,$$CJ^XLFSTR("--------------",80)
+31 QUIT
End DoDot:2
+32 IF $PIECE(DATASTR,U,2)'=1
Begin DoDot:2
+33 WRITE !!,$$CJ^XLFSTR("Approved authorization request details",80)
+34 WRITE !,$$CJ^XLFSTR("--------------------------------------",80)
+35 QUIT
End DoDot:2
+36 WRITE !," 365 day period number: ",$PIECE(DATASTR,U)
+37 WRITE !," 90 day period number: ",$PIECE(DATASTR,U,2)
+38 WRITE !," Start date: ",$$FMTE^XLFDT($PIECE(DATASTR,U,3))
+39 IF $PIECE(DATASTR,U,2)'=1
Begin DoDot:2
+40 WRITE !," Date request submitted: ",$$FMTE^XLFDT($PIECE(DATASTR,U,4))
+41 WRITE !," Authorized by: ",$PIECE(DATASTR,U,8)
+42 WRITE !,"Authorization received date: ",$$FMTE^XLFDT($PIECE(DATASTR,U,5))
+43 QUIT
End DoDot:2
+44 WRITE !," Entered / edited on: ",$$FMTE^XLFDT($PIECE(DATASTR,U,7))
+45 WRITE !," Entered / edited by: ",$PIECE(DATASTR,U,6)
+46 ;W !," Facility: ",$$NAME^XUAF4($P(DATASTR,U,9))
+47 WRITE !," Facility: ",$PIECE(DATASTR,U,9)
+48 QUIT
End DoDot:1
+49 DO ASKCONT^DGOTHMG2
+50 QUIT
+51 ;
PR ; show pending request
+1 ;
+2 ; DGDFN is defined in ^DGOTHMGT
+3 ;
+4 NEW DATASTR
+5 DO FULL^VALM1
+6 SET VALMBCK="R"
+7 SET DATASTR=$$GETPEND^DGOTHUT1(DGDFN)
+8 IF +DATASTR'>0
WRITE !!,"Error: ",$PIECE(DATASTR,U,2)
+9 IF +DATASTR>0
Begin DoDot:1
+10 WRITE !!,$$CJ^XLFSTR("Pending authorization request details",80)
+11 WRITE !,$$CJ^XLFSTR("-------------------------------------",80)
+12 WRITE !,"Date request submitted: ",$$FMTE^XLFDT($PIECE(DATASTR,U,2))
+13 WRITE !," Request entered on: ",$$FMTE^XLFDT($PIECE(DATASTR,U,4))
+14 WRITE !," Request entered by: ",$PIECE(DATASTR,U,3)
+15 ;W !," Facility: ",$$NAME^XUAF4($P(DATASTR,U,5))
+16 WRITE !," Facility: ",$PIECE(DATASTR,U,5)
+17 QUIT
End DoDot:1
+18 DO ASKCONT^DGOTHMG2
+19 QUIT
+20 ;
CHKKEY(DGKEY) ; check if current user has a given security key
+1 ;
+2 ; DGKEY - name of the security key to check
+3 ;
+4 ; assumes that DUZ is defined
+5 ;
+6 ; returns 1 if user has the key in question, 0 otherwise
+7 ;
+8 NEW RES
+9 DO OWNSKEY^XUSRB(.RES,DGKEY)
+10 QUIT RES(0)