1 / 15

The ABCD HL7v3 Generator

The ABCD HL7v3 Generator. Hans Jonkers. Philips Research. October 27, 2009. The ABCD HL7v3 Generator. Restrictions: No support for the HL7v3 methodology No support for the messaging part of HL7v3. Maps the MIF and XSD sources of the HL7v3 standard to C# code that

Download Presentation

The ABCD HL7v3 Generator

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The ABCD HL7v3 Generator Hans Jonkers Philips Research October 27, 2009

  2. The ABCD HL7v3 Generator • Restrictions: • No support for the HL7v3 methodology • No support for the messaging part of HL7v3 Maps the MIF and XSD sources of the HL7v3 standard to C# code that • supports the creation, access, modification, storage and retrieval of HL7v3 objects • is strongly-typed: each (data, vocabulary, RIM, etc.) class/type is mapped one-to-one to a type defined in C# • is independent of the way the objects are stored (in-memory, in XML or in a database)

  3. Example Creating an encounter: var patient = Patient.LoadInstanceFromXml( ... ); var practitioner = Practitioner.LoadInstanceFromXml( ... ); var encounter = new Encounter(); var subject = new Subject( patient, encounter ); var performer = new Performer( practitioner, encounter ); encounter.moodCode = ... // Fill in the encounter details ... encounter.SaveInstanceToXml( ... );

  4. Example (Visual Studio)

  5. Development Process In A Nutshell • Use model-driven development • Technology used: MOM (Meta Object Model) + Vampire toolset • Generate a MOM object model + XML reader from the XML schema definition of MIF. • Use model-to-model transformations to map the MOM representations of the MIF artifacts to MOM object models. • Generate C# code from the MOM object models:

  6. Generator Network

  7. VIDE Snapshot of MifModel.mom

  8. VIDE Snapshot of RIM

  9. VIDE Snapshot of Clinical Statement

  10. Current Application of the Generator Small XML repository of patient data (to be extended) Object model hierarchy:

  11. Visual Studio Screenshot

  12. Some Problems Encountered • Understanding the constructs of the MIF language was often a matter of experimental informatics (due to a lack of documentation) • Not succeeded in generating a complete set of consistent MIF files (using the official HL7 V3 Generator) from the set of tool input files • MIF R1 datatype specification too abstract to generate code from → XML schema file of data types was used to generate code from • Vocabulary contains duplicate codes (within same coding system) and uses multiple concept inheritance at a few places • Stacking of static models pushes Visual Studio to its limits; need some way of flattening the models

  13. Some Useful Techniques • Model-to-model transformations make life a lot easier than transformations at the XML level (using XSLT) • The ability to define metametamodels (MetaRim, MetaVoc) allows RIM-flavor to be added to object models • Union types are a very natural way to deal with HL7v3 choice boxes • Partial class mechanism of C# is very useful to keep different aspects of code generation separated

  14. Conclusion • MIF + (light-weight) Model-Driven Development is a good marriage • XML can be kept under the hood • Current generator is still a prototype, but sufficient to build basic RIMBAA apps based on MIF-definitions of HL7v3 static models Possible improvements/extensions: • Generation of more ‘convenience functions’ • Moving structural attributes to the metatypes • Support for extension/restriction at the modeling level • Support for MIF constructs that are not currently used • Generation of validation code • Support for message handling • Turn MOM into a light-weight HL7v3 MDD formalism (as opposed to UML) ???

More Related