synthetichealth / synthea

Synthetic Patient Population Simulator
https://synthetichealth.github.io/synthea
Apache License 2.0
2.14k stars 644 forks source link

Adding observations to emergency encounters across modules #780

Open stephteeple opened 4 years ago

stephteeple commented 4 years ago

Hello, thank you for all your work putting together this incredible resource.

I have been working through the wiki and generic module framework to figure out the best approach for my use case. I'd like to add several vital sign Observations to Encounters of class 'emergency', including heart rate, respiratory rate, SBP, temperature and O2 saturation. Am I correct in thinking this would require searching all modules and adding an Observation state tailored to each emergency encounter?

Thank you!

dehall commented 4 years ago

Yes, that's the basic approach you'd want to take, but there's a wide spectrum of ways you could implement this.

First I hope you've seen the module builder: https://synthetichealth.github.io/module-builder/ It's a lot easier than working directly with the JSON modules. But it doesn't have any built-in saving capability, so make sure to download modules often as you're working on them so that you don't lose anything.

Next, some of those vital signs you noted are already tracked "behind the scenes" in Synthea. For example in the Wellness Encounters module: https://synthetichealth.github.io/module-builder/#wellness_encounters you can see we're recording heart rate, respiration rate, blood pressure, etc as Observations, reading them from internal Vital Signs. In Synthea the "Vital Sign" represents the actual physical status of the patient, whereas the Observation is the recording of that status on their health record. So there is an internal process within Synthea that sets certain Vital Signs on a regular basis, which can then be read from anywhere in the modules using an Observation. That said, that internal process isn't aware of specific events happening in the modules. I'm not a doctor but I assume people often have elevated heart rates when they get injured and have an emergency encounter. But in Synthea the internal "heart rate" vital sign doesn't know about the injury so it doesn't automatically increase. In cases like that you can manually set a range or specific value for a vital sign with the Vital Sign state. So in short: try to use existing Vital Signs where appropriate.

Finally, it's a nontrivial, tedious undertaking to update a lot of modules, especially if you're adding the exact same thing in multiple places. One thing to consider is creating a submodule with appropriate Observations, and then calling that submodule everywhere there's an emergency encounter. Where this starts to get tricky is if you want very different values depending on the nature of the emergency encounter. If it makes sense, you can stratify the encounters into multiple categories, so for example maybe a "high temperature" submodule for infections and a "high heart rate" for injuries, etc. Or you can combine the submodule with vital signs. In short: use submodules if possible

Like I said, there's a wide spectrum of possibilities depending on what you need to do. If all you want to do is add a small set of observations to one or two modules, it may be overkill to use submodules.

Most of our team is out for the long weekend, but don't hesitate to ask if you have further questions or if any of this ^ was unclear.