# Question about occurrences and cardinality values in the Blood Pressure archetype

**URL:** https://discourse.openehr.org/t/question-about-occurrences-and-cardinality-values-in-the-blood-pressure-archetype/15081
**Category:** Clinical (archive)
**Created:** [2 August 2011 10:46 UTC](https://discourse.openehr.org/t/question-about-occurrences-and-cardinality-values-in-the-blood-pressure-archetype/15081 "2011-08-02T10:46:30Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Seref](https://discourse.openehr.org/user_avatar/discourse.openehr.org/seref/32/13_2.png) [@Seref](https://discourse.openehr.org/u/Seref)
#### Post date: [2 August 2011 10:46 UTC](https://discourse.openehr.org/t/question-about-occurrences-and-cardinality-values-in-the-blood-pressure-archetype/15081/1 "2011-08-02T10:46:30Z")

</div>

Greetings,  
Am I suffering from acute caffeine deficiency syndrome (just made it  
up) or is there a problem with the occurrences of event and  
interval\_events in the blood pressure archetype?  
In the published blood pressure archetype in the CKM, HISTORY[at0001]  
has events with cardinality {1..\*; unordered}  
However "EVENT[at0006] occurrences matches {0..\*}" and  
"INTERVAL\_EVENT[at1042] occurrences matches {0..1}" under the history  
allow zero instances of both of these elements.  
So the cardinality sets 1 as the minimum member count for the  
container attribute, but occurrences attributes of objects introduce  
0, which is beyond allowed boundaries. In plain English: cardinality  
says there has to be at least one, but objects say, there can be zero  
or more. When both objects have zero instances, the cardinality  
constraint is violated.

Comments?

---

<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: [2 August 2011 11:31 UTC](https://discourse.openehr.org/t/question-about-occurrences-and-cardinality-values-in-the-blood-pressure-archetype/15081/2 "2011-08-02T11:31:01Z")

</div>

Hi Seref,

I am suffering from the same + the heat from possibly the first summer  
day in Germany this year, but I think this is perfectly correct.  
As far as i understand, it just means you have to choose at least one  
at0006 EVENT or one at1042 INTERVAL\_EVENT.  
Then you can add as many further at0006 events as required.

So, you are right, they cannot both have zero instances, but you can  
choose, and a cardinality of \>=1 and member elements with occurrence \>=  
0 is the way to express this choice I believe.

Sebastian

---

<div class="post-metadata">

### Author: ![Seref](https://discourse.openehr.org/user_avatar/discourse.openehr.org/seref/32/13_2.png) [@Seref](https://discourse.openehr.org/u/Seref)
#### Post date: [2 August 2011 11:46 UTC](https://discourse.openehr.org/t/question-about-occurrences-and-cardinality-values-in-the-blood-pressure-archetype/15081/3 "2011-08-02T11:46:59Z")

</div>

Hi Sebastian,  
If I follow the descriptions from the specification, I don't think I  
can see anything in there that says you have to choose at least one in  
this case.  
Actually page 56 of the adl 1.4 specification (  
[http://www.openehr.org/releases/1.0.1/architecture/am/adl.pdf](http://www.openehr.org/releases/1.0.1/architecture/am/adl.pdf) )  
specifically says the following:

VCOC: cardinality/occurrences validity: the interval represented by:  
(the sum of all  
occurrences minimum values) .. (the sum of all occurrences maximum values) must  
be inside the interval of the cardinality

If I were to write a validator based on this, it would invalidate the  
blood pressure archetype based on the criteria above taken from the  
spec.

What you're saying makes sense, but I can't see it in the specification.

---

<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: [2 August 2011 12:00 UTC](https://discourse.openehr.org/t/question-about-occurrences-and-cardinality-values-in-the-blood-pressure-archetype/15081/4 "2011-08-02T12:00:52Z")

</div>

Hi Seref,

This means - you have to have at least one event, but it could be either  
EVENT or INTERVAL\_EVENT.

Does that make sense.

Cheers, Sam

---

<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: [2 August 2011 12:13 UTC](https://discourse.openehr.org/t/question-about-occurrences-and-cardinality-values-in-the-blood-pressure-archetype/15081/5 "2011-08-02T12:13:21Z")

</div>

Hi Seref,

interesting, I think Thomas changed this rule for ADL 1.5 to:  
VACMC - cardinality/occurrences validity: where occurrences and cardinality are stated, the interval represented by: (sum of all occurrences minimum values) .. (sum of all occurrences maximum values) must intersect with the interval stated by the cardinality.

Thomas and I had a discussion about some edge cases here a while ago, where you could make this rule a little more strict potentially, but in any case it seems to be a necessary condition for a correct archetype.

My take is that VCOC prevents functionality that is needed and is simply too strict and was therefore modified to VACMC in ADL1.5 - Thomas?

Sebastian

> **(attachments)**
>
> ![oceanlogo.png](https://discourse.openehr.org/images/transparent.png)

---

<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: [2 August 2011 14:27 UTC](https://discourse.openehr.org/t/question-about-occurrences-and-cardinality-values-in-the-blood-pressure-archetype/15081/6 "2011-08-02T14:27:53Z")

</div>

Yes. We should allow the two 0..x constraints. The cardinality constraint says you must have at least 1 thing in the list, and the two other constraints each say - separately - that the EVENT and INTERVAL\_EVENT matching objects can single have 0 instances. Taken together, it is all compatible. The reworded rule above, quoted by Sebastian, says that it has to be at least _possible_ to meet the constraints.

- t

---

<div class="post-metadata">

### Author: ![Seref](https://discourse.openehr.org/user_avatar/discourse.openehr.org/seref/32/13_2.png) [@Seref](https://discourse.openehr.org/u/Seref)
#### Post date: [2 August 2011 17:09 UTC](https://discourse.openehr.org/t/question-about-occurrences-and-cardinality-values-in-the-blood-pressure-archetype/15081/7 "2011-08-02T17:09:07Z")

</div>

Thanks Tom,  
The reworded rule is what I was asking for actually: something in the  
spec that sets the rule for this particular combination of values.

Cheers  
Seref
