-
Notifications
You must be signed in to change notification settings - Fork 753
Open
Labels
Description
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
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
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
dehall commentedon 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 commentedon Jan 17, 2025
@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 commentedon 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
shabiel commentedon Feb 4, 2025
I never got a chance to look at it, and may not have time. But FYI, I found another case with the Lipid panel, where two of it are done on 2019-09-29T04:46:30-04:00.