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

Enforce OperationDefinition affectsState #2504

Closed
prb112 opened this issue Jun 14, 2021 · 1 comment
Closed

Enforce OperationDefinition affectsState #2504

prb112 opened this issue Jun 14, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request P3 Priority 3 - Nice To Have

Comments

@prb112
Copy link
Contributor

prb112 commented Jun 14, 2021

Is your feature request related to a problem? Please describe.
Enforce OperationDefinition affectsState per the Specification

OperationDefinition.affectsState
--
Element Id | OperationDefinition.affectsState
Definition | Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'.
Cardinality | 0..1
Type | boolean
Summary | true
Comments | What http methods can be used for the  operation depends on the .affectsState value and whether the input  parameters are primitive or complex:   Servers SHALL support POST method for all operations.   Servers SHALL support GET method if all the parameters for the  operation are primitive or there are no parameters and the operation has  affectsState = false.

https://www.hl7.org/fhir/operationdefinition-definitions.html#OperationDefinition.affectsState

Describe the solution you'd like
The FHIROperation framework should read the affectsState per the Specification, and enforce the use of get/post

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Acceptance Criteria

  1. GIVEN [a precondition]
    AND [another precondition]
    WHEN [test step]
    AND [test step]
    THEN [verification step]
    AND [verification step]

Additional context
Per Comment #2489 (comment)

@prb112 prb112 added the enhancement New feature or request label Jun 14, 2021
@lmsurpre lmsurpre added the P3 Priority 3 - Nice To Have label Aug 30, 2021
@tbieste tbieste self-assigned this Aug 31, 2021
@tbieste tbieste added this to the Sprint 2021-12 milestone Aug 31, 2021
tbieste added a commit that referenced this issue Sep 7, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue Sep 7, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue Sep 7, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue Sep 8, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue Sep 8, 2021
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
prb112 added a commit that referenced this issue Sep 15, 2021
@prb112
Copy link
Contributor Author

prb112 commented Sep 21, 2021

Works great ...

With affectState off... flows right through.

With affectState on...
{"resourceType":"OperationOutcome","id":"c0-a8-56-25-c4336c9c-2d8c-4854-b9fa-99adefb54431","issue":[{"severity":"fatal","code":"not-supported","details":{"text":"HTTP method 'GET' is not supported for operation: 'testop'"},"expression":[""]}]}

@prb112 prb112 closed this as completed Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3 Priority 3 - Nice To Have
Projects
None yet
Development

No branches or pull requests

3 participants