Conflict between PARTY_RELATIONSHIP.type() requirements and item-path specification

Description

The [Type_validity: type = name] invariant of PARTY_RELATIONSHIP cannot be satisfied in the context of a ROLE without breaking the item-path specification, where it is stated the name must be unique among siblings (see http://www.openehr.org/releases/1.0.2/architecture/overview.pdf , Chapter 11 - Paths and locators).

Example:
===================================
ROLE = <
name/value = 'HC consumer'
identities = ....
relationships = (Set<PARTY_RELATIONSHIP>) <
[at0002] = <
name/value = 'Insurance'
details = ....
time_validity = 1/jan/1992 - 20/jan/2011
>
[at0003] = <
name/value = 'Patient'
details = ....
time_validity = 1/jan/1992 - 20/jan/1992
>
[at0003] = <
name/value = 'Patient'
details = ....
time_validity = 1/dec/2002 - 20/dec/2002
>
...
>
===================================

The [type() = name] is not only a PARTY_RELATIONSHIP issue, but applies to other classes from demographic package. In a way it was also reported by Sergio Freire on the mailinglist: http://lists.chime.ucl.ac.uk/mailman/private/openehr-technical/2010-August/005308.html

Environment

None

Activity

Show:
Peter Gummer
January 9, 2012, 6:17 AM

I've just run into the same problem. In a system that I'm working on, I've set the type to the same value for two sibling relationships, but the openEHR framework that I'm using is silently "correcting" the second relationship type for me by renaming it to "Relationship_1". Nasty!

Thanks for confirming for me, Sebastian, that it's a bug in the specs, not in the framework that I'm using.

I will have to work around this by defining a 'type' element on my PARTY_RELATIONSHIP archetype. That's not nice because, according to the specs, 'type' is supposed to be a function; but given that the specified 'type' function cannot be implemented, this is probably the closest thing to the specs that can be done.

Heath Frankel
May 11, 2015, 10:37 PM

I believe the unique name rule should be relaxed.

Done

Reporter

Sebastian Iancu

Labels

None

Components

Affects versions

Priority

Minor
Configure