Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These errors are typically due to something outside of the control of CBS. With that in mind, CBS will create a new file under /retry-logs/. CBS will then attempt to retry the same action 10 times. After 10 failures, CBS will create a helpdesk ticket as well as email the hospital of the issue. The email will include the file in issue as well as all 10 exceptions thrown. CBS will move the log from /retry-log/ to /resolved-retry-logs/ or /failed-logs/ when it is successful or fails 10 attempts.

Technical Notes

The code is built around settings stored My.Settings and is written in VB.Net 4.8. The program runs on the server eadu.cvm.tamu.edu as a scheduled task with the name Cubex Billing Sync. All files and code are stored in the C drive under C:/Cubex_Billing_Sync/.

The program supports command line arguments as commands. The Cubex Billing Sync task uses the following command line arguments:

Code Block
breakoutModewide
languagepowershell
retry sa-download la-download tomo-download sa-process la-process tomo-process process-transactions

Command

Purpose

sa-download
la-download
tomo-download

Calls CUBEX.GetBilling for the chosen CUBEX database and stores the results into C:/Cubex_Billing_Sync/unprocessed-logs/.

sa-process
la-process
tomo-process

Finds all unprocessed logs within the correct sub folder of C:/Cubex_Billing_Sync/unprocessed-logs/ and tries to upload them into the VMIS database under cubex_billing_log and cubex_billing_log_transaction.

process-transactions

Finds all cubex_billing_log_transaction with null date_processed and runs them against sp_cubex_transaction.

retry

Retries any failed log found in C:/Cubex_Billing_Sync/retry-logs/. These files are created during the commands: sa-process la-process tomo-process.

prune-records

[Untested] Clears log files that are one year or older.

CUBEX is partitioned into three different catalogs. Each catalog is assigned a database number.

Database Number

Name

1

Smal Animal

2

Large Animal

3

TOMO

CBS stores CUBEX transactions in:

  • eadu.cvm.tamu.edu Server

    • C:/CUBEX_SYNC_LOG/unprocessed-logs/{{database-name}}/ - Each file is a separate call to CUBEX.GetBilling. The file name includes [database_number]--[sequence_number]--[cubex-date].xml. Each of these files store the raw data that comes from CUBEX.GetBilling.

    • C:/CUBEX_SYNC_LOG/processed-logs/{{database-name}} - Once a file is processed it is moved from unprocessed to here.

      • NOTE: Logs that fail are still moved and an additional log is created under ./retry-logs/ housing the payload and all exceptions related to the file.

  • VMIS Database - production | devtest

    • cubex_billing_log - Stores the raw data sent form CUBEX along with several other fields to help determine which CUBEX database it relates to.

    • cubex_billing_log_transaction - Stores each transaction within the file along with common fields from the file for ease of use. This links to the log and any other record it may create via foreign keys.

      • NOTE: Fields are prefixed with either cubex_ or vmis_ to state the originator of the data.

CBS communicates with:

  • VMIS Database

    • cubex_billing_log: INSERT | UPDATE | SELECT

    • cubex_billing_log_transaction: INSERT | UPDATE | SELECT

    • sp_cubex_transaction: EXECUTE - Creates the records and updates the log.

Resolving Issues

Child pages (Children Display)
alltrue
depth0
allChildrentrue
style
sortAndReverse
first0

...