SANDI - CUBEX Drug Dispensing Cabinets

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) aka Intermediate Care Ward aka IMC
  • CUBEX LAC (LAC A-6)
  • CUBEX VMSC Treatment Room (VMSC 32A) 
  • CUBEX Pharmacy Sync (SAC 194)
  • CUBEX SAC ICU (SAC 136)
  • CUBEX MDVC

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

  • 04/20/21 @ 125017 Cubex upload failure 
  • Data    
  • visit #    2125352
  • patient name    Jango 
  • client first name    Josh
  • client last name    Klossing
  • code    60059
  • qty    3
  • dr    ASk
  • visit #    2125352 $VAR1 = '2125352'; 
  • visit type    
  • reason - if known    {"success": 0, "failureReason": " Visit Type [] not foundPatient with unique system number [] not found","failureCode": "INVALID"}
  • 04/20/21 @ 125017 Cubex upload failure 
  • Data    
  • visit #    2125352
  • patient name    Jango 
  • client first name    Josh
  • client last name    Klossing
  • code    O5033
  • qty    8
  • dr    ASk
  • visit #    2125352 $VAR1 = '2125352'; 
  • visit type    
  • reason - if known    {"success": 0, "failureReason": " Visit Type [] not foundPatient with unique system number [] not found","failureCode": "INVALID"}

{"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

  • 04/20/21 @ 125017 Cubex upload failure 
  • Data    
  • visit #    2125352
  • patient name    Jango 
  • client first name    Josh
  • client last name    Klossing
  • code    60059
  • qty    3
  • dr    ASk
  • visit #    2125352 $VAR1 = '2125352'; 
  • visit type    
  • reason - if known    {"success": 0, "failureReason": " Visit Type [] not foundPatient with unique system number [] not found","failureCode": "INVALID"}
  • 04/20/21 @ 125017 Cubex upload failure 
  • Data    
  • visit #    2125352
  • patient name    Jango 
  • client first name    Josh
  • client last name    Klossing
  • code    O5033
  • qty    8
  • dr    ASk
  • visit #    2125352 $VAR1 = '2125352'; 
  • visit type    
  • reason - if known    {"success": 0, "failureReason": " Visit Type [] not foundPatient with unique system number [] not found","failureCode": "INVALID"}

Moving a Cabinet

If a Cabinet is moved to a new location within the same network, the Cabinet will still function without IT@Vet Med or CUBEX intervention, but DHCP should be updated.

If a Cabinet is moved to a new location on a different network (for example, BSB, SAC/LAC, and VMSC are three different networks with different IP ranges), then the following steps are required for the Cabinet to work in the new location.

  1. IT@Vet Med will need to assign the cabinet a new static IP address for the network the new location is on and/or update the DHCP description data.
  2. When the cabinet is ready to be moved (but no sooner as it will disrupt function) IT@Vet Med will update WHD/IPAM.  The IPAM change will be done manually.
  3. IT@Vet Med will ensure the cabinets have Ethernet connectivity at the new location and there are no firewall issues.
  4. CUBEX will "re-point the cabinet to itself, which takes about 10 minutes".  We believe this entails updates on the CUBEX Sync cabinet and the CUBEX cloud server by the CUBEX team.
  5. If the cabinet has network access, the CUBEX app is launched on the desktop, but the unit does not automatically connect (gets stuck on the Connecting... screen) and go to the CUBEX sign-in page, then the Pharmacy team should contact CUBEX for technical support.
If the Cabinets are connected to an external refrigerator with a QLOCK connection, these are plug and play.  Meaning the fridge can remain in place and be connected to the new cabinet without any configuration changes.  QLOCK connections are used in at least the Step Down and VMSC locations at this writing.