ehrbase / openEHR_SDK

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

Generator did not generate subject, language, encoding fields for ACTION #82

Closed ppazos closed 4 years ago

ppazos commented 4 years ago

Steps to reproduce

Working on https://github.com/ehrbase/project_management/issues/363

  1. template: https://ckm.highmed.org/ckm/templates/1246.169.206
  2. generated ACTION: https://github.com/ehrbase/fhir-bridge/blob/363_mapping_procedure/src/main/java/org/ehrbase/fhirbridge/opt/prozedurcomposition/definition/ProzedurAction.java
  3. the ACTION entry doesn't have the mandatory fields:
    • subject: PARTY_PROXY
    • language: CODE_PHRASE
    • encoding: CODE_PHRASE

Reference UML: https://specifications.openehr.org/releases/RM/latest/UML/diagrams/RM-composition.entry.svg

Actual result

That makes the generated COMPOSITION to be invalid when submitted to EHRBASE.

{"error":"java.lang.IllegalArgumentException: Message at /subject (/content[openEHR-EHR-ACTION.procedure.v1, 1]/subject): Attribute subject of class ACTION does not match existence 1..1\nMessage at /language (/content[openEHR-EHR-ACTION.procedure.v1, 1]/language): Attribute language of class ACTION does not match existence 1..1\n","status":"Bad Request"}

Expected result

Mandatory fields should be present.

Success criteria

stefanspiska commented 4 years ago

encoding is set in the bedground to UTF-8. The rest is fixed in https://github.com/ehrbase/openEHR_SDK/pull/88