# Definition of persistence for a composition

**URL:** <https://discourse.openehr.org/t/definition-of-persistence-for-a-composition/14882>\
**Category:** Technical (archive)\
**Created:** [3 March 2009 14:12 UTC](https://discourse.openehr.org/t/definition-of-persistence-for-a-composition/14882 "2009-03-03T14:12:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leonardo\_Moretti](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/b38774/32.png) [@Leonardo\_Moretti](https://discourse.openehr.org/u/Leonardo_Moretti)\
**Post date:** [3 March 2009 14:12 UTC](https://discourse.openehr.org/t/definition-of-persistence-for-a-composition/14882/1 "2009-03-03T14:12:55Z")

</div>

Hi all,  
I'd like to define persistence for a composition dinamically (and not  
statically in an archetype), because this property changes depending on  
application or application context.

If I'd like to define a composition as persistent, could I define this into  
a template? Is this the correct way to use templates? Moreover, in some  
particular case, I don't exclude to change persistence attribute for a  
compositon at run-time, depending of application context.

Any other suggestions?  
leo

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [16 March 2009 07:10 UTC](https://discourse.openehr.org/t/definition-of-persistence-for-a-composition/14882/2 "2009-03-16T07:10:32Z")

</div>

Hi Leo

Persistent is a feature that has meaning and cannot be changed at runtime.  
It means that the data goes on being relevant and does not apply to one  
clinical event. It also means that updates are not fixing errors or  
incompleteness - they are a new statement of the information. The old data  
are not invalidated for the period that was covered.

So you can think of persistent compositions as Managed Lists (current  
medications, allergies etc)

I wondered how you were interpreting it?

Cheers, Sam

---

<div class="post-metadata">

**Author:** ![Leonardo\_Moretti](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/b38774/32.png) [@Leonardo\_Moretti](https://discourse.openehr.org/u/Leonardo_Moretti)\
**Post date:** [20 March 2009 10:40 UTC](https://discourse.openehr.org/t/definition-of-persistence-for-a-composition/14882/3 "2009-03-20T10:40:52Z")

</div>

Hi Sam,  
thanks for your reply. I try to explain which is my issue.  
Generally in an application form we can have persistent and not persistent  
data. Actually template specifications allow at most one composition in each  
template, but this means that a template contains or all persistent data or  
all not persistent data.  
In order to define template with both persistent and not persistent data, we  
should be able to have template with more than one composition. Has anyone  
solved this problem?

leo

Sam Heard-3 wrote:

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [23 March 2009 20:12 UTC](https://discourse.openehr.org/t/definition-of-persistence-for-a-composition/14882/4 "2009-03-23T20:12:50Z")

</div>

Hi Leo

As the Composition is the transactional unit - the minimum that can be  
committed to the health record - the template schema in use at the moment  
limits the scope to one composition.

We have used application and screen constructs to have more than one  
composition available to the user at one time.

In fact, a commit to the EHR is a contribution and it may be possible to  
work at this level in a template. This would mean you could have multiple  
compositions in one template.

I will defer to more technical people on the implementation issues.

Cheers, Sam

---

<div class="post-metadata">

**Author:** ![thomas.beale](https://discourse.openehr.org/user_avatar/discourse.openehr.org/thomas.beale/32/35_2.png) [@thomas.beale](https://discourse.openehr.org/u/thomas.beale)\
**Post date:** [5 April 2009 09:19 UTC](https://discourse.openehr.org/t/definition-of-persistence-for-a-composition/14882/5 "2009-04-05T09:19:32Z")

</div>

Leonardo Moretti wrote:

---

<div class="post-metadata">

**Author:** ![Heath\_Frankel3](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@Heath\_Frankel3](https://discourse.openehr.org/u/Heath_Frankel3)\
**Post date:** [7 April 2009 23:36 UTC](https://discourse.openehr.org/t/definition-of-persistence-for-a-composition/14882/6 "2009-04-07T23:36:03Z")

</div>

Hi Tom,  
Would this be a template on the EHR\_EXTRACT?

Heath

---

<div class="post-metadata">

**Author:** ![thomas.beale](https://discourse.openehr.org/user_avatar/discourse.openehr.org/thomas.beale/32/35_2.png) [@thomas.beale](https://discourse.openehr.org/u/thomas.beale)\
**Post date:** [8 April 2009 09:37 UTC](https://discourse.openehr.org/t/definition-of-persistence-for-a-composition/14882/7 "2009-04-08T09:37:04Z")

</div>

Heath Frankel wrote:

> Hi Tom,  
> Would this be a template on the EHR\_EXTRACT?
> 
> Heath

I had not been thinking about that, but that would be an example.  
Originally I was thinking of a 'meta-template' that can bind 1 or more  
openEHR templates to different data sources, and can then be used more  
effectively to generate a screen form.

- thomas
