Add encounter_status to clinical encounter input layer and core (#775)#1359
Open
gopihc wants to merge 2 commits into
Open
Add encounter_status to clinical encounter input layer and core (#775)#1359gopihc wants to merge 2 commits into
gopihc wants to merge 2 commits into
Conversation
…-health#775) Adds an optional encounter_status field to the clinical encounter input layer contract, aligned with the FHIR Encounter.status value set, and surfaces it on core.encounter. This lets downstream analytics distinguish completed encounters from in-progress or unsigned documentation instead of relying on connectors to drop incomplete encounters from the input layer. The column is additive and nullable: clinical encounters carry the source status; claims-derived encounters are null since they have no clinical lifecycle status. No existing columns change, so downstream marts are unaffected.
…uva-health#775) The clinical encounter input model used for integration testing declares its columns explicitly, so it must surface the new encounter_status field for the core clinical encounter staging model to compile and build against synthetic data.
✅ Deploy Preview for thetuvaproject canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional
encounter_statusfield to the clinical encounter data model so downstream analytics can distinguish completed encounters from in-progress or unsigned/not-yet-completed documentation, instead of relying on connectors to drop incomplete encounters from the input layer.encounter_statusto theinput_layer__encountercontract, aligned with the FHIREncounter.statusvalue set (planned, arrived, in-progress, onleave, finished, cancelled, entered-in-error).encounter_statusoncore.encounter, populated from clinical (EHR) sources and null for claims-derived encounters, which have no clinical lifecycle status.The change is purely additive and nullable: no existing columns change,
core.encounterhas no enforced contract, and downstream marts select explicit columns, so they are unaffected.Validation
Local DuckDB with synthetic data (
small):core.encounterlineage (claims + clinical enabled): 229 models, 0 errors.encounter_statusis present oncore.encounterand that the claims/clinicalsmart_unionbuilds correctly (claims-derived rows null as expected).input_layer__encountertests pass, including the new column-exists and null-percentage checks.Release note
enhancement
Closes #775