DGRRLU1A ;alb/aas,BPFO/MM DG Replacement and Rehosting RPC for VADPT (cont) - ;11/12/2003
;;5.3;Registration;**538**;Aug 13, 1993
;
;Continued from DGRRLU1
;
10 ; -- means test required, get current means test status and MAS Parameter display of notification
; if (paramater && last means test indicator == "r") display message
N DGMTLST,DIVRULE,DIVTXT,DGMSGF,DGMFLG,X,DGDOM,DGDOM1
S DIVRULE="false"
I $P($G(^DG(40.8,+$O(^DG(40.8,"AD",+$G(DIV),0)),"MT")),"^")="Y" S DIVRULE="true"
S DGMSGF=1
S DGMTLST=$$CMTS^DGMTU(DFN)
S DGMFLG=$$MFLG^DGMTU(DGMTLST)
;S DGMTDATE=$P($G(^DGMT(408.31,+DGMTLST,0)),U)
S DIVTXT=$P($G(^DG(40.8,+$O(^DG(40.8,"AD",+$G(DIV),0)),"MT")),"^",2)
S X=" "
DO ADD^DGRRLU(X)
;
11 ; -- legacy data for patient, check to see if patient on M data base merged into current M database
; Beginning with release 4, the legacy alert will always return false.
; Alert no longer displayed. It will be removed in a future release.
DO ADD^DGRRLU(" ")
;
12 ; -- fugitive felon -- to be released soon.
NEW FUGITIVE
SET FUGITIVE="false"
IF $D(^DPT("AXFFP",1,DFN)) SET FUGITIVE="true"
DO ADD^DGRRLU(" ")
;
13 ; -- patient record flag
N DGPFFLGS,DGPFFLG,DGRRNFLG
S DGRRNFLG=0
S DGPFFLG=""
IF +$G(PARAMS("PATIENT_RECORD_FLAG")) DO ; old version of patient record flag
.I $L($T(GETACT^DGPFAPI)) S DGPFFLGS=$$GETACT^DGPFAPI(DFN,"DGPFFLGS") D
.. I $G(DGPFFLGS)=0 Q
.. N DGPFI
.. S DGPFI=0
.. F S DGPFI=$O(DGPFFLGS(DGPFI)) Q:'DGPFI D
...I DGPFI>1 S DGPFFLG=DGPFFLG_", "
...S DGPFFLG=DGPFFLG_$P($G(DGPFFLGS(+DGPFI,"FLAG")),U,2)
.DO ADD^DGRRLU(" ")
;
IF '+$G(PARAMS("PATIENT_RECORD_FLAG")) DO ; new (06/17/04) version of patient record flag can be turned on with this param, the flag and the old code can be removed once the new stuff is approved
.I '$L($T(GETACT^DGPFAPI)) S DGRRNFLG=1 D NOALRT
.Q:DGRRNFLG=1
.S DGPFFLGS=$$GETACT^DGPFAPI(DFN,"DGPFFLGS") D
.. I $G(DGPFFLGS)=0 D NOALRT Q
.. D ADD^DGRRLU(" ")
.. N DGPFI
.. S DGPFI=0
.. F S DGPFI=$O(DGPFFLGS(DGPFI)) Q:'DGPFI D
...N APPRVBY,ASSIGNDT,CATEGORY,FLAG,FLAGTYPE,ORIGSITE,OWNER,REVDT,LINE
...S APPRVBY=$$CHARCHK^DGRRUTL($P($G(DGPFFLGS(DGPFI,"APPRVBY")),U,2))
...S ASSIGNDT=$P($P($G(DGPFFLGS(DGPFI,"ASSIGNDT")),U),".")
...S FLAG=$$CHARCHK^DGRRUTL($P($G(DGPFFLGS(DGPFI,"FLAG")),U,2))
...S FLAGTYPE=$$CHARCHK^DGRRUTL($P($G(DGPFFLGS(DGPFI,"FLAGTYPE")),U,2))
...S ORIGSITE=$$CHARCHK^DGRRUTL($P($G(DGPFFLGS(DGPFI,"ORIGSITE")),U,2))
...S OWNER=$$CHARCHK^DGRRUTL($P($G(DGPFFLGS(DGPFI,"OWNER")),U,2))
...S REVDT=$P($G(DGPFFLGS(DGPFI,"REVIEWDT")),U)
...S LINE=" "
...D ADD^DGRRLU(LINE)
...D ADD^DGRRLU(" ")
...N DGRRNI
...S DGRRNI=0
...F S DGRRNI=$O(DGPFFLGS(DGPFI,"NARR",DGRRNI)) Q:'DGRRNI D
....N DGRRNL
....S DGRRNL=$G(DGPFFLGS(DGPFI,"NARR",DGRRNI,0))
....D ADD^DGRRLU(" "_$$CHARCHK^DGRRUTL(DGRRNL)_"")
...D ADD^DGRRLU(" ")
...D ADD^DGRRLU(" ")
..D ADD^DGRRLU(" ")
;
14 ; -- patient merged -- not a requirement
DO ADD^DGRRLU(" ")
;
15 ; -- combat vet status -- being worked on by Edna Curtain.
N CVSTATUS,CVEND,DGCV
SET (CVSTATUS,CVEND,DGCV)=""
I $L($T(CVEDT^DGCV)) S DGCV=$$CVEDT^DGCV(+DFN)
I $P(DGCV,"^")=1 D
. SET CVSTATUS=$S($P(DGCV,"^",2)>DT:"ELIGIBLE",1:"EXPIRED")
. SET CVEND=$P(DGCV,"^",2)
DO ADD^DGRRLU(" ")
16 ;Bad Address Indicator
N DGRRBA
S DGRRBA=$$BADADR^DGUTL3(DFN)
DO ADD^DGRRLU(" ")
;
END QUIT
;
NOALRT ;Returns an empty alert for Patient Record Flag
D ADD^DGRRLU(" ")
S LINE=" "
D ADD^DGRRLU(LINE)
D ADD^DGRRLU(" ")
D ADD^DGRRLU(" ")
D ADD^DGRRLU(" ")
Q