source: FOIAVistA/tag/r/SCHEDULING-SD-SC/SDAPIER.m@ 951

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

initial load of FOIAVistA 6/30/08 version

File size: 5.0 KB
Line 
1SDAPIER ;ALB/MJK - Outpatient API/Error Processing ; 22 FEB 1994 11:30 am
2 ;;5.3;Scheduling;**27**;08/13/93
3 ;
4ERRFILE(SDERROR,SDATA) ; -- file error
5 N SDTEXT,SDTYPE,I,SDERDAT
6 S SDERDAT=$$DATA(SDERROR),SDTYPE=$P(SDERDAT,";",3)
7 S (I,@SDERROOT@(SDTYPE))=$G(@SDERROOT@(SDTYPE))+1
8 S @("SDTEXT="_$P(SDERDAT,";",5)),@SDERROOT@(SDTYPE,I)=SDERROR_U_SDTEXT
9 Q
10 ;
11ERRCHK() ; -- check to see if error ; >1000 are warnings
12 Q $G(@SDERROOT@("ERROR"))>0
13 ;
14DATA(SDERROR) ; -- get error parameters
15 N Y,SDTYPE
16 S Y=$TEXT(@SDERROR)
17 S:Y="" Y="???? ;;E;ERROR;""ERROR HANDLING PROBLEM"""
18 S SDTYPE=$P(Y,";",3),$P(Y,";",3)=$S(SDTYPE="E":"ERROR",SDTYPE="W":"WARNING",1:"UNKNOWN")
19 Q Y
20 ;
21TEST ; -- test message
22 N Y,ERROR,SDATA
23 S SDATA="ONE^TWO^THREE^FOUR^FIVE"
24 F R !,"Enter error#: ",ERROR:DTIME Q:"^"[ERROR D
25 . S Y=$$DATA(ERROR)
26 . S @("Y="_$P(Y,";",5)),Y=ERROR_U_Y
27 . W !,Y
28 Q
29 ;
30PRINT ; -- print list of errors
31 N Y,%ZIS,POP,ZTSK
32 W !,">>> Print API Error code Table",!
33 S %ZIS="PMQ" D ^%ZIS I POP G PRINTQ
34 I '$D(IO("Q")) D START^SDAPIER G PRINTQ
35 S Y=$$QUE
36PRINTQ D:'$D(ZTQUEUED) ^%ZISC Q
37 ;
38START ; -- print error table
39 U IO
40 N SDI,SDATA,SDERROR,SDSECT,SDMSG,SDTYPE,SDASH,SDPAGE,SDERDAT
41 S $P(SDASH,"-",IOM)="",SDPAGE=1,SDATA="1 Parameter^2 Parameter^3 Parameter"
42 D HDR
43 F SDI=2:1 S SDERROR=+$TEXT(ERRORS+SDI) Q:SDERROR=9999 D
44 . S SDERDAT=$$DATA(SDERROR),SDTYPE=$P(SDERDAT,";",3),SDSECT=$P(SDERDAT,";",4),@("SDMSG="_$P(SDERDAT,";",5))
45 .W !?1,SDERROR,?10,SDTYPE,?25,SDSECT,!?5,"Message: ",SDMSG,!,SDASH
46 .I ($Y+6)>IOSL D HDR
47STARTQ Q
48 ;
49HDR ; -- print header
50 I SDPAGE>1,$E(IOST,1,2)="C-" D PAUSE^VALM1
51 W @IOF,?25,"Outpatient API Error Code Table",?73,"Page: ",SDPAGE,!!
52 W !,"Code #",?10,"Type of Code",?25,"Section Affected",!,SDASH
53 S SDPAGE=SDPAGE+1
54 Q
55 ;
56QUE() ; -- que job
57 ; return: did job que [ 1|yes 0|no ]
58 ;
59 K ZTSK,IO("Q")
60 S ZTDESC="Outpatient API Error Table",ZTRTN="START^SDAPIER"
61 D ^%ZTLOAD W:$D(ZTSK) " (Task: ",ZTSK,")"
62 Q $D(ZTSK)
63 ;
64ERRORS ; -- errors and warning messages
65 ;;type;section;message
661 ;;E;BASIC;"No event data array."
672 ;;E;BASIC;"Patient DFN [#"_+SDATA_"] is not valid."
683 ;;E;BASIC;"USER number [#"_+SDATA_"] is not valid."
694 ;;E;BASIC;"CLINIC number [#"_+SDATA_"] is not valid."
705 ;;E;BASIC;"Encounter date is null."
71100 ;;E;APPT;"Not a vaild appointment date/time ["_+SDATA_"] for patient [#"_+$P(SDATA,U,2)_"]."
72101 ;;E;APPT;"Patient appointment for clinic #"_+SDATA_", not clinic #"_+$P(SDATA,U,2)_", as requested."
73102 ;;E;APPT;"Not a vaild appointment slot ["_+SDATA_"] for clinic. [#"_+$P(SDATA,U,2)_"]"
74103 ;;E;APPT;"Current appointment status '"_$P(SDATA,U)_"' does not allow check out."
75104 ;;E;APPT;"Encounter date/time ["_+SDATA_"] is greater than today. ["_DT_"]."
76110 ;;E;APPT;"Encounter ien not available."
77130 ;;E;CO;"Hospital Location for appointment is not a clinic. [#"_+SDATA_"]"
781100 ;;W;CO;"Appointment already checked-out."
791030 ;;W;CO;"Appointment does not need to be checked-out. (Before check-out requirement)"
801031 ;;W;CO;"Patient was an inpatient at the time of appointment. ["_+SDATA_"]"
811040 ;;W;CLASS;"Classification data passed but not required. No classification data was filed."
821041 ;;W;CLASS;"Invalid classification code passed: '"_$P(SDATA,U)_"'."
831042 ;;W;CLASS;"Classification '"_$P(SDATA,U)_"' is no longer required for this encounter."
841043 ;;W;CLASS;"Classification '"_$P(SDATA,U)_"' data is uneditable. Not updated."
851044 ;;W;CLASS;"Data for classification '"_$P(SDATA,U)_"' is invalid. [Value:'"_$P(SDATA,U,2)_"']"
861045 ;;W;CLASS;"Deleting classification data may cause encounter status not to be 'checked-out'."
871046 ;;W;CLASS;"Changing 'SC' classification data may cause encounter status not to be 'checked-out'."
881047 ;;W;CLASS;"'"_$P(SDATA,U)_"' classification data not required for this encounter. Data not filed."
891050 ;;W;PROV;"Provider #"_+SDATA_" is not a valid IEN. Data not added."
901051 ;;W;PROV;"Provider #"_+SDATA_" is not a valid IEN. Data not processed."
911052 ;;W;PROV;"Deleting provider #"_+SDATA_" was not attempted. At least one provider is required for 'checked-out'."
921060 ;;W;DX;"Diagnosis code '"_+SDATA_"' is not a valid ICD9 code. Data not added."
931061 ;;W;DX;"Diagnosis code '"_+SDATA_"' is not a valid ICD9 code. Data not processed."
941062 ;;W;DX;"Deleting diagnosis code '"_+SDATA_"' was not attempted. At least one dx code is required for 'checked-out'."
951070 ;;W;STOPS;"Invalid stop code #"_+SDATA_". Code not added."
961071 ;;W;STOPS;"No slots remain to file stop codes and CPT procedure codes."
971072 ;;W;CPT;"CPT code '"_$P(SDATA,U)_"' is not a valid code. Procedure data not added."
981073 ;;W;CPT;"The desired number of CPT code '"_$P(SDATA,U)_"' have already been filed."
991074 ;;W;STOPS;"Error occurred during add/edit backdoor filing."
1001075 ;;W;STOPS;"Invalid stop code #"_+SDATA_". Code not processed."
1011076 ;;W;CPT;"CPT code '"_$P(SDATA,U)_"' is not a valid code. Code not processed."
1021077 ;;W;STOPS;"Stop code '"_$P(SDATA,U)_"' did not exist for encounter. Nothing to delete."
1031078 ;;W;CPT;"The number of CPT code '"_$P(SDATA,U)_"' to delete was larger than what was entered for encounter."
1049999 ;;
Note: See TracBrowser for help on using the repository browser.