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

How to do Chained Search ? #150

Open
sh0umik opened this issue Aug 31, 2016 · 2 comments
Open

How to do Chained Search ? #150

sh0umik opened this issue Aug 31, 2016 · 2 comments

Comments

@sh0umik
Copy link

sh0umik commented Aug 31, 2016

I have this Info in Fhirbase now i want to search using subject reference .
{ "id": "6f4be94a-6465-48ab-8487-f31b41dce9ff", "code": { "text": "Burnt Ear", "coding": [ { "code": "39065001", "system": "http://snomed.info/sct", "display": "Burn of ear" } ] }, "meta": { "extension": [ { "url": "fhir-request-method", "valueString": "POST" }, { "url": "fhir-request-uri", "valueUri": "Condition" } ], "versionId": "1acde595-3c6d-46b2-afe2-d10c20c82615", "lastUpdated": "2016-08-31T19:45:04.020Z" }, "status": "confirmed", "subject": { "reference": "Patient/123456" }, "category": { "coding": [ { "code": "diagnosis", "system": "http://hl7.org/fhir/condition-category", "display": "Diagnosis" }, { "code": "439401001", "system": "http://snomed.info/sct", "display": "Diagnosis" } ] }, "location": [ { "code": { "text": "Left Ear", "coding": [ { "code": "49521004", "system": "http://snomed.info/sct", "display": "Left external ear structure" } ] } } ], "severity": { "coding": [ { "code": "24484000", "system": "http://snomed.info/sct", "display": "Severe" } ] }, "onsetDate": "2012-05-24", "resourceType": "Condition" }

I tried there but No luck ..
SELECT fhir_search('{"resourceType": "Condition", "queryString": "subject=Patient/123456"}'); SELECT fhir_search('{"resourceType": "Condition", "queryString": "subject:Patient=123456"}');

Each time i try i get this error Not found SearchParameter . Also code:text this kind of parameter also does not work . Am i missing something ?

@Semalexa
Copy link
Contributor

Semalexa commented Sep 1, 2016

In FHIR v1.6.0 Condition.subject was renamed from patient to subject, but fhirbase is not 1.6 yet and still uses Condition.patient.
So the query would be
SELECT fhir_search('{"resourceType": "Condition", "queryString": "patient=Patient/123456"}');
SELECT fhir_search('{"resourceType": "Condition", "queryString": "patient:Patient=123456"}');

@sh0umik
Copy link
Author

sh0umik commented Sep 1, 2016

Thank you @Semalexa . That solved the Problem . I was using FHIR DSTU2 json structure and Fhirbase is FHIR STU3 Candidate (v1.4.0) :) .

Looking forward for 1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants