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

Custom search param with multiple bases returns wrong type in results #863

Closed
jamesagnew opened this issue Feb 23, 2018 · 0 comments
Closed

Custom search param with multiple bases returns wrong type in results #863

jamesagnew opened this issue Feb 23, 2018 · 0 comments

Comments

@jamesagnew
Copy link
Collaborator

@jamesagnew jamesagnew commented Feb 23, 2018

Per an email from Dave Carlson:

I defined a SearchParameter with 2 'base' types, MedicationRequest and ProcedureRequest. Searching with either base will always return instances of both types. My understanding is that only the resource type used in the search should be returned, e.g. for [base]/MedicationRequest?reason=[condition-id] only MedicationRequest resources should be returned. My SearchParameter resource is copied below.

Here is the SP:

{
        "resourceType": "SearchParameter",
        "id": "cc-request-reason",
        "url": "http://clinicalcloud.solutions/fhir/SearchParameter/request-reason",
        "name": "reason",
        "status": "active",
        "publisher": "http://clinicalcloud.solutions",
        "code": "reason",
        "base": [
          "MedicationRequest",
          "ProcedureRequest"
        ],
        "type": "reference",
        "description": "This parameter filters Request pattern resources by reason reference",
        "expression": "MedicationRequest.reasonReference | ProcedureRequest.reasonReference",
        "target": [
            "Condition",
            "Observation"
        ]
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.