Skip to content

Equals, constructors, BMM -> JSON schema, configurable json mapping

Compare
Choose a tag to compare
@pieterbos pieterbos released this 01 Oct 14:56
· 1111 commits to master since this release
e5d754c

Thanks to the joint efforts EHRBase and Nedap teams, we are proud to present Archie version 0.8.0. Included are:

Configurable JSON mapping.

You can:

  • configure the type property (to be the standards based '_type' instead of '@type' for example).
  • whether or not to include extra fields such as 'path', that potentially make javascript development easier, but the data bigger

Some more options are possible

Constructors in the RM

The reference model objects now have two sets of constructors:

  • constructors with a minimal set of parameters
  • the exact same constructors as the reference implementation
    This means the Archie RM is now even closer to being a drop-in replacement of the older OpenEHR reference implementation

Equals+hashcode methods in the RM

The reference model objects now all have equals and hashcode methods, that check for equality of the entire object tree.

Improved JSON Example generation

The JSON example generation has been improved so the resulting instances are valid in more cases

BMM to JSON Schema generator added

The JsonSchemaCreator converts a BMM schema to a json schema. This improved upon the standard specifications-ITS-JSON by checking all of the model, where the standard json schema stops as soon as inheritance is encountered.

The README.md has not yet been fully updated. It will be soon.

Small bugfix for slot-closing in the flattener

When in a specialised archetype a slot is closed, then after that the slot is filled with two archetype roots, the ordering of the C_OBJECTS in the resulting flat archetype was incorrect.
Note that you should not do this in this order (fill first, then close after), but it's not explicitly invalid. So don't do it, but Archie now correctly handles it in case someone does.