CodeSystem search vs lookup

504 views
Skip to first unread message

Rajesh Katarya

unread,
Jul 23, 2019, 12:14:19 PM7/23/19
to HAPI FHIR
Trying to understand the difference between search and lookup.
For example:
CodeSystem search supports both code and name parameters

GET call
/CodeSystem?code=2093-3
returns nothing

I tried to be specific to a code system:
/CodeSystem?code=2093-3&name=LOINC
also returns nothing


Moving to use lookup:
/CodeSystem/$lookup?system=http://loinc.org&code=2093-3

works.

Can anyone help me in explaining the difference between the two approaches.

Also, would like to know how to filter by a specific property ( and property value )
As an example, for GET call like this /CodeSystem/$lookup?system=http://loinc.org&code=2093-3

I only want to get value of the STATUS property ( to reduce response pay load) and not see/get any other properties.



Thanks much.

-Rajesh

James Agnew

unread,
Jul 23, 2019, 2:09:20 PM7/23/19
to Rajesh Katarya, HAPI FHIR
For external CodeSystems (ones that are loaded using the terminology loader, such as LOINC and SCT), only the $lookup operation works as the regular resource indexing won't index contents that aren't in the resource body.

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/a3465c84-ddfc-4ab5-815b-03842c79b8cf%40googlegroups.com.

jagadesh doddi

unread,
Mar 14, 2020, 7:46:28 AM3/14/20
to HAPI FHIR
I can seach code system with http://localhost:8080/hapi-fhir-jpaserver/fhir/CodeSystem/$lookup?system=http://snomed.info/sct&code=39065001&_format=json

It returns
 {
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "name",
      "valueString": "SNOMED CT"
    },
    {
      "name": "display",
      "valueString": "Burn of ear structure"
    },
    {
      "name": "abstract",
      "valueBoolean": false
    }
  ]
}

How do I search for codes by display name? I want all the codes with display name "Burn" in it. 
To unsubscribe from this group and stop receiving emails from it, send an email to hapi...@googlegroups.com.

david....@gmail.com

unread,
Mar 14, 2020, 9:10:35 PM3/14/20
to HAPI FHIR
I'm not sure about the hapi side of things, but you can do a ValueSet $expand.



Snomed CT has a number of implicit valuesets in fhir. 
http://snomed.info/sct?fhir_vs is a valueset for all on snomed.
http://snomed.info/sct?fhir_vs=isa/125666000  to get all children of concept 125666000
http://snomed.info/sct?fhir_vs=refset/32570481000036109  to get concepts in the refset 32570481000036109(Emergency department diagnosis reference set)

If there is no valueset for your codesystem you may need to post the $expand request so you can define one.



Reply all
Reply to author
Forward
0 new messages