1 | MAGDIRVE ;WOIFO/PMK - Serious Fatal Image Processing Error Messages ; 09/08/2004 07:31
|
---|
2 | ;;3.0;IMAGING;**11,30**;16-September-2004
|
---|
3 | ;; +---------------------------------------------------------------+
|
---|
4 | ;; | Property of the US Government. |
|
---|
5 | ;; | No permission to copy or redistribute this software is given. |
|
---|
6 | ;; | Use of unreleased versions of this software requires the user |
|
---|
7 | ;; | to execute a written test agreement with the VistA Imaging |
|
---|
8 | ;; | Development Office of the Department of Veterans Affairs, |
|
---|
9 | ;; | telephone (301) 734-0100. |
|
---|
10 | ;; | |
|
---|
11 | ;; | The Food and Drug Administration classifies this software as |
|
---|
12 | ;; | a medical device. As such, it may not be changed in any way. |
|
---|
13 | ;; | Modifications to this software may result in an adulterated |
|
---|
14 | ;; | medical device under 21CFR820, the use of which is considered |
|
---|
15 | ;; | to be a violation of US Federal Statutes. |
|
---|
16 | ;; +---------------------------------------------------------------+
|
---|
17 | ;;
|
---|
18 | Q
|
---|
19 | ;
|
---|
20 | ; new version for RPC client-server image processing error messages
|
---|
21 | ;
|
---|
22 | MAGZERO(RTN,LASTIEN,LASTIMG) ; from ^MAGDIR1B/^MAGDIR84 for bad ^MAG(2005)
|
---|
23 | N TITLE
|
---|
24 | K MSG
|
---|
25 | S TITLE="DICOM IMAGE PROCESSING ERROR - IMAGE FILE CORRUPTION"
|
---|
26 | S MSG(2)="The ^MAG(2005) file has been corrupted so that new images will"
|
---|
27 | S MSG(3)="overwrite old ones and general image database inconsistency"
|
---|
28 | S MSG(4)="will result."
|
---|
29 | S MSG(5)=""
|
---|
30 | S MSG(6)="Latest internal entry number processed: "
|
---|
31 | S MSG(6)=MSG(6)_LASTIMG ; ^MAGDICOM(2006.563,1,"LAST IMAGE POINTER")
|
---|
32 | S MSG(7)="Bad ^MAG(2005,0) internal entry number: "_LASTIEN
|
---|
33 | D BADERROR(RTN,TITLE,.MSG)
|
---|
34 | Q
|
---|
35 | ;
|
---|
36 | ZERONODE(RTN,LASTIEN,LASTPTR,FILE,FILENAME) ; from ^MAGDIR1/^MAGDIR84
|
---|
37 | ; invoked for an arbitrary file corrupted value
|
---|
38 | N TITLE,ZERONODE
|
---|
39 | K MSG
|
---|
40 | S TITLE="DICOM IMAGE PROCESSING ERROR - "_FILE_" FILE CORRUPTION"
|
---|
41 | S MSG(2)="The "_FILENAME_" file has been corrupted so that new reports will"
|
---|
42 | S MSG(3)="overwrite old ones and general image/report database inconsistency"
|
---|
43 | S MSG(4)="will result."
|
---|
44 | S MSG(5)=""
|
---|
45 | S MSG(6)="Latest internal entry number processed: "
|
---|
46 | S MSG(6)=MSG(6)_LASTPTR ; from ^MAGDICOM(2006.563,1,"LAST ... POINTER")
|
---|
47 | S ZERONODE=$S(FILE[")":$P(FILE,")")_",0)",1:FILE_"(0)")
|
---|
48 | S MSG(7)="Bad "_ZERONODE_" internal entry number: "_LASTIEN
|
---|
49 | D BADERROR(RTN,TITLE,.MSG)
|
---|
50 | Q
|
---|
51 | ;
|
---|
52 | OBJECT(RTN,MAGGP) ; from ^MAGDIR2B/^MAGDIR9B
|
---|
53 | N TITLE
|
---|
54 | K MSG
|
---|
55 | S TITLE="DICOM IMAGE PROCESSING ERROR - WRONG GROUP OBJECT TYPE"
|
---|
56 | S MSG(2)="The group entry in ^MAG(2005) does not have the proper group"
|
---|
57 | S MSG(3)="object type."
|
---|
58 | S MSG(4)=""
|
---|
59 | S MSG(5)="The expected value is 11. The value in the group entry is "
|
---|
60 | S MSG(5)=MSG(5)_$P($G(^MAG(2005,MAGGP,0),"^^^^^not defined"),"^",6)_"."
|
---|
61 | S MSG(6)=""
|
---|
62 | S MSG(7)="Internal entry number of incorrect group: "_MAGGP
|
---|
63 | D BADERROR(RTN,TITLE,.MSG)
|
---|
64 | Q
|
---|
65 | ;
|
---|
66 | MISMATCH(RTN,DFN,MAGGP) ; from ^MAGDIR2B/E & ^MAGDIR9B/E for a patient mismatch
|
---|
67 | N GROUPDFN,TITLE
|
---|
68 | K MSG
|
---|
69 | S TITLE="DICOM IMAGE PROCESSING ERROR - PATIENT MISMATCH PROBLEM"
|
---|
70 | S GROUPDFN=$P($G(^MAG(2005,MAGGP,0)),"^",7)
|
---|
71 | S MSG(2)="The image and the group point to different patients."
|
---|
72 | S MSG(3)=""
|
---|
73 | S MSG(4)="The Image points to PATIENT file internal entry number "_DFN
|
---|
74 | S MSG(5)=$$PATDEMO(DFN)
|
---|
75 | S MSG(6)=""
|
---|
76 | S MSG(7)="The Group points to PATIENT file internal entry number "_GROUPDFN
|
---|
77 | S MSG(8)=$$PATDEMO(GROUPDFN)
|
---|
78 | S MSG(9)=""
|
---|
79 | S MSG(10)="Internal entry number of group: ^MAG(2005,"_MAGGP_")"
|
---|
80 | D BADERROR(RTN,TITLE,.MSG)
|
---|
81 | Q
|
---|
82 | ;
|
---|
83 | PATDEMO(DFN) ; display patient demographics
|
---|
84 | N %,DISYS,DTIME,VA,VADM,X
|
---|
85 | S X=""
|
---|
86 | I 'DFN S X="<null DFN>"
|
---|
87 | E D
|
---|
88 | . D DEM^VADPT
|
---|
89 | . S X=$G(VADM(1))_" | "_$G(VA("PID")) ; name & id
|
---|
90 | . S X=X_" | "_$P($G(VADM(5)),"^",2)_" | "_$P($G(VADM(3)),"^",2) ; sex & dob
|
---|
91 | . Q
|
---|
92 | Q X ; name | id | sex | dob
|
---|
93 | ;
|
---|
94 | RADMISS(RTN,DFN,RARPT,RARPTDFN) ; from ^MAGDIR2A/^MAGDIR9A for a patient mismatch
|
---|
95 | ; this is bad DFN value for the radiology report in ^RARPT
|
---|
96 | N TITLE
|
---|
97 | K MSG
|
---|
98 | S TITLE="DICOM IMAGE PROCESSING ERROR - RAD PATIENT/REPORT MISMATCH"
|
---|
99 | S MSG(2)="The image and the radiology report point to different patients."
|
---|
100 | S MSG(3)=""
|
---|
101 | S MSG(4)="The Image points to PATIENT file internal entry number "_DFN
|
---|
102 | S MSG(5)=$$PATDEMO(DFN)
|
---|
103 | S MSG(6)=""
|
---|
104 | S MSG(7)="The Rad Report points to PATIENT file internal entry number "_RARPTDFN
|
---|
105 | S MSG(8)=$$PATDEMO(RARPTDFN)
|
---|
106 | S MSG(9)=""
|
---|
107 | S MSG(10)="Internal entry number of report: ^RARPT("_RARPT_")"
|
---|
108 | D BADERROR(RTN,TITLE,.MSG)
|
---|
109 | Q
|
---|
110 | ;
|
---|
111 | TIUMISS(RTN,DFN,TIUIEN,TIUDFN) ; from ^MAGDIR2E/^MAGDIR9E for a patient mismatch
|
---|
112 | ; this is bad DFN value for the consult/procedure request note in ^TIU(8925)
|
---|
113 | N TITLE
|
---|
114 | K MSG
|
---|
115 | S TITLE="DICOM IMAGE PROCESSING ERROR - TIU PATIENT/REPORT MISMATCH"
|
---|
116 | S MSG(2)="The image and the TIU note point to different patients."
|
---|
117 | S MSG(3)=""
|
---|
118 | S MSG(4)="The Image points to PATIENT file internal entry number "_DFN
|
---|
119 | S MSG(5)=$$PATDEMO(DFN)
|
---|
120 | S MSG(6)=""
|
---|
121 | S MSG(7)="The TIU note points to PATIENT file internal entry number "_TIUDFN
|
---|
122 | S MSG(8)=$$PATDEMO(TIUDFN)
|
---|
123 | S MSG(9)=""
|
---|
124 | S MSG(10)="Internal entry number of TIU note: ^TIU(8925,"_TIUIEN_")"
|
---|
125 | D BADERROR(RTN,TITLE,.MSG)
|
---|
126 | Q
|
---|
127 | ;
|
---|
128 | TIUMISS2(RTN,TIUIEN1,TIUIEN2,TIUXDIEN,MAGGP) ; from ^MAGDIR2E/^MAGDIR9E - TIU mismatch
|
---|
129 | ; mismatch between TIU, TIU External Data File, and the image group
|
---|
130 | N TITLE
|
---|
131 | K MSG
|
---|
132 | S TITLE="DICOM IMAGE PROCESSING ERROR - TIU/IMAGE GROUP MISMATCH"
|
---|
133 | S MSG(2)="The image group and TIU point to different notes."
|
---|
134 | S MSG(3)=""
|
---|
135 | S MSG(4)="TIU points to TUI note ien #"_TIUIEN1
|
---|
136 | S MSG(5)="The image points to TIU note ien #"_TIUIEN2
|
---|
137 | S MSG(6)="TIU External Data File (8925.91) ien #"_TIUXDIEN
|
---|
138 | S MSG(7)="points to image group ien #"_MAGGP
|
---|
139 | D BADERROR(RTN,TITLE,.MSG)
|
---|
140 | Q
|
---|
141 | ;
|
---|
142 | TMPMISS(RTN,PARENTFP,MAGGP) ; from ^MAGDIR2E/^MAGDIR9E
|
---|
143 | ; the image group does not have 2006.5839 for the PARENT FILE
|
---|
144 | N TITLE
|
---|
145 | K MSG
|
---|
146 | S TITLE="DICOM IMAGE PROCESSING ERROR - IMAGE GROUP MISMATCH"
|
---|
147 | S MSG(2)="The image group does not point to PARENT FILE 2006.5839."
|
---|
148 | S MSG(3)=""
|
---|
149 | S MSG(4)="The image group should point to PARENT FILE 2006.5839."
|
---|
150 | S MSG(5)="Instead it point to PARENT FILE #"_PARENTFP
|
---|
151 | S MSG(6)="The image group is ^MAG(2005,"_MAGGP_")"
|
---|
152 | D BADERROR(RTN,TITLE,.MSG)
|
---|
153 | Q
|
---|
154 | ;
|
---|
155 | IMAGEPTR(RTN,IMAGEPTR,LASTIMG) ; from ^MAGDIR2B/^MAGDIR9B for a corrupted image pointer value
|
---|
156 | N TITLE
|
---|
157 | K MSG
|
---|
158 | S TITLE="DICOM IMAGE PROCESSING ERROR - IMAGE ENTRY NUMBER PROBLEM"
|
---|
159 | S MSG(2)="The internal entry number for this image is less than that of the"
|
---|
160 | S MSG(3)="last processed image. This will cause new images to overwrite"
|
---|
161 | S MSG(4)="old ones and general image database inconsistency will result."
|
---|
162 | S MSG(5)=""
|
---|
163 | S MSG(6)="Latest internal entry number processed: "
|
---|
164 | S MSG(6)=MSG(6)_LASTIMG ; ^MAGDICOM(2006.563,1,"LAST IMAGE POINTER")
|
---|
165 | S MSG(7)="Bad internal entry number of new image: "_IMAGEPTR
|
---|
166 | D BADERROR(RTN,TITLE,.MSG)
|
---|
167 | Q
|
---|
168 | ;
|
---|
169 | GROUPPTR(RTN,MAGGP,LASTIMG) ; from ^MAGDIR2A/E & ^MAGDIR9A/E and ^MAGDMED3 for bad group pointer
|
---|
170 | N TITLE
|
---|
171 | K MSG
|
---|
172 | S TITLE="DICOM IMAGE PROCESSING ERROR - GROUP ENTRY NUMBER PROBLEM"
|
---|
173 | S MSG(2)="The internal entry number for this group is less than that of the"
|
---|
174 | S MSG(3)="last processed image. This will cause new images to overwrite"
|
---|
175 | S MSG(4)="old ones and general image database inconsistency will result."
|
---|
176 | S MSG(5)=""
|
---|
177 | S MSG(6)="Latest internal entry number processed: "
|
---|
178 | S MSG(6)=MSG(6)_LASTIMG ; ^MAGDICOM(2006.563,1,"LAST IMAGE POINTER")
|
---|
179 | S MSG(7)="Bad internal entry number of new group: "_MAGGP
|
---|
180 | D BADERROR(RTN,TITLE,.MSG)
|
---|
181 | Q
|
---|
182 | ;
|
---|
183 | BADERROR(RTN,TITLE,MSG) ; final common pathway for all msgs
|
---|
184 | ; invoked by other image processing error checking code as well
|
---|
185 | N I
|
---|
186 | S I=$O(MSG(" "),-1)
|
---|
187 | S MSG(1)=$G(MSG(1)) ; usually null
|
---|
188 | S MSG(I+1)="Gateway: """_$G(SYSTITLE,"<unknown>")_""""
|
---|
189 | S MSG(I+2)=""
|
---|
190 | S MSG(I+3)=" This is a VERY SERIOUS ERROR. Image processing"
|
---|
191 | S MSG(I+4)=" will be halted until it is resolved."
|
---|
192 | S MSG(I+5)=""
|
---|
193 | S MSG(I+6)="Call IRM and the National VistA Support Help Desk (888) 596-HELP"
|
---|
194 | S MSG(I+7)=""
|
---|
195 | S MSG(I+8)="Problem detected by routine "_RTN_"."
|
---|
196 | S MSG(I+9)=""
|
---|
197 | S MSG("TITLE")=TITLE,MSG("CRITICAL")=1 ; send email to Silver Spring
|
---|
198 | Q
|
---|
199 | ;
|
---|
200 | ERROR(RTN,TITLE,MSG) ; application error - local to the site - no email
|
---|
201 | N I
|
---|
202 | S I=$O(MSG(" "),-1)
|
---|
203 | S MSG(I+1)="Problem detected by routine "_RTN_"."
|
---|
204 | S MSG(I+2)=""
|
---|
205 | S MSG("TITLE")=TITLE,MSG("CRITICAL")=0 ; no email to Silver Spring
|
---|
206 | Q
|
---|