Skip to content

Validate ServiceRequest orderDetail semantics in Bundle POST#9

Open
nnpvaan wants to merge 2 commits into
masterfrom
i24
Open

Validate ServiceRequest orderDetail semantics in Bundle POST#9
nnpvaan wants to merge 2 commits into
masterfrom
i24

Conversation

@nnpvaan

@nnpvaan nnpvaan commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR updates the Bundle create API so that ServiceRequest.orderDetail is handled as an elaboration of the requested service, rather than as an extension of the panel code

Current behavior

When a Bundle is posted, the tests listed in ServiceRequest.orderDetail are currently added to the panel specified in code. This is semantically incorrect because orderDetail should describe the requested tests for the ServiceRequest, not extend the panel itself. As a result, partial panel subsets are not rejected and the default panel code path is not validated as expected.

Desired behavior

ServiceRequest.orderDetail should be interpreted according to the selected code:

  • For a named panel code, if orderDetail is omitted, the request should defer to the panel and create all tests defined in that panel
  • For a named panel code, if orderDetail is present, it must include all tests in the panel; additional tests are allowed.
  • For a named panel code, if one or more panel tests are missing from orderDetail, the request should be rejected with 400 Bad Request and an OperationOutcome
  • For the default panel code (30954-2), orderDetail should define the exact requested tests and no panel validation should be applied
  • For the default panel code (30954-2), if orderDetail is omitted, the request should be rejected with 400 Bad Request and an OperationOutcome

--
I confirm that I have thoroughly tested this Pull Request and that the code
adheres to the PEP 8 and Plone 5 Python style guide standards.

@nnpvaan nnpvaan requested a review from xispa June 24, 2026 04:51
@nnpvaan nnpvaan self-assigned this Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant