medizininformatik-initiative / feasibility-gui

Apache License 2.0
2 stars 3 forks source link

Add required and recommended fields #273

Open juliangruendner opened 2 days ago

juliangruendner commented 2 days ago

FHIR profiles define so called modifiers as well as the cardinality for each field of a profile.

This information has direct influence on the data selection and whether a field should be selected.

The fhir ontology generator uses this and other information to add to attributes to each field: required and recommended.

both influence the UI as follows:

required:

If a field is required it has to be added to the dataselection and it should be selected as the health data element (like e.g. Diagnosis) is added to the data selection.

Further the element should be displayed as selected and the tick for the selection be greyed out, as it cannot be removed from the dataselection.

recommended:

If a field is recommended it has to be added to the dataselection and it should be selected as the health data element (like e.g. Diagnosis) is added to the data selection.

A recommended field, unlike a required one, can be de-selected and appears as a standard selected field.

Example excerpt from the ontology json:

{
            "id": "Observation.identifier:analyseBefundCode",
            "display": {
              "original": "analyseBefundCode",
              "translations": [
                {
                  "language": "de-DE",
                  "value": ""
                },
                {
                  "language": "en-US",
                  "value": ""
                }
              ]
            },
            "description": {
              "original": "A unique identifier assigned to this observation.",
              "translations": [
                {
                  "language": "de-DE",
                  "value": ""
                },
                {
                  "language": "en-US",
                  "value": ""
                }
              ]
            },
            "type": "Identifier",
            "recommended": true,
            "required": false,
...
juliangruendner commented 12 hours ago

@Shayan1375 requires the newest backend develop version