Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synthea creates duplicate lab panels for the same date #1552

Open
shabiel opened this issue Jan 17, 2025 · 3 comments
Open

Synthea creates duplicate lab panels for the same date #1552

shabiel opened this issue Jan 17, 2025 · 3 comments
Labels

Comments

@shabiel
Copy link
Contributor

shabiel commented Jan 17, 2025

What happened?

I am working on importing lab data. My destination system rejects it if it is a duplicate panel.

I have a feeling this is really a bug in the module itself, not in Synthea.

I created a Synthea Patient (very large... > 50MB, not attached). I used jq to analyze the data.

jq -r '.entry[].resource | select(.resourceType == "DiagnosticReport") | select (.category[0].coding[0].code == "LAB") | [ .code.text, .effectiveDateTime ] | @csv ' Adriene242_Danyelle408_Gibson10_f72c4f4a-07a7-d2fd-c486-e7e84994c3e1.json > time_analysis.csv

time_analysis.csv

Rows 3-6 look like this:

"Basic metabolic 2000 panel - Serum or Plasma","2015-01-19T12:55:09+00:00"
"Urinalysis macro (dipstick) panel - Urine","2015-01-19T12:55:09+00:00"
"Basic metabolic panel - Blood","2015-01-19T12:55:09+00:00"
"Lipid panel with direct LDL - Serum or Plasma","2015-01-19T12:55:09+00:00"

The problem is that there are two BMPs taking place at the same time. The second BMP is in Blood. Labcorp and Quest both say it's a SERUM specimen, not a whole blood specimen. I think that's probably the root of the problem.

Let me know if you agree; and if so, I can try to modify the module and see if that fixes the problem.

Environment

- OS: Rocky Linux
- Java: OpenJDK 17

Relevant log output

@shabiel shabiel added the bug label Jan 17, 2025
@dehall
Copy link
Contributor

dehall commented Jan 17, 2025

From a quick search, I see "Basic metabolic 2000 panel - Serum or Plasma" is used in metabolic_syndrome/kidney_conditions and uti/ed_bundle, and "Basic metabolic panel - Blood" is used in congestive_heart_failure and wellness_encounters, so if you're seeing both at the same time there might be some weird encounter interactions. We had and fixed a bug a while back related to overlapping encounters (#883) so I hope it's not something like that popping up again. Please feel free to take a look at those modules and suggest code changes if we have something wrong.

@shabiel
Copy link
Contributor Author

shabiel commented Jan 17, 2025

From a quick search, I see "Basic metabolic 2000 panel - Serum or Plasma" is used in metabolic_syndrome/kidney_conditions and uti/ed_bundle, and "Basic metabolic panel - Blood" is used in congestive_heart_failure and wellness_encounters, so if you're seeing both at the same time there might be some weird encounter interactions. We had and fixed a bug a while back related to overlapping encounters (#883) so I hope it's not something like that popping up again. Please feel free to take a look at those modules and suggest code changes if we have something wrong.

@dehall I don't remember how to use the module builder repo that I modified in synthea. Can you remind me? I will try changing the BMPs to Serum and see if the problem goes away.

@dehall
Copy link
Contributor

dehall commented Jan 17, 2025

The hosted version at https://synthetichealth.github.io/module-builder/
The two modules with BMP - blood will be listed under Core Modules: "Congestive Heart Failure" and "Wellness Encounters", and it looks like the state in question is called "Record_MetabolicPanel" in both - click the list icon on the sidebar to get a searchable list of states and it will highlight the one you want. After you change the module, click Download and move it to your local synthea install under src/main/resources/modules

One other thought - can you see what else is included in this patient's record at the same encounter? Depending on which two encounters seem to be jammed together here there may be different ways to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants