FHIR Chat · ConceptMap/$translate · terminology

Stream: terminology

Topic: ConceptMap/$translate


view this post on Zulip Simone Heckmann (Oct 30 2018 at 14:07):

Hi,
I've got this ConceptMap right here (-> http://test.fhir.org/r3/ConceptMap/104), which has a mapping for

<group>
    <source value="http://dmi.de/fhir/CodeSystem/kdl"/>
    <target value="urn:oid:1.3.6.1.4.1.19376.3.276.1.5.9"/>
     [...]
    <element>
      <code value="AM010102"/>
      <display value="G-AEP Kriterien"/>
      <target>
        <code value="AUFN"/>
        <display value="Einweisungs- und Aufnahmedokumente"/>
        <equivalence value="wider"/>
      </target>
    </element>
  </group>

however, the Operation http://test.fhir.org/r3/ConceptMap/104/$translate?code=AM010102&system=http://dmi.de/fhir/CodeSystem/kdl
returns:

<Parameters xmlns="http://hl7.org/fhir">
  <parameter>
    <name value="result"/>
    <valueBoolean value="false"/>
  </parameter>
  <parameter>
    <name value="message"/>
    <valueString value="Code AM010102 in system http://dmi.de/fhir/CodeSystem/kdl not recognized"/>
  </parameter>
</Parameters>

I would argue, that the given the ConceptMap, the server has everything it needs to answer the request...
But apparently, it's running additional checks like validating the Code against the source ValueSet or against the CodeSystem? Which additional Resources do I need?

view this post on Zulip Rob Hausam (Oct 30 2018 at 14:58):

Well, the server isn't recognizing the source value set or the group source code system, so I expect you need to add something for those:
http://test.fhir.org/r3/ValueSet?url=http%3A//dmi.de/fhir/ValueSet/kdl
http://test.fhir.org/r3/CodeSystem?url=http%3A//dmi.de/fhir/CodeSystem/kdl

view this post on Zulip Simone Heckmann (Oct 30 2018 at 15:15):

I added the CodeSystem, now I get

<?xml version="1.0" encoding="UTF-8"?>
<Parameters xmlns="http://hl7.org/fhir">
    <parameter>
        <name value="result"/>
        <valueBoolean value="false"/>
    </parameter>
    <parameter>
        <name value="message"/>
        <valueString value="Invalid class typecast"/>
    </parameter>
</Parameters>

view this post on Zulip Simone Heckmann (Oct 30 2018 at 15:16):

Same after adding the ValueSet...

view this post on Zulip Simone Heckmann (Oct 30 2018 at 15:17):

Both URLs you suggested resolve to the corresponding Ressources now...

view this post on Zulip Rob Hausam (Oct 30 2018 at 15:19):

"Invalid class typecast" sounds like a server bug to me, @Grahame Grieve?

view this post on Zulip Grahame Grieve (Oct 30 2018 at 22:18):

yes, and I think I've fixed that

view this post on Zulip Grahame Grieve (Oct 30 2018 at 22:18):

I'll upgrade the server

view this post on Zulip Simone Heckmann (Nov 06 2018 at 08:54):

BTW, @Grahame Grieve : tx.fhir.org doesn't allow the uploading of ConceptMaps. Is that on purpose?

view this post on Zulip Grahame Grieve (Nov 06 2018 at 09:54):

yes because lots of processes depend on it being correct. I can upload, but others can't

view this post on Zulip Simone Heckmann (Nov 07 2018 at 13:59):

Ok, but the behaviour of $translate should be the same on test.fhir.org, right?

view this post on Zulip Grahame Grieve (Nov 07 2018 at 19:35):

yes same serfver

view this post on Zulip Grahame Grieve (Nov 07 2018 at 19:35):

though I think test.fhir.org is an upgrade behind, which I'll be fixing in a few hours

view this post on Zulip Michael Lawley (Sep 01 2019 at 23:29):

The operation definition for $translate says very little about how to deal with various error cases - eg translating an unknown code in a known code system, or translating an unknown code system.
In particular, should the operation return a 200 or a 4xx (400, 404, 4??) status code

view this post on Zulip Grahame Grieve (Sep 01 2019 at 23:31):

my take:
- if the inputs are not understood, return 400
- if the inputs are understood, but there is no translation, then 200 OK with result = false
- there are always cases where the server can't be sure that the client asked the wrong question, so it's impossible to nail down 4xx vs 5xx

it would be good to have a task to clarify this

view this post on Zulip Michael Lawley (Sep 01 2019 at 23:35):

5xx means error internal to server ; 4xx is "error" in the request itself (where this may include not supported by this server; 501 might be okay for this, by my preference would be for a 422)

view this post on Zulip Grahame Grieve (Sep 01 2019 at 23:35):

sure. we can certainly recommend 4xx or even 422 but I don't think it's good to make it a SHALL

view this post on Zulip Michael Lawley (Sep 01 2019 at 23:37):

Can you clarify what "inputs are (not) understood" means? I don't think of this as a known/unknown issue

view this post on Zulip Grahame Grieve (Sep 01 2019 at 23:42):

either inputs are missing, or the values are not considered to be valid.

view this post on Zulip Michael Lawley (Sep 05 2019 at 14:42):

So here's an example call [base]/ConceptMap/$translate?system=http://hl7.org/fhir/address-use&code=xxx&source=http://hl7.org/fhir/ValueSet/address-use&target=http://terminology.hl7.org/ValueSet/v3-AddressUse where the code being translated, xxx is not in the code system http://hl7.org/fhir/address-use

Our server "understands" the inputs - a code & a system URI, but there is no translation because the code is not valid. We return a 200 and a result = false. Should we instead return a 400? This would align with $lookup, but does require more processing

view this post on Zulip Grahame Grieve (Sep 05 2019 at 20:20):

I agree that 200 is right in this case, and we should document that


Last updated: Apr 12 2022 at 19:14 UTC