AGMBIR1 ;IHS/OIT/NKD - PAT REG MBI DETAIL ; JULY 23, 2018
;;7.1;PATIENT REGISTRATION;**14**;AUG 25, 2005;Build 1
;
;IHS/OIT/NKD AG*7.1*14 MBI PHASE 2
;
PAT ; PATIENT LOOKUP
N DFN,RHIFLAG,REC,AGPATDFN,AGRES
D PTLK^AG
Q:'$D(DFN)!$D(DUOUT)!$D(DFOUT)!$D(DTOUT)!$D(DIRUT)
PRINT ; PRINT DETAILS
S AGRES=$$GETMBIS^AGUTL(DFN,"AGRES")
I 'AGRES W !!,"Patient has no MBI history on file."
E D
. W !!,?10,"Eff Date",?26,"MBI",?40,"Source"
. N CNT S CNT=0 F S CNT=$O(AGRES(CNT)) Q:'CNT D
. . W !,$$RJ^XLFSTR(CNT_")",6),?10,$P(AGRES(CNT,0),U,2),?26,$P(AGRES(CNT,0),U,3),?40,$P(AGRES(CNT,0),U,4)
END ; CLEANUP
K DIR
S DIR("A")="Press RETURN..."
S DIR(0)="E"
D ^DIR
K DIR
D ^XBFMK,KILL^AUPNPAT
Q
AGMBIR1 ;IHS/OIT/NKD - PAT REG MBI DETAIL ; JULY 23, 2018
+1 ;;7.1;PATIENT REGISTRATION;**14**;AUG 25, 2005;Build 1
+2 ;
+3 ;IHS/OIT/NKD AG*7.1*14 MBI PHASE 2
+4 ;
PAT ; PATIENT LOOKUP
+1 NEW DFN,RHIFLAG,REC,AGPATDFN,AGRES
+2 DO PTLK^AG
+3 IF '$DATA(DFN)!$DATA(DUOUT)!$DATA(DFOUT)!$DATA(DTOUT)!$DATA(DIRUT)
QUIT
PRINT ; PRINT DETAILS
+1 SET AGRES=$$GETMBIS^AGUTL(DFN,"AGRES")
+2 IF 'AGRES
WRITE !!,"Patient has no MBI history on file."
+3 IF '$TEST
Begin DoDot:1
+4 WRITE !!,?10,"Eff Date",?26,"MBI",?40,"Source"
+5 NEW CNT
SET CNT=0
FOR
SET CNT=$ORDER(AGRES(CNT))
IF 'CNT
QUIT
Begin DoDot:2
+6 WRITE !,$$RJ^XLFSTR(CNT_")",6),?10,$PIECE(AGRES(CNT,0),U,2),?26,$PIECE(AGRES(CNT,0),U,3),?40,$PIECE(AGRES(CNT,0),U,4)
End DoDot:2
End DoDot:1
END ; CLEANUP
+1 KILL DIR
+2 SET DIR("A")="Press RETURN..."
+3 SET DIR(0)="E"
+4 DO ^DIR
+5 KILL DIR
+6 DO ^XBFMK
DO KILL^AUPNPAT
+7 QUIT