source: WorldVistAEHR/trunk/r/ICR_IMMUNOLOGY_CASE_REGISTRY-IMR/IMRKIDS1.m@ 1261

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1IMRKIDS1 ;HCIOFO/SG - ERROR MESSAGES ; 6/5/02 9:43am
2 ;;2.1;IMMUNOLOGY CASE REGISTRY;**18**;Feb 09, 1998
3 ;
4 Q
5 ;
6 ;***** RETURNS TEXT OF THE MESSAGE
7 ;
8 ; ERRCODE Error code
9 ; [.TYPE] Type of the error
10 ; [ARG1-ARG5] Optional parameters that substitute the |n| "windows"
11 ; in the text of the message (for example, the |2| will
12 ; be substituted by the value of the ARG2).
13 ;
14MSG(ERRCODE,TYPE,ARG1,ARG2,ARG3,ARG4,ARG5) ;
15 S TYPE=6 Q:ERRCODE'<0 ""
16 N ARG,I1,I2,MSG
17 ;--- Get a descriptor of the message
18 S I1=-ERRCODE,MSG=$P($T(MSGLIST+I1),";;",2)
19 S I1=+$TR($P(MSG,U,2)," "),MSG=$P(MSG,U,3,999)
20 S:I1>0 TYPE=I1
21 Q:MSG?." " "Unknown error ("_ERRCODE_")"
22 ;--- Substitute parameters
23 S I1=2
24 F S I1=$F(MSG,"|",I1-1) Q:'I1 D
25 . S I2=$F(MSG,"|",I1) Q:'I2
26 . X "S ARG=$G(ARG"_+$TR($E(MSG,I1,I2-2)," ")_")"
27 . S $E(MSG,I1-1,I2-1)=ARG
28 Q $$TRIM^XLFSTR(MSG)
29 ;
30 ;***** RETURNS TYPE OF THE MESSAGE
31 ;
32 ; ERRCODE Error code
33 ;
34TYPE(ERRCODE) ;
35 Q:ERRCODE'<0 0
36 N I,TYPE S I=-ERRCODE
37 S I=$P($T(MSGLIST+I),";;",2),TYPE=+$TR($P(I,U,2)," ")
38 Q $S(TYPE>0:TYPE,1:6)
39 ;
40 ;***** LIST OF THE MESSAGES (THERE SHOULD BE NOTHING AFTER THE LIST!)
41 ;
42 ; The error codes are provided in the table only for clarity.
43 ; Text of the messages are extracted using the $TEXT function and
44 ; absolute values of the ERRCODE parameter.
45 ;
46 ; Message Type:
47 ; 1 Debug 4 Warning
48 ; 2 Information 5 Database Error
49 ; 3 Data Quality 6 Error
50 ;
51MSGLIST ; Code Type Message Text
52 ;; -1 ^ 1 ^ User entered the "^"
53 ;; -2 ^ 6 ^ Timeout
54 ;; -3 ^ 6 ^ Cannot create the '|2|' checkpoint!
55 ;; -4 ^ 6 ^ Cannot complete the '|2|' checkpoint!
56 ;; -5 ^ 6 ^ Undefined variable: '|2|'
57 ;; -6 ^ 6 ^ Error during the |2|. See log files.
58 ;; -7 ^ 6 ^ Error code '|2|' is returned by the '|3|'
59 ;; -8 ^ 3 ^ Error code '|2|' is returned by the '|3|'
60 ;; -9 ^ 5 ^ FileMan DBS call error(s)|2|
61 ;; -10 ^ 6 ^ Cannot lock the record(s) of |2|
62 ;; -11 ^ 6 ^ Error(s) during processing of the patient data
63 ;; -12 ^ 4 ^ Task has been interrupted by user
Note: See TracBrowser for help on using the repository browser.