Is your feature request related to a problem? Please describe.
While validating #2873 and #2834 I realized that we only exercise these rules during ingestion and not validation.
The $validate endpoint serves multiple use cases:
- exposes general profile validation (the default)
- allows clients to ask if a given resource is valid for this server
The input parameter that controls this switch is called mode but I think we mostly ignore that today.
Describe the solution you'd like
When $validate is called with a mode of create or update, we should make use of the applicable fhir-server-config fhirServer/resources/<resourceType>/profiles config properties so that the response will reflect the expected result of an attempted create/update request with this same content.
Describe alternatives you've considered
Acceptance Criteria
- GIVEN [a precondition]
AND [another precondition]
WHEN [test step]
AND [test step]
THEN [verification step]
AND [verification step]
Additional context
Is your feature request related to a problem? Please describe.
While validating #2873 and #2834 I realized that we only exercise these rules during ingestion and not validation.
The $validate endpoint serves multiple use cases:
The input parameter that controls this switch is called
modebut I think we mostly ignore that today.Describe the solution you'd like
When
$validateis called with a mode ofcreateorupdate, we should make use of the applicable fhir-server-configfhirServer/resources/<resourceType>/profilesconfig properties so that the response will reflect the expected result of an attempted create/update request with this same content.Describe alternatives you've considered
Acceptance Criteria
AND [another precondition]
WHEN [test step]
AND [test step]
THEN [verification step]
AND [verification step]
Additional context