Coder Social home page Coder Social logo

Comments (7)

jeffeastman avatar jeffeastman commented on September 23, 2024

This sequence actually has an Rx with a duration on the MedicationOrder, but the mild steroid order is cancelled within the same submodule. With the duration, the MedicationEnd seems unnecessary.

Timing the order out based upon its duration seems a better solution, though I don't do that now.

from synthea.

dehall avatar dehall commented on September 23, 2024

Thanks for catching this, the wiki is out of date. The start time of clinical states such as MedicationOrder and Procedure no longer have to have the same start time as the Encounter. (In general when there is a discrepancy between the wiki and the code, the code should be assumed to be the correct version. I'll go over the wiki this morning to double check everything.)

For context - one piece of feedback we received regarding realism was the fact that all Encounters had the same duration (15 minutes) regardless of what the encounter entailed. But obviously more complex procedures take longer, so to represent that, we added the EncounterEnd state and the duration field on Procedure states. Now an Encounter may contain many procedures, observations, delays, etc, which don't all start at the exact same time as the start of the encounter.

Re: the MedicationOrder duration, you're right that given a specific duration the MedicationEnd probably isn't necessary. There are still valid uses for the MedicationEnd state in general, but if there are places we can remove it without losing anything, I think that's a good thing. I'll add an item to review that.

from synthea.

jeffeastman avatar jeffeastman commented on September 23, 2024

Thanks for the update. Does this apply to the other states (CarePlanStart, DiagnosticReport,MultiObservation, Observation) too? I update the Encounter's endDateTime to the time of the last event that is added to it, or to the EncounterEnd's time if there is one (Wellness encounters don't seem to)

from synthea.

dehall avatar dehall commented on September 23, 2024

Yes this applies to the other state types as well.

Wellness encounters are trickier because many different modules could process states for the same wellness encounter, so it's not possible for a single module to define when that wellness encounter ends. We've punted on this for now so the wellness encounter is just assumed to take 1 hour. https://github.com/synthetichealth/synthea/blob/master/lib/modules/encounters.rb#L130

from synthea.

jeffeastman avatar jeffeastman commented on September 23, 2024

My approach of updating each encounter's end time whenever an event is added to it works for wellness encounters too. That might work for Synthea.

I tend to rely upon the Wiki definitions as tracking all of the individual Ruby commits and reverse engineering their definitions doesn't work for me. Its probably a good sanity check of the wiki when I do notice issues there.

BTW, Procedure delays are also not documented in the wiki.

from synthea.

cjduffett avatar cjduffett commented on September 23, 2024

I added procedure duration to the docs.

from synthea.

jeffeastman avatar jeffeastman commented on September 23, 2024

Closing this issue as its been resolved

from synthea.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.