we have been using the emr api in the radiology module to find or create active visits and encounters when saving new radiology orders/discontinue existing ones but we want remove this dependency since it forces us to install ~11 modules.
I would love to get some input and maybe clinical background (@burke) on visits/encounters and the way we think about implementing this.
Currently we use global properties to configure
- visit type (used to set the visitType in Visit)
- encounter type (used to set the encounterType in Encounter)
- encounter role (used to set the encounterRole in EncounterProvider)
- in case there is no active Visit for the patient and the configured VisitType: we create a new Visit and save with it a new encounter (populated with all the types/roles mentioned before)
- in case there is an active Visit for the patient and the configured VisitType: we create a new encounter and attach it to the active Visit
Do you see this as a sane approach?
Furthermore, we are wondering if we should create a Visit when discontinuing an order? since the patient might not even be at the facility (for ex. he called to cancel the imaging procedure).