snowstorm icon indicating copy to clipboard operation
snowstorm copied to clipboard

Missing designation output when using Accept-language header and no displayLanguage

Open danka74 opened this issue 1 year ago • 2 comments

If a request is made with no displayLanguage and Accept-language HTTP header and includeDesignation=true is used, the resulting designations are incomplete. (The example has no Swedish translation, but the issue exists for concepts with sv translation).

{
                "system": "http://snomed.info/sct",
                "code": "900000000000550004",
                "designation": [
                    {
                        "use": {
                            "system": "http://terminology.hl7.org/CodeSystem/designation-usage",
                            "code": "display"
                        }
                    },
                    {
                        "language": "en",
                        "value": "Definition (core metadata concept)"
                    },
                    {
                        "language": "en",
                        "value": "Definition"
                    }
                ]
            },

Example request:

curl --location 'https://browser.ihtsdotools.org/fhir/ValueSet/$expand?url=http%3A%2F%2Fsnomed.info%2Fsct%2F45991000052106%3Ffhir_vs%3Drefset%2F787778008&includeDesignations=true&count=500' \
--header 'Accept: application/json' \
--header 'Accept-Language: sv'

danka74 avatar Oct 22 '23 19:10 danka74

The concept 900000000000550004 is not translated in the latest Swedish release. It's not translated in the daily-build either. Many other concepts are translated and seem to be listing the sv translations correctly?

      {
        "system": "http://snomed.info/sct",
        "code": "882784691000119100",
        "display": "pneumoni orsakad av SARS-CoV-2",
        "designation": [
          {
            "language": "sv",
            "use": {
              "system": "http://terminology.hl7.org/CodeSystem/designation-usage",
              "code": "display"
            },
            "value": "pneumoni orsakad av SARS-CoV-2"
          },
          {
            "language": "en",
            "value": "Pneumonia caused by severe acute respiratory syndrome coronavirus 2 (disorder)"
          },
          {
            "language": "sv",
            "use": {
              "system": "http://snomed.info/sct",
              "code": "900000000000013009",
              "display": "Synonym"
            },
            "value": "pneumoni orsakad av SARS-CoV-2"
          },

Perhaps I do not understand the issue here.

kaicode avatar Nov 02 '23 17:11 kaicode

See the FSN above, it is missing the "use" element. In my example, first designation, only "use" was present. The result should be that "language", "value", and "use" are always present for all designations.

danka74 avatar Nov 04 '23 10:11 danka74