HLCSRES ;ALB/MFK - HL7 MESSAGE REQUEUER SCREEN # 2 ; 08-JUN-1995
;;1.6;HEALTH LEVEL SEVEN;;Oct 13, 1995
EN(MATCH) ; -- main entry point
D EN^VALM("HL MESSAGE REQUEUER - 2")
Q
;
HDR ; -- header code
N TMP,NAME
S TMP=$G(^HLCS(870,MATCH,0))
S NAME=$P(TMP,"^",1)
S:(NAME="") NAME="UNKNOWN"
S TMP="Processed Messages in Logical Link "_NAME
S VALMHDR(1)=$$SETSTR^VALM1(TMP,"",(40-($L(TMP)\2)),$L(TMP))
Q
;
INIT ; -- init variables and list array
N ENTRY,DATE,APP,X,DATE1,LINEENT,CNTR,Y
S (ENTRY,CNTR)=0
F S ENTRY=$O(^HLCS(870,MATCH,2,ENTRY)) Q:(ENTRY="")!(ENTRY="B") D
.Q:($P($G(^HLCS(870,MATCH,2,ENTRY,0)),"^",2)="P")
.S CNTR=CNTR+1
.S LINEENT=""
.S DATE1=$P($G(^HLCS(870,MATCH,2,ENTRY,1,1,0)),"^",7)
.S APP=$P($G(^HLCS(870,MATCH,2,ENTRY,1,1,0)),"^",5)
.S DATE=$$FMDATE^HLFNC(DATE1)
.S Y=DATE
.D DD^%DT
.S LINEENT=$$SETFLD^VALM1(CNTR,LINEENT,"INDEX")
.S LINEENT=$$SETFLD^VALM1(Y,LINEENT,"DATE")
.S LINEENT=$$SETFLD^VALM1(APP,LINEENT,"APP")
.S ^TMP("HL","MESSAGE",$J,CNTR,0)=LINEENT
.S ^TMP("HL","MESSAGE",$J,"IDX",CNTR,CNTR)=""
.S ^TMP("HL","MESSAGE",$J,"B",CNTR,ENTRY)=""
I CNTR=0 S ^TMP("HL","MESSAGE",$J,1,0)="** There are no entries in this queue **"
S VALMCNT=CNTR
Q
;
HELP ; -- help code
S X="?" D DISP^XQORM1 W !!
Q
;
EXPND ; -- expand code
N LOOP,LLE,X,VALMY,HLLLE
S LOOP="",HLLLE=0
D EN^VALM2(XQORNOD(0))
; -- find out what the user selected
I ('$D(VALMY)) S VALMBCK="" Q
F LOOP=$O(VALMY(LOOP)) Q:(LOOP="") D
.S HLLLE=HLLLE+1
.S LLE(HLLLE)=$O(^TMP("HL","MESSAGE",$J,"B",LOOP,""))
; -- call entry to show individual messages
D EN^HLCSRQ
; -- re-index files in case entries were re-queued
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHLCSRES 1698 printed Dec 13, 2024@01:56:56 Page 2
HLCSRES ;ALB/MFK - HL7 MESSAGE REQUEUER SCREEN # 2 ; 08-JUN-1995
+1 ;;1.6;HEALTH LEVEL SEVEN;;Oct 13, 1995
EN(MATCH) ; -- main entry point
+1 DO EN^VALM("HL MESSAGE REQUEUER - 2")
+2 QUIT
+3 ;
HDR ; -- header code
+1 NEW TMP,NAME
+2 SET TMP=$GET(^HLCS(870,MATCH,0))
+3 SET NAME=$PIECE(TMP,"^",1)
+4 if (NAME="")
SET NAME="UNKNOWN"
+5 SET TMP="Processed Messages in Logical Link "_NAME
+6 SET VALMHDR(1)=$$SETSTR^VALM1(TMP,"",(40-($LENGTH(TMP)\2)),$LENGTH(TMP))
+7 QUIT
+8 ;
INIT ; -- init variables and list array
+1 NEW ENTRY,DATE,APP,X,DATE1,LINEENT,CNTR,Y
+2 SET (ENTRY,CNTR)=0
+3 FOR
SET ENTRY=$ORDER(^HLCS(870,MATCH,2,ENTRY))
if (ENTRY="")!(ENTRY="B")
QUIT
Begin DoDot:1
+4 if ($PIECE($GET(^HLCS(870,MATCH,2,ENTRY,0)),"^",2)="P")
QUIT
+5 SET CNTR=CNTR+1
+6 SET LINEENT=""
+7 SET DATE1=$PIECE($GET(^HLCS(870,MATCH,2,ENTRY,1,1,0)),"^",7)
+8 SET APP=$PIECE($GET(^HLCS(870,MATCH,2,ENTRY,1,1,0)),"^",5)
+9 SET DATE=$$FMDATE^HLFNC(DATE1)
+10 SET Y=DATE
+11 DO DD^%DT
+12 SET LINEENT=$$SETFLD^VALM1(CNTR,LINEENT,"INDEX")
+13 SET LINEENT=$$SETFLD^VALM1(Y,LINEENT,"DATE")
+14 SET LINEENT=$$SETFLD^VALM1(APP,LINEENT,"APP")
+15 SET ^TMP("HL","MESSAGE",$JOB,CNTR,0)=LINEENT
+16 SET ^TMP("HL","MESSAGE",$JOB,"IDX",CNTR,CNTR)=""
+17 SET ^TMP("HL","MESSAGE",$JOB,"B",CNTR,ENTRY)=""
End DoDot:1
+18 IF CNTR=0
SET ^TMP("HL","MESSAGE",$JOB,1,0)="** There are no entries in this queue **"
+19 SET VALMCNT=CNTR
+20 QUIT
+21 ;
HELP ; -- help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXPND ; -- expand code
+1 NEW LOOP,LLE,X,VALMY,HLLLE
+2 SET LOOP=""
SET HLLLE=0
+3 DO EN^VALM2(XQORNOD(0))
+4 ; -- find out what the user selected
+5 IF ('$DATA(VALMY))
SET VALMBCK=""
QUIT
+6 FOR LOOP=$ORDER(VALMY(LOOP))
if (LOOP="")
QUIT
Begin DoDot:1
+7 SET HLLLE=HLLLE+1
+8 SET LLE(HLLLE)=$ORDER(^TMP("HL","MESSAGE",$JOB,"B",LOOP,""))
End DoDot:1
+9 ; -- call entry to show individual messages
+10 DO EN^HLCSRQ
+11 ; -- re-index files in case entries were re-queued
+12 QUIT