NHANES data in LibreEHR

I’ll pull some sample records to show a little later.

We have a planned redux of this feature. Part of the plan is to store the queries in their own field instead of including them in a string containing other data in log_comments to allow for better data restoration etc… so this would be the time to look at this issue/feature and offer commentary.

Here an example of the log entries from when I created the patient list using my new tool. The basic problem is it’s hard to understand exactly what operation happened because the main “content” is the SQL query. Something that might make sense is to add another column that shows part of the php call stack, so a better idea of what operation truly took place would be more obvious.

@tony I would like to setup a demo site soon. In the previous thread, you mentioned that there were AWS resources available. What would I need to do to get access?

That would be @r0bby that can help you. Do you have a pull request for us to base the demo on?

We have rackspace resources available:

See the following:

Though I do wonder if we can load this data into the EHR demo site… the less servers, the better.

No, the new project work doesn’t change any of the existing EHR codebase. It’s a separate set of scripts. (Something akin to the scripts that used to live in the contrib directory.) I will create a new github project so people can take a look at the code later.

I can setup a parallel instance on the existing LibreEHR demo server. I created a gitlab issue request.

Not going to give access – I will load the data and set up another demo though!

We have access to $2,000/month worth of credits for rackspace-- we’re barely scraping $250 - I haven’t actually done accounting…which is why everything is being moved there.

Ah, you need access…I could give that…wasn’t sure why you needed it…I can give you access.

In the near term, I’d like to be able to wipe and reload the data fairly frequently as we add to the data set. Longer term, we’re going to look at connecting Weka to the EHR’s MySQL Instance for data mining. Not sure exactly what that will entail and will figure things out locally first.

The current MySQL dump is 75MB uncompressed and 6MB gzip’d. Both will continue to grow in size.

Let me know what you need.

The scripts are now adding ICD10 codes to the problem lists based on responses in survey to things like "have you ever been told you have asthma, heart disease, angina, etc…" It’s only handling a subset of the potential diagnoses in the NHANES data at the moment (from the MCQ datafile https://wwwn.cdc.gov/Nchs/Nhanes/2011-2012/MCQ_G.htm), not handling the responses to 230a-c (Cancer types) yet. Need to map the NHANES codes to ICD10 codes. Also not handling the Diabetes and Blood Pressure questionnaires yet.

DNS record added. I will handle everything else on Monday – maybe tomorrow.

@r0bby Thank you so much for your help with this. There is no urgency, everything can wait for when it’s convenient to you.

1 Like

Suggestion: Cram NHANES scripts into /modules/nhanes. Add Global for module [mod_nhanes] if needed and module path Add conditional module check in base code if needed (menus etc…). PR to main or branch. We still need to decide if we can get the new repo created for non-core modules and forms (new flavor of “contribs”).

I was just gonna deploy another copy of LibreHealth EHR and have it at another subdomain.

@r0bby Not sure if you mean “another copy” to be on the existing demo server, or a new server, but either approach is fine.

@aethelwulffe The new code isn’t a “module” of the existing EHR. It’s external scripts, that also may prove useful in circumstances outside of the context of the EHR. It doesn’t make sense to maintain it as part of the “monolithic” EHR package. It “integrates” with a LibreEHR server by running the scripts, and specifying the IP address of the server. The scripts then login to the server and post against the web pages, (pretending to be a human working through the browser) to create the records. There are no “code dependencies,” so treating it as an independent package makes the most sense for now.

An interesting finding in the data itself. For the blood pressure and cholesterol questionnaire. 2 questions in particular Have you ever been told your blood cholesterol was high? To lower cholesterol, ever been told to take prescription meds?

There are 163 respondents who answered “No, have not been told cholesterol is high,” but “Yes, to have been told to take meds.” and a further 127 who answered no answered “Yes, are you folliwing this advice to take prescribed medicine.”

I don’t have the medication data loaded yet to cross reference these answers with the medications that the respondents say they are taking.

What I’m going to do for now is NOT add a diagnosis of “E78.00,Pure hypercholesterolemia, unspecified” to the problem list for entries where (BPQ080 - Doctor told you - high cholesterol level) is “no” but BPQ90/100 are yes.
Lot’s of potential explanations, and we can look into things in more depth once the data sets are more complete.

https://wwwn.cdc.gov/Nchs/Nhanes/2011-2012/BPQ_G.htm