IHTSDO / snowstorm

Scalable SNOMED CT Terminology Server using Elasticsearch
Other
184 stars 74 forks source link

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

Open danka74 opened 8 months ago

danka74 commented 8 months ago

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'
kaicode commented 8 months ago

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.

danka74 commented 8 months ago

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.