ehrbase / openEHR_SDK

A SDK to facilitate the development of openEHR applications
Other
48 stars 28 forks source link

Object "Ergebnis-Status" of "Virologischer-Befund" not transferred to ehrbase #229

Closed NormanWeinert closed 3 years ago

NormanWeinert commented 3 years ago

Configuration information

EHRbase version: "0.16.5", openEHR_SDK version: "39cb1fd", Archie version: "5a4a9442e5e2516aed5f25636ac236682aace7b9", PostgreSQL version: "PostgreSQL 13.2, compiled by Visual C++ build 1914, 64-bit" Java Runtime version: "AdoptOpenJDK 11.0.11+9", Operating System version: "Windows 10 amd64 10.0",

Steps to reproduce

The Virologischer-Befund template requires the value "Ergebnis-Status" in "Pro Analyt Cluster" of "Labortest-Panel". When the java composition is sent to ehrbase the mentioned value is not transferred and it is also not present in the JSON mapping file. When the value is completely taken out the verifier does not even recognise that it is missing even though the value should be required.

Link to the Virologischer-Befund template: http://88.198.146.13/ckm/templates/1246.169.636

The resulting Composition (value "Ergebnis-Status" in "Pro Analyt" of "Labortest-Panel" is missing):

{
  "_type": "COMPOSITION",
  "name": {
    "_type": "DV_TEXT",
    "value": "Virologischer Befund"
  },
  "archetype_details": {
    "archetype_id": {
      "value": "openEHR-EHR-COMPOSITION.report-result.v1"
    },
    "template_id": {
      "value": "Virologischer Befund"
    },
    "rm_version": "1.0.4"
  },
  "feeder_audit": {
    "_type": "FEEDER_AUDIT",
    "originating_system_item_ids": [
      {
        "_type": "DV_IDENTIFIER",
        "id": "Observation/2/_history/1",
        "type": "fhir_logical_id"
      }
    ],
    "originating_system_audit": {
      "_type": "FEEDER_AUDIT_DETAILS",
      "system_id": "FHIR-Bridge"
    }
  },
  "language": {
    "_type": "CODE_PHRASE",
    "terminology_id": {
      "_type": "TERMINOLOGY_ID",
      "value": "ISO_639-1"
    },
    "code_string": "de"
  },
  "territory": {
    "_type": "CODE_PHRASE",
    "terminology_id": {
      "_type": "TERMINOLOGY_ID",
      "value": "ISO_3166-1"
    },
    "code_string": "DE"
  },
  "category": {
    "_type": "DV_CODED_TEXT",
    "value": "event",
    "defining_code": {
      "_type": "CODE_PHRASE",
      "terminology_id": {
        "_type": "TERMINOLOGY_ID",
        "value": "openehr"
      },
      "code_string": "433"
    }
  },
  "composer": {
    "_type": "PARTY_SELF"
  },
  "context": {
    "_type": "EVENT_CONTEXT",
    "start_time": {
      "_type": "DV_DATE_TIME",
      "value": "2021-05-16T08:49:21+02:00"
    },
    "setting": {
      "_type": "DV_CODED_TEXT",
      "value": "secondary medical care",
      "defining_code": {
        "_type": "CODE_PHRASE",
        "terminology_id": {
          "_type": "TERMINOLOGY_ID",
          "value": "openehr"
        },
        "code_string": "232"
      }
    },
    "other_context": {
      "_type": "ITEM_TREE",
      "name": {
        "_type": "DV_TEXT",
        "value": "Tree"
      },
      "items": [
        {
          "_type": "ELEMENT",
          "name": {
            "_type": "DV_TEXT",
            "value": "Status"
          },
          "value": {
            "_type": "DV_TEXT",
            "value": "Enumeration[final]"
          },
          "archetype_node_id": "at0005"
        },
        {
          "_type": "CLUSTER",
          "name": {
            "_type": "DV_TEXT",
            "value": "Fallidentifikation"
          },
          "items": [
            {
              "_type": "ELEMENT",
              "name": {
                "_type": "DV_TEXT",
                "value": "Fall-Kennung"
              },
              "value": {
                "_type": "DV_TEXT",
                "value": "http://external.fhir.server/Encounter/555"
              },
              "archetype_node_id": "at0001"
            }
          ],
          "archetype_node_id": "openEHR-EHR-CLUSTER.case_identification.v0"
        }
      ],
      "archetype_node_id": "at0001"
    }
  },
  "content": [
    {
      "_type": "OBSERVATION",
      "name": {
        "_type": "DV_TEXT",
        "value": "Befund"
      },
      "language": {
        "_type": "CODE_PHRASE",
        "terminology_id": {
          "_type": "TERMINOLOGY_ID",
          "value": "ISO_639-1"
        },
        "code_string": "de"
      },
      "encoding": {
        "_type": "CODE_PHRASE",
        "terminology_id": {
          "_type": "TERMINOLOGY_ID",
          "value": "IANA_character-sets"
        },
        "code_string": "UTF-8"
      },
      "subject": {
        "_type": "PARTY_SELF"
      },
      "data": {
        "name": {
          "_type": "DV_TEXT",
          "value": "Event Series"
        },
        "origin": {
          "_type": "DV_DATE_TIME",
          "value": "2021-05-16T08:49:21+02:00"
        },
        "events": [
          {
            "_type": "POINT_EVENT",
            "name": {
              "_type": "DV_TEXT",
              "value": "Jedes Ereignis"
            },
            "time": {
              "_type": "DV_DATE_TIME",
              "value": "2021-05-16T08:49:21+02:00"
            },
            "data": {
              "_type": "ITEM_TREE",
              "name": {
                "_type": "DV_TEXT",
                "value": "Tree"
              },
              "items": [
                {
                  "_type": "ELEMENT",
                  "name": {
                    "_type": "DV_TEXT",
                    "value": "Labortest-Bezeichnung"
                  },
                  "value": {
                    "_type": "DV_CODED_TEXT",
                    "value": "Detection of virus (procedure)",
                    "defining_code": {
                      "_type": "CODE_PHRASE",
                      "terminology_id": {
                        "_type": "TERMINOLOGY_ID",
                        "value": "SNOMED CT"
                      },
                      "code_string": "122442008"
                    }
                  },
                  "archetype_node_id": "at0005"
                },
                {
                  "_type": "CLUSTER",
                  "name": {
                    "_type": "DV_TEXT",
                    "value": "Probe"
                  },
                  "items": [
                    {
                      "_type": "ELEMENT",
                      "name": {
                        "_type": "DV_TEXT",
                        "value": "Zeitpunkt der Probenentnahme"
                      },
                      "value": {
                        "_type": "DV_DATE_TIME",
                        "value": "2011-08-16T06:15:00Z"
                      },
                      "archetype_node_id": "at0015"
                    },
                    {
                      "_type": "CLUSTER",
                      "name": {
                        "_type": "DV_TEXT",
                        "value": "Anatomische Lokalisation"
                      },
                      "items": [
                        {
                          "_type": "ELEMENT",
                          "name": {
                            "_type": "DV_TEXT",
                            "value": "Name der Körperstelle"
                          },
                          "value": {
                            "_type": "DV_CODED_TEXT",
                            "value": "Bronchial structure (body structure)",
                            "defining_code": {
                              "_type": "CODE_PHRASE",
                              "terminology_id": {
                                "_type": "TERMINOLOGY_ID",
                                "value": "SNOMED CT"
                              },
                              "code_string": "955009"
                            }
                          },
                          "archetype_node_id": "at0001"
                        }
                      ],
                      "archetype_node_id": "openEHR-EHR-CLUSTER.anatomical_location.v1"
                    }
                  ],
                  "archetype_node_id": "openEHR-EHR-CLUSTER.specimen.v1"
                },
                {
                  "_type": "CLUSTER",
                  "name": {
                    "_type": "DV_TEXT",
                    "value": "Labortest-Panel"
                  },
                  "items": [
                    {
                      "_type": "CLUSTER",
                      "name": {
                        "_type": "DV_TEXT",
                        "value": "Pro Analyt"
                      },
                      "items": [
                        {
                          "_type": "ELEMENT",
                          "name": {
                            "_type": "DV_TEXT",
                            "value": "Nachweis"
                          },
                          "value": {
                            "_type": "DV_CODED_TEXT",
                            "value": "Inconclusive (qualifier value)",
                            "defining_code": {
                              "_type": "CODE_PHRASE",
                              "terminology_id": {
                                "_type": "TERMINOLOGY_ID",
                                "value": "SNOMED Clinical Terms"
                              },
                              "code_string": "419984006"
                            }
                          },
                          "archetype_node_id": "at0001"
                        },
                        {
                          "_type": "ELEMENT",
                          "name": {
                            "_type": "DV_TEXT",
                            "value": "Virusnachweistest"
                          },
                          "value": {
                            "_type": "DV_CODED_TEXT",
                            "value": "SARS-CoV-2 Ag",
                            "defining_code": {
                              "_type": "CODE_PHRASE",
                              "terminology_id": {
                                "_type": "TERMINOLOGY_ID",
                                "value": "LOINC"
                              },
                              "code_string": "94558-4"
                            }
                          },
                          "archetype_node_id": "at0024"
                        },
                        {
                          "_type": "ELEMENT",
                          "name": {
                            "_type": "DV_TEXT",
                            "value": "Zugehörige Laborprobe"
                          },
                          "value": {
                            "_type": "DV_IDENTIFIER",
                            "assigner": "DISPLAY",
                            "id": "ID",
                            "type": "URI"
                          },
                          "archetype_node_id": "at0026"
                        }
                      ],
                      "archetype_node_id": "openEHR-EHR-CLUSTER.laboratory_test_analyte.v1"
                    }
                  ],
                  "archetype_node_id": "openEHR-EHR-CLUSTER.laboratory_test_panel.v0"
                }
              ],
              "archetype_node_id": "at0003"
            },
            "archetype_node_id": "at0002"
          }
        ],
        "archetype_node_id": "at0001"
      },
      "archetype_node_id": "openEHR-EHR-OBSERVATION.laboratory_test_result.v1"
    }
  ],
  "archetype_node_id": "openEHR-EHR-COMPOSITION.report-result.v1"
}
chevalleyc commented 3 years ago

See also https://github.com/ehrbase/project_management/issues/532

stefanspiska commented 3 years ago

@SevKohler @birgerhaarbrandt ProAnalytCluster.java was generated with an old version of the sdk.

If you regenerate with the sdk dev version then

 @Path("/items[at0005]/value|value")
  private String ergebnisStatusValue;

will be replaced by @Path("/items[at0005]") private List ergebnisStatus;

which should be handle correctly