source: FOIAVistA/trunk/r/INCOME_VERIFICATION_MATCH-IVM/IVMLERR2.m@ 1757

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

initial load of FOIAVistA 6/30/08 version

File size: 4.9 KB
Line 
1IVMLERR2 ;ALB/RMO - IVM Transmission Error Processing - Protocols; 15-SEP-1997
2 ;;2.0;INCOME VERIFICATION MATCH;**9**; 21-OCT-94
3 ;
4 ;This routine contains the IVM transmission log error processing
5 ;protocols.
6 ;
7 ;See EN^IVMLERR1 for additional documentation on 'system wide variables'
8 ;used in this routine.
9 ;
10CL ;Entry point for IVMLE CHANGE LIST protocol
11 ; Input -- IVMEPSTA Error processing statuses
12 ; Output -- IVMEPSTA Error processing statuses
13 ; VALMSG Custom message
14 ; VALMBCK R =Refresh screen
15 N DIR,DTOUT,DUOUT,Y
16 D FULL^VALM1
17 ;
18 ;Ask user to select error processing statuses
19 S DIR(0)="SMO^1:New;2:Checked;3:Both"
20 S DIR("A")="Select Error Processing Status"
21 D ^DIR
22 ;
23 ;Process user response
24 S:Y=3 Y="1^2"
25 I Y,"^1^2^"[(U_Y_U) D
26 . S IVMEPSTA=Y
27 . ;Re-build error list for selected statuses
28 . D BLD^IVMLERR
29 S VALMSG=$$MSG^IVMLERR
30 S VALMBCK="R"
31 Q
32 ;
33CD ;Entry point for IVMLE CHANGE DATE RANGE protocol
34 ; Input -- IVMBEG Begin date
35 ; IVMEND End date
36 ; Output -- IVMBEG Begin date
37 ; IVMEND End date
38 ; VALMSG Custom message
39 ; VALMBCK R =Refresh screen
40 N VALMB,VALMBEG,VALMEND
41 S VALMB=IVMBEG
42 ;
43 ;Ask user for date range
44 D RANGE^VALM1
45 ;
46 ;Process user response
47 I 'VALMBEG!((IVMBEG=VALMBEG)&(IVMEND=VALMEND)) D
48 . W !!,"Date Range was not changed."
49 . D PAUSE^VALM1
50 . S VALMBCK=""
51 ELSE D
52 . S IVMBEG=VALMBEG,IVMEND=VALMEND
53 . ;Re-build error list for selected date range
54 . D BLD^IVMLERR
55 . S VALMBCK="R"
56 S VALMSG=$$MSG^IVMLERR
57 Q
58 ;
59SL ;Entry point for IVMLE SORT LIST protocol
60 ; Input -- IVMSRTBY Sort by criteria
61 ; Output -- IVMSRTBY Sort by criteria
62 ; VALMSG Custom message
63 ; VALMBCK R =Refresh screen
64 N DIR,DTOUT,DUOUT,Y
65 D FULL^VALM1
66 ;
67 ;Ask user to select sort criteria
68 S DIR(0)="SMO^P:Patient Name;D:Date/Time ACK Received"
69 S DIR("A")="Select Sort By"
70 D ^DIR
71 ;
72 ;Process user response
73 I "^P^D^"[(U_Y_U),IVMSRTBY'=Y D
74 . S IVMSRTBY=Y
75 . ;Re-build error list for selected sort criteria
76 . D BLD^IVMLERR
77 S VALMSG=$$MSG^IVMLERR
78 S VALMBCK="R"
79 Q
80 ;
81CE ;Entry point for IVMLE CHECK ERROR OFF LIST protocol
82 ; Input -- None
83 ; Output -- VALMSG Custom message
84 ; VALMBCK R =Refresh screen
85 N IVMLINE,IVMNUM,IVMTLIEN,VALMY
86 ;
87 ;Ask user to select transmission errors to check off the list
88 D EN^VALM2(XQORNOD(0))
89 D FULL^VALM1
90 ;
91 ;Process user selection
92 S IVMNUM=0
93 F S IVMNUM=$O(VALMY(IVMNUM)) Q:'IVMNUM D
94 . ;Invoke call to check error off list
95 . I $D(^TMP(IVMARY_"IDX",$J,IVMNUM)) S IVMLINE=+^(IVMNUM),IVMTLIEN=+$P(^(IVMNUM),U,2) D CHKERR(IVMARY,IVMLINE,IVMTLIEN)
96 S VALMBCK="R"
97 S VALMSG=$$MSG^IVMLERR
98 Q
99 ;
100CHKERR(IVMARY,IVMLINE,IVMTLIEN) ;Check error off list
101 ; Input -- IVMARY Global array subscript
102 ; IVMLINE Line number
103 ; IVMTLIEN IVM transmission log IEN
104 ; Output -- None
105 N IVMERMSG
106 I $$ERRSTAT^IVMTLOG(IVMTLIEN,2,.IVMERMSG) D
107 . D FLDTEXT^VALM10(IVMLINE,"STATUS","Checked")
108 . D FLDCTRL^VALM10(IVMLINE,"STATUS",IOINHI,IOINORM)
109 ELSE D
110 . W !,^TMP(IVMARY,$J,IVMLINE,0)
111 . W:$G(IVMERMSG)'="" !,"...",$$LOWER^VALM1(IVMERMSG)
112 . W !,"...Unable to check error off list"
113 . D PAUSE^VALM1
114 Q
115 ;
116RP ;Entry point for IVMLE RETRANSMIT PATIENT protocol
117 ; Input -- None
118 ; Output -- VALMSG Custom message
119 ; VALMBCK R =Refresh screen
120 N IVMLINE,IVMNUM,IVMTLIEN,IVMTLOG,VALMY
121 ;
122 ;Ask user to select transmission errors to retransmit patient
123 D EN^VALM2(XQORNOD(0))
124 D FULL^VALM1
125 ;
126 ;Process user selection
127 S IVMNUM=0
128 F S IVMNUM=$O(VALMY(IVMNUM)) Q:'IVMNUM D
129 . I $D(^TMP(IVMARY_"IDX",$J,IVMNUM)) S IVMLINE=+^(IVMNUM),IVMTLIEN=+$P(^(IVMNUM),U,2) D
130 . . ;Get information for IVM transmission log entry and invoke code
131 . . ;to set patient to retransmit
132 . . I $$GET^IVMTLOG(IVMTLIEN,.IVMTLOG) D SETPAT(IVMARY,IVMLINE,.IVMTLOG)
133 S VALMBCK="R"
134 S VALMSG=$$MSG^IVMLERR
135 Q
136 ;
137SETPAT(IVMARY,IVMLINE,IVMTLOG) ;Set patient to retransmit
138 ; Input -- IVMARY Global array subscript
139 ; IVMLINE Line number
140 ; IVMTLOG IVM transmission log entry array
141 ; Output -- None
142 N IVMERMSG,IVMEVTS
143 M IVMEVTS=IVMTLOG("EVENTS")
144 ;
145 ;Set patient to retransmit
146 I $$SETSTAT^IVMPLOG(IVMTLOG("PAT"),.IVMEVTS,.IVMERMSG) D
147 . D UPDPAT(IVMARY,IVMTLOG("PAT"))
148 ELSE D
149 . W !,^TMP(IVMARY,$J,IVMLINE,0)
150 . W:$G(IVMERMSG)'="" !,"...",$$LOWER^VALM1(IVMERMSG)
151 . W !,"...Unable to set transmit flag for patient"
152 . D PAUSE^VALM1
153 Q
154 ;
155UPDPAT(IVMARY,IVMDFN) ;Update all IVM transmssion error log entries in the list
156 ;for the patient as retransmit
157 ; Input -- IVMARY Global array subscript
158 ; IVMDFN IVM patient IEN
159 ; Output -- None
160 N IVMLINE,IVMTLIEN
161 ;
162 ;Loop through entries in the list for the patient
163 S IVMLINE=0
164 F S IVMLINE=$O(^TMP(IVMARY_"IDX",$J,"PT",IVMDFN,IVMLINE)) Q:'IVMLINE S IVMTLIEN=+^(IVMLINE) D
165 . ;Update entry as retransmit
166 . D FLDTEXT^VALM10(IVMLINE,"RETRANSMIT","*")
167 . D FLDCTRL^VALM10(IVMLINE,"RETRANSMIT",IOINHI,IOINORM)
168 . ;Invoke code to check error off the list
169 . D CHKERR(IVMARY,IVMLINE,IVMTLIEN)
170 Q
Note: See TracBrowser for help on using the repository browser.