Changes between Version 3 and Version 4 of SchedTechManual/ServerChanges1_7

Jul 10, 2012, 2:50:47 PM (12 years ago)
Sam Habiel



  • SchedTechManual/ServerChanges1_7

    v3 v4  
    1818Due to all of these reasons, I decided to completely remove Mumps Transactions from the Scheduling GUI code.
    1920== Summary of Work ==
    20216 routines had to be changed: BSDX07, BSDX08, BSDX25, BSDX26, BSDX29, BSDX31.
    2627For practical reasons, I decided that I will handle errors that can be reported to me (e.g. Fileman failing to store data). Mumps level errors I cannot handle gracefully; however, I put code to try to recover in certain places where I thought it would be practical to do so.
     29== Individual Routines ==
     30=== BSDX07 (Make appointment) ===
     32 * Lock node by patient ID
     33 * Check if appointment can be stored in PIMS if applicable (i.e. if this is a linked resource)
     34 * File data into ^BSDXAPPT - on failure, nothing to rollback
     35 * File word processing field - no error checking is done here (easy to detect by end users if they lose data)
     36 * If applicable, uncancel existing appointment in file 2 (rollback: delete everything)
     37 * OR Add a new appointment to file 2 (rollback: delete everything)
     38 * Add the appointment time to file 44 appointment subfile (rollback: delete everything)
     39 * Add the patient to the file 44 patient subsubfile under the appointment subfile. (rollback: delete everything)
     40 * Update availablities (global sets only)
     41 * Call event driver
     43Rollback strategy: Difficult because of all the different possible failure points. Delete all appointments from all files.
     45M Error handling: Delete all appointments where possible.
     47Limitations of Rollback:
     48If the patient has a previous appointment in 2 and an error happens in storing the new appointments, the old appointment is deleted. From $$UNMAKE^BSDXAPI:
     50    ; TODO: If Patient Appointment previously existed as cancelled, it's removed.
     51    ; How can I tell if one previously existed when data is in an intermediate 
     52    ; State? Can I restore it if the other file failed? Restoration can cause   
     53    ; another error. If I restore the global, there will be cross-references   
     54    ; missing (ASDCN specifically).                                             
     56=== BSDX08 (Cancel appointment) ===
     58 * Lock appointment
     59 * Check if appointment can be cancelled in PIMS
     60 * Add cancellation data in ^BSDXAPPT (rollback: none needed on failure)
     61 * Cancel appointment in 2 (rollback: remove cancellation data)
     62 * Delete appointment in 44 (no error detection as Fileman is not expected to fail)
     63 * Update availabilities (Global sets only)
     64 * Call event driver (point of no return)
     66Rollback strategy: it's easier than BSDX07 because there is only one point at which we can fail after we put data into the system. Rollback removes cancellation data from ^BSDXAPPT.
     68M Error Handling: Same as rollback.
     70Limitations of Rollback: If an M error occurs in the event driver, I do not uncancel in file 2 and restore the entry in file 44.
     71== Unit Test Routines ==
     73== Other Enhancements ==
     75== TODO ==