source: FOIAVistA/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLCSRE1.m@ 1742

Last change on this file since 1742 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1HLCSRE1 ;ALB/MFK - UTILITIES FOR HL7 MESSAGE REQUEUER; 08-JUN-1995
2 ;;1.6;HEALTH LEVEL SEVEN;;Oct 13, 1995
3SELECT(MODE) ;
4 ; MODE=0 FOR DESELECT
5 ; MODE=1 (DEFAULT) FOR SELECT
6 S:('$D(MODE)) MODE=1
7 ; -- find out list of selected
8 D EN^VALM2(XQORNOD(0))
9 I ('$D(VALMY)) S VALMBCK="" Q
10 S LINE=""
11 F S LINE=$O(VALMY(LINE)) Q:(LINE="") D
12 .; -- select lines
13 .S STAR=$S(MODE=0:" ",1:" *")
14 .S ROW=STAR_$E($G(^TMP("HL","MESSAGE",$J,LINE,0)),3,245)
15 .S ^TMP("HL","MESSAGE",$J,LINE,0)=ROW
16 .D SELECT^VALM10(LINE,MODE)
17 .S ENTRY=$O(^TMP("HL","MESSAGE",$J,"B",LINE,""))
18 .S ^TMP("HL","MESSAGE",$J,"B",LINE,ENTRY)=MODE
19 S VALMBCK=""
20 K MODE,ROW,STAR
21 Q
22EXIT ; -- exit code for HL7 REQUEUE MESSAGE
23 ; -- compile list of messages to requeue
24 N DIR,LINE,ENTRY,DIRUT,Y,X
25 S LINE=""
26 F S LINE=$O(^TMP("HL","MESSAGE",$J,"B",LINE)) Q:(LINE="") D
27 .S ENTRY=""
28 .F S ENTRY=$O(^TMP("HL","MESSAGE",$J,"B",LINE,ENTRY)) Q:(ENTRY="") D
29 ..I (^TMP("HL","MESSAGE",$J,"B",LINE,ENTRY)=1) S MSG(MATCH,ENTRY)=""
30 I $D(MSG) D
31 .D FULL^VALM1
32 .S DIR(0)="Y",DIR("B")="YES",DIR("A")="Re-queue these messages?"
33 .S DIR("?")="Select ""YES"" to re-queue, or ""NO"" to quit without re-queueing."
34 .D ^DIR Q:$D(DIRUT)
35 .I Y=1 D REPMSG^HLCSREP
36 K ^TMP("HL","MESSAGE",$J),MATCH,MSG
37 S VALMBCK="R"
38 Q
Note: See TracBrowser for help on using the repository browser.