Changeset 1081 for Scheduling
- Timestamp:
- Jan 26, 2011, 5:38:11 AM (14 years ago)
- Location:
- Scheduling/trunk/m
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/m/BSDX07.m
r1041 r1081 1 BSDX07 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 1 2/6/10 12:31pm1 BSDX07 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 1/26/11 11:29am 2 2 ;;1.42;BSDX;;Dec 07, 2010 3 3 ; … … 175 175 N BSDXSCD S BSDXSCD=$P(BSDXRNOD,U,4) ; Hosp Location IEN 176 176 ; Only if we have a valid Hosp Loc can we make an appointment 177 I +BSDXSCD,$D(^SC(BSDXSCD,0)) D I +BSDXERR D ERR(BSDXI,"-10~BSDX07 Error: ~MAKE^BSDAPI returned error code: "_BSDXERR) Q177 I +BSDXSCD,$D(^SC(BSDXSCD,0)) D I +BSDXERR D ERR(BSDXI,"-10~BSDX07 Error: MAKE^BSDXAPI returned error code: "_BSDXERR) Q 178 178 . N BSDXC 179 179 . S BSDXC("PAT")=BSDXPATID -
Scheduling/trunk/m/BSDXAPI.m
r1080 r1081 1 BSDXAPI ; IHS/ANMC/LJF - SCHEDULING APIs ; 1/2 5/11 1:00pm1 BSDXAPI ; IHS/ANMC/LJF - SCHEDULING APIs ; 1/26/11 11:47am 2 2 ;;1.42;BSDX;;Dec 07, 2010;Build 7 3 3 ;Orignal routine is BSDAPI by IHS/LJF, HMW, and MAW … … 27 27 ; I $G(BSDR("ADT"))'?7N.1".".4N Q 1_U_"Appt Date/Time error: "_$G(BSDR("ADT")) 28 28 ; to allow for date at midnight which does not have a dot at the end. 29 ; 2011-01-26 (v.1.5) 30 ; More user friendly message if patient already has appointment in $$MAKE: 31 ; Spits out pt name and user friendly date. 29 32 ; 30 33 ; … … 52 55 ; BSDR("TYP") = 3 for scheduled appts, 4 for walkins 53 56 ; BSDR("ADT") = appointment date and time 54 ; BSDR("LEN") = appointment length in minutes ( 5-120)57 ; BSDR("LEN") = appointment length in minutes (*1.42 limit removed) 55 58 ; BSDR("OI") = reason for appt - up to 150 characters 56 59 ; BSDR("USR") = user who made appt … … 68 71 ;I ($G(BSDR("LEN"))<5)!($G(BSDR("LEN"))>240) Q 1_U_"Appt Length error: "_$G(BSDR("LEN")) ; v 1.42 - no check on length is done anymore. see top comments for details. 69 72 I '$D(^VA(200,+$G(BSDR("USR")),0)) Q 1_U_"User Who Made Appt Error: "_$G(BSDR("USR")) 70 I $D(^DPT(BSDR("PAT"),"S",BSDR("ADT"),0)),$P(^(0),U,2)'["C" Q 1_U_"Patient "_BSDR("PAT")_" already has appt at "_BSDR("ADT") 73 ;I $D(^DPT(BSDR("PAT"),"S",BSDR("ADT"),0)),$P(^(0),U,2)'["C" Q 1_U_"Patient "_BSDR("PAT")_" already has appt at "_BSDR("ADT") ; v.1.5 more user friendly err msg 74 ; 75 ; Following block to give an error message to user if there is already an appointment for patient. More verbose than others. 76 N BSDXERR ; place to store error message 77 I $D(^DPT(BSDR("PAT"),"S",BSDR("ADT"),0)),$P(^(0),U,2)'["C" DO QUIT BSDXERR ; If there's an appt in the "S" node of file 2 and it's not cancelled 78 . S BSDXERR=1_U_"Patient "_$P(^DPT(BSDR("PAT"),0),U)_" ("_BSDR("PAT")_") " 79 . S BSDXERR=BSDXERR_"already has appt at "_$$FMTE^XLFDT(BSDR("ADT")) 80 . N BSDXSCIEN S BSDXSCIEN=$P(^DPT(BSDR("PAT"),"S",BSDR("ADT"),0),U) ; Clinic IEN in ^SC (0 piece of 0 node of "S" multiple in file 2) 81 . N BSDXSCNAM S BSDXSCNAM=$P(^SC(BSDXSCIEN,0),U) ; PIMS Name of Clinic 82 . S BSDXERR=BSDXERR_$C(13,10)_"PIMS clinic: "_BSDXSCNAM ; tell the user of the PIMS clinic 83 . I $D(^BSDXRES("ALOC",BSDXSCIEN)) DO ; if the Clinic is linked to a BSDX Resource (we find out using the index ALOC in the BSDX RESOURCE file) 84 . . N BSDXRESIEN S BSDXRESIEN=$O(^BSDXRES("ALOC",BSDXSCIEN,"")) 85 . . QUIT:'BSDXRESIEN ; Safeguard if index is corrupt 86 . . N BSDXRESNAM S BSDXRESNAM=$P(^BSDXRES(BSDXRESIEN,0),U) 87 . . S BSDXERR=BSDXERR_$C(13,10)_"Scheduling GUI clinic: "_BSDXRESNAM ; tell the user of the BSDX clinic 71 88 ; 72 89 NEW DIC,DA,Y,X,DD,DO,DLAYGO
Note:
See TracChangeset
for help on using the changeset viewer.