NHANES data in LibreEHR

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

Here’s the code in progress

It has two main components at present. A “screen scraper” to download the NHANES data itself from the CDC, and a import process which takes that data and creates LibreEHR records.

Basically, I’m going to be running two LibreEHR instances on the same server.

This week in the Mayo Clinic Proceedings is an abstract about using Triglyceride/HDL ratios to predict heart disease on older patients, based on NHANES data. Clearly, the NHANES data is very rich but it comes in multiple flavors from different time periods. I plan to research all of the different NHANES studies this week. Ironically, the EPA has paid very close attention to NHANES because a lot of the lab work drawn is related to industrial and environmental pollutants. Here is a guide the EPA wrote on the subject: NHANES_032003.PDF (2.0 MB)

@yehster, check PM – it’s up.

I had high hopes that we would present what we are doing at the InSpire conference but the panel moderator seems to have a completely different vision. He wants to only present training instances of the production EHR (e.g. Cerner, Epic) and only how it pertains to medical students and medical centers. That ignores other educational and research opportunities. There will be other opportunities to present this and write a paper

1 Like

Current test data is loaded on: https://nhanes.librehealth.io It consists of ~9000 patients, with problem/diagnosis lists and medications.

Unfortunate about the narrow focus for the InSpire conference, not sure of the format of the panel, but what we are working on here may still end up relevant to the discussion even if it’s not part of the formal agenda.

1 Like

This is super cool! Thanks guys!

What is the login info for the NHanes site?

Same as the LibreHealth EHR login. PS – I love how we can handle multi-tenency!

Admin/password

1 Like

Fantastic. I am in the process of looking at all “Reports” to see how we might use the information we have uploaded in a meaningful way for education, training and research

Patient search works very well. In the reports section, I am not able to search by medical problems (ICD-9 or ICD-10) or medications under Client >> Rx or Clinical. I think it will search by PID but I don’t know if if can search for all patients taking metformin, as an example. Perhaps I am doing something wrong. I am assuming labs will be uploaded at some point?

I didn’t load the ICD-10 code book during setup of the database(mistake/forgot). That’s why search from the report doesn’t work.

I’m not sure if the “Rx” report searches the medications in the “lists” table (which is where I put the meds) or the “prescriptions” table which is still empty. Will look in to that. It’s a little confusing that both places exist for “similar” data. (For PCMEDICS, we removed the “lists” option). We might need to tweak things a little.

I’m almost ready for the next data update (with a patient encounter to record blood pressures and weight/height) and will make sure to address these other issues at that time.

The only report at this time that seems to be working and is helpful is the Patient List Creation. It will create a list based on demographics, problems and medications. My question to the group is should we have the option to download as a CSV file for the more important reports?

Kevin and I have already talked about linking the machine learning software WEKA to the mySQL database and running queries. That would be great for the advanced classes but I think the average informatics class would gladly settle on descriptive statistics if that could download the list as a CSV. Comments?

That client Report is, frankly crappy and unreliable. Need to create a much better tool for ad-hoc searches. I’d love to take that one on.