# How to correctly specify the time window within which the fluid balance applies

**URL:** https://discourse.openehr.org/t/how-to-correctly-specify-the-time-window-within-which-the-fluid-balance-applies/5451
**Category:** Ask IEB
**Tags:** archetype
**Created:** [10 July 2024 16:44 UTC](https://discourse.openehr.org/t/how-to-correctly-specify-the-time-window-within-which-the-fluid-balance-applies/5451 "2024-07-10T16:44:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Lucas](https://discourse.openehr.org/user_avatar/discourse.openehr.org/lucas/32/3185_2.png) [@Lucas](https://discourse.openehr.org/u/Lucas)
#### Post date: [10 July 2024 16:44 UTC](https://discourse.openehr.org/t/how-to-correctly-specify-the-time-window-within-which-the-fluid-balance-applies/5451/1 "2024-07-10T16:44:21Z")

</div>

**Unimportant Context but interesting:**  
For the use case assessing a patient’s fluid balance, I decided to use the archetype OBSERVATION.fluid\_balance.v1 - no surprise so far ;-). But the surprise came step-by-step. In the clinical knowledge manager the archetype is depicted as follow

 ![image](https://discourse.openehr.org/uploads/default/original/2X/b/baea6879dfa30e243d53f3d8ab8d0e4f3970d172.png)

But if I go to the archetype designer to check the archetype fluid balance, then it looks very different, namely

![image](https://discourse.openehr.org/uploads/default/original/2X/8/816390080cfdeb6339ce99c1ee189bf93f9b0bcd.png)

And if I add this archetype to a composition, it looks different again, namely

 ![image](https://discourse.openehr.org/uploads/default/original/2X/b/b46bc76b76dd249721fcc1c5a2ee8e5424e83e97.png)

**Important Context:**  
But my biggest surprise came, when I wanted to test the “Any interval event” by uploading the template in the Form Builder by Better. The template simply consists of the COMPOSITION.report-result.v1 which includes the archetype OBSERVATION.fluid\_balance.v1. But when testing it, I had no option to define an arbitrary time interval for the attribute “Any interval event”.

**My question:**

- Is there a way to define an arbitrary time interval, such as from DD.MM.YYYY:HH:MM until DD.MM.YYYY:HH:MM, only by relying on the archetype OBSERVATION.fluid\_balance.v1?
- If not, is there a way to include the attributes “from” and “until” as DD.MM.YYYY:HH:MM without resorting on specialization of this archetype or bloating it with the Timing archetypes?

---

<div class="post-metadata">

### Author: ![Lucas](https://discourse.openehr.org/user_avatar/discourse.openehr.org/lucas/32/3185_2.png) [@Lucas](https://discourse.openehr.org/u/Lucas)
#### Post date: [10 July 2024 18:41 UTC](https://discourse.openehr.org/t/how-to-correctly-specify-the-time-window-within-which-the-fluid-balance-applies/5451/2 "2024-07-10T18:41:48Z")

</div>

I tinkered with the template and realized, that there are attributes inherited by the reference model to actually instantiate an arbitrary time window using the following attributes:

 ![image](https://discourse.openehr.org/uploads/default/original/2X/e/e546bb8e888dbbcd93567aa5062d2f9ecbe2ff3a.jpeg)

Unfortunately, I was unable to expose this possibility in the Form Builder provided as Sandbox by Better - thank you Better for your support. But fortunately, I now know, that this can be instantiated by other means.

And I also figured out what format is expected for the attribute offset, namely (copied and pasted from [ISO 8601 duration format](https://www.digi.com/resources/documentation/digidocs/90001488-13/reference/r_iso_8601_duration_format.htm))

> P(n)Y(n)M(n)DT(n)H(n)M(n)S

Where:

- **P** is the duration designator (referred to as “period”), and is always placed at the beginning of the duration.
- **Y** is the year designator that follows the value for the number of years.
- **M** is the month designator that follows the value for the number of months.
- **W** is the week designator that follows the value for the number of weeks.
- **D** is the day designator that follows the value for the number of days.
- **T** is the time designator that precedes the time components.
- **H** is the hour designator that follows the value for the number of hours.
- **M** is the minute designator that follows the value for the number of minutes.
- **S** is the second designator that follows the value for the number of seconds.

For example:

> P3Y6M4DT12H30M5S

Represents a duration of three years, six months, four days, twelve hours, thirty minutes, and five seconds.
