Thanks Peter,
The Choice worked as expected in the AE, but there is an issue with the TD.
I was able to set CODED TEXT, COUNT and DATE TIME, and set constraints to
them like this:
ELEMENT[at0005] occurrences matches
{0..1} matches { -- choice
value matches {
DV_CODED_TEXT matches {
defining_code matches {
[local::
at0006, -- 11
at0007, -- 22
at0008] -- 33
}
}
DV_COUNT matches {
magnitude matches {|0..500|}
}
DV_DATE_TIME matches {*}
}
}
The problem is when I export OPTs using that archetype, all the constraints
are gone, for example, I created a template that only allows CODED TEXT,
and the result is this (no codes in the code list of the CODE_PHRASE):
<children xsi:type="C_COMPLEX_OBJECT">
<rm_type_name>DV_CODED_TEXT</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>defining_code</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_CODE_PHRASE">
<rm_type_name>CODE_PHRASE</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 />
<terminology_id>
<value>openehr</value>
</terminology_id>
<code_list>433</code_list>
</children>
</attributes>
</children>
On Wed, Feb 8, 2017 at 9:25 PM, Peter Gummer <[email protected]> wrote:
> Hi Pablo,
>
> The way to produce the ADL that you’ve posted below is with a “Choice”
> element.
>
> 1. Go to the Archetype Editor’s “Definition” tab.
> 2. Click the [+] button on the left.
> 3. From the drop-down list, select “New element” and “Choice”.
> 4. Over on the right of the screen, you will see two buttons, [+] and [-].
> Click the [+] button and select “Text”.
> 5. Repeatedly click the [+] button to add all of the data types that will
> be permitted in this element.
>
> Hope that helps,
> Peter
>
>
> > On 9 Feb 2017, at 10:52, Pablo Pazos <[email protected]> wrote:
> >
> > Hi,
> >
> > I'm testing the EHRServer with alternative datatypes for the same
> ELEMENT.value.
> >
> > I found the only way of doing that in the Archetype Editor is by setting
> the node as Any. And there is no way to further constraint the allowed
> datavalues in the AE.
> >
> > In the Template Designer I can further constraint that by specifying
> which specific types can be used, to avoid the possibility of allowing any
> datavalue to be there. The problem I found is that after setting the
> allowed datavalues, I can't set constraints for them, e.g. if I specify
> Coded Text, I can't set the code list.
> >
> > Shouldn't the datatype constraints be set also on the AE and the
> constraints per allowed datavalue allowed to be set on the AE and TD?
> >
> > I've seen some ADLs/OPTs from Brazil with alternatives, and I don't know
> if they are using another AE/TD or just setting the constraints by hand.
> For example a problem status archetypes has this which I can't reproduce in
> the Ocean's AE:
> >
> > ELEMENT[at0082] occurrences matches {0..*} matches { --
> Unspecified
> > value matches {
> > DV_TEXT matches {*}
> > DV_BOOLEAN matches {
> > value matches {True, False}
> > }
> > DV_COUNT matches {*}
> > }
> > }
> >
> >
> > Thanks!
> >
>
>
> _______________________________________________
> openEHR-technical mailing list
> [email protected]
> http://lists.openehr.org/mailman/listinfo/openehr-
> technical_lists.openehr.org
--
Ing. Pablo Pazos Gutiérrez
Cel:(00598) 99 043 145
Skype: cabolabs
<http://cabolabs.com/>
http://www.cabolabs.com
[email protected]
_______________________________________________
openEHR-technical mailing list
[email protected]
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org