LinuxForHealth / FHIR

The LinuxForHealth FHIR® Server and related projects
https://linuxforhealth.github.io/FHIR
Apache License 2.0
331 stars 157 forks source link

How tp search with bodySite param in FHIR Procedure? #4053

Closed nehaghub closed 1 year ago

nehaghub commented 2 years ago

Hi.. Describe the bug I have one requirement to check bodysite in Procedure Here is my sample data available { "fullUrl": "https://abc.com/v1/projects/pr99/locations/us-central1/datasets/cqldqm_poc/fhirStores/cqldqm_poc/fhir/Procedure/c662536d-415f-474d-905b-3dfb6dc4f3fe", "resource": { "bodySite": [ { "coding": [ { "code": "50", "display": "Bilateral Procedure [50]", "system": "http://www.ama-assn.org/go/cpt", "version": "2022.2.21AB" } ] } ], "id": "c662536d-415f-474d-905b-3dfb6dc4f3fe", "meta": { "lastUpdated": "2022-11-04T07:43:58.010292+00:00", "versionId": "MTY2NzU0NzgzODAxMDI5MjAwMA" }, "resourceType": "Procedure", "status": "on-hold", "subject": { "reference": "Patient/f9e2ec3e-731f-4341-8a6f-dffa5a44b373" } }, "search": { "mode": "match" } },

I want to search with bodySite attribute but i am not able to pass bodysite param as i don't know how to search with bodySite in Procedure.

I tried below curl request but it is not searching with bodysite param curl --request GET \ --url 'https://abc.com/v1/projects/psvc99/locations/us-central1/datasets/cqldqm_poc/fhirStores/cqldqm_poc/fhir/Procedure?bodysite%3Amissing=1' \ --header 'Authorization: Bearer ya29.a0Aa4xrXPQud59Xrd2yFS-S1-McHsoZqEVYYMQxg3M7QBDZ_TVyZhHiFHg_bFwFgMxu6PXHpIXAgvogYRIGUiolM4VsfLXS3mq3lp-6PrmTQN2dpu5fIjVF9Jl1z9cWE0tacRirPTTP6PbOk37fHNoSBJdJtEaxW-9A1qN3rfRqLoqsHtMxjG9vSWXaFZMp_mD4QIOgiITSxpUw6x05oz_J0kyVr4PFFvZvpHbGnYYizaS3KssOPm6gECod6-lhREpFz0CBugaCgYKAfcSARASFQEjDvL9kbDgb4kjkNeY37E5uhpylA0270' \ --header 'c: application/json' Add any other context about the problem here. Please help me to make search query suing bodysite in Procedure.

lmsurpre commented 2 years ago

You are right that there is no body site search parameter defined in the base spec (i.e. at https://hl7.org/FHIR/procedure.html#search).

Therefor you will need to define your own search parameter (and re-index any previously-ingested Procedure resources) in order to search on this. See https://linuxforhealth.github.io/FHIR/guides/FHIRSearchConfiguration for our documentation on how to do that.

nehaghub commented 2 years ago

Thanks for your reply. I will try to implement the solution provided by you.