rm_type_name for the DV_DURATIONs primitive object in XML

Boštjan Lah Bostjan.Lah at marand.si
Tue Mar 15 12:32:56 EDT 2016


Sebastian/Diego,

You're absolutely right - sorry I have been too quick in my reply.

I think what template designer 2.8 (2.6 does the same BTW) does is correct this is the same as we always had.

However there is still a bug in CKM opt generation - but for INTERVAL<DV_DURATION> what it does there is at the wrong level.

I don't have the new AE which supports INTERVAL<DV_DURATION> so I tried this with INTERVAL<DV_DATE_TIME> and I get this:
                  <children xsi:type="C_COMPLEX_OBJECT">
                    <rm_type_name>DV_INTERVAL<DV_DATE_TIME></rm_type_name>
                    <occurrences>
                      <lower_included>true</lower_included>
                      <upper_included>true</upper_included>
                      <lower_unbounded>false</lower_unbounded>
                      <upper_unbounded>false</upper_unbounded>
                      <lower>1</lower>
                      <upper>1</upper>
                    </occurrences>
                    <node_id />
                    <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                      <rm_attribute_name>upper</rm_attribute_name>
                      <existence>
                        <lower_included>true</lower_included>
                        <upper_included>true</upper_included>
                        <lower_unbounded>false</lower_unbounded>
                        <upper_unbounded>false</upper_unbounded>
                        <lower>0</lower>
                        <upper>1</upper>
                      </existence>
                      <children xsi:type="C_COMPLEX_OBJECT">
                        <rm_type_name>DV_DATE_TIME</rm_type_name>
                        <occurrences>

so INTERVAL.upper is of type DV_DATE_TIME, which is the correct type.

However for INTERVAL<DV_DURATION> I get the following:
                                  <children xsi:type="C_COMPLEX_OBJECT">
                                    <rm_type_name>DV_INTERVAL<DV_DURATION></rm_type_name>
                                    <occurrences>
                                      <lower_included>true</lower_included>
                                      <upper_included>true</upper_included>
                                      <lower_unbounded>false</lower_unbounded>
                                      <upper_unbounded>false</upper_unbounded>
                                      <lower>1</lower>
                                      <upper>1</upper>
                                    </occurrences>
                                    <node_id/>
                                    <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                                      <rm_attribute_name>upper</rm_attribute_name>
                                      <existence>
                                        <lower_included>true</lower_included>
                                        <upper_included>true</upper_included>
                                        <lower_unbounded>false</lower_unbounded>
                                        <upper_unbounded>false</upper_unbounded>
                                        <lower>1</lower>
                                        <upper>1</upper>
                                      </existence>
                                      <children xsi:type="C_PRIMITIVE_OBJECT">
                                        <rm_type_name>DURATION</rm_type_name>

So here the INTERVAL.upper type is DURATION, which is clearly wrong - it should really be DV_DURATION.

Best regards,
Bostjan





On 15 Mar 2016, at 17:01, Diego Boscá <yampeku at gmail.com<mailto:yampeku at gmail.com>> wrote:

To make things worse, in the XML Schema DV_DURATION contains an
Iso8601Duration, which in the end is an string with a regex

2016-03-15 16:43 GMT+01:00 Sebastian Garde
<sebastian.garde at oceaninformatics.com<mailto:sebastian.garde at oceaninformatics.com>>:
OK, that would have been my pick as well.

Only that:
- The Java Ref Impl exports it as DV_DURATION (It seems we all agree that this is wrong)
- Template Designer (2.8) exports this as "DURATION" (in the generated OPT).
- The online Template Editor seems to export it either as C_DURATION or DURATION in the 1.4 OPT export (depending on what is constrained?!)

So it seems that C_DURATION is another candidate.

I could however not get any of the tools to just use "String"...

Sebastian


-----Original Message-----
From: openEHR-technical [mailto:openehr-technical-bounces at lists.openehr.org] On Behalf Of Diego Boscá
Sent: Dienstag, 15. März 2016 14:04
To: For openEHR technical discussions <openehr-technical at lists.openehr.org<mailto:openehr-technical at lists.openehr.org>>
Subject: Re: rm_type_name for the DV_DURATIONs primitive object in XML

Agree with bostjan, In fact DV_DURATION type is being assigned to both the C_Complex_object and the C_Primitive_object rm_type_name, which is surely wrong.

2016-03-15 13:42 GMT+01:00 Boštjan Lah <Bostjan.Lah at marand.si<mailto:Bostjan.Lah at marand.si>>:
Hi,

according to the specs it's String:
http://www.openehr.org/releases/RM/latest/docs/data_types/data_types.h
tml#_dv_duration_class
That's what template designer does.

Best regards,
Bostjan

On 15 Mar 2016, at 13:35, Sebastian Garde
<sebastian.garde at oceaninformatics.com> wrote:

Dear all,

There are a differences in how the Template Designer and how CKM
construct the XML for a DV_Duration:

Take this snippet (from
http://openehr.org/ckm/#showArchetype_1013.1.123_XML
)

<children xsi:type="C_COMPLEX_OBJECT">
                   <rm_type_name>DV_DURATION</rm_type_name>
                   <occurrences>
                     <lower_included>true</lower_included>
                     <upper_included>true</upper_included>
                     <lower_unbounded>false</lower_unbounded>
                     <upper_unbounded>false</upper_unbounded>
                    <lower>1</lower>
                     <upper>1</upper>
                   </occurrences>
                   <node_id />
                   <attributes xsi:type="C_SINGLE_ATTRIBUTE">
                     <rm_attribute_name>value</rm_attribute_name>
                     <existence>
                       <lower_included>true</lower_included>
                       <upper_included>true</upper_included>
                       <lower_unbounded>false</lower_unbounded>
                       <upper_unbounded>false</upper_unbounded>
                       <lower>1</lower>
                       <upper>1</upper>
                     </existence>
                     <children xsi:type="C_PRIMITIVE_OBJECT">
                       <rm_type_name>DV_DURATION</rm_type_name>
                       <occurrences>
                         <lower_included>true</lower_included>
                         <upper_included>true</upper_included>
                         <lower_unbounded>false</lower_unbounded>
                         <upper_unbounded>false</upper_unbounded>
                         <lower>1</lower>
                         <upper>1</upper>
                       </occurrences>
                       <node_id />
                       <item xsi:type="C_DURATION">
                         <pattern>PMWD</pattern>
                         <range>
                           <lower_unbounded>true</lower_unbounded>
                           <upper_unbounded>true</upper_unbounded>
                         </range>
                       </item>
                     </children>
                   </attributes>
                 </children>

What is the correct rm_type_name for C_PRIMITIVE_OBJECT here (in old
red above)?

Is it “DV_DURATION” as the Java Ref Impl uses or is it simply “DURATION”
(both for reason I don’t really understand) or should it maybe be
“String” or “ISO8901_DURATION” as
http://openehr.org/releases/trunk/UML/#Architecture___18_1_83e026d_143
3773264460_352968_7042
and/or
http://openehr.org/releases/trunk/UML/#Architecture___18_1_83e026d_142
2968609347_115062_25681
describe.

Frankly I am confused, but I hope that someone can enlighten me here?

Cheers
Sebastian


_______________________________________________
openEHR-technical mailing list
openEHR-technical at lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.open
ehr.org



_______________________________________________
openEHR-technical mailing list
openEHR-technical at lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.open
ehr.org

_______________________________________________
openEHR-technical mailing list
openEHR-technical at lists.openehr.org<mailto:openEHR-technical at lists.openehr.org>
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
_______________________________________________
openEHR-technical mailing list
openEHR-technical at lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

_______________________________________________
openEHR-technical mailing list
openEHR-technical at lists.openehr.org<mailto:openEHR-technical at lists.openehr.org>
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20160315/72cbf9df/attachment-0002.html>


More information about the openEHR-technical mailing list