BQIMUVFL ;VNGT/HS/BEE-MU Retrieve V UPDATED/REVIEWED information ; 17 Dec 2010 9:03 AM
;;2.2;ICARE MANAGEMENT SYSTEM;;Jul 28, 2011;Build 37
;
;
EN(DATA,DFN,ACTION) ;EP -- BQI GET VFILE INFO
;
;Returns V UPDATED/REVIEWED file information
;
;Input:
; DFN - Patient IEN
; ACTION - NULL - Return most recent information for all CLINICAL REVIEW ACTIONS
; - Unique CLINICAL ACTION ENTRY - Return just the most recent information for that entry
; - ALLERGY - Returns the most recent information for Allergy-related CLINICAL REVIEW ACTIONS
; - PROBLEM LIST - Returns the most recent information for Problem List-related CLINICAL REVIEW ACTIONS
; - MEDICATION - Returns the most recent information for Medication-related CLINICAL REVIEW ACTIONS
;
NEW UID,II,HDR,ACT,IEN,CACT
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIMUVFL",UID))
K @DATA
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIMUVFL D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
S HDR="T00045ACTION^D00015DATE^T00030ENCOUNTER_PROVIDER"
S @DATA@(II)=HDR_$C(30)
;
; Set up listing of ACTIONs to return
S:ACTION="ALLERGY" ACTION="ALLERG"
S:ACTION="PROBLEM LIST" ACTION="PROBLEM"
D
. I ACTION="ALLERG"!(ACTION="PROBLEM")!(ACTION="MEDICATION") D Q
.. S ACT=0 F S ACT=$O(^AUTTCRA(ACT)) Q:'ACT S CACT=$G(^AUTTCRA(ACT,0)) I $P(CACT,U)[ACTION,$P(CACT,U,2)]"" S ACT($P(CACT,U,2))=$P(CACT,U)
. I ACTION]"" D Q
.. S ACT=$O(^AUTTCRA("B",ACTION,"")) I ACT]"" S CACT=$G(^AUTTCRA(ACT,0)) I $P(CACT,U,2)]"" S ACT($P(CACT,U,2))=ACTION
. S ACT=0 F S ACT=$O(^AUTTCRA(ACT)) Q:'ACT S CACT=$G(^AUTTCRA(ACT,0)) I $P(CACT,U,2)]"" S ACT($P(CACT,U,2))=$P(CACT,U)
;
; Loop through desired list and pull entries
S ACT="" F S ACT=$O(ACT(ACT)) Q:ACT="" I $T(@ACT)]"" D @(ACT_"("_DFN_")")
;
DONE S II=II+1,@DATA@(II)=$C(31)
Q
;
RPBL(DATA,DFN,ACTION) ;EP -- BQI GET MU PRB INFO
;
;Returns Problem List MU individual information for a particular patient
;
;Input:
; DFN - Patient IEN
; ACTION - PROBLEM LIST REVIEWED/PROBLEM LIST UPDATED/NO ACTIVE PROBLEMS
;
NEW UID,II,HDR,ACT,IEN,CACT,CALL
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("BQIMUVFL",UID))
K @DATA
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^BQIMUVFL D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
S HDR="I00010DFN^T00045ACTION^D00030APCDTCDT^T00035APCDTEPR"
S @DATA@(II)=HDR_$C(30)
;
S CALL=""
S ACT=$O(^AUTTCRA("B",ACTION,"")) I ACT]"" S CACT=$G(^AUTTCRA(ACT,0)) I $P(CACT,U,2)]"" S CALL="P"_$P(CACT,U,2)
;
;If defined, call tag
I CALL]"",$T(@CALL)]"" D @(CALL_"("_DFN_")")
;
XRPBL S II=II+1,@DATA@(II)=$C(31)
Q
;
PLR(DFN) ;EP-Retrieve PROBLEM LIST REVIEWED info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTPLR^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D WRT(RSLT)
Q
;
PLU(DFN) ;EP-Retrieve PROBLEM LIST UPDATED info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTPLU^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D WRT(RSLT)
Q
;
NAP(DFN) ;EP-Retrieve NO ACTIVE PROBLEMS info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTNAP^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D WRT(RSLT)
Q
;
PPLR(DFN) ;EP-Retrieve PROBLEM LIST REVIEWED info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTPLR^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D PWRT(RSLT,DFN)
Q
;
PPLU(DFN) ;EP-Retrieve PROBLEM LIST UPDATED info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTPLU^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D PWRT(RSLT,DFN)
Q
;
PNAP(DFN) ;EP-Retrieve NO ACTIVE PROBLEMS info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTNAP^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D PWRT(RSLT,DFN)
Q
;
MLR(DFN) ;EP-Retrieve MEDICATION LIST REVIEWED info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTMLR^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D WRT(RSLT)
Q
;
MLU(DFN) ;EP-Retrieve MEDICATION LIST UPDATED info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTMLU^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D WRT(RSLT)
Q
;
NAM(DFN) ;EP-Retrieve NO ACTIVE MEDICATIONS info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTNAM^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D WRT(RSLT)
Q
;
ALR(DFN) ;EP-Retrieve ALLERGY LIST REVIEWED info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTALR^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D WRT(RSLT)
Q
;
ALU(DFN) ;EP-Retrieve ALLERGY LIST UPDATED info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTALU^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D WRT(RSLT)
Q
;
NAA(DFN) ;EP-Retrieve NO ACTIVE ALLERGIES info
;
;Input:
; II - Index entry
; DATA - Array to store info
;Output:
; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
;
N RSLT
S RSLT=$$LASTNAA^APCLAPI6(DFN,,DT,"A") Q:RSLT=""
D WRT(RSLT)
Q
;
FRMT(X) ;EP-Format output for BQI GET VFILE INFO
N RSLT
Q:X="" ""
;
;Pull time from entry if not defined (current API doesnt return time)
I $P($P(X,U),".",2)="" D
. N IEN,DTM
. S IEN=$P(X,U,6) Q:IEN=""
. S DTM=$$GET1^DIQ(9000010.54,IEN_",",1201,"I")
. S:DTM["." $P(X,U)=DTM
;
S RSLT=$P(X,U,2)_U_$$FMTE^BQIUL1($P(X,U))_U_$$GET1^DIQ(200,$P(X,U,3)_",",.01,"E")
Q RSLT
;
WRT(RSLT) ;EP-Write output string to Global Array for BQI GET VFILE INFO
S RSLT=$$FRMT(RSLT)
S II=II+1,@DATA@(II)=RSLT_$C(30)
Q
;
PFRMT(X,DFN) ;EP-Format output for BQI GET MU PRB INFO
N RSLT
Q:X="" ""
;
;Check for time in result - Pull from file if blank (current API doesn't include time)
I $P($P(X,U),".",2)="" D
. N IEN,DTM
. S IEN=$P(X,U,6) Q:IEN=""
. S DTM=$$GET1^DIQ(9000010.54,IEN_",",1201,"I")
. S:DTM["." $P(X,U)=DTM
;
S RSLT=DFN_U_$P(X,U,2)_U_$$FMTE^BQIUL1($P(X,U))_U_$P(X,U,3)_$C(28)_$$GET1^DIQ(200,$P(X,U,3)_",",.01,"E")
Q RSLT
;
PWRT(RSLT,DFN) ;EP-Write output string to Global Array for BQI GET MU PRB INFO
S RSLT=$$PFRMT(RSLT,DFN)
S II=II+1,@DATA@(II)=RSLT_$C(30)
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)=$C(31)
Q
BQIMUVFL ;VNGT/HS/BEE-MU Retrieve V UPDATED/REVIEWED information ; 17 Dec 2010 9:03 AM
+1 ;;2.2;ICARE MANAGEMENT SYSTEM;;Jul 28, 2011;Build 37
+2 ;
+3 ;
EN(DATA,DFN,ACTION) ;EP -- BQI GET VFILE INFO
+1 ;
+2 ;Returns V UPDATED/REVIEWED file information
+3 ;
+4 ;Input:
+5 ; DFN - Patient IEN
+6 ; ACTION - NULL - Return most recent information for all CLINICAL REVIEW ACTIONS
+7 ; - Unique CLINICAL ACTION ENTRY - Return just the most recent information for that entry
+8 ; - ALLERGY - Returns the most recent information for Allergy-related CLINICAL REVIEW ACTIONS
+9 ; - PROBLEM LIST - Returns the most recent information for Problem List-related CLINICAL REVIEW ACTIONS
+10 ; - MEDICATION - Returns the most recent information for Medication-related CLINICAL REVIEW ACTIONS
+11 ;
+12 NEW UID,II,HDR,ACT,IEN,CACT
+13 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+14 SET DATA=$NAME(^TMP("BQIMUVFL",UID))
+15 KILL @DATA
+16 SET II=0
+17 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIMUVFL D UNWIND^%ZTER"
+18 SET HDR="T00045ACTION^D00015DATE^T00030ENCOUNTER_PROVIDER"
+19 SET @DATA@(II)=HDR_$CHAR(30)
+20 ;
+21 ; Set up listing of ACTIONs to return
+22 IF ACTION="ALLERGY"
SET ACTION="ALLERG"
+23 IF ACTION="PROBLEM LIST"
SET ACTION="PROBLEM"
+24 Begin DoDot:1
+25 IF ACTION="ALLERG"!(ACTION="PROBLEM")!(ACTION="MEDICATION")
Begin DoDot:2
+26 SET ACT=0
FOR
SET ACT=$ORDER(^AUTTCRA(ACT))
IF 'ACT
QUIT
SET CACT=$GET(^AUTTCRA(ACT,0))
IF $PIECE(CACT,U)[ACTION
IF $PIECE(CACT,U,2)]""
SET ACT($PIECE(CACT,U,2))=$PIECE(CACT,U)
End DoDot:2
QUIT
+27 IF ACTION]""
Begin DoDot:2
+28 SET ACT=$ORDER(^AUTTCRA("B",ACTION,""))
IF ACT]""
SET CACT=$GET(^AUTTCRA(ACT,0))
IF $PIECE(CACT,U,2)]""
SET ACT($PIECE(CACT,U,2))=ACTION
End DoDot:2
QUIT
+29 SET ACT=0
FOR
SET ACT=$ORDER(^AUTTCRA(ACT))
IF 'ACT
QUIT
SET CACT=$GET(^AUTTCRA(ACT,0))
IF $PIECE(CACT,U,2)]""
SET ACT($PIECE(CACT,U,2))=$PIECE(CACT,U)
End DoDot:1
+30 ;
+31 ; Loop through desired list and pull entries
+32 SET ACT=""
FOR
SET ACT=$ORDER(ACT(ACT))
IF ACT=""
QUIT
IF $TEXT(@ACT)]""
DO @(ACT_"("_DFN_")")
+33 ;
DONE SET II=II+1
SET @DATA@(II)=$CHAR(31)
+1 QUIT
+2 ;
RPBL(DATA,DFN,ACTION) ;EP -- BQI GET MU PRB INFO
+1 ;
+2 ;Returns Problem List MU individual information for a particular patient
+3 ;
+4 ;Input:
+5 ; DFN - Patient IEN
+6 ; ACTION - PROBLEM LIST REVIEWED/PROBLEM LIST UPDATED/NO ACTIVE PROBLEMS
+7 ;
+8 NEW UID,II,HDR,ACT,IEN,CACT,CALL
+9 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+10 SET DATA=$NAME(^TMP("BQIMUVFL",UID))
+11 KILL @DATA
+12 SET II=0
+13 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^BQIMUVFL D UNWIND^%ZTER"
+14 SET HDR="I00010DFN^T00045ACTION^D00030APCDTCDT^T00035APCDTEPR"
+15 SET @DATA@(II)=HDR_$CHAR(30)
+16 ;
+17 SET CALL=""
+18 SET ACT=$ORDER(^AUTTCRA("B",ACTION,""))
IF ACT]""
SET CACT=$GET(^AUTTCRA(ACT,0))
IF $PIECE(CACT,U,2)]""
SET CALL="P"_$PIECE(CACT,U,2)
+19 ;
+20 ;If defined, call tag
+21 IF CALL]""
IF $TEXT(@CALL)]""
DO @(CALL_"("_DFN_")")
+22 ;
XRPBL SET II=II+1
SET @DATA@(II)=$CHAR(31)
+1 QUIT
+2 ;
PLR(DFN) ;EP-Retrieve PROBLEM LIST REVIEWED info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTPLR^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO WRT(RSLT)
+11 QUIT
+12 ;
PLU(DFN) ;EP-Retrieve PROBLEM LIST UPDATED info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTPLU^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO WRT(RSLT)
+11 QUIT
+12 ;
NAP(DFN) ;EP-Retrieve NO ACTIVE PROBLEMS info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTNAP^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO WRT(RSLT)
+11 QUIT
+12 ;
PPLR(DFN) ;EP-Retrieve PROBLEM LIST REVIEWED info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTPLR^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO PWRT(RSLT,DFN)
+11 QUIT
+12 ;
PPLU(DFN) ;EP-Retrieve PROBLEM LIST UPDATED info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTPLU^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO PWRT(RSLT,DFN)
+11 QUIT
+12 ;
PNAP(DFN) ;EP-Retrieve NO ACTIVE PROBLEMS info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTNAP^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO PWRT(RSLT,DFN)
+11 QUIT
+12 ;
MLR(DFN) ;EP-Retrieve MEDICATION LIST REVIEWED info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTMLR^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO WRT(RSLT)
+11 QUIT
+12 ;
MLU(DFN) ;EP-Retrieve MEDICATION LIST UPDATED info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTMLU^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO WRT(RSLT)
+11 QUIT
+12 ;
NAM(DFN) ;EP-Retrieve NO ACTIVE MEDICATIONS info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTNAM^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO WRT(RSLT)
+11 QUIT
+12 ;
ALR(DFN) ;EP-Retrieve ALLERGY LIST REVIEWED info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTALR^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO WRT(RSLT)
+11 QUIT
+12 ;
ALU(DFN) ;EP-Retrieve ALLERGY LIST UPDATED info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTALU^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO WRT(RSLT)
+11 QUIT
+12 ;
NAA(DFN) ;EP-Retrieve NO ACTIVE ALLERGIES info
+1 ;
+2 ;Input:
+3 ; II - Index entry
+4 ; DATA - Array to store info
+5 ;Output:
+6 ; @DATA = CLINICAL ACTION^DATE OF OCCURRANCE^ENTERED BY
+7 ;
+8 NEW RSLT
+9 SET RSLT=$$LASTNAA^APCLAPI6(DFN,,DT,"A")
IF RSLT=""
QUIT
+10 DO WRT(RSLT)
+11 QUIT
+12 ;
FRMT(X) ;EP-Format output for BQI GET VFILE INFO
+1 NEW RSLT
+2 IF X=""
QUIT ""
+3 ;
+4 ;Pull time from entry if not defined (current API doesnt return time)
+5 IF $PIECE($PIECE(X,U),".",2)=""
Begin DoDot:1
+6 NEW IEN,DTM
+7 SET IEN=$PIECE(X,U,6)
IF IEN=""
QUIT
+8 SET DTM=$$GET1^DIQ(9000010.54,IEN_",",1201,"I")
+9 IF DTM["."
SET $PIECE(X,U)=DTM
End DoDot:1
+10 ;
+11 SET RSLT=$PIECE(X,U,2)_U_$$FMTE^BQIUL1($PIECE(X,U))_U_$$GET1^DIQ(200,$PIECE(X,U,3)_",",.01,"E")
+12 QUIT RSLT
+13 ;
WRT(RSLT) ;EP-Write output string to Global Array for BQI GET VFILE INFO
+1 SET RSLT=$$FRMT(RSLT)
+2 SET II=II+1
SET @DATA@(II)=RSLT_$CHAR(30)
+3 QUIT
+4 ;
PFRMT(X,DFN) ;EP-Format output for BQI GET MU PRB INFO
+1 NEW RSLT
+2 IF X=""
QUIT ""
+3 ;
+4 ;Check for time in result - Pull from file if blank (current API doesn't include time)
+5 IF $PIECE($PIECE(X,U),".",2)=""
Begin DoDot:1
+6 NEW IEN,DTM
+7 SET IEN=$PIECE(X,U,6)
IF IEN=""
QUIT
+8 SET DTM=$$GET1^DIQ(9000010.54,IEN_",",1201,"I")
+9 IF DTM["."
SET $PIECE(X,U)=DTM
End DoDot:1
+10 ;
+11 SET RSLT=DFN_U_$PIECE(X,U,2)_U_$$FMTE^BQIUL1($PIECE(X,U))_U_$PIECE(X,U,3)_$CHAR(28)_$$GET1^DIQ(200,$PIECE(X,U,3)_",",.01,"E")
+12 QUIT RSLT
+13 ;
PWRT(RSLT,DFN) ;EP-Write output string to Global Array for BQI GET MU PRB INFO
+1 SET RSLT=$$PFRMT(RSLT,DFN)
+2 SET II=II+1
SET @DATA@(II)=RSLT_$CHAR(30)
+3 QUIT
+4 ;
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)=$CHAR(31)
+6 QUIT