FHIR Chat · how to filter by abstract codes? · terminology

Stream: terminology

Topic: how to filter by abstract codes?


view this post on Zulip Eric Haas (Jul 14 2020 at 18:25):

the CLD for the value set "all non-abstract codes"

I don't know how to do this. I looked and did not see a way.

view this post on Zulip John Moehrke (Jul 14 2020 at 18:40):

is it .contains.abstract false?

view this post on Zulip Eric Haas (Jul 14 2020 at 19:21):

Its some filter

 <include>  <!-- 1..* Include one or more codes from a code system or other value set(s) -->
   <system value="[uri]"/><!-- ?? 0..1 The system the codes come from -->
   <filter>  <!-- ?? 0..* Select codes/concepts by their properties (including relationships) -->
    <property value="[code]"/><!-- 1..1 A property/filter defined by the code system -->
    <op value="[code]"/><!-- 1..1 = | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists -->
    <value value="[string]"/><!-- 1..1 Code from the system, or regex criteria, or boolean value for exists -->
   </filter>
</include

view this post on Zulip John Moehrke (Jul 14 2020 at 20:11):

Moehrke Research (@John Moehrke and @ryan moehrke ) have failed, trying all kinds of .filter mechanics.

view this post on Zulip Grahame Grieve (Jul 14 2020 at 20:27):

so the first thing to do is to make sure that the code system actually defines what is abstract or not. Here's what's required, for Eric's code system of focus:

view this post on Zulip Grahame Grieve (Jul 14 2020 at 20:27):

https://github.com/FHIR/packages/commit/04d4796595f55769756e6e36ebcffda514e4d909

view this post on Zulip Grahame Grieve (Jul 14 2020 at 20:28):

having done that, then you write a filter based on the notSelectable property:

view this post on Zulip Grahame Grieve (Jul 14 2020 at 20:29):

<filter>
  <property value="abstract"/>
  <op value="="/>
  <value value="false"/>
</filter>

view this post on Zulip John Moehrke (Jul 14 2020 at 20:36):

I tried that

view this post on Zulip John Moehrke (Jul 14 2020 at 20:39):

which according to http://build.fhir.org/codesystem.html#filters we should not need to add that filter as all properties magically include the "=" and "in"... but I tried it anyway

view this post on Zulip John Moehrke (Jul 14 2020 at 20:44):

I have also tried including the codeSystem, and then exclude the codeSystem with filter of notSelectable.. got nothing expanded at all

view this post on Zulip Grahame Grieve (Jul 14 2020 at 20:45):

according to http://build.fhir.org/codesystem.html#filters we should not need to add that filter as all properties magically include the "=" and "in"...

I have no idea what that means

view this post on Zulip John Moehrke (Jul 14 2020 at 21:42):

well, I didn't trust that statement in the FHIR spec either.. hence why I tried it explicitly.

view this post on Zulip John Moehrke (Jul 15 2020 at 18:25):

@Eric Haas did yo get this working? I have tried other things still not working.

view this post on Zulip John Moehrke (Jul 16 2020 at 14:46):

@Grahame Grieve can you help me? when I use any filter I get no expansion. I have even tried to include and exclude. My repo is https://github.com/IHE/FormatCode

view this post on Zulip Eric Haas (Jul 16 2020 at 21:39):

It is not working for me either

view this post on Zulip Michael Lawley (Jul 16 2020 at 21:45):

It means that for every property, there is an (implicit) filter with (at least) those two operators

view this post on Zulip Michael Lawley (Jul 16 2020 at 21:47):

@John Moehrke does it work if you use a different terminology server?

view this post on Zulip John Moehrke (Jul 16 2020 at 22:00):

I don't know how to do that

view this post on Zulip Michael Lawley (Jul 16 2020 at 22:01):

You can call the igpublisher with -tx and the URL for another tx server. Eg https://r4.ontoserver.csiro.au/fhir

view this post on Zulip Grahame Grieve (Jul 17 2020 at 05:45):

@John Moehrke what have you tried? Have you cleaned out the cache?

view this post on Zulip John Moehrke (Jul 17 2020 at 11:13):

I have not tried cleaning the cache, which cache shall I clean with what detergent?

view this post on Zulip Grahame Grieve (Jul 17 2020 at 11:17):

you have a txCache. Delete the files in there

view this post on Zulip Grahame Grieve (Jul 17 2020 at 11:17):

oh. I know why you mightn't be seeing that. I'll have to debug

view this post on Zulip Grahame Grieve (Jul 17 2020 at 11:17):

is what you have committed to master?

view this post on Zulip John Moehrke (Jul 17 2020 at 11:21):

yes

view this post on Zulip Grahame Grieve (Jul 17 2020 at 11:29):

ok I'll look tomorrow

view this post on Zulip John Moehrke (Jul 17 2020 at 11:33):

cleaning the txCache did not help

view this post on Zulip Michael Lawley (Jul 17 2020 at 22:20):

This is what I see the in txcache (when using Ontoserver):

{"hierarchical" : true, "valueSet" :{
  "resourceType" : "ValueSet",
  "compose" : {
    "include" : [{
      "system" : "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode",
      "filter" : [{
        "property" : "notSelectable",
        "op" : "=",
        "value" : "false"
      }]
    }]
  }
}}####
e: {
  "error" : "Error from server: Error:org.hl7.fhir.r5.model.CodeableConcept@a357c3e\r\n"
}

the default Tx has the error text as:
"error" : "Error from server: Unable to provide support for code system http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"

view this post on Zulip Grahame Grieve (Jul 18 2020 at 03:39):

it's an issue in the publisher's mini terminology server

view this post on Zulip Grahame Grieve (Jul 20 2020 at 22:24):

fixed next release

view this post on Zulip John Moehrke (Jul 27 2020 at 18:15):

I don't think this is working yet. @Eric Haas did you get yours working?

view this post on Zulip Eric Haas (Jul 28 2020 at 22:22):

not yet

view this post on Zulip Grahame Grieve (Jul 28 2020 at 22:23):

the code is certainly working ...

view this post on Zulip John Moehrke (Jul 29 2020 at 13:24):

teach me

view this post on Zulip John Moehrke (Jul 29 2020 at 13:24):

You @Grahame Grieve have full access to my FormatCode IG.

view this post on Zulip Eric Haas (Aug 04 2020 at 20:08):

here is my ValueSet"

<?xml version="1.0" encoding="UTF-8"?>
<ValueSet xmlns="http://hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <id value="us-core-provider-specialty"/>
  <url value="http://hl7.org/fhir/us/core/ValueSet/us-core-provider-specialty"/>
  <version value="1.0.1"/>
  <name value="USCoreProviderSpecialityNucc"/>
  <title value="US Core Provider Speciality (NUCC)"/>
  <status value="active"/>
  <date value="2019-05-21"/>
  <publisher value="HL7 US Realm Steering Committee"/>
  <contact>
    <telecom>
      <system value="other"/>
      <value value="http://hl7.org/fhir"/>
    </telecom>
  </contact>
  <description value="Provider speciality roles codes which are composed of the NUCC Health Care Provider Taxonomy Code Set for providers"/>
  <copyright value="This value set includes content from NUCC Health Care Provider Taxonomy Code Set for providers which is copyright © 2016+ American Medical Association.  For commercial use, including sales or licensing, a license must be obtained."/>
  <compose>
    <include>
      <system value="http://nucc.org/provider-taxonomy"/>
      <filter>
        <property value="abstract"/>
        <op value="="/>
        <value value="false"/>
      </filter>
    </include>
  </compose>
</ValueSet>

this results in the following error:Error from server: The filter "abstract = false" was not understood in the context of http://nucc.org/provider-taxonomy

IF is not the code is it a problem with the codesystem properties?

view this post on Zulip Grahame Grieve (Aug 04 2020 at 21:18):

is this in an IG where I can reproduce?

view this post on Zulip Eric Haas (Aug 04 2020 at 23:22):

US Core CI Build: https://build.fhir.org/ig/HL7/US-Core/ValueSet-us-core-provider-specialty.html

view this post on Zulip Michael Lawley (Aug 05 2020 at 00:05):

Since abstract is not a pre-defined property (see https://www.hl7.org/fhir/codesystem.html#status), it would need to be declared in the CodeSystem

view this post on Zulip Michael Lawley (Aug 05 2020 at 00:08):

But I don't even see properties on the codes in the CodeSystem that indicate abstractness in the http://nucc.org/provider-taxonomy CodeSystem, so I wouldn't expect this filter do be doing anything.

view this post on Zulip John Moehrke (Aug 05 2020 at 01:29):

note the newer IG publisher did work for me

view this post on Zulip Eric Haas (Aug 05 2020 at 14:23):

Is working for me as well

view this post on Zulip Grahame Grieve (Aug 06 2020 at 03:15):

yes I think it's resolved.


Last updated: Apr 12 2022 at 19:14 UTC