Skip to Navigation | Skip to Content

openEHR-Technical mailing list archives

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: Archetypes and XML-Schemas


Hi Leonardo

We are just about to produce a new XML schema for archetypes based on 
the new ADL 1.5 and getting rid of a lot of clutter for XML which was 
not required.

For example one change I have been promoting is the recording of 
existence. At present in the AOM it is an interval of 0..1 which can be 
constrained to 0..0 and 1..1. It is worth considering this carefully as 
an example of how we could simplify the expression in XML just as 
Thomas does in ADL.

First, the rule is that the reference model sets the minimum 
constraint. This must be either 0..1 (optional) or 1..1 (mandatory) ie 
attributes in the reference model can be optional or mandatory (no 
other choices). If the attribute is mandatory then there is no logical 
existence constraint that can be applied. So the constraint statements 
in the AOM that are possible for optional attributes are:

1) 0..0 (prohibited) and
2) 1..1 (required).

This is a binary constraint. For this reason we are proposing that 
existence is represented as an optional attribute with 2 values 
'required' and 'prohibited'. This is easy to read and can be 
transformed into the in memory interval easily during de-serialisation. 
It also means that existence will usually not appear in an actual 
archetype as it is rarely used.

It would be good to have other ideas on simplification of the XML 
schema as we move to the new 2.1 AOM.

Cheers, Sam
 

> -----Original Message-----
> From: openehr-technical-bounces@chime.ucl.ac.uk [mailto:openehr-
> technical-bounces@chime.ucl.ac.uk] On Behalf Of Moretti Leonardo
> Sent: Wednesday, 12 May 2010 2:49 AM
> To: openehr-technical@openehr.org
> Subject: Archetypes and XML-Schemas
> 
> XMLSerializer.output() (xml-serializer-1.0.1.jar) produce XMLs that 
> are
> not compliant with openEHR XML-Schemas
> (http://www.openehr.org/releases/1.0.2/its/XML-schema/index.html).
> Also the xml representation taken from http://openehr.org/knowledge/
> are
> not valid XML instances respect to these schemas (for example
> <http://jira.noemalife.loc:8080/secure/attachment/15267/openEHR-EHR-
> OBSERVATION.body_weight.v1.adl>
> openEHR-EHR-OBSERVATION.body_weight.v1
> <http://jira.noemalife.loc:8080/secure/attachment/15267/openEHR-EHR-
> OBSERVATION.body_weight.v1.adl>).
> 
> The main problem is that the order of the elements is not equals to
> that
> one specified in <xs:sequence> blocks of XSDs.
> 
> What is "wrong", the implementation or the schemas? The order of the
> elements in xml representation of an archetype must be fixed?
> 
> Thanks
> leo
> 
> --
> 
> Ing. Leonardo Moretti
> Senior Analyst
> 
> *NoemaLife S.p.A
> *Via Gobetti, 52
> 40129 Bologna – ITALY
> T +39 051 4193911
> F +39 051 4193900
> lmoretti@noemalife.com <mailto:lmoretti@noemalife.com>
> 
> www.noemalife.com <http://www.noemalife.com/>
> 
> _______________________________________________
> openEHR-technical mailing list
> openEHR-technical@openehr.org
> http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical


_______________________________________________
openEHR-technical mailing list
openEHR-technical@openehr.org
http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical