hapi-fhir
hapi-fhir copied to clipboard
Support Implied Profiles in RepositoryValidatingRuleBuilder
The Core libraries now support the concept of "implied profiles", which indicates that a resource should undergo validation against this "implied profile" whether it is present in the incoming resource's profile section or not. This request is to add the capability to our RepositoryValidatingRuleBuilder to provide the ability to make use of this new feature in the core libraries.
A potential API could look like:
ruleBuilder
.forResourcesOfType("Patient")
.impliedProfile("http://www.hl7.org/fhir/us/core/StructureDefinition-us-core-patient.html")
.requireAtLeastProfile("http://www.hl7.org/fhir/us/core/StructureDefinition-us-core-patient.html");
Which would cause any incoming Patients to be validated against US Core, whether or not they indicate that they support the profile in their meta.profile section.