Hosting EHR Instances for the Education program

I updated the installer to show failed SQL statements.

In testing locally, it shows that in addition to the event categories being missing, there is a problem with insert statements into the lists table.

Medications are missing as a result from the patient records. (As an example, compare Ralph Abbot on the nhanes instance and the nku instance.)

Haven’t had a chance to dig more deeply into why queries are failing in the cloning process. It doesn’t make sense as they are generated by MySQL dump. However, it is happening.

Given that there has been some activity on the other instances replacing them with clean copies doesn’t seem like a good option at the moment.

1 Like

Hi all, I am getting ready for my students to use the EHR in class next Wednesday. I was going back to login and run through the scavenger hunt again this morning. It worked fine when I tried it a few months ago, but today when I click on the patient last name, I get an error message. I am using the link for UMD. Can you help me with this?

https://ehr.librehealth.io/interface/main/tabs/main.php?url=..%2Fpatient_file%2Fsummary%2Fdemographics.php%3Fset_pid%3D1

Also–I thought I remembered seeing instructions for creating user accounts for the students in my class, but I can’t seem to find them. Can someone please point me to that, if it exists?

Thank you!

looks like the upgrade script needs to be run. @yehster can you look at the tables and make sure they are there. It is really difficult to work with out tools.

Running sql_upgrade.php for (1.0.1 - > 2.0) did not resolve the issue for the default ehr site. There seems to be at least one missing column.

This is the error when trying to select patients: ERROR: query failed: SELECT * FROM clinical_rules WHERE pid=0 AND active = 1 ORDER BY id

Error: Unknown column ‘active’ in ‘where clause’

and this is the output from the upgrade script. There doesn’t seem to be any reference to the new “active” column in clinical rules. It looks like the upgrade scripts had been run prior, but the needed column isn’t part of the patch.

Processing 1_0_1-to-2_0_0_upgrade.sql … Skipping section #IfMissingColumn insurance_data inactive_time Skipping section #IfMissingColumn insurance_data eDate Skipping section #IfIndex insurance_data pid_type_date Skipping section #IfNotIndex insurance_data pid_type_date_inactivetime Skipping section #IfMissingColumn billing exclude_from_insurance_billing Skipping section #IfMissingColumn codes exclude_from_insurance_billing Skipping section #IfMissingColumn form_encounter eft_number Skipping section #IfMissingColumn form_encounter claim_number Skipping section #IfMissingColumn form_encounter document_image Skipping section #IfMissingColumn form_encounter seq_number Skipping section #IfMissingColumn form_encounter ordering_physician Skipping section #IfMissingColumn form_encounter referring_physician Skipping section #IfMissingColumn form_encounter contract_physician Skipping section #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2016-10-01 load_filename 2017-PCS-Long-Abbrev-Titles.zip Skipping section #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2016-10-01 load_filename 2017-GEM-DC.zip Skipping section #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2016-10-01 load_filename 2017-ICD10-Code-Descriptions.zip Skipping section #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2016-10-01 load_filename 2017-GEM-PCS.zip Skipping section #IfNotRow2D list_options list_id lists option_id ub_admit_source Skipping section #IfNotRow2D list_options list_id lists option_id ub_admit_type Skipping section #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2017-10-01 load_filename 2018-ICD-10-PCS-Order-File.zip Skipping section #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2017-10-01 load_filename 2018-ICD-10-CM-General-Equivalence-Mappings.zip Skipping section #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2017-10-01 load_filename 2018-ICD-10-Code-Descriptions.zip Skipping section #IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2017-10-01 load_filename 2018-ICD-10-PCS-General-Equivalence-Mappings.zip Updating global configuration defaults… Updating Access Controls… DONE upgrading access controls Updating version indicators… Database and Access Control upgrade finished.

@aethelwulffe

Here is the change that added the active column to the clinical rules table.

and here is one one which includes the new column at database creation

but the new column doesn’t appear in the upgrade script

can you patch it

active tinyint(4) DEFAULT NULL COMMENT ‘Is this measure turned on?’);

I just sent a pr for the fix to get it into the code base.Once it is approved then it can be uploaded and run, if you don’t have time to fix it now.

Structure in libreehr/modules/MIPS/SQL/1_install/

Trying to get around to publishing the installer.

Gotcha.

All the below stuff has to get changed in two months anyway. Basically all rules get re-written annually, and usually the name of the whole government program etc…

DROP TABLE IF EXISTS clinical_rules;

CREATE TABLE clinical_rules ( id varchar(35) NOT NULL DEFAULT ‘’, pid bigint(20) NOT NULL DEFAULT ‘0’ COMMENT ‘0 is default for all patients, while > 0 is id from patient_data table’, active_alert_flag tinyint(1) DEFAULT NULL COMMENT ‘Active Alert Widget Module flag - note not yet utilized’, passive_alert_flag tinyint(1) DEFAULT NULL COMMENT ‘Passive Alert Widget Module flag’, patient_reminder_flag tinyint(1) DEFAULT NULL COMMENT ‘Clinical Reminder Module flag’, release_version varchar(255) NOT NULL DEFAULT ‘’ COMMENT ‘Clinical Rule Release Version’, web_reference varchar(255) NOT NULL DEFAULT ‘’ COMMENT ‘Clinical Rule Web Reference’, access_control varchar(255) NOT NULL DEFAULT ‘patients:med’ COMMENT ’ACO link for access control’, pqrs_code varchar(35) DEFAULT NULL COMMENT ‘Measure number’, pqrs_individual_2016_flag tinyint(4) DEFAULT NULL COMMENT ‘Is MIPS flag’, pqrs_group_type varchar(2) DEFAULT ‘X’ COMMENT ‘XML output scheme type’, active tinyint(4) DEFAULT NULL COMMENT ‘Is this measure turned on?’);

Is this still an issue?

@yehster @teryhill @aethelwulffe

I think UMD just started to use LibreHealth EHR so I appreciate any help you can give them to resolve this glitch

When the demo’s are updated then the upgrade script can be run and that should take care of the issue.

ALTER TABLE clinical_rules ADD COLUMN active tinyint(4) DEFAULT NULL COMMENT ‘Is this measure turned on?’)

ERROR: query failed: ALTER TABLE clinical_rules ADD COLUMN active tinyint(4) DEFAULT NULL COMMENT ‘Is this measure turned on?’)

Sorry sending the correction.

It’s completely okay!

I just commited it so you should be able to update it and upgrade it

All demos updated – I really gotta automate this process.

can you look at the PHP error log and see if there is an error?

Just to make sure that nothing else is going on.

A whole lot of this:

[Thu Nov 23 23:59:59.968525 2017] [:error] [pid 31260] [client REDACTED:27606] PHP Notice: Undefined index: pc_aid in /opt/ehr/modules/calendar/includes/get_provider_events.php on line 76, referer: https://ehr.librehealth.io/modules/calendar/index.php?&framewidth=1593