CUBEX Drug Dispensing Cabinet

The CUBEX is the hospital's automatic drug dispensing equipment, installed in mid July of 2020, which replaced the previous Omnicell drug dispensing cabinets. The cabinets are of different sizes based on desired storage configurations but contain the same basic features of lockable cabinets which can be accessed by doctors using biometrics (fingerprints) or a secure code.

CUBEX Locations and Names

  • CUBEX SAC Anesthesia  (SAC 1100)
  • CUBEX SAC Step Down (SAC 1201)
  • CUBEX LAC (LAC A-6)
  • CUBEX VMSC Treatment Room  (VMSC 32A) 
  • CUBEX Pharmacy Sync  (SAC 194)
  • CUBEX SAC ICU  (SAC 136)

Restarting/Booting the In-Unit Computer

The large CUBEX units do not have a power button for their computers.  The computer can be turned off by accessing the Windows menu.  To restart the computer, the unit needs to lose power fully.  Unsure of the exact amount of time needed.  If the unit is unplugged, the computer takes longer than the actual unit to lose power due to a built-in UPS.  To have the computer boot, wait until the computer screen loses power before plugging the unit back in.

The small CUBEX units have the computer built-in to the monitor.  They can be powered on by the power button found on the monitor.

Vetstar Communications

Uploading Patients/Visit/Status to Cubex

  1. This can be initiated by opening/closing a visit (either with Vetstar or with SANDI) or directly by using the 2cubex/2cubexd (opening/closing visit) quick command in Vetstar.
  2. This will set a patient's status to Active or Deactive on the actual Cubex machines.  Patients that are active should be the same patients that currently have a visit open, as charges will not be applied to patients that do not have a visit open as a visit type is required to apply charges to an account.
  3. If the visit is opened in Vetstar (or the user is using quick command 2cubex/2cubexd), a script on vetmedprod1: /atc/client/scripts/sendMessageToCubex will contact chivetmedweb1.ad.uillinois.edu via curl.  This will run either VCR hl7a01c (activate patient) or VCR hl7a03c (deactivate patient).  If the visit is opened/closed in SANDI, then the script is run on chivethisprod1.ad.uillinois.edu.  The script is the same on both SANDI boxes: d:\atc\client\sendCubexPatient.bat.  This will sent a pre-generated xml message to mycubex.net.
  4. The upload of a client/patient to Cubex will fail if there are leading zeros on the MR.  When this happens, the Pharmacy needs to notify Cubex support.
  5. If special characters exist in a patient record it may not upload to Cubes.  For example, an & in the patient name will fail. 

Downloading to Vetstar on Production SANDI box

  1. Initiated by Windows Task Scheduler: Runs script d:\atc\client\getCubexBilling.bat every 1 minute.
  2. getCubexBilling.bat connects to the mycubex.net server and downloads the messages for Cubex and stores it in d:/atc/temp/cubexDownload.txt
  3. getCubexBilling.bat then runs Perl script d:\backends\vetstar\ATCBackend\client\UICubexChargeUpload.pl to parse and update the Vetstar/SANDI database using the messages from Cubex.
  4. The Perl script logs messages to d:\atc\debug\cubex.txt
  5. Log output is in 3 sections: Data XML Parsing, Data variable presentation, Data Posting.  Each section is logged separately to the same log file.
  6. If a failure message is created in UICubexChargeUpload.pl and the script does not fail prior to the end of the script, it will email the failure message to the indicated emails.  The emails can be changed at the end of the UICubexChargeUpload.pl Perl script.

Error: {"success": 0, "failureReason": " Visit Type [] not foundPatient with unique system number [] not found","failureCode": "INVALID"}

This is caused by something being changed in the medical record.  The example below refers to visit 2125352. Running and audit showed that there were two visits 2125351 and 2125352. Then Medical records made some changes, merged, deleted, etc. The actual visit that was used/in the emr is 2125351. This is why 2125352 is throwing a not valid.  

Email sample:

From: Vetstar Message Generator <jbove@vetstar.com> 

Sent: Tuesday, April 20, 2021 12:50 PM

To: Vet Med Lists VTHPharmacy <VTHPharmacy@vetmed.illinois.edu>

Subject: Cubex failed posting

{"success": 0, "failureReason": " Visit Type [] not foundPatient with unique system number [] not found","failureCode": "INVALID"}From: Vetstar Message Generator <jbove@vetstar.com> 

Sent: Tuesday, April 20, 2021 12:50 PM

To: Vet Med Lists VTHPharmacy <VTHPharmacy@vetmed.illinois.edu>

Subject: Cubex failed posting