TIUHL7A ; SLC/AJB - TIUHL7 Msg Mgr ; 10OCT05
;;1.0;TEXT INTEGRATION UTILITIES;**200,228**;Jun 20, 1997
Q
DELETE ;
D FULL^VALM1
W ! I $$READ^TIUU("Y","Are you sure you wish to delete this message") D
. K ^XTMP("TIUHL7",$P(TIUMSG(TIUSEL),U,2),$P(TIUMSG(TIUSEL),U))
. W !!,"Message deleted."
W ! I $$READ^TIUU("EA","Press <RETURN> to continue")
Q
REPROC ;
N HL771RF,HL771SF,HLCS,HLDOM,HLINSTN,HLPARAM,HLPID,HLREC,HLRFREQ,HLSFREQ
D FULL^VALM1
W !!,"Reprocessing message..."
I '$$REPROC^HLUTIL($P(TIUMSG(TIUSEL),U),"PROCMSG^TIUHL7P1") W !,"finished.",! I $$READ^TIUU("EA","Press <RETURN> to continue") Q
W "ERROR. Unable to reprocess this message.",!
I $$READ^TIUU("EA","Press <RETURN> to continue")
Q
EN ; main entry point for TIUHL7 MSG VIEW
N TIULVL
D EN^VALM("TIUHL7 MSG VIEW")
K ^TMP("VALMAR",$J,TIULVL)
Q
HDR ;
Q
INIT ;
N TIULINE,TIUX
S TIULVL=VALMEVL,VALMCNT=0
F TIUX="MSGRESULT","MSG" D
. N TIUCNT,TIUTEXT,TIUVAL S TIUVAL=80 ; TIUVAL is column width for display in LM - each line will be <=TIUVAL
. S TIULINE="" F S TIULINE=$O(^XTMP("TIUHL7",$P(TIUMSG(TIUSEL),U,2),$P(TIUMSG(TIUSEL),U),TIUX,TIULINE)) Q:'+TIULINE D
. . S TIUTEXT=^XTMP("TIUHL7",$P(TIUMSG(TIUSEL),U,2),$P(TIUMSG(TIUSEL),U),TIUX,TIULINE)
. . F TIUCNT=1:1:(($L(TIUTEXT)\TIUVAL)+1) S VALMCNT=VALMCNT+1 D SET^VALM10(VALMCNT,$E(TIUTEXT,(TIUVAL*(TIUCNT-1)+1),(TIUVAL*TIUCNT)))
. S VALMCNT=VALMCNT+1 D SET^VALM10(VALMCNT,"")
Q
HELP ; help code
I X="?" S POP=1
D FULL^VALM1
W !!,"The following actions are available:"
W !!,"Delete Message - Delete the current message"
W !,"Reprocess Message - Reprocess the current message",!
I +$G(POP) I $$READ^TIUU("EA","Press <RETURN> to continue")
S VALMBCK="R",POP=0
Q
EXIT ; exit code
Q
EXPND ; expand code
Q
TIUHL7A ; SLC/AJB - TIUHL7 Msg Mgr ; 10OCT05
+1 ;;1.0;TEXT INTEGRATION UTILITIES;**200,228**;Jun 20, 1997
+2 QUIT
DELETE ;
+1 DO FULL^VALM1
+2 WRITE !
IF $$READ^TIUU("Y","Are you sure you wish to delete this message")
Begin DoDot:1
+3 KILL ^XTMP("TIUHL7",$PIECE(TIUMSG(TIUSEL),U,2),$PIECE(TIUMSG(TIUSEL),U))
+4 WRITE !!,"Message deleted."
End DoDot:1
+5 WRITE !
IF $$READ^TIUU("EA","Press <RETURN> to continue")
+6 QUIT
REPROC ;
+1 NEW HL771RF,HL771SF,HLCS,HLDOM,HLINSTN,HLPARAM,HLPID,HLREC,HLRFREQ,HLSFREQ
+2 DO FULL^VALM1
+3 WRITE !!,"Reprocessing message..."
+4 IF '$$REPROC^HLUTIL($PIECE(TIUMSG(TIUSEL),U),"PROCMSG^TIUHL7P1")
WRITE !,"finished.",!
IF $$READ^TIUU("EA","Press <RETURN> to continue")
QUIT
+5 WRITE "ERROR. Unable to reprocess this message.",!
+6 IF $$READ^TIUU("EA","Press <RETURN> to continue")
+7 QUIT
EN ; main entry point for TIUHL7 MSG VIEW
+1 NEW TIULVL
+2 DO EN^VALM("TIUHL7 MSG VIEW")
+3 KILL ^TMP("VALMAR",$JOB,TIULVL)
+4 QUIT
HDR ;
+1 QUIT
INIT ;
+1 NEW TIULINE,TIUX
+2 SET TIULVL=VALMEVL
SET VALMCNT=0
+3 FOR TIUX="MSGRESULT","MSG"
Begin DoDot:1
+4 ; TIUVAL is column width for display in LM - each line will be <=TIUVAL
NEW TIUCNT,TIUTEXT,TIUVAL
SET TIUVAL=80
+5 SET TIULINE=""
FOR
SET TIULINE=$ORDER(^XTMP("TIUHL7",$PIECE(TIUMSG(TIUSEL),U,2),$PIECE(TIUMSG(TIUSEL),U),TIUX,TIULINE))
IF '+TIULINE
QUIT
Begin DoDot:2
+6 SET TIUTEXT=^XTMP("TIUHL7",$PIECE(TIUMSG(TIUSEL),U,2),$PIECE(TIUMSG(TIUSEL),U),TIUX,TIULINE)
+7 FOR TIUCNT=1:1:(($LENGTH(TIUTEXT)\TIUVAL)+1)
SET VALMCNT=VALMCNT+1
DO SET^VALM10(VALMCNT,$EXTRACT(TIUTEXT,(TIUVAL*(TIUCNT-1)+1),(TIUVAL*TIUCNT)))
End DoDot:2
+8 SET VALMCNT=VALMCNT+1
DO SET^VALM10(VALMCNT,"")
End DoDot:1
+9 QUIT
HELP ; help code
+1 IF X="?"
SET POP=1
+2 DO FULL^VALM1
+3 WRITE !!,"The following actions are available:"
+4 WRITE !!,"Delete Message - Delete the current message"
+5 WRITE !,"Reprocess Message - Reprocess the current message",!
+6 IF +$GET(POP)
IF $$READ^TIUU("EA","Press <RETURN> to continue")
+7 SET VALMBCK="R"
SET POP=0
+8 QUIT
EXIT ; exit code
+1 QUIT
EXPND ; expand code
+1 QUIT