Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Translation Information #311

Open
juliangruendner opened this issue Jan 15, 2025 · 4 comments
Open

Update Translation Information #311

juliangruendner opened this issue Jan 15, 2025 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@juliangruendner
Copy link
Contributor

juliangruendner commented Jan 15, 2025

The Backend and ontology generator have been updated to provide translations for all criteria in German and English.
Use backend develop branch to implement against: https://github.com/medizininformatik-initiative/feasibility-backend/tree/develop

The language information should be displayed in the language chosen in the ui (German or English).

Displaying the search results criteria

The search call (e.g. http://localhost:8090/api/v4/terminology/entry/search?searchterm=718-7&availability=&contexts=&kds-modules=&terminologies=) now returns the following items, with the display information encapsulated in the display attribute.

{
    "totalHits": 1,
    "results": [
        {
            "id": "c27f29a5-ccf5-3ff7-b6c7-73f4a243f1a5",
            "display": {
                "original": "Hemoglobin [Mass/volume] in Blood",
                "translations": [
                    {
                        "language": "de-DE",
                        "value": "Hämoglobin [Masse/Volumen] in Blut"
                    },
                    {
                        "language": "en-US",
                        "value": "Hemoglobin [Mass/volume] in Blood"
                    }
                ]
            },
            "availability": 0,
            "context": "Laboruntersuchung",
            "terminology": "http://loinc.org",
            "termcode": "718-7",
            "kdsModule": "Labor",
            "selectable": true
        }
    ]
}

The UI should use this information to display the name of the criterion on the language selected in the UI.
en-US if english is selected
de-DE if german is seleted

e.g UI in German:

image

Displaying the information of the criteria as part of the query

the criteria-profile call (e.g. http://localhost:8090/api/v4/terminology/criteria-profile-data?ids=c27f29a5-ccf5-3ff7-b6c7-73f4a243f1a5) now returns:

[
    {
        "id": "c27f29a5-ccf5-3ff7-b6c7-73f4a243f1a5",
        "display": {
            "original": "Hemoglobin [Mass/volume] in Blood",
            "translations": [
                {
                    "language": "de-DE",
                    "value": "Hämoglobin [Masse/Volumen] in Blut"
                },
                {
                    "language": "en-US",
                    "value": "Hemoglobin [Mass/volume] in Blood"
                }
            ]
        },
        "context": {
            "code": "Laboruntersuchung",
            "system": "fdpg.mii.cds",
            "version": "1.0.0",
            "display": "Laboruntersuchung"
        },
        "termCodes": [
            {
                "code": "718-7",
                "system": "http://loinc.org",
                "version": "2.78",
                "display": "Hemoglobin [Mass/volume] in Blood"
            }
        ],
        "uiProfile": {
            "name": "Laboruntersuchung",
            "timeRestrictionAllowed": true,
            "attributeDefinitions": []
        }
    }
]

The UI should use this information to display the name of the criterion on the language selected in the UI.
en-US if english is selected
de-DE if german is seleted

image
@juliangruendner juliangruendner self-assigned this Jan 15, 2025
@michael-82
Copy link

The corresponding PR in the backend is #384

@Shayan1375 Shayan1375 added the enhancement New feature or request label Jan 15, 2025
@Shayan1375
Copy link
Contributor

The values of the translation object and the original should be an array of strings following the same pattern as in the Dataselection

{
    "totalHits": 1,
    "results": [
        {
            "id": "c27f29a5-ccf5-3ff7-b6c7-73f4a243f1a5",
            "display": {
                "original": ["Hemoglobin [Mass/volume] in Blood"],
                "translations": [
                    {
                        "language": "de-DE",
                        "value": ["Hämoglobin [Masse/Volumen] in Blut"]
                    },
                    {
                        "language": "en-US",
                        "value": ["Hemoglobin [Mass/volume] in Blood"]
                    }
                ]
            },
            "availability": 0,
            "context": "Laboruntersuchung",
            "terminology": "http://loinc.org",
            "termcode": "718-7",
            "kdsModule": "Labor",
            "selectable": true
        }
    ]
}

@Shayan1375
Copy link
Contributor

Furthermore the json response from (http://localhost:8090/api/v4/terminology/entry/0ccb8c32-7081-3595-8d53-263abf90e1ad/relations should return a json object with the display object for the parents and children

[
{
    "parents": [
        {
            "display": {
                "original": ["Body fluid specimen"],
                "translations": [
                    {
                        "language": "de-DE",
                        "value": ["Body fluid specimen"]
                    },
                    {
                        "language": "en-US",
                        "value": ["Body fluid specimen"]
                    }
                ]
            },
            "contextualizedTermcodeHash": "9f236859-841c-3620-bb53-1fc36e453643"
        }
    ],
    "children": [
        {
            "display": {
                "original": ["Amniocentesis fluid specimen"],
                "translations": [
                    {
                        "language": "de-DE",
                        "value": ["Amniocentesis fluid specimen"]
                    },
                    {
                        "language": "en-US",
                        "value": ["Amniocentesis fluid specimen"]
                    }
                ]
            },
            "contextualizedTermcodeHash": "cbc09b1c-ad24-3776-810e-3c697b622431"
        },
        {
            "name": "Amniotic fluid cytologic material",
            "contextualizedTermcodeHash": "66db87ba-237a-31f6-8467-8d3fa8f613e8"
        }
    ],
    "relatedTerms": []
}
]

@Shayan1375
Copy link
Contributor

Furthermore the response of the endpoint http://localhost:8090/api/v4/terminology/systems also needs a translation.

Current state:

[
    {
        "url": "http://snomed.info/sct",
        "name": "snomed"
    },
    {
        "url": "http://fhir.de/CodeSystem/bfarm/icd-10-gm",
        "name": "icd10"
    },
    {
        "url": "urn:oid:2.16.840.1.113883.3.1937.777.24.5.3",
        "name": "mii-consent"
    }
]

Expected with translation

[
    {
        "url": "http://snomed.info/sct",
        "display": {
            "original": "snomed",
            "translations": [
                {
                    "language": "de-DE",
                    "value": "snomed"
                },
                {
                    "language": "en-US",
                    "value": "snomed"
                }
            ]
        }
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants