Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customers need to be able to configure profiles that are not allowed to be used for validation #2834

Closed
michaelwschroeder opened this issue Oct 5, 2021 · 1 comment

Comments

@michaelwschroeder
Copy link
Contributor

Is your feature request related to a problem? Please describe.
In the case where one or more profiles have been loaded in the FHIR server, but a customer does not want to allow those profiles to be used to validate resources, the customer should have a way via a config property to specify the list of profiles they do not want to allow to be used.

Describe the solution you'd like
Similar to the fhirServer/resources/<resourceType>/profiles/atLeastOne config property, which specifies a list of profiles, one of which must be specified by a resource to validate against, there could be a config property which specifies a list of profiles which a resource is not allowed to validate against.

Describe alternatives you've considered
None.

Acceptance Criteria

  1. GIVEN a profile is specified in a config property as not being allowed to be validated against
    AND a resource specifies that profile to be validated against
    WHEN a request is made to create or update the resource
    THEN the request will fail

Additional context
Related issues: #2551 , #2832

@michaelwschroeder michaelwschroeder self-assigned this Oct 14, 2021
michaelwschroeder added a commit that referenced this issue Oct 19, 2021
Signed-off-by: Mike Schroeder <mschroed@us.ibm.com>
michaelwschroeder added a commit that referenced this issue Oct 21, 2021
Signed-off-by: Mike Schroeder <mschroed@us.ibm.com>
michaelwschroeder added a commit that referenced this issue Oct 21, 2021
Issues #2834 and #2873 - add support to configure not allowed profiles
@lmsurpre lmsurpre added this to the Sprint 2021-14 milestone Oct 25, 2021
@lmsurpre
Copy link
Member

test results for ingestion:

notAllowed Resource.meta.profile result
["profile1"] ["profile1"] 400 Bad Request with "A profile was specified which is not allowed."
["profile1"] ["profile1|a"] 400 Bad Request with "A profile was specified which is not allowed."
["profile1|a"] ["profile1"] 200 OK with "Profile 'profile1' is not supported"
["profile1|a"] ["profile1|a"] 400 Bad Request with "A profile was specified which is not allowed."
["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"] ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"] 400 Bad Request with "A profile was specified which is not allowed."
["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"] ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient|3.1.1"] 400 Bad Request with "A profile was specified which is not allowed."
["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient|3.1.1"] ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient"] 200 OK
["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient|3.1.1"] ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient|3.1.1"] 400 Bad Request with "A profile was specified which is not allowed."
["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient|3.1.1"] ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient|4.0.0"] 200 OK

notably, the setting does NOT prevent validation from occurring on our $validate endpoint. that was never really discussed and so I think this behavior is fine, but i wanted to make sure it was clear that the server will still try to validate against the "notAllowed" profiles at this alternate endpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants