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

Change display and translations structure for criteria and concepts #382

Open
juliangruendner opened this issue Oct 17, 2024 · 3 comments · May be fixed by #384
Open

Change display and translations structure for criteria and concepts #382

juliangruendner opened this issue Oct 17, 2024 · 3 comments · May be fixed by #384
Assignees

Comments

@juliangruendner
Copy link
Contributor

juliangruendner commented Oct 17, 2024

the translation structure should be change to allow for distinguishing between original display values and translations by language.

This should be changed for the criteria search and the concept search alike.

For the ontology index (criteria search) the display replaces the attribute "name".

{
    "availability": 0,
    "terminology": "http://loinc.org",
    "termcode": "74620-6",
    "selectable": true,
    "context": {
        "system": "fdpg.mii.cds",
        "code": "Laboruntersuchung",
        "display": "Laboruntersuchung",
        "version": "1.0.0"
    },
    "termcodes": [
        {
            "system": "http://loinc.org",
            "code": "74620-6",
            "display": "1,1-Dimethoxy-(9Z)octadecene (DMA 18:1)/Oleate (C18:1w9) [Mass Ratio] in Fibroblast",
            "version": "2.77"
        }
    ],
    "display": {
        "original": "1,1-Dimethoxy-(9Z)octadecene (DMA 18:1)/Oleate (C18:1w9) [Mass Ratio] in Fibroblast",
        "en": "1,1-Dimethoxy-(9Z)octadecene (DMA 18:1)/Oleate (C18:1w9) [Mass Ratio] in Fibroblast",
        "de": "1,1-Dimethoxy-(9Z)octadecene (DMA 18:1)/Oleate (C18:1w9) [Masse Verhältnis] in Fibroblast"
    },
    "criteria_sets": [],
    "parents": [],
    "children": [],
    "related_terms": [],
    "kds_module": "Labor"
}
{
    "termcode": {
        "code": "0200",
        "display": "Geriatrie",
        "system": "http://fhir.de/CodeSystem/dkgev/Fachabteilungsschluessel",
        "version": 2099
    },
    "value_sets": [
        "http://fhir.de/ValueSet/dkgev/Fachabteilungsschluessel"
    ],
    "display": {
        "original": "Geriatrie",
        "en": "Geriatrix",
        "de": "Geriatrie"
    }
}

When delivering this via the rest api however, the "display" object will be converted so it matches the format introduced in #381

@michael-82
Copy link
Collaborator

After a quick discussion we decided to slightly change the format (the internal one for elastic search) so we do not use an array for translations. Since this would introduce a need for nested field type, which brings some restrictions, for which I honestly can't estimate if it will be a bigger deal in the future. So for now we will keep it simple.

michael-82 added a commit that referenced this issue Oct 18, 2024
…cepts

- remove nested declaration from elastic search documents (seems to be unnecessary, but should be monitored)
michael-82 added a commit that referenced this issue Oct 18, 2024
…cepts

- Change responses to codeable concept and terminology replies to the new structure
- missing: tests, actual ontology files to conveniently check if responses make sense
michael-82 added a commit that referenced this issue Oct 18, 2024
…cepts

- fix wrong field names (was in wrong case) for translations
michael-82 added a commit that referenced this issue Oct 21, 2024
…cepts

- remove nested declaration from elastic search documents (seems to be unnecessary, but should be monitored)
michael-82 added a commit that referenced this issue Oct 21, 2024
…cepts

- Change responses to codeable concept and terminology replies to the new structure
- missing: tests, actual ontology files to conveniently check if responses make sense
michael-82 added a commit that referenced this issue Oct 21, 2024
…cepts

- fix wrong field names (was in wrong case) for translations
michael-82 added a commit that referenced this issue Oct 21, 2024
michael-82 added a commit that referenced this issue Oct 21, 2024
…cepts

- modify swagger file to match new responses
michael-82 added a commit that referenced this issue Oct 22, 2024
michael-82 added a commit that referenced this issue Oct 22, 2024
…cepts

- remove nested declaration from elastic search documents (seems to be unnecessary, but should be monitored)
- modify swagger file to match new responses
- adapt tests to the new structure
- Change responses to codeable concept and terminology replies to the new structure
michael-82 added a commit that referenced this issue Oct 24, 2024
…cepts

- remove nested declaration from elastic search documents (seems to be unnecessary, but should be monitored)
- modify swagger file to match new responses
- adapt tests to the new structure
- Change responses to codeable concept and terminology replies to the new structure
@juliangruendner
Copy link
Contributor Author

juliangruendner commented Oct 31, 2024

"display": {
            "original": "MII PR Medikation MedicationRequest",
            "translations": [
              {
                "language": "de",
                "value": ""
              },
              {
                "language": "en",
                "value": "MII PR Medikation MedicationRequest"
              }
            ]
          }

michael-82 added a commit that referenced this issue Nov 12, 2024
…cepts

- remove nested declaration from elastic search documents (seems to be unnecessary, but should be monitored)
- modify swagger file to match new responses
- adapt tests to the new structure
- Change responses to codeable concept and terminology replies to the new structure
michael-82 added a commit that referenced this issue Dec 6, 2024
…cepts

- remove nested declaration from elastic search documents (seems to be unnecessary, but should be monitored)
- modify swagger file to match new responses
- adapt tests to the new structure
- Change responses to codeable concept and terminology replies to the new structure
@michael-82
Copy link
Collaborator

I made some slight changes to the previous messages.

"en-US" should just be "en" and "de-DE" should just be "de"

michael-82 added a commit that referenced this issue Dec 6, 2024
…cepts

- change de-De to de and en-US to us for the elastic search related entries (the ones sent to the frontend are unchanged...might have to change as well)
michael-82 added a commit that referenced this issue Dec 6, 2024
michael-82 added a commit that referenced this issue Dec 6, 2024
…cepts

- modify elastic search tests in integration tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants