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/BSDX31.m

    r1472 r1479  
    1 BSDX31   ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 6/27/12 4:57pm
     1BSDX31   ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/9/12 12:57pm
    22        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
     
    2020        ; -5: Filing of No-show in ^DPT failed (BSDXAPI error)
    2121        ; -6: Invalid Resource ID
     22        ; -7: Lock not acquired on ^BSDXAPPT(BSDXAPTID)
    2223        ; -100: M Error
    2324        ;
     
    7071        I '$D(^BSDXAPPT(BSDXAPTID,0)) D ERR(-2,"BSDX31: Invalid Appointment ID") Q
    7172        ;
     73        ; Lock BSDX node, only to synchronize access to the globals.
     74        ; It's not expected that the error will ever happen as no filing
     75        ; is supposed to take 5 seconds.
     76        L +^BSDXAPPT(BSDXAPTID):5 E  D ERR(-7,"BSDX31: Appt record is locked. Please contact technical support.") Q
     77        ;
    7278        ; Noshow value check - Must be 1 or 0
    7379        S BSDXNS=+BSDXNS
     
    113119        . D ERR(-5,"BSDX31: "_$P(BSDXERR,U,2))
    114120        . N % S %=$$BSDXNOS(BSDXAPTID,'BSDXNS) ; no error checking for filer
     121        ;
     122        ; Unlock
     123        L -^BSDXAPPT(BSDXAPTID)
    115124        ;
    116125        ; Return data in ADO.net table
     
    177186        ;
    178187ERR(BSDXERID,ERRTXT)       ;Error processing
     188        ; Unlock first
     189        L:$D(BSDXAPTID) -^BSDXAPPT(BSDXAPTID)
    179190        ; If last line is $C(31), we are done. No more errors to send to client.
    180191        I ^BSDXTMP($J,$O(^BSDXTMP($J," "),-1))=$C(31) QUIT
     
    189200        N $ET S $ET="D ^%ZTER HALT"  ; Emergency Error Trap
    190201        D ^%ZTER
    191         S $EC="" ; Clear Error
     202        ;
    192203        I $G(BSDXAPTID),$D(BSDXNS) N % S %=$$BSDXNOS(BSDXAPTID,'BSDXNS) ; Reverse No-Show status (whatever it was)
    193204        ; Send to client
Note: See TracChangeset for help on using the changeset viewer.