Hi!

On Mon, Dec 5, 2011 at 00:10, Heath Frankel <
heath.frankel at oceaninformatics.com> wrote:

> I think previously I had indicated I had no problem with the stringified
> interval approach in XML, but I am reverting my thinking on this and feel
> that it would be counter intuitive for those who what to use the XML
> schemas for code generation purposes.  I think in this case the computable
> requirement outweighs the human readable requirement.
>

You are probably right regarding XML, and maybe this is valid also for most
JSON use-cases where the desire for an as simple as possible
object-serialization-mapping outweighs human readability.

I think the openEHR community is best served by having different archetype
serialization format categories with different priorities for different
purposes. E.g.:

1a. An XML format optimized for mapping to XML-schema generated code.
1b. A JSON format optimized for mapping to AOM object models handcrafted or
generated from AOM-specifications.

2. A cADL-variant wrapped in YAML optimized for human readability. It could
be used for archetype files stored in version control systems (making
version diffs readable) and as textual format when you need textual
examples in documentation, teaching etc.

In 1a & 1b easy implementation should be prioritized over readability but
in #2 human readability should be prioritized. Prioritizing both in the
same format would likely fail. Things like default ordering of nodes and
attributes could be recommended but optional for #1 but should be mandatory
for #2 (otherwise readability suffers and diffs get messed up).

I think we can come up with a much more concise representation of these
> intervals without compromising the computable requirement, something
> similar to XML schema maxOccurs/minOccurs.
>

Probably, but for #1 maybe being close to the AOM should be prioritized
over being concise. After all, archetypes will not be sent over the wire at
the same scale as patient data (RM instances).

By the way, is the AOM open for changes (like renaming attributes) if that
would increase clarity?

If we would change subject and discuss RM instance serialization, then
binary formats (like Protobuf and Thrift) could form a third category where
message size and speed of conversion would be prioritized over ease of
implementation or readability. XML and JSON would likely be good to have
also for interoperability and debugging purposes. YAML for the RM would not
be an obvious "over the wire"-format, but can be very useful for compact
human readable long term EHR archiving storage as plain text files and for
documentation examples.

Best regards,
Erik Sundvall
erik.sundvall at liu.se http://www.imt.liu.se/~erisu/  Tel: +46-13-286733


> please everyone remember that the dADL, JSON and XML generated from AWB
> all currently use the stringified expression of cardinality / occurrences /
> existence. Now, these are usually the most numerous constraints in an
> archetype and if expressed in the orthodox way, take up 6 lines of text,
> hence the giant files (e.g. AOM 1.4 based XML we currently use) - and thus
> the much reduced files you see on Erik's page, because we are using ADL 1.5
> flavoured serialisations not the ADL 1.4 one.
>
> Now, I think we should probably go with the stringified form in all of
> these formalisms. The cost of doing this is a small micro-parser, but it is
> the same microparser for everyone, which seems attractive to me.
>
> The alternative that Erik mentioned was more native, but still efficient
> interval expressions, e.g. dADL has it built in (0..* is |>=0| in dADL),
> and YAML and JSON could probably be persuaded to make some sort of array of
> integer-like things be used. XML still doesn't have any such support. In
> theory this approach would be the best if each syntax supported it
> properly, but XML doesn't at all, and the others don't support Intervals
> with unbounded upper limit (i.e. the '*' in '0..*'). *
> *
> But Erik's exercise certainly proved that efficient representation of the
> humble Interval <Integer> is actually worthwhile. (Once again thanks for
> that page, its quite a good way to get a good feel for these syntaxes very
> quickly).*
> *
> - thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.openehr.org/mailman/private/openehr-technical_lists.openehr.org/attachments/20111205/e7161629/attachment.html>

Reply via email to