I don’t know if it is mentioned somewhere in the specs, but is there a restriction on the amount of instances that may be instantiated for the same template in the the same EHR ? Is it possible to enforce e.g. that an anamnesis template may only exist one time, but the echocardiography template may exist in an unrestricted amount of times ?
I assume you want to restrict such that for a given EHR/Patient you only want one active instance for a composition based on a specific template. This is a persistent composition.
In openEHR persistence is just saying that we assume there will be several versions of that composition. In our EHR solution we define persistence within different scopes. The type of scopes is as follows:
- Patient - meaning allow only one instance within the scope of the EHR
- PeriodOfCare - only one instance within a period of care
- EpisodeOfCare - only one instance within an outpatient stay or admission
- Folder - only one instance within a FOLDER
The rules to handle the scopes are implemented by the application using the openEHR CDR.
What is the default mode when storing Compositions when I do not specify those aspects ? Will it be allowed to store unlimited instances of a template type ?
Just a small note on terminology: you are referring to instantiating COMPOSITIONs that are compliant with templates, that is not instantiation of templates, since templates are in a serialized format file. Instantiating templates is loading those files into an application.
We currently have a discussion in the SEC that needs to define how many instances of a persistent COMPOSITION defined by the same template could be instantiated inside an EHR. For instance, as Bjorn says, they interpreted many instances of a persistent COMPO could exist in the same EHR. While in our implementation we interpreted only one instance is allowed, so you can have just one problem list or one medication list per EHR, and many versions for each, but each of those is conceptually one document that changes is time.