FHIR Chat · code:in · hapi

Stream: hapi

Topic: code:in


view this post on Zulip Brian Kaney (Sep 09 2020 at 21:19):

I tried this on Logica, locally running, and on the R4 test server with the same results. I can't seem to get code:in to work when using snomed (for some reason ICD-10 examples I tried did work)? Any ideas?

Here is the ValueSet:
http://hapi.fhir.org/baseR4/ValueSet?url=http://foo.com/ValueSet/conditions-T2DM-sct-small

Here is Condition that should be found:
http://hapi.fhir.org/baseR4/Condition/1461176

But this shows empty set:
http://hapi.fhir.org/baseR4/Condition?code:in=http://foo.com/ValueSet/conditions-T2DM-sct-small

view this post on Zulip John Silva (Sep 11 2020 at 21:03):

Also asked this in implementors channel.

Today I discovered something interesting about this problem:
If I used an ICD10 ValueSet, i.e. "system": "http://hl7.org/fhir/sid/icd-10"
the code:in search worked.

However, if I used a SNOMED or a LOINC coding system in the ValueSet it did NOT work. That seems very strange?

view this post on Zulip Paul Denning (Jan 26 2021 at 15:41):

I was wondering if the CapabilityStatement should explicitly indicate if 'code:in' is supported. See https://jira.hl7.org/browse/FHIR-30631

view this post on Zulip Bob Milius (Feb 18 2021 at 22:09):

Bumping this topic.
I would like to search for Observations with a code found in a ValueSet. Can someone show me an example of a successful search with code:in with HAPI? I'd like to create a valueset with a set of LOINC codes and search for all Observations that are found in that set. I first tried with it with an already existing ValueSet (observation-vitalsignresult), but it didn't return anything, even though I know the fhir server has Observations with codes found in this set.

http://hapi.fhir.org/baseR4/Observation?code:in=http://hl7.org/fhir/ValueSet/observation-vitalsignresult

view this post on Zulip Joel Schneider (Feb 19 2021 at 16:38):

Some further exploration ...

ValueSet

code:in search

code:in search with misspelled ValueSet url

search for specific code

ValueSet/$validate-code "Unable to expand ValueSet"

view this post on Zulip Moritz Kähler (Apr 13 2021 at 09:39):

Are there any news? I face the same problem, I'm unable to run a code:in query. Either the result is empty, unfiltered or I get an error message.

view this post on Zulip John Silva (Apr 13 2021 at 11:53):

I've had problems with code:in on HAPI before as well.
Try a few things related to your code:in search:

Does the code:in operation depend on CodeSystem?

view this post on Zulip Bob Milius (Dec 16 2021 at 19:15):

bumping this... We would love to be able to search on code:ina valueset

view this post on Zulip Moritz Kähler (Jan 26 2022 at 12:16):

In Hapi 5.6 this issue is solved.
To use :in operator you need to

  • hibernate.search.enabled: true in yaml file
  • upload the valueSet
  • restart hapi server or wait for 10 minutes until the expansion of the valueSet is completed. (Running $expand operation does not help here)

Here is an example query that worked for me
http://localhost:8086/fhir/Observation?code:in=/myValueSetId

{
  "resourceType": "ValueSet",
  "id": "myValueSetId",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2022-01-25T08:46:11.675+00:00",
    "source": "#xa4kq6mWK4hapvjA"
  },
  "url": "/ValueSet/myValueSetId",
  "version": "1.0.0",
  "name": "MyValueSet",
  "status": "active",
  "date": "2018-04-07T06:53:01+10:00",
  "description": "tbd",
  "compose": {
    "include": [ {
      "system": "http://snomed.info/sct",
      "concept": [ {
        "code": "10268700 ",
        "display": "Prostate specific antigen (substance)"
      } ]
    }, {
      "system": "http://loinc.org",
      "concept": [ {
        "code": "2857-1",
        "display": "Prostate specific Ag [Mass/volume] in Serum or Plasma"
      } ]
    } ]
  }
}

(Please note that I used local references)

view this post on Zulip jayesh iyer (Jan 27 2022 at 17:13):

Thank you Moritz for this detailed example and explanation of how to get this search to work. I was able to get this to work using these tips.

Thank you very much! :+1: :smile:


Last updated: Apr 12 2022 at 19:14 UTC