-
Notifications
You must be signed in to change notification settings - Fork 157
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
Implicit base not picked up for the patient search parameter #1674
Comments
@lmsurpre I believe this is working as designed. When parsing a chained search parameter, we check the In the example above, the
Looking at the |
@lmsurpre, was looking through backlog issues, and after looking into this one, I came to the same conclusion that Mike did. Can this one be closed? |
Its definitely an interesting case. As Mike mentions, The problem with this is that https://hl7.org/fhir/search.html#reference explicitly mentions this search parameter as an example of a reference search parameter that shouldn't need the
|
I had a peak at the search parameters from R5 and it looks like they have updated the target for this
I'm not sure where those are all coming from but I'd argue that, given the section I just quoted above, it should have a single target of type Patient. |
It looks like there is an open issue for this that resolved to change it to just "Patient": https://jira.hl7.org/browse/FHIR-13601 |
That seems reasonable to do. |
What is funny is that issue actually links to https://jira.hl7.org/browse/FHIR-15903 in which I raised this same issue. I wish I would have linked to that from here... Anyway, I think it provides further evidence for modifying the search parameter that we ship in our registry. UPDATE: FHIR-13601 was closed without actually fixing the issue, so I've opened https://jira.hl7.org/browse/FHIR-32876 |
The built-in SearchParameter-clinical-patient search parameter should have a single target of type "Patient" but instead it has a target of both "Patient" and "Group". In this commit, I move the fhir-registry IndexGenerator from src/main/java to src/test/java and add a step to modify this one spec resource so that users can search on the `patient` search parameter without needing a type modifier. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
I also opened https://jira.hl7.org/browse/FHIR-32305 for the same issue in the US Core search parameter definitions. Depending on the result of that discussion, we may want to patch those ones as well. |
Successfully verified with searches such as these: |
I just found that http://hl7.org/fhir/SearchParameter/Provenance-patient has the same issue. I added this as a comment to https://jira.hl7.org/browse/FHIR-32876 and I will open a separate issue for it here as well so that we can patch it. |
Describe the bug
I found a case that we missed when we implemented #300 for adding the implicit resource type of a reference: chained parameters.
Specifically, note this line from https://build.fhir.org/search.html#chaining
To me, that implies that if the type was NOT ambiguous, then the type modifier should be optional (just like in the normal case). However, my query for
Observation?patient.gender=female
returns the following issue:Expected behavior
The type modifier is not required if the reference search parameter only targets a single type.
Additional context
We should open an HL7 JIRA ticket on this section of the spec as well, because it contradicts itself in a bad way:
If it's "necessary to limit the search to a particular type" then the first query they give isn't actually valid, but they don't make this very clear.
The text was updated successfully, but these errors were encountered: