Representation of variation in pregnancy

@SEC - there is maybe a related use case with pregnancy, where we need to describe a due date as a Duration data type expressed in weeks but with a variation of x days eg 34 weeks +/- 7 days.

I’m wondering if there is a need to add an attribute to the Duration and Count data types that allows us to express the variation - Silje’s example of ‘87+1’ or ‘88-3’ or the pregnancy 34 wks +/- 7 days. So we need 3 components to express the pregnancy date and most of the genomics example:

  1. the data value;
  2. a modifier(?) of :heavy_plus_sign: OR :heavy_minus_sign: OR :heavy_plus_sign:/ :heavy_minus_sign:
  3. the variance(?).

In Silje’s example there is also a need to add another qualifier, an :asterisk:

Otherwise we need 3 separate data elements for each time we need to represent this pattern, if we use current modelling practice, which is rather inelegant. In the genomics example we need multiple groupings of 3 which would probably need to be grouped into an internal/standalone CLUSTER and some archetypes will need multiple groups of 3, plus the asterisk indicating another attribute in the genomic represenation. I foresee some modelling chaos happening here if we ‘fudge’ it this way.

In case of durations I think we could get away with adding this, as weeks durations are not part of ISO duration standard but are included because of the needs of healtcare data (openEHR specifications even cite pregnancy as a use case). I would say that extending them to add +/- variance falls into the same category of needed improvements over the ISO duration. I’m up to improve that if it feels clearer.

For the genetic positions, I also think (parsable) text should be better, so maybe even a DV_PARSABLE referencing the formalism?

I am pretty sure W is supported by the base standard - see https://en.wikipedia.org/wiki/ISO_8601#Durations

There is some debate about how to handle negative durations but others have tried so my suggestion for an interval of Duration should work (may not be supported by CDR;s - would need ot check.

Oh, then we have to fix the specs text that say otherwise

Makes good sense, but… Duration, Interval of duration, Quantity (time), Interval of quantity (time), Time, Interval of time data types - none allow a negative time or duration ie min of 0 for all. At least in the tooling…

1 Like

yep, seems like a tooling issue more than a gap in the specification themselves

So which data type would be best suited?

[moved from https://discourse.openehr.org/t/representation-of-genetic-positions, originally the first response to this subtopic]

Pregnancy is different [from the example of genetic positions] since this is actually about imprecision. The accuracy support in quantity might (should) work for that - see https://specifications.openehr.org/releases/UML/latest/#Architecture___18_1_83e026d_1433773264460_352968_7042

It is certainly what it is/was intended for a

You could have
magnitude = “PW34”
accuracy = “+ - 7 days”

or theoretically have an Interval of Duration “-P7D… +P7D” - I think!!? But 'm not sure that is going to be helpful for safe.