This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
Snapshot generation results in incomplete snapshots if differential not based on FHIR base profile #45
Labels
bug
Something isn't working
priority high
This issue has high priority
ready for release
Issue is fixed and merged into develop, ready for next release
Milestone
Generating snapshots for profiles based on other non FHIR root profiles results in incomplete snapshots. The generateSnapshot method of the org.hl7.fhir.r4.conformance.ProfileUtilities class expects a snapshot StructureDefinition as a base and a differential StructureDefinition as the one to apply to the base.
Side note: This precondition defines an inherent order in which snapshots need to be generated.
Our org.highmed.dsf.fhir.service.SnapshotGeneratorImpl class selects the base profile within the generateSnapshot method (Line 48) by looking up the type property of the differential StructureDefinition, this is wrong and only works if the profile is based on a root FHIR profile.
To fix this, we need to use the baseDefinition property url and lookup the corresponding StructureDefinition snapshot. If we only find a differential StructureDefinition we might want to generate the necessary snapshot for it first (and so on). If we can't find either a differential or a snapshot for the given baseDefinition property url, we can't generate the requested snapshot.
The text was updated successfully, but these errors were encountered: