XUMFHM ;ISS/RAM - MFS HANDLER ERROR MESSAGE ;11/16/05
;;8.0;KERNEL;**416**;Jul 10, 1995;Build 5
;
;
EM(ERROR,ERR) ; -- error message
;
N X,I,Y,XMTEXT,FLG
;
S FLG=0
;
D MSG^DIALOG("AM",.X,80,,"ERR")
;
;S X(.02)="",X(.03)=$G(ERROR),X(.04)=""
;
S X=.9 F S X=$O(X(X)) Q:'X D
.I X(X)="" K X(X) Q
.I X(X)["DINUMed field cannot" S FLG=1 K X(X) Q
.I X(X)["ASSOCIATION" S FLG=1 K X(X) Q
.I X(X)["INSTITUTION" S FLG=1 K X(X) Q
.I X(X)["The entry does not exist." S FLG=1 K X(X) Q
.I X(X)["already exists." S FLG=1 K X(X) Q
;
I FLG Q:'$O(X(.9))
;
S ERRCNT=ERRCNT+1
;
S ^TMP("XUMF ERROR",$J,ERRCNT_".01")=""
S ^TMP("XUMF ERROR",$J,ERRCNT_".02")=""
S ^TMP("XUMF ERROR",$J,ERRCNT_".03")=$G(ERROR)
S ^TMP("XUMF ERROR",$J,ERRCNT_".04")=""
S ^TMP("XUMF ERROR",$J,ERRCNT_".05")="KEY: "_$G(KEY)_" IFN: "_$G(IFN)_" IEN: "_$G(IEN)
S ^TMP("XUMF ERROR",$J,ERRCNT_".06")=""
S X=.9 F S X=$O(X(X)) Q:'X D
.S ^TMP("XUMF ERROR",$J,ERRCNT_"."_X)=X(X)
;
Q
;
EM1 ;
;
N XMY,XMSUB
;
S ^TMP("XUMF ERROR",$J,.1)="HL7 message ID: "_$G(HL("MID"))
S XMY("G.XUMF ERROR")="",XMSUB="MFS ERROR"
S XMTEXT="^TMP(""XUMF ERROR"",$J,"
;
D ^XMD
;
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUMFHM 1206 printed Oct 16, 2024@18:11:35 Page 2
XUMFHM ;ISS/RAM - MFS HANDLER ERROR MESSAGE ;11/16/05
+1 ;;8.0;KERNEL;**416**;Jul 10, 1995;Build 5
+2 ;
+3 ;
EM(ERROR,ERR) ; -- error message
+1 ;
+2 NEW X,I,Y,XMTEXT,FLG
+3 ;
+4 SET FLG=0
+5 ;
+6 DO MSG^DIALOG("AM",.X,80,,"ERR")
+7 ;
+8 ;S X(.02)="",X(.03)=$G(ERROR),X(.04)=""
+9 ;
+10 SET X=.9
FOR
SET X=$ORDER(X(X))
if 'X
QUIT
Begin DoDot:1
+11 IF X(X)=""
KILL X(X)
QUIT
+12 IF X(X)["DINUMed field cannot"
SET FLG=1
KILL X(X)
QUIT
+13 IF X(X)["ASSOCIATION"
SET FLG=1
KILL X(X)
QUIT
+14 IF X(X)["INSTITUTION"
SET FLG=1
KILL X(X)
QUIT
+15 IF X(X)["The entry does not exist."
SET FLG=1
KILL X(X)
QUIT
+16 IF X(X)["already exists."
SET FLG=1
KILL X(X)
QUIT
End DoDot:1
+17 ;
+18 IF FLG
if '$ORDER(X(.9))
QUIT
+19 ;
+20 SET ERRCNT=ERRCNT+1
+21 ;
+22 SET ^TMP("XUMF ERROR",$JOB,ERRCNT_".01")=""
+23 SET ^TMP("XUMF ERROR",$JOB,ERRCNT_".02")=""
+24 SET ^TMP("XUMF ERROR",$JOB,ERRCNT_".03")=$GET(ERROR)
+25 SET ^TMP("XUMF ERROR",$JOB,ERRCNT_".04")=""
+26 SET ^TMP("XUMF ERROR",$JOB,ERRCNT_".05")="KEY: "_$GET(KEY)_" IFN: "_$GET(IFN)_" IEN: "_$GET(IEN)
+27 SET ^TMP("XUMF ERROR",$JOB,ERRCNT_".06")=""
+28 SET X=.9
FOR
SET X=$ORDER(X(X))
if 'X
QUIT
Begin DoDot:1
+29 SET ^TMP("XUMF ERROR",$JOB,ERRCNT_"."_X)=X(X)
End DoDot:1
+30 ;
+31 QUIT
+32 ;
EM1 ;
+1 ;
+2 NEW XMY,XMSUB
+3 ;
+4 SET ^TMP("XUMF ERROR",$JOB,.1)="HL7 message ID: "_$GET(HL("MID"))
+5 SET XMY("G.XUMF ERROR")=""
SET XMSUB="MFS ERROR"
+6 SET XMTEXT="^TMP(""XUMF ERROR"",$J,"
+7 ;
+8 DO ^XMD
+9 ;
+10 QUIT
+11 ;