NHANES data in LibreEHR

This is what I did for OpenEMR to use Pentaho on behalf of IPPF. https://github.com/oemr501c3/openemr-insights The ETL parts (at least) might be a good starting point for a Weka model

GREAT. I think Kevin and I could give you some ideas as to what clinicians, educators and researchers would like to see in an educational EHR. Perhaps if it was crafted correctly, the CSV file download would be less necessary. For example, if you could search for everyone with a creatinine above 2.0 or HgbA1c above 8, as well as searching their demographics and diagnostic codes (ICD-10) that would do be really helpful. The database we are pulling patients from (NHANES) has been used hundreds of times to publish articles.

Speaking out of ignorance (once again), I don’t suppose there are ways to port some of the tables out so they are like data.medicare.gov . This is a web based spreadsheet where researchers can filter and manipulate data, like any spreadsheet with the option to export. Obviously, this is probably something that would require development $$ through a grant but I don’t mind asking stupid questions early in the game

Depending on what your criteria are, I am pretty sure I have some serious mojo I could adapt to do some very deep stuff.

Again, more questions out of ignorance. Would having open APIs provide outside access to data stored on the educational EHR? Is this an opportunity for a SMART app using FHIR standards??

1 Like

What I am trying to ask in a round about fashion is, what are our choices going forward to be able to analyze patient data in the EHR? As it stands, I can see, for example, all of the drugs on men ages 70-80 (361 patients) but how can I filter and analyze it better? The standard ways would be to perform a SQL query on the backend data tables or a download a CSV file and analyze in a separate statistics or machine learning package. There are probably other options but these (I assume) are the most common options for analysis. Other thoughts?

Several times the instructions allude to some ad hoc reporting examples on oemr.org but I can’t find any examples of ad hoc reports using “insights”. Do you have a link?

No I don’t as no one ever adopted it and created any. The tools to creating the reports are there but not the reports. I would love to revive this. We created specific reports for IPPF and the ability to do ad-hoc reporting using various Pentaho plugins like Saiku Analytics.

The install was not easy. I think we should setup the tool as a service instance that can be subscribed to. Not fixed on Pentaho as the engine even at this point.

There are some general examples on page 8/9 based on the default ETL.

Let me know when you need to me to install things. :slight_smile: and I’ll do it :slight_smile:

Well, good news! We have the MIPS package well underway for 2017, and that will be mostly finished (waiting on some implementation standards to be actually published) by the end of the month…now, that isn’t really the good news though! I have been kept on tenterhooks by two companies wanting to purchase this product or just the services for a few months now…but that isn’t the good news either! The good news is that on May 30, instead of simply grabbing a bottle of rum and a .38 and spending some quality time in a dark room, I intend to see if my partner will go for us just releasing this crap to the LH project…then take the dinghy out for some Trans-Atlantic sailing.

nhanes.librehealth.io has been updated with a new data. It now includes blood pressure readings, height,weight, BMI and waist circumference measurements.

For reporting, I’m old school for now, and run SQL directly against the database, either in a workbench tool, or if customers need to repeatedly run complicated reports, I write PHP to build up the queries and parse the results.

Here’s an interesting “basic” query that I don’t think is available through the EHR itself: The forum won’t let attach a .CSV, so I’m just pasting the results here:

select count(), title,diagnosis from lists where type=‘medical_problem’ group by title,diagnosis order by count() desc; count(*);title;diagnosis 1882;Essential (primary) hypertension;ICD10:I10 1826;Pure hypercholesterolemia, unspecified;ICD10:E78.00 1448;Mild intermittent asthma, uncomplicated;ICD10:J45.20 1365;Unspecified osteoarthritis, unspecified site;ICD10:M19.90 568;Type 2 diabetes mellitus without complications;ICD10:E11.9 511;Disorder of thyroid, unspecified;ICD10:E07.9 297;Unspecified chronic bronchitis;ICD10:J42 253;Elevated blood-pressure reading, without diagnosis of hypertension;ICD10:R03.0 239;Gout, unspecified;ICD10:M10.9 229;Cerebral infarction, unspecified;ICD10:I63.9 219;Liver disease, unspecified;ICD10:K76.9 203;Old myocardial infarction;ICD10:I25.2 200;Chronic kidney disease, unspecified;ICD10:N18.9 196;Chronic ischemic heart disease, unspecified;ICD10:I25.9 187;Heart failure, unspecified;ICD10:I50.9 140;Type 2 diabetes mellitus with unspecified diabetic retinopathy without macular edema;ICD10:E11.319 129;Angina pectoris, unspecified;ICD10:I20.9 100;Emphysema, unspecified;ICD10:J43.9 89;Malignant neoplasm of prostate;ICD10:C61 67;Malignant neoplasm of unspecified site of unspecified female breast;ICD10:C50.919 61;Other specified malignant neoplasm of skin, unspecified;ICD10:C44.99 40;Malignant neoplasm of colon, unspecified;ICD10:C18.9 38;Unspecified malignant neoplasm of skin, unspecified;ICD10:C44.90 33;Malignant neoplasm of cervix uteri, unspecified;ICD10:C53.9 33;Malignant melanoma of skin, unspecified;ICD10:C43.9 29;Malignant neoplasm of other specified ill-defined sites;ICD10:C76.8 27;Dependence on renal dialysis;ICD10:Z99.2 22;Malignant neoplasm of uterus, part unspecified;ICD10:C55 15;Malignant neoplasm of bladder, unspecified;ICD10:C67.9 15;Malignant neoplasm of lymphoid, hematopoietic and related tissue, unspecified;ICD10:C96.9 14;Malignant neoplasm of thyroid gland;ICD10:C73 14;Malignant neoplasm of unspecified part of unspecified bronchus or lung;ICD10:C34.90 12;Malignant neoplasm of unspecified ovary;ICD10:C56.9 10;Malignant neoplasm of unspecified kidney, except renal pelvis;ICD10:C64.9 9;Malignant neoplasm of stomach, unspecified;ICD10:C16.9 6;Malignant neoplasm of bone and articular cartilage, unspecified;ICD10:C41.9 6;Malignant neoplasm of larynx, unspecified;ICD10:C32.9 6;Malignant neoplasm of esophagus, unspecified;ICD10:C15.9 5;Malignant neoplasm of unspecified testis, unspecified whether descended or undescended;ICD10:C62.90 5;Malignant neoplasm of rectum;ICD10:C20 4;Malignant neoplasm of pancreas, unspecified;ICD10:C25.9 3;Malignant neoplasm of brain, unspecified;ICD10:C71.9 2;Leukemia, unspecified not having achieved remission;ICD10:C95.90 2;Malignant (primary) neoplasm, unspecified;ICD10:C80.1 1;Malignant neoplasm of liver, not specified as primary or secondary;ICD10:C22.9 1;Other and unspecified malignant neoplasms of lymphoid, hematopoietic and related tissue;ICD10:C96.9 1;Malignant neoplasm of mouth, unspecified;ICD10:C06.9 1;Malignant neoplasm of connective and soft tissue, unspecified;ICD10:C49.9

1 Like

We are at a point now, where all the data is available to calculate this CQM on BMI screening.
https://ecqi.healthit.gov/ep/ecqms-2016-reporting-period/preventive-care-and-screening-body-mass-index-bmi-screening-and

I will put together some queries for the calculations later

1 Like

This is fantastic. For my report to the AMIA Educational Working Group on Monday I can capture a screen shot of the vital sign summary as well as the SQL report on the incidence of diseases in this database.

I suspect Kevin is right regarding old school queries using MySQL Workbench. I have done that in the past but someone had to hold my hand the entire time for me to execute a query. I’m always looking for an easier and faster alternative to data mine but perhaps it doesn’t exist. I would still argue that strategic CSV downloads would allow the majority of educational people to do descriptive statistics and a minority to do predictive analytics

Minor issue but is race a demographic category? I didn’t see it in the uploaded data, but I also didn’t see it as a category when I opened a patient summary and looked at the demographic categories available

There isn’t a perfect mapping between NHANES race categories and LibreEHR’s list so I deferred on importing it for the moment.

Ok, thanks. Have you thought about how in the future faculty might execute a SQL query. Will that be a permission/security issue?

Initially, we talked about hosting several instances to allow 3-4 universities to evaluate LibreHealth EHR (educational version) for a semester so we could gain valuable input

We are getting closer to a true educational EHR that we can share with others. That being said, at what point do we add the educational EHR project to the web site http://librehealth.io web site, under Projects?

Hopefully, my last question for awhile. I plan to use data on Jimmy Jennings for tomorrow’s presentation. When you graph is BP I noted that three BPs are available. Were all three found in the NHANES BP table for him? If so, were they all run on the same day of his exam? The reason I am asking is that the assumption is that NHANES data is cross sectional and not longitudinal. I believe one of the early NHANES cohorts did receive some follow up but most were one shot affairs

1 Like

Yes, the BP readings are from the same day. The NHANES protocol is to take consecutive blood pressure measurements to ensure an accurate sampling. https://wwwn.cdc.gov/Nchs/Nhanes/2011-2012/BPX_G.htm

One reasonable way to allow others to run queries is for us to provide the data dump file for download and from them to load the data into MySQL or MariaDB on running on their own systems. There are ways to allow others to provide access to the database on a shared/hosted system, but as you noted, there are deeper security/permissions concerns. Theoretically, others could be given remote access with the same permissions Robby setup for my account on the current nhanes server and run queries in the same manner.

I had enough reservations giving you access(those have since gone away by the way), sooo…let’s not. We can distribute SQL dumps though! What we COULD do is set up a Docker image where people can run it themselves…

I think we should add it as a contribution of the Education Team. Since it is an enhancement to the lh-EHR project, I suppose it can be a demo of the lh-EHR for training? Can you please help write a page on the mission, goals, and objectives of the Education Team of LibreHealth. Currently the page shows 404 - http://librehealth.io/teams/education , but I think we should add it there.