Multi-Language Support

47 views
Skip to first unread message

Johanna Häusler

unread,
Jan 9, 2024, 9:31:27 AMJan 9
to HAPI FHIR
Hy all,

I need to implement Questionnaires (SDC) with multi-language support, so I am trying to figure out whether hapi supports any kind of language translation. Specifically I looked into the Translation Extension (https://hl7.org/fhir/R4/languages.html), but couldn't make it work with version 6.8.0.

I did some research and ended up in that Triaged epic from some years ago: https://jira.hl7.org/browse/FHIR-32379. It seems like it came out of this discussion: https://groups.google.com/g/hapi-fhir/c/O4lOKkVQj1M/m/A2W3w0GlAgAJ which looks like exactly what I need.

Does anyone know if there is some kind of translation support from the hapi server already? Or is there even one planned? Can you think of any other option I have besides client-side post-processing?

Thanks in advance,
Cheers,
Johanna


Anton Kurylovich

unread,
Jan 12, 2024, 9:30:12 AMJan 12
to HAPI FHIR
Can you provide an example of what you tried but couldn't get working? Just want to make sure I understood this question correctly, and an example would help.

Johanna Häusler

unread,
Jan 15, 2024, 1:24:22 AMJan 15
to HAPI FHIR
Hy Anton, thanks for your reply!

Maybe I totally misunderstood how this should work, but I tried something like this:

I POSTed the following questionnaire to my hapi server (shortened example form):
{
   "resourceType":"Questionnaire",
   "meta":{
      "profile":[
         "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire|2.7"
      ]
   },
   "name":"SDOH Screening Questions",
   "title":"Health Screening",
   "status":"draft",
   "date":"2019-10-01T04:00:00.000Z",
   "description":"Original Text.",
   "item":[
      {
         "linkId":"/introduction",
         "code":[
            {
               "system":"Custom",
               "code":"introduction",
               "display":"Original Text."
            }
         ],
         "text":"Original Text.",
         "type":"group",
         "required":false,
         "extension":[
            {
               "url":"http://hl7.org/fhir/StructureDefinition/translation",
               "extension":[
                  {
                     "url":"lang",
                     "valueCode":"de"
                  },
                  {
                     "url":"content",
                     "valueString":"deutsch"
                  }
               ]
            },
            {
               "url":"http://hl7.org/fhir/StructureDefinition/translation",
               "extension":[
                  {
                     "url":"lang",
                     "valueCode":"it"
                  },
                  {
                     "url":"content",
                     "valueString":"italiano"
                  }
               ]
            }
         ]
      }
   ]
}

Then I executed this request:
curl --location --request GET 'http://myfhirserver/Questionnaire/the-id-of-the-example-form' --header 'Accept-Language: de-DE' 

And I expected that any of the "Original Text" fields was translated to german, but I got the questionnaire back as-is.

I also tried moving around the translation extension, but always with the same result.

If that is not how the standard is meant, I would highly appreciate a working example or any advice how the multi-language support could be established.

Cheers,
Johanna
Reply all
Reply to author
Forward
0 new messages