source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPFLMT2.m@ 1259

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

initial load of WorldVistAEHR

File size: 4.4 KB
Line 
1DGPFLMT2 ;ALB/RBS - PRF TRANSMISSION ERRORS LM PROTOCOL ACTIONS ; 6/24/05 12:20pm
2 ;;5.3;Registration;**650**;Aug 13, 1993;Build 3
3 ;
4 ;no direct entry
5 QUIT
6 ;
7 ;
8SL ;Entry point for DGPF TRANSMIT SORT LIST action protocol.
9 ;
10 ;The following Input variable is a 'system wide variable' in the
11 ;DGPF TRANSMISSION ERRORS List Manager screen:
12 ;
13 ; Input:
14 ; DGSRTBY - list sort by criteria
15 ; "N" = Patient Name
16 ; "D" = Date/Time Error Received
17 ; Output:
18 ; DGSRTBY - list sort by criteria
19 ; VALMBCK - 'R' = refresh screen
20 ;
21 ;is action selection allowed?
22 I '$D(@VALMAR@("IDX")) D Q
23 . W !
24 . D BLD^DIALOG(261129," There are no transmission error records to display.","","DGERR","F")
25 . D MSG^DIALOG("WE","","","","DGERR") W *7
26 . D WAIT^VALM1
27 . S VALMBCK="R"
28 ;
29 ;change sort (flip / flop)
30 S DGSRTBY=$S($G(DGSRTBY)="N":"D",1:"N")
31 ;
32 ;re-build list for sort criteria
33 D BLD^DGPFLMT
34 ;
35 ;return to LM (refresh screen)
36 S VALMBCK="R"
37 Q
38 ;
39 ;
40RM ;Entry point for DGPF TRANSMIT REJECT MESSAGE action protocol.
41 ;
42 ; Input: None
43 ; Output: VALMBCK - 'R' = refresh screen
44 ;
45 N DGERR ;if error returned
46 N DGDFN ;patient dfn
47 N DGPFIEN ;ien of record in PRF HL7 TRANSMISSION LOG (#26.17) file
48 N DGSEL ;user selection
49 N VALMY ;array output of EN^VALM2 call of user selected entry(s)
50 ;
51 S (DGSEL,DGPFIEN)=""
52 ;
53 ;- if user selected RM Retransmit Message action while in the
54 ; VM View Message details action, use the single entry value at
55 ; the ^TMP("DGPFSORT",$J,"SELECTION",<n>) node for retransmission.
56 ;- Note, this temp node gets deleted after the RM action processes.
57 ;
58 S DGSEL=+$O(^TMP("DGPFSORT",$J,"SELECTION",""))
59 S:DGSEL VALMY(DGSEL)=""
60 ;
61 ;- if no single entry found, is action selection allowed?
62 ;- Note, this check will also stop the user from trying to retransmit
63 ; a single selection multiple times from the VM View Message action.
64 ;
65 I 'DGSEL,'$D(@VALMAR@("IDX")) D
66 . W !
67 . D BLD^DIALOG(261129," There are no transmission error messages to select.","","DGERR","F")
68 . D MSG^DIALOG("WE","","","","DGERR") W *7
69 . D WAIT^VALM1
70 . ;- else, if no single entry found, prompt user for selection(s)
71 E D:'DGSEL
72 . D EN^VALM2($G(XQORNOD(0)))
73 . S DGSEL=$O(VALMY(""))
74 ;
75 ;- call to retransmit error message(s)
76 I DGSEL D
77 . ;
78 . I $$EN^DGPFLMT5(.VALMY)
79 . ;
80 . D WAIT^VALM1
81 . ;
82 . ;- don't re-build list if $D(^TMP("DGPFSORT",$J,"SELECTION"))
83 . ; because this RM action is being called from the VM action.
84 . ;
85 . D:'$D(^TMP("DGPFSORT",$J,"SELECTION")) BLD^DGPFLMT
86 . ;
87 . ;- always clean up single entry so it can't be selected again
88 . K ^TMP("DGPFSORT",$J,"SELECTION")
89 ;
90 ;return to LM (refresh screen)
91 S VALMBCK="R"
92 Q
93 ;
94 ;
95VM ;Entry point for DGPF TRANSMIT VIEW MESSAGE action protocol.
96 ;
97 ; Input: None
98 ; Output: VALMBCK - 'R' = refresh screen
99 ;
100 N DGERR ;if error returned
101 N DGDFN ;patient dfn
102 N DGPFIEN ;ien of record in PRF HL7 TRANSMISSION LOG (#26.17) file
103 N DGSEL ;user selection
104 N VALMY ;output of EN^VALM2 call, array of user selected entry
105 ;
106 ;is action selection allowed?
107 I '$D(@VALMAR@("IDX")) D Q
108 . W !
109 . D BLD^DIALOG(261129," There are no transmission error records to display.","","DGERR","F")
110 . D MSG^DIALOG("WE","","","","DGERR") W *7
111 . D WAIT^VALM1
112 . S VALMBCK="R"
113 ;
114 ;ask user to select a single error for displaying details
115 S (DGSEL,DGPFIEN)=""
116 D EN^VALM2($G(XQORNOD(0)),"S")
117 ;
118 ;process user selection
119 S DGSEL=$O(VALMY(""))
120 I DGSEL,$D(@VALMAR@("IDX",DGSEL,DGSEL)) D
121 . S DGPFIEN=$P($G(@VALMAR@("IDX",DGSEL,DGSEL)),U,3)
122 . S DGDFN=$P($G(@VALMAR@("IDX",DGSEL,DGSEL)),U,4)
123 . ;
124 . ;- capture user single selection in ^TMP() global -
125 . ; This is used to determine if the user selected to retransmit a
126 . ; single record entry by selecting the Retransmit Message action
127 . ; while in the View Message action.
128 . ; If undefined after returning from the View Message action, then
129 . ; the user did use the Retransmit Message action.
130 . ; This would require Quiting the View Message screen back to the
131 . ; main screen and doing a rebuild of all display and sort files.
132 . ;
133 . S ^TMP("DGPFSORT",$J,"SELECTION",DGSEL)=$G(@VALMAR@("IDX",DGSEL,DGSEL))
134 . ;
135 . ;- call to display error message details
136 . D EN^DGPFLMT3(DGDFN,DGPFIEN)
137 . ;
138 . ;clean-up user single selection when exiting this action.
139 . K ^TMP("DGPFSORT",$J,"SELECTION")
140 ;
141 ;- re-build and display list
142 D BLD^DGPFLMT
143 ;
144 ;return to LM (refresh screen)
145 S VALMBCK="R"
146 Q
Note: See TracBrowser for help on using the repository browser.