Re: Suitable data type to record frequency of something happening

2017-09-29 Thread Thomas Beale


On 28/09/2017 18:21, Dileep V S wrote:

Hi,

I need to record the frequency of occurrence of an event.Typical 
readings will be like 2/day, 5/week, 1/month etc.In archetype editor I 
could not find a suitable property to use under quantity. The count 
also does not work as it does not have a unit associated. Please 
advise the best approach.


Also what is the difference between Duration and Quantity with time 
property? Both seem to be doing the same.




Duration in openEHR is represented in ISO8601 string format, and is 
usually used for representing 'social time' durations, including with 
more than one unit, e.g, '2 years, 3 months and 20 days',  '39 weeks 4 
days' and so on.


DV_QUANTITY with units of time enables the representation of any time, 
but with only a single unit at a time, e.g. 501.3 ns. There is no unit 
such as 'month' since months are not regular units, just customary 
pseudo-units.


Theoretically there is some overlap, but practically speaking I have 
never seen it cause a problem. Conversion between the two forms if 
needed is easy enough in any programming environment.


- thomas


___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

Re: Suitable data type to record frequency of something happening

2017-09-29 Thread Dileep V S
Dear Heather,

For frequency, use the Frequency property and the {Qualified real/Time}
> Unit. This will display a popup where you choose one unit from the left
> column and one from the right. Select ‘1’ from the left and the unit of
> your choice (eg wk) from the right – this allows you to say a frequency
> like 5/week, where ‘5’ will be the quantity value recorded in the system


I tested this, but feel is is not the most elegant way. The unit part shows
up as 1/d, 1/wk, 1/mo (for /day, /week & /month respectively). While
recording values you have to select a number and one of the units. So if I
have to record 5/week, the composition will have magnitude as '5' and unit
as '1/wk'. The UI will need to do some manipulation/mapping to present an
elegant view to the user (1/wk >/week).

A more elegant method would be a ability to mark units as /d, /wk, /mo etc.

regards



Dileep V S
*Founder*
HealtheLife Ventures LLP
m: +91 9632888113
a: 103, Innovation Centre, IIIT, Electronics City, Bangalore 560100
w: healthelife.in  e: dil...@healthelife.in

On Fri, Sep 29, 2017 at 2:57 AM, Heather Leslie <
heather.les...@oceanhealthsystems.com> wrote:

> Hi Dileep,
>
>
>
> For frequency, use the Frequency property and the {Qualified real/Time}
> Unit. This will display a popup where you choose one unit from the left
> column and one from the right. Select ‘1’ from the left and the unit of
> your choice (eg wk) from the right – this allows you to say a frequency
> like 5/week, where ‘5’ will be the quantity value recorded in the system
>
>
>
> Re Quantity>Time vs Duration – the relevant section of the specs are here:
>
>- QUANTITY: http://www.openehr.org/releases/RM/latest/docs/data_
>types/data_types.html#_dv_quantity_class
>
> 
>– “Can also be used for time durations, where it is more convenient to
>treat these as simply a number of seconds rather than days, months, years.”
>- DURATION: http://www.openehr.org/releases/RM/latest/docs/data_
>types/data_types.html#_dv_duration_class
>
> .
>In practice we model duration mostly – for example to record age of a
>person or duration of an operation.
>
>
>
> I can only recall modelling Time using the Quantity data type in one
> archetype – http://www.openehr.org/ckm/#showArchetype_1013.1.44 - for the
> specifications of how a stimulus has been set up in an audiometer. I’m
> honestly not sure if this is a good use case as it has had no collaborative
> review but it definitely seemed not to fit the proper use of duration as a
> period of time with respect to a notional point in time. I’m interested in
> other’s views as to whether they agree or not.
>
>
>
> And others might have other use cases I’m not aware of.
>
> If someone can document simply and succinctly the difference, with use
> cases, I’d be grateful for the clarification too. It’s not easy.
>
>
>
> Regards
>
>
>
> Heather
>
>
>
> *From:* openEHR-technical [mailto:openehr-technical-
> boun...@lists.openehr.org] *On Behalf Of *Dileep V S
> *Sent:* Friday, 29 September 2017 3:21 AM
> *To:* For openEHR technical discussions  openehr.org>
> *Subject:* Suitable data type to record frequency of something happening
>
>
>
> Hi,
>
> I need to record the frequency of occurrence of an event.Typical readings
> will be like 2/day, 5/week, 1/month etc.In archetype editor I could not
> find a suitable property to use under quantity. The count also does not
> work as it does not have a unit associated. Please advise the best approach.
>
>
>
> Also what is the difference between Duration and Quantity with time
> property? Both seem to be doing the same.
>
>
>
> regards
>
> Duration and
>
> Dileep V S
>
> *Founder*
>
> *HealtheLife Ventures LLP*
>
> m:
>
> +91 9632888113
>
> a:
>
> 103, Innovation Centre, IIIT, Electronics City, Bangalore 560100
>
> w:
>
> healthelife.in  e: dil...@healthelife.in
>
>
>
> ___
> openEHR-technical mailing list
> openEHR-technical@lists.openehr.org
> http://lists.openehr.org/mailman/listinfo/openehr-
> technical_lists.openehr.org
>
___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

Re: Suitable data type to record frequency of something happening

2017-09-29 Thread Dileep V S
Thanks for the replies and clarifications. I will try the frequency
property and see if I can figure it out

regards

Dileep V S
*Founder*
HealtheLife Ventures LLP
m: +91 9632888113
a: 103, Innovation Centre, IIIT, Electronics City, Bangalore 560100
w: healthelife.in  e: dil...@healthelife.in

On Fri, Sep 29, 2017 at 12:13 PM, David Moner  wrote:

> There is no functional difference between those two data types.
>
> In order to avoid this duality, in the new data types for the revised ISO
> 13606 we have defined Duration as a specialization of Physical Quantity,
> with units constrained to units of time. The reasoning behind this decision
> is that a period of time should be always stored using the minimal unit of
> measurement. Then, we can transform it automatically to any desired format
> for visualization purposes.
>
>
>
> 2017-09-28 19:21 GMT+02:00 Dileep V S :
>
>> Hi,
>>
>> I need to record the frequency of occurrence of an event.Typical readings
>> will be like 2/day, 5/week, 1/month etc.In archetype editor I could not
>> find a suitable property to use under quantity. The count also does not
>> work as it does not have a unit associated. Please advise the best approach.
>>
>> Also what is the difference between Duration and Quantity with time
>> property? Both seem to be doing the same.
>>
>> regards
>> Duration and
>> Dileep V S
>> *Founder*
>> HealtheLife Ventures LLP
>> m: +91 9632888113 <+91%2096328%2088113>
>> a: 103, Innovation Centre, IIIT, Electronics City, Bangalore 560100
>> w: healthelife.in  e: dil...@healthelife.in
>>
>> ___
>> openEHR-technical mailing list
>> openEHR-technical@lists.openehr.org
>> http://lists.openehr.org/mailman/listinfo/openehr-technical_
>> lists.openehr.org
>>
>
>
>
> --
> David Moner Cano
>
> Web: http://www.linkedin.com/in/davidmoner
> Twitter: @davidmoner
> Skype: davidmoner
>
> ___
> openEHR-technical mailing list
> openEHR-technical@lists.openehr.org
> http://lists.openehr.org/mailman/listinfo/openehr-
> technical_lists.openehr.org
>
___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org