ehrbase/openEHR_SDK

Redundant template_id in FLAT Compositions

Closed this issue · 0 comments

Before reporting an issue

  • I have searched existing issues
  • I have reproduced the issue with the latest release

Environment information

SDK 2.3.0-SNAPSHOT

Steps to reproduce

Store a Composition as FLAT and retrieve it as Canonical

Expected behavior

Only the Composition root has a archetype_details/template_id node

Actual result

Each archetyped Locatable has the same archetype_details/template_id node

Further information

In ToCompositionWalker::postHandle, for any archetyped Locatable, the template_id from the context used, which is the template_id of the base object (Composition).
This will likely also affect ExampleGeneratorToCompositionWalker and DtoToCompositionWalker.

See https://specifications.openehr.org/releases/RM/latest/common.html#_archetyped_class