FirelyTeam / firely-validator-api

Firely's official FHIR validator API for validating HL7 FHIR resources against profiles.
Other
5 stars 2 forks source link

[Validator] Support Global profiles from IGs #135

Open ewoutkramer opened 6 years ago

ewoutkramer commented 6 years ago

If you validate instances in the context of an IG, that IG (formally by means of ImplementationGuide.global) may specify a set of IG specific profiles that a kind of resource must conform to. I.e. although Observation.subject and many other core resources refers to Patient, in the context of a Dutch IG, all these references must be interpreted (or replaced by) references to a dutch constrained version of Patient.

Add a feature to the validator to support "profile substitution", where any reference to a core profile X, would be translated to a reference to a more specific profile from such an IG.

wmrutten commented 6 years ago

An IG resource can define dependencies to other IG resources: https://www.hl7.org/fhir/implementationguide-definitions.html#ImplementationGuide.dependency

Should this logic also try to resolve the parent IG's and verify any inherited global profiles?

ewoutkramer commented 6 years ago

I've almost assumed these references are "informal", but I am not sure....

wmrutten commented 6 years ago

I think this is intended for validation purposes...

LouisBernath commented 4 years ago

Any plans to support IGs in the near future? :)

wmrutten commented 4 years ago

Just thinking out loud, we could implement a new ResourceResolver that indexes all dependencies referenced by an IG. The resolver could also build a closure of all external dependencies to other IGs. This ResourceResolver could then be consumed by the SnapshotGenerator & Validator classes.

ewoutkramer commented 4 years ago

Yes, if we combine that with package support (which @mharthoorn has already built) we basically have all the tools in place we need, based on the existing framework.

wmrutten commented 4 years ago

Sounds like a plan! Shouldn't be too complicated.

marcovisserFurore commented 2 years ago

Duplicate of FirelyTeam/firely-net-sdk#1863

ewoutkramer commented 2 years ago

Why is this marked as a duplicate of FirelyTeam/firely-net-sdk#1863? This issue is about the "global" feature in the IG resource, and has nothing to do with NPM packages...