Conversation
|
This branch is working on a ticket in the NHS England VED JIRA Project. Here's a handy link to the ticket: VED-367 |
…sponse without the params
dlzhry2nhs
left a comment
There was a problem hiding this comment.
Very good - nice intricate work for the feature.
Couple of reasonably minor comments added. Also have some broader questions on this feature:
- what testing was done/will be done. Do we need to do e2e tests for this as part of this ticket or create a new ticket for them?
- Do we need to make any changes to the API schema? I notice we don't document anything about using the local identifier or elements in the search request.
|
| return None | ||
|
|
||
| requested_elements = {e.strip().lower() for e in _elements.split(",") if e.strip()} | ||
| requested_elements_valid = requested_elements.issubset({"id", "meta"}) |
There was a problem hiding this comment.
Nice, didn't know this set method. :)
Clarified with team. Will be tested through standard path with a view to adding to the e2e suite in future. Similarly, this will be discussed with BA as to whether OAS docs are needed and a future ticket will be created if required. |



Summary
So basically there are several ways of searching the API, for this ticket we are specifically looking at searching via - Identifier and _element (not on the onboarding page) but we use that search internally. Formally it was immunisation.identifier and _element (now not fhir compliant),
first part of the ticket was to switch it to - identifier and _elements
second part of the ticket was to now allow a search only by the identifier, making _elements (the new name) optional. This also changes the search payload from a truncated version to returning the full resource when a search call is made just by an identifier, the payload is exactly what would be returned in a get call.
_elements while optional, if used can only be (id,meta). The unittest also uses encoded strings, which when decoded which matches the url of the search request, just in case anyone is wondering why those strings are there.
Add any other relevant notes or explanations here. Remove this line if you have nothing to add.
Reviews Required
Review Checklist
ℹ️ This section is to be filled in by the reviewer.