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

Comments

Projects
None yet
1 participant
@jamesagnew
Owner

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