BQIRMPAT ;PRXM/HC/ALA-Recalculate a patient's reminders ; 15 Jun 2007 10:47 AM
;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
;
Q
;
EN(DATA,DFN) ;EP - BQI REFRESH PATIENT REMINDERS
; Input
; DFN - Patient internal entry number
;
NEW UID,II,ERROR,BQIDFN
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIRMPAT",UID))
K @DATA
;
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIRMPAT D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
S @DATA@(II)="I00010RESULT"_$C(30)
S BQIDFN=$G(DFN,"")
I BQIDFN="" S BMXSEC="No patient selected" Q
;
D PAT^BQIRMDR(BQIDFN,1)
S II=II+1,@DATA@(II)="1"_$C(30)
S II=II+1,@DATA@(II)=$C(31)
Q
;
ERR ;
D ^%ZTER
NEW Y,ERRDTM
S Y=$$NOW^XLFDT() X ^DD("DD") S ERRDTM=Y
S BMXSEC="Recording that an error occurred at "_ERRDTM
I $D(II),$D(DATA) S II=II+1,@DATA@(II)="-1"_$C(30)
I $D(II),$D(DATA) S II=II+1,@DATA@(II)=$C(31)
Q
BQIRMPAT ;PRXM/HC/ALA-Recalculate a patient's reminders ; 15 Jun 2007 10:47 AM
+1 ;;2.1;ICARE MANAGEMENT SYSTEM;;Feb 07, 2011
+2 ;
+3 QUIT
+4 ;
EN(DATA,DFN) ;EP - BQI REFRESH PATIENT REMINDERS
+1 ; Input
+2 ; DFN - Patient internal entry number
+3 ;
+4 NEW UID,II,ERROR,BQIDFN
+5 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+6 SET DATA=$NAME(^TMP("BQIRMPAT",UID))
+7 KILL @DATA
+8 ;
+9 SET II=0
+10 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIRMPAT D UNWIND^%ZTER"
+11 SET @DATA@(II)="I00010RESULT"_$CHAR(30)
+12 SET BQIDFN=$GET(DFN,"")
+13 IF BQIDFN=""
SET BMXSEC="No patient selected"
QUIT
+14 ;
+15 DO PAT^BQIRMDR(BQIDFN,1)
+16 SET II=II+1
SET @DATA@(II)="1"_$CHAR(30)
+17 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+18 QUIT
+19 ;
ERR ;
+1 DO ^%ZTER
+2 NEW Y,ERRDTM
+3 SET Y=$$NOW^XLFDT()
XECUTE ^DD("DD")
SET ERRDTM=Y
+4 SET BMXSEC="Recording that an error occurred at "_ERRDTM
+5 IF $DATA(II)
IF $DATA(DATA)
SET II=II+1
SET @DATA@(II)="-1"_$CHAR(30)
+6 IF $DATA(II)
IF $DATA(DATA)
SET II=II+1
SET @DATA@(II)=$CHAR(31)
+7 QUIT