270 likes | 367 Views
HL7 version 3. Persistence of in-memory object trees. Scope: database models, v3 modeling aspects and their impact on persistence, persisting concepts, extracting data. Slide contents published under the Creative Commons / Attribute-Share Alike license
E N D
HL7 version 3 Persistence of in-memory object trees Scope: database models, v3 modeling aspects and their impact on persistence, persisting concepts, extracting data. Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/HL7v3_implementation.zip
Agenda • Database Models • ER, EAV, XML, Hybrid, Distributed • Persisting RIM object graphs • Update/snapshot mode • Obsolescing v3 documents/messages • Context conduction • Persistence of OIDs and IDs • Persisting concepts • Extracting/querying data
RIMBAA Technology Matrix Persistent Representation Object Representation Serialized Representation RIM (generic) Model RIM Constrained Information Model Application specific Model
Persistence Database Models Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/implementation_mechanics.ppt
Database Models • EAV (“RDF Triples”) • Pure EAV considered to be too slow • XML • Example implementation • RDBMS (ER) • Focus of the presentation
Persistence Persisting RIM object graphs Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/implementation_mechanics.ppt
Storage and RetrievalTraditional APIs Use traditional data access API: JDBC, ODBC, ADO Create your own mapping between business objects and a relational database model.
Storage and RetrievalUsing Coding Techniques Object/Relational Mapping Wrap database objects (tables, columns, fields…) in OO classes Hibernate (Java), nHibernate (.NET), HyperJAXB, Jakarta OJB, JPOX Many others available Search on Sourceforge for “object relational mapping” yields several pages (Java and .NET)
Snapshot mode (of object trees) • Object trees are snapshots (of data). An initial laboratory results message (labeled TE1) may be updated by a final laboratory results message (labeled TE2) • Undo any merging that it did upon receipt of TE1 This requires that one persists the fact that certain objects are associated with TE1. It also requires that one has a temporal database to revert to a prior version of objects/attributes. • Merge the contents of TE2 with whatever objects the receiver already was aware about.
Persistence Context Conduction Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/implementation_mechanics.ppt
Abstract “context conduction” Original slide provided by Ewout Kramer.
Conducting and Blocking (new style) • Conducting relationships: • Participations: • all but _ParticipationAncillary • ActRelationships: • all but COMP, OUTC, SEQL Original slide provided by Ewout Kramer.
Context Conduction (new style) • There are two attributes on ActRelationship: actRelationshipNonConducting : SET<CS>, participationNonConducting : SET<CS> • Only certain Participations/ActRels conduct. We will add a concept property to indicate this. • For types that conduct, they always conduct and are always additive • Conduction still works by following the serialization of models Original slide ptovided by Ewout Kramer.
Context Conduction • Two options for dealing with CC: • Denormalize the conduction on import • Generally viewed as the safer option • CC is a “wire-format optimization technique” • Deal with CC at run-time, i.e. when a query is processed • Lots of joins to go “up the tree” and fetch context • Problem when merging object trees into nets; CC is specific to a serialization
Persistence Persisting Concepts Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/implementation_mechanics.ppt
Persisting Concepts • Persist all information received • Translations • We may not be able to recreate those • Translation may be “more granular” than primary concept code • Value set OIDs • may need to be aware which ones are implied -by context- when one receives a v3 instance
Persist versions of Value Sets • Over time, updates to the coding system (or value set) must be identified and distributed. New Coding System New OID New Coding System New OID New Coding System New OID
Persistence Implementation Experience Slide contents published under the Creative Commons / Attribute-Share Alike license Source: www.ringholm.de/download/implementation_mechanics.ppt
Use-case 1: Approach • Serialized messages mapped to in-memory message objects (JAXB, code generation) • Application (business-) objects mapped to relational database (Hibernate ORM) • Custom code: mapping of message objects to application objects
Use-case 1: Hibernate • Lazy object loading • Hibernate QL for object based queries
IBM RIMon: RIMified XML Note: Format was created prior to the creation of the RIM ITS
Any Questions ? • Or: post your question/suggestions via • HL7 Wiki: http://bit.ly/d7tSsL • E-mail v3impl@ringholm.com