Change to having each collector collect both programs on the same laptop

From CCMDB Wiki
Jump to navigation Jump to search

We need to be able to have collectors follow patients from Medicine to CC and vice versa, and to collect both programs on the same laptop. This was accomplished by changing all the CCMDB.accdb Data Integrity Checks, CSS, CE, interface visibility via function hider() and possibly more. See 2023-11 - 2023-23 in CCMDB.accdb Change Log 2023 for details.

State of transition

detection of program

Used to be done by function program() checking Settings, will now be done by Function admission_program(Pat ID) and query admission_program resolving Service/Location against the corresponding "program" field in the s_dispo table.

dropdown availability

Instructions for collectors on transition day

Instructions to Clean CSS when moving to Combined Program Collection‎

Implementation details for setup with two different copies of CCMDB.accdb on same laptop - not the solution we will use   

We did the roll-out for this for the H6 laptop. Ran into several issues with Reconnect check orphans query and News and Backup. H6 remains doubled up, all other laptops are one program only for now.

Initial configuration - need to back out of this

News and backup

Laptop configuration

  • Add the locations that were available for the other laptop to s_locations_allowed_collection table
  • running the newest News and Backup script Backup.bat will update itself to always back up and pull newest versions in a way that works for both setups.
  • do the twinning on the laptop by running the Regional Server\Maintenance\Combine_CM\ccmdb_CM_twinner.ps1 (full address: \\ad.wrha.mb.ca\WRHA\REGION\SHARED\ICU_DATA_COLLECTION\Maintenance\Combine_CM\ccmdb_CM_twinner.ps1) script

Implementation details

Two copies of ccmdb.accdb need to be present, since you can't open a second instance of the same file. A powershell script opens the two files in the correct order. A shortcut launches the powershell script.

desktop shortcut   
  • double-clicking on a powerscript file will by default open it in an editor, so we made a shortcut to run the script instead of editing it.
powershell script details   
  • the script ccmdb_starter_both.ps1 opens the first file with command line parameters, waits for the user to click enter, and then opens the second one
  • powershell was used because batch would not process command line parameters right
  • the two file starts are separated by user having to click OK in the script to make sure they are actually logged in in the correct order
implementation inside CCMDB_*.accdb   
  • The program attempts to read the data file name from the command line via VBA using Command(). If no command line parameter is given the old standard ccmdb_data.mdb is used.

Paths not taken

same ccmdb.accdb, different command line parameters   
  • this didn't allow opening the second instance while the first is open.
collecting programs in same Access DB - reconsidered and heading that way   
  • This would require major changes to cross checks, form hiding and other places, and since we are likely moving away to SF it wasn't worth it.
Store data file path info in settings   
  • The settings are stored in the data file, so CCMDB.accdb wouldn't know where to get the data.

Related articles

Related articles: