API for adding data to an EHR

Hello,
In which part of the openEHR API is the definition of how to add an instance of a template to an existing EHR ?
Something like "add <serialized 'Health risk assessment'> to <id of EHR>" ?
Greetings
Georg

Please have a look at

https://specifications.openehr.org/releases/ITS-REST/Release-1.0.0/ehr.html#composition

The instance of the template goes in the body. Different implementations have used different JSON formats for the payload. Ethercis supports both FLAT (originally from ThinkEHR) and it’s own ECISFLAT formats.

regards

ah, cool, that was what I was looking for. Thank you

For the record: there is no concept of “instance of a template”, there are instances of COMPOSITIONs that comply with a template. The information model class is COMPOSITION, the constraints to which instances of COMPOSITION should comply are defined in a template.

That’s worth saying Pablo. It is a common misunderstanding. Similarly there are no archetypes in openehr instance data. Only patterns of data that are valid against the archetype designs.

For no technical people we have been describing templates as recipes, with archetypes as recipe components like a sauce which has its own recipe.

Thankfully my food recipes do not validate my cooking.

Ian