Updated routines version to 1.42
This commit is contained in:
parent
ea124e92c1
commit
67dd7ba3af
|
@ -1,5 +1,5 @@
|
|||
BSDX01 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 9/29/10 10:20am
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
SUINFOD(BSDXY,BSDXDUZ) ;EP Debugging entry point
|
||||
;D DEBUG^%Serenji("SUINFO^BSDX01(.BSDXY,BSDXDUZ)")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX02 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/15/10 12:25pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
; Change Log
|
||||
; July 15 2010: UJO/SMH - Pass FM dates in instead of US dates for i18n
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX03 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
Q
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX04 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 7/15/10 12:44pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
; Change Log:
|
||||
; July 11 2010: Pass BSDXSTART and END as FM dates rather than US formatted dates
|
||||
; for i18n
|
||||
|
|
11
m/BSDX05.m
11
m/BSDX05.m
|
@ -1,8 +1,13 @@
|
|||
BSDX05 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/15/10 12:51pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
BSDX05 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 5:36pm
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
; Change Log:
|
||||
; UJO/SMH - July 11 2010: pass FM Dates for Start and End rather than US Dates
|
||||
; UJO/SMH - Dec 8 2010: In STCOMM, the logic was that an appointment
|
||||
; that was a walk-in didn't count towards slot calculations.
|
||||
; I checked PIMS, and Walk-ins do indeed count towards slot calculations.
|
||||
; Therefore, I commented this line out:
|
||||
; ;Q:$P(BSDXNOD,U,13)="y" ;WALKIN
|
||||
;
|
||||
APBLKOV(BSDXY,BSDXSTART,BSDXEND,BSDXRES) ;EP
|
||||
;Called by BSDX APPT BLOCKS OVERLAP
|
||||
|
@ -52,7 +57,7 @@ STCOMM(BSDXAD) ;
|
|||
S BSDXNOD=^BSDXAPPT(BSDXAD,0)
|
||||
Q:$P(BSDXNOD,U,10)=1 ;NO-SHOW Flag
|
||||
Q:$P(BSDXNOD,U,12)]"" ;CANCELLED APPT
|
||||
Q:$P(BSDXNOD,U,13)="y" ;WALKIN
|
||||
; Q:$P(BSDXNOD,U,13)="y" ;WALKIN -- new in V 1.42. See top comments.
|
||||
S BSDXNSTART=$P(BSDXNOD,U)
|
||||
S BSDXNEND=$P(BSDXNOD,U,2)
|
||||
I BSDXNEND'>BSDXSTART Q ;End is less than start
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX06 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/15/10 4:51pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
; Change Log:
|
||||
; UJO/SMH: July 15 2010: Change in BSDXSTART and BSDXEND: get
|
||||
; dates in FM format for i18n
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX07 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 10/31/10 9:38am
|
||||
;;1.42;BSDX;;Sep 29, 2010
|
||||
BSDX07 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 12:31pm
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
; Change Log:
|
||||
; UJO/SMH
|
||||
|
@ -114,7 +114,7 @@ APPADD(BSDXY,BSDXSTART,BSDXEND,BSDXPATID,BSDXRES,BSDXLEN,BSDXNOTE,BSDXATID) ;EP
|
|||
; is supposed to take 5 seconds.
|
||||
L +^BSDXAPPT(BSDXPATID):5 I '$T D ERR(BSDXI,"-1~Patient record is locked. Please contact technical support.") Q
|
||||
; Header Node
|
||||
S ^BSDXTMP($J,BSDXI)="I00020APPOINTMENTID^T00020ERRORID"_$C(30)
|
||||
S ^BSDXTMP($J,BSDXI)="I00020APPOINTMENTID^T00100ERRORID"_$C(30)
|
||||
;Restartable Transaction; restore paramters when starting.
|
||||
; (Params restored are what's passed here + BSDXI)
|
||||
TSTART (BSDXY,BSDXSTART,BSDXEND,BSDXPATID,BSDXRES,BSDXLEN,BSDXNOTE,BSDXATID,BSDXI):T="BSDX ADD NEW APPOINTMENT^BSDX07"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX08 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 11/16/10 7:12am
|
||||
;;1.42;BSDX;;Sep 29, 2010
|
||||
BSDX08 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 12:35pm
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
; Original by HMW. New Written by Sam Habiel. Licensed under LGPL.
|
||||
;
|
||||
|
@ -100,7 +100,7 @@ APPDEL(BSDXY,BSDXAPTID,BSDXTYP,BSDXCR,BSDXNOT) ;EP
|
|||
; Counter
|
||||
N BSDXI S BSDXI=0
|
||||
; Header Node
|
||||
S ^BSDXTMP($J,BSDXI)="T00030ERRORID"_$C(30)
|
||||
S ^BSDXTMP($J,BSDXI)="T00100ERRORID"_$C(30)
|
||||
;
|
||||
; Lock BSDX node, only to synchronize access to the globals.
|
||||
; It's not expected that the error will ever happen as no filing
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX09 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 10/20/10 4:16pm
|
||||
;;1.41;BSDX;;Sep 07, 2010;Build 7
|
||||
;;1.42;BSDX;;Dec 07, 2010;Build 7
|
||||
;
|
||||
; Change Log:
|
||||
; UJO/TH - v 1.3 on 3100714 - Extra Demographics:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX11 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
ENV0100 ;EP Version 1.0 Environment check
|
||||
I '$G(IOM) D HOME^%ZIS
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX12 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/18/10 2:14pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
; Change Log:
|
||||
; v 1.3 - i18n support - 3100718
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX13 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/18/10 2:17pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
BSDX13 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 6:05pm
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
; Change Log:
|
||||
; V 1.3 - i18n support - Dates passed to Routine as FM Date - WV/SMH
|
||||
|
@ -30,7 +30,7 @@ AVDELDT(BSDXY,BSDXRESD,BSDXSTART,BSDXEND) ;EP
|
|||
; S X=BSDXEND
|
||||
; S %DT="X" D ^%DT
|
||||
; I Y=-1 D ERR(0,"AVDELDT-BSDX13: Invalid End Date") Q
|
||||
S BSDXEND=$P(Y,".")_".99999"
|
||||
S BSDXEND=$P(BSDXEND,".")_".99999"
|
||||
I '+BSDXRESD D ERR(0,"AVDELDT-BSDX13: Invalid Resource ID") Q
|
||||
;
|
||||
F S BSDXSTART=$O(^BSDXAB("ARSCT",BSDXRESD,BSDXSTART)) Q:'+BSDXSTART Q:BSDXSTART>BSDXEND D
|
||||
|
@ -45,7 +45,7 @@ ERROR ;
|
|||
D ^%ZTER
|
||||
I '+$G(BSDXI) N BSDXI S BSDXI=999999
|
||||
S BSDXI=BSDXI+1
|
||||
D ERR(0,"BSDX13 M Error: <"_$G(%ZTERROR)_">")
|
||||
D ERR(0,"BSDX13 M Error: <"_$G(%ZTERZE)_">")
|
||||
Q
|
||||
;
|
||||
ERR(BSDXERID,ERRTXT) ;Error processing
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX14 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
ACCTYPD(BSDXY,BSDXVAL) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX15 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
GRPTYP(BSDXY) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX16 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
RSRCD(BSDXY,BSDXVAL) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX17 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
SCHUSRD(BSDXY) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX18 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
DELRUD(BSDXY,BSDXIEN) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX19 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
ADDRGD(BSDXY,BSDXVAL) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX20 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
DELRGID(BSDXY,BSDXIEN) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX21 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 5/21/10 9:42pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
ADDAGD(BSDXY,BSDXVAL) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX22 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
DELAGID(BSDXY,BSDXIEN,BSDXIEN1) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX23 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
EVENT(BSDXEVENT,BSDXPARAM,BSDXSIP,BSDXSPT) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX24 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
Q
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX25 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
CHECKIND(BSDXY,BSDXAPTID,BSDXCDT,BSDXCC,BSDXPRV,BSDXROU,BSDXVCL,BSDXVFM,BSDXOG) ;EP
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX26 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 3:08am
|
||||
;;1.42;BSDX;;Sep 29, 2010
|
||||
BSDX26 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 12:38pm
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
; Change History:
|
||||
; 3101023 - UJO/SMH - Addition of restartable transaction; relocation of tx.
|
||||
; --> Thanks to Zach Gonzalez and Rick Marshall
|
||||
|
@ -74,7 +74,7 @@ EDITAPT(BSDXY,BSDXAPTID,BSDXNOTE) ;EP Edit appointment (only note text can be
|
|||
; Counter
|
||||
N BSDXI S BSDXI=0
|
||||
; Header Node
|
||||
S ^BSDXTMP($J,BSDXI)="T00020ERRORID"_$C(30)
|
||||
S ^BSDXTMP($J,BSDXI)="T00100ERRORID"_$C(30)
|
||||
; Restartable txn for GT.M. Restored vars are Params + BSDXI.
|
||||
TSTART (BSDXY,BSDXAPTID,BSDXNOTE,BSDXI):T="BSDX EDIT APPOINTMENT^BSDX26"
|
||||
;
|
||||
|
|
24
m/BSDX27.m
24
m/BSDX27.m
|
@ -1,9 +1,13 @@
|
|||
BSDX27 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/15/10 12:22pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
BSDX27 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 4:52pm
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
; Change Log: July 15, 2010
|
||||
; UJO/SMH - i18n: FM Dates passed into routine for Clinic Letters - CLDISP tag
|
||||
;
|
||||
; UJO/SMH - i18n: FM Dates passed into routine for Clinic Letters - CLDISP ta
|
||||
; v 1.42 - 3101208 - SMH
|
||||
; - Added check to skip cancelled appointments. Check was forgotten
|
||||
; in original code.
|
||||
; . N BSDXFLAGS S BSDXFLAGS=$P(BSDXNOD,U,2) ; No show and Cancel Flags
|
||||
; . Q:BSDXFLAGS["C" ; if appt is cancelled, quit
|
||||
;
|
||||
Q
|
||||
;
|
||||
|
@ -18,6 +22,16 @@ PADISP(BSDXY,BSDXPAT) ;EP
|
|||
;a patient's appointments and generating patient letters.
|
||||
;Called by rpc BSDX PATIENT APPT DISPLAY
|
||||
;
|
||||
; Sam's Notes:
|
||||
; Relatively complex algorithm.
|
||||
; 1. First, loop through ^DPT(DA,"S", and get all appointments.
|
||||
; Exclude cancelled appts. Store in BSDXDPT array.
|
||||
; 2. Go through ^BSDXAPPT("CPAT", (patient index) .
|
||||
; Get the info from there and compar with BSDXDPT array. If
|
||||
; they are the same, get all info, and rm entry from BSDXDPT array.
|
||||
; 3. If there are any remaining entries in BSDXDPT (PIMS leftovers),
|
||||
; Get the data from file 2 and 44.
|
||||
;
|
||||
N BSDXI,BSDXIEN,BSDXNOD,BSDXNAM,BSDXDOB,BSDXHRN,BSDXSEX,BSDXCNID,BSDXCNOD,BSDXMADE,BSDXCLRK,BSDXNOT,BSDXQ
|
||||
N BSDXSTRT
|
||||
N BSDXSTRE,BSDXCITY,BSDXST,BSDXZIP,BSDXPHON
|
||||
|
@ -49,6 +63,8 @@ PADISP(BSDXY,BSDXPAT) ;EP
|
|||
. S BSDXCID=$P(BSDXNOD,U)
|
||||
. Q:'+BSDXCID
|
||||
. Q:'$D(^SC(BSDXCID,0))
|
||||
. N BSDXFLAGS S BSDXFLAGS=$P(BSDXNOD,U,2) ; No show and Cancel Flags
|
||||
. Q:BSDXFLAGS["C" ; if appt is cancelled, quit
|
||||
. S BSDXDPT(BSDXCID,BSDXDT)=BSDXNOD
|
||||
;
|
||||
;$O Through ^BSDX("CPAT",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX28 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/18/10 2:30pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
; Change Log:
|
||||
; HMW 3050721 Added test for inactivated record
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX29 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 6:05am
|
||||
;;1.42;BSDX;;Sep 29, 2010
|
||||
BSDX29 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 12:39pm
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
; Change Log:
|
||||
; v1.3 by WV/SMH on 3100713
|
||||
|
@ -37,7 +37,7 @@ BSDXCP(BSDXY,BSDXRES,BSDX44,BSDXBEG,BSDXEND) ;EP
|
|||
; Counter
|
||||
N BSDXI S BSDXI=0
|
||||
; Header Node
|
||||
S ^BSDXTMP($J,0)="T00010TASK_NUMBER^T00020ERRORID"_$C(30)
|
||||
S ^BSDXTMP($J,0)="T00010TASK_NUMBER^T00100ERRORID"_$C(30)
|
||||
;
|
||||
; Make dates inclusive; add 1 to FM dates
|
||||
S BSDXBEG=BSDXBEG-1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX2E ;IHS/OIT/MJL - ENVIRONMENT CHECK FOR WINDOWS SCHEDULING [7/18/10 4:30pm]
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
S LINE="",$P(LINE,"*",81)=""
|
||||
S XPDNOQUE="NO QUE" ;NO QUEUING ALLOWED
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX30 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; [ 09/12/2007 1:54 PM ]
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
SPACED(BSDXY,BSDXDIC,BSDXVAL) ;EP
|
||||
|
|
43
m/BSDX31.m
43
m/BSDX31.m
|
@ -1,5 +1,5 @@
|
|||
BSDX31 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 8:25am
|
||||
;;1.42;BSDX;;Sep 29, 2010
|
||||
BSDX31 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 12:39pm
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
; Change Log:
|
||||
; v1.42 Oct 23 2010 WV/SMH
|
||||
; - Change transaction to restartable. Thanks to Zach Gonzalez
|
||||
|
@ -10,6 +10,8 @@ BSDX31 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 12/6/10 8:25am
|
|||
; -1: zero or null Appt ID
|
||||
; -2: Invalid APPT ID (doesn't exist in ^BSDXAPPT)
|
||||
; -3: No-show flag is invalid
|
||||
; -4: Filing of No-show in ^BSDXAPPT failed
|
||||
; -5: Filing of No-show in ^DPT failed (BSDXAPI error)
|
||||
; -100: M Error
|
||||
;
|
||||
;
|
||||
|
@ -39,6 +41,18 @@ UT ; Unit Tests
|
|||
; Test 4: -2
|
||||
D NOSHOW(.ZZZ,2938748233,0)
|
||||
I $P(^BSDXTMP($J,1),U)'=-2 W "ERROR T4",! B
|
||||
; Test 5: -3
|
||||
D NOSHOW(.ZZZ,APPID,3)
|
||||
I $P(^BSDXTMP($J,1),U)'=-3 W "ERROR T5",! B
|
||||
; Test 6: Mumps error (-100)
|
||||
s bsdxdie=1
|
||||
D NOSHOW(.ZZZ,APPID,1)
|
||||
I $P(^BSDXTMP($J,1),U)'=-100 W "ERROR T6",! B
|
||||
k bsdxdie
|
||||
; Test 7: Restartable transaction
|
||||
s bsdxrestart=1
|
||||
D NOSHOW(.ZZZ,APPID,1)
|
||||
I $P(^BSDXAPPT(APPID,0),U,10)'=1 W "ERROR T7",! B
|
||||
QUIT
|
||||
NOSHOW(BSDXY,BSDXAPTID,BSDXNS) ;EP - No show a patient
|
||||
; Called by RPC: BSDX NOSHOW
|
||||
|
@ -64,9 +78,15 @@ NOSHOW(BSDXY,BSDXAPTID,BSDXNS) ;EP - No show a patient
|
|||
; Counter
|
||||
N BSDXI S BSDXI=0
|
||||
; Header Node
|
||||
S ^BSDXTMP($J,BSDXI)="I00020ERRORID^T00030ERRORTEXT"_$C(30)
|
||||
S ^BSDXTMP($J,BSDXI)="I00100ERRORID^T00030ERRORTEXT"_$C(30)
|
||||
; Begin transaction
|
||||
TSTART (BSDXI,BSDXY,BSDXAPTID,BSDXNS):T="BSDX NOSHOW CANCEL^BSDX29"
|
||||
;;;test for error inside transaction. See if %ZTER works
|
||||
I $G(bsdxdie) S X=1/0
|
||||
;;;TEST
|
||||
;;;test for TRESTART
|
||||
I $G(bsdxrestart) K bsdxrestart TRESTART
|
||||
;;;test
|
||||
; Turn off SDAM APPT PROTOCOL BSDX Entries
|
||||
N BSDXNOEV S BSDXNOEV=1 ;Don't execute protocol
|
||||
; Appointment ID check
|
||||
|
@ -174,18 +194,23 @@ NOSEVT3(BSDXRES) ;
|
|||
;
|
||||
ERR(BSDXERID,ERRTXT) ;Error processing
|
||||
S BSDXI=BSDXI+1
|
||||
TROLLBACK
|
||||
S ERRTXT=$TR(ERRTXT,"^","~")
|
||||
I $TL>0 TROLLBACK
|
||||
S ^BSDXTMP($J,BSDXI)=BSDXERID_"^"_ERRTXT_$C(30)
|
||||
S BSDXI=BSDXI+1
|
||||
S ^BSDXTMP($J,BSDXI)=$C(31)
|
||||
Q
|
||||
QUIT
|
||||
;
|
||||
ETRAP ;EP Error trap entry
|
||||
N $ET S $ET="D ^%ZTER HALT" ; Emergency Error Trap
|
||||
; Rollback, otherwise ^XTER will be empty from future rollback
|
||||
I $TL>0 TROLLBACK
|
||||
D ^%ZTER
|
||||
I '$D(BSDXI) N BSDXI S BSDXI=999999
|
||||
S BSDXI=BSDXI+1
|
||||
D ERR(0,"BSDX31 Error: "_$G(%ZTERROR))
|
||||
Q
|
||||
S $EC="" ; Clear Error
|
||||
; Send to client
|
||||
I '$D(BSDXI) N BSDXI S BSDXI=0
|
||||
D ERR(-100,"BSDX31 Error: "_$G(%ZTERZE))
|
||||
QUIT
|
||||
;
|
||||
IMHERE(BSDXRES) ;EP
|
||||
;Entry point for BSDX IM HERE remote procedure
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX32 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 9/29/10 10:21am
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
ERROR ;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX33 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/15/10 12:33pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
; Mods by WV/STAR
|
||||
;
|
||||
; Change Log:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX34 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/15/10 12:37pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
; Change Log:
|
||||
; July 10 2010:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDX35 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
Q
|
||||
|
|
11
m/BSDXAPI.m
11
m/BSDXAPI.m
|
@ -1,9 +1,10 @@
|
|||
BSDXAPI ; IHS/ANMC/LJF - SCHEDULING APIs ; 12/6/10 6:01am
|
||||
;;1.42;BSDX;;Sep 29, 2010;Build 7
|
||||
BSDXAPI ; IHS/ANMC/LJF - SCHEDULING APIs ; 12/6/10 5:50pm
|
||||
;;1.42;BSDX;;Dec 07, 2010;Build 7
|
||||
;Orignal routine is BSDAPI by IHS/LJF, HMW, and MAW
|
||||
;local mods (many) by WV/SMH
|
||||
;Move to BSDX namespace as BSDXAPI from BSDAPI by WV/SMH
|
||||
; Change History:
|
||||
; 2010-11-5:
|
||||
; - Fixed errors having to do uncanceling patient appointments if it was a patient cancelled appointment.
|
||||
; - Use new style Fileman API for storing appointments in file 44 in $$MAKE due to problems with legacy API.
|
||||
; 2010-11-12:
|
||||
|
@ -12,6 +13,10 @@ BSDXAPI ; IHS/ANMC/LJF - SCHEDULING APIs ; 12/6/10 6:01am
|
|||
; Added an entry point to update the patient note in file 44.
|
||||
; 2010-12-6
|
||||
; MAKE1 incorrectly put info field in BSDR("INFO") rather than BSDR("OI")
|
||||
; 2010-12-8
|
||||
; Removed restriction on max appt length. Even though this restriction
|
||||
; exists in fileman (120 minutes), PIMS ignores it. Therefore, I
|
||||
; will ignore it here too.
|
||||
;
|
||||
MAKE1(DFN,CLIN,TYP,DATE,LEN,INFO) ; Simplified PEP w/ parameters for $$MAKE - making appointment
|
||||
; Call like this for DFN 23435 having an appointment at Hospital Location 33
|
||||
|
@ -50,7 +55,7 @@ MAKE(BSDR) ;PEP; call to store appt made
|
|||
I $G(BSDR("ADT")) S BSDR("ADT")=+$E(BSDR("ADT"),1,12) ;remove seconds
|
||||
I $G(BSDR("ADT"))'?7N1".".4N Q 1_U_"Appt Date/Time error: "_$G(BSDR("ADT"))
|
||||
;
|
||||
I ($G(BSDR("LEN"))<5)!($G(BSDR("LEN"))>240) Q 1_U_"Appt Length error: "_$G(BSDR("LEN"))
|
||||
;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.
|
||||
I '$D(^VA(200,+$G(BSDR("USR")),0)) Q 1_U_"User Who Made Appt Error: "_$G(BSDR("USR"))
|
||||
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")
|
||||
;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
BSDXGPRV ; WV/SMH - WINDOWS SCHEDULING RPCS ; 11/2/10 4:27pm
|
||||
;;1.41;BSDX;;Sep 29, 2010
|
||||
;;1.42;BSDX;;Dec 07, 2010
|
||||
;
|
||||
;
|
||||
ERROR ;
|
||||
|
|
Loading…
Reference in New Issue