Ignore:
Timestamp:
Jul 9, 2012, 7:43:46 PM (12 years ago)
Author:
Sam Habiel
Message:

Added/fixed the following:

  • Unit Tests for running everything through PIMS
  • Checks for end of message for error handling ((31))
  • All routines previously using transactions use locks now
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/m/BSDX25.m

    r1472 r1479  
    1 BSDX25  ; VEN/SMH - WINDOWS SCHEDULING RPCS ; 7/5/12 11:55am
     1BSDX25  ; VEN/SMH - WINDOWS SCHEDULING RPCS ; 7/9/12 5:00pm
    22        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
     
    4141        ; -2 -> Invalid Check-in Date
    4242        ; -3 -> Cannot check-in due to Fileman Filer failure
     43        ; -4 -> Cannot lock ^BSDXAPPT(APPTID)
    4344        ; -10 -> BSDXAPI error
    4445        ; -100 -> Mumps Error
     
    6667        I '+BSDXAPPTID D ERR("-1~Invalid Appointment ID") QUIT
    6768        I '$D(^BSDXAPPT(BSDXAPPTID,0)) D ERR("-1~Invalid Appointment ID") QUIT
     69        ;
     70        ; Lock BSDX node, only to synchronize access to the globals.
     71        ; It's not expected that the error will ever happen as no filing
     72        ; is supposed to take 5 seconds.
     73        L +^BSDXAPPT(BSDXAPPTID):5 E  D ERR("-4~Appt record is locked. Please contact technical support.") QUIT
    6874        ;
    6975        ; Remove Date formatting v.1.5. Client will send date as FM Date.
     
    101107        . D ERR(-10_"~"_$P(BSDXERR,U,2)) ; Send error message to client
    102108        ;
     109        L -^BSDXAPPT(BSDXAPPTID)
    103110        S BSDXI=BSDXI+1
    104111        S ^BSDXTMP($J,BSDXI)="0"_$C(30)
     
    124131        Q 0
    125132        ;
    126 RMCI(BSDXY,BSDXAPPTID)  ; EP - Remove Check-in from BSDX APPT and 2/44
     133RMCI(BSDXY,BSDXAPPTID)  ; Private EP - Remove Check-in from BSDX APPT and 2/44
    127134        ; Called by RPC BSDX REMOVE CHECK-IN
    128135        ;
     
    163170        I '$D(^BSDXAPPT(BSDXAPPTID,0)) D ERR("-2~Invalid Appointment ID") QUIT
    164171        ;
     172        ; Lock
     173        ; Timeout not expected to happen except in error conditions.
     174        L +^BSDXAPPT(BSDXAPPTID):5 E  D ERR("-7~Appt record is locked. Please contact technical support.") QUIT
     175        ;
    165176        ; Get appointment Data
    166177        N BSDXNOD S BSDXNOD=^BSDXAPPT(BSDXAPPTID,0)
     
    199210        . N % S %=$$BSDXCHK(BSDXAPPTID,BSDXCDT) ; No error checking here.
    200211        . D ERR("-5~"_$P(BSDXERR,U,2)) ; Send error message to client
    201         ;
     212        ;
     213        ; Unlock
     214        L -^BSDXAPPT(BSDXAPPTID)
     215        ;
    202216        ; Return ADO recordset
    203217        S BSDXI=BSDXI+1
     
    264278        ;
    265279ERR(BSDXERR)    ;Error processing
     280        ; Unlock first
     281        L:$D(BSDXAPPTID) -^BSDXAPPT(BSDXAPPTID)
    266282        ; If last line is $C(31), we are done. No more errors to send to client.
    267283        I ^BSDXTMP($J,$O(^BSDXTMP($J," "),-1))=$C(31) QUIT
Note: See TracChangeset for help on using the changeset viewer.