ImplementingArchetypeBasedSystems
BackgroundUsing templatesQueriesArchetypesStoring openEHR instances2
Using templatesThere are 2 differentdefinitionsforwhat a templateis:OceantemplatesZilicstemplatesCurrentlythere are a lot of open sourceprojectsregardingopenEHRTemplates can notyetbecreatedwith open sourcetools3
Using templatesFor open source (non profit) projects, the only alternative is to edit XML ‘by hand’both ocean and zilics templates schemas are publicOpen EHR-Gen isworkingonthatOther commercial approaches usually transform the archetypes to their own model to simulate templates4
Using templatesExport the schema from a template is not viablefor medium sized template 1,5mb (for comparison, HL7 CDA schema is only around 700kb)Currently templates mix clinical with GUITemplates specifications are currently changingNot yet defined, but in the future they will be (specialized) archetypes5
QueriesAlso ADL queriessyntaxisnotdefinedyet (AQL, A-Path…). Neither AQL and A-Path can yetbeconsideredstandardAQL is a prototypeinside of OceantemplatedesignerA-Pathis a proposalfromZilicsAQL has more ‘buzz’6
ArchetypesNot a single archetype repositoryCKM (primary source)NEHTA (Australia)SKL (Sweden)Same archetype in different repositories?Missing archetypes?Governance?Repository for multiple models?7
Storing openEHR data instancesopenEHRdoesnotsayanythingabouthow data shouldbestoredObjects?XML?Relationaldatasources (SQL)?Tokyo/Kyotocabinet?RDF triplets?Most of open sourceprojects use XML data sourcesopenEHR XML schemas are public8
Our philosophyArchetypes (separating knowledge from systems) is a very powerful methodology.Putting the clinical knowledge on the focusArchetype based systems are the future…9…but we can not throw our current systems data!
Looking at the play field…For archetype definition:Multiple models availableMultiple available repositories (and not all openEHR)Most standards can take benefit from using archetypes10
Looking at the play field…For legacy data integration:Not use templates, use archetypes (specialized o not)When importing legacy data, you want to use all current dataCurrent data in relational formGenerate unified XML views from distributed data sourcesOutput is XML (archetype data instances)If both input and output are XMLUse Xquery (and XPath)11
IBIMELeaded by PhD. Prof. Montserrat RoblesTen years of experience  in the field of Biomedical Informatics≈ 20 membersFunded by Regional, National and European R&D projects and technology transferhttp://www.ibime.upv.es12
IBIME Group (UPV)LinkEHR Archetype EditorArchetype editionReference model independenceOpen SourceLinkEHR Integration Archetype EditorLegacy datasource mappingXQuery scripts automatic generationEHRFlex (EHR Viewer)13
LinkEHR Archetype EditorAny model can be importedTested models: openEHR, ISO 13606, HL7 CDA, ASTM CCR and CDISC ODM. Therefore, it is possible to define archetypes based on these models.Archetype creation driven by the reference modelIncludes a syntactic and semantic validator.Connection with CKMIn the works: sample instance generator, CDA and openEHR specific editors…14
LinkEHR Integration Archetype EditorTo generate XML documents conforming to the reference model is necessary to define how archetypes sources of data are related: mappings or correspondences.The user must specify how to calculate from one or several values of the data source the value of an attribute of the archetype. The data sources can be relational,XML or archetypes (working on it :)15
EHR Viewer (EHRflex)EHRflex is an archetype-based EMR system.Independent of the reference model.Uses web technologies (Google Web Toolkit).Automatic generation of archetype-based interfaces for view and edit clinical data.Open source project.
EHR Viewer (EHRflex)
EHR Viewer (EHRflex)Open source project: http://ehrflex.sourceforge.net/
Real ExperiencesHospital General Universitario de ValenciaPangea-LE implementation for over 5 yearsIntegration of distributed data sources (more than 25 databases).Virtual Federated EHR viewer.Full migration to EN13606 EHR Extracts in development.
Real experiences
EHR petitionLinkEHR-EdPangea-LEMapXMLArchetypeStandardizationIntegrationLegacydata sourcesProprietaryXMLStandardizedXMLOther usesEHRcommunicationEHRviewerSistema LinkEHR21Real Experiences
Real ExperiencesHospital de Fuenlabrada (Madrid)Use of openEHR and EN13606 archetypes for pressure ulcer nursing control.The archetype creation methodology was evaluated.Both reference models were compared and tested.
Real ExperiencesHospital de Fuenlabrada (Madrid)Use of EN13606 for medication conciliation between primary and specialised care.Agreed definition of a primary-care summary archetype.Communication of normalised legacy data to support patient transitions between primary care and the hospital.
Real ExperiencesThe semantic interoperability of the Patient Summary is being tested between the Hospital General Universitario in Valencia (HGUV) and the Hospital de Fuenlabrada in Madrid.Based both on the Spanish and epSOS definition of the contents of the Patient Summary.The information is communicated using the CEN EN13606 norm.
Real ExperiencesHospital de FuenlabradaMadridCommunication of standardizedEN13606 informationEHRServerEHRServerHospital General UniversitarioValencia
Methodology1. Agree a concept definition and define the archetypeWe have used two different definitionsSpanish National Patient SummaryepSOS Patient Summary final datasetThey can be easily edited or modified with open source archetype editors like LinkEHR-Edhttp://www.linkehr.com
Methodology2. Map the archetype to original/legacy dataWith these mappings we can automatically generate transformation programs for the EHR system.ExistingEHR systemsXML
Methodology3. Deploy the transformation program in the EHR serverSet up a standard EN13606 extract server in both hospitals to generate and communicate the standardized informationTransformation is applied on demandWeb-service basedIncludes a standard EN13606 web viewerMappedArchetypeMappedArchetypeEHR viewerVHHISFHHISEHRServerEHRServerEN13606StandardInformationXML
Real ExperiencesVirgen del Rocío HospitalHL7 CDA can be archetyped. Archetypes can be used as templates for HL7.HL7 CDA has some characteristics that do not follow Object Oriented Modelling, but are XML Schema specifications. Archetypes are only applicable to OO models, so some tweaks had to be implemented.LinkEHR can use CDA archetypes to generate valid CDA instances of existing data.30
MML-openEHR-HL7 CDA ProjectResearch stay at Yoshihara Laboratory in Kyoto UniversityMy thesis work: How we can integrate between different standards?31Differentparts of the world with different standards
Same illness!WorkCan MML concepts be represented as archetypes?Can we generate correct MML XML from the MML archetypes?Can we map MML to other standards?32
MML concepts as archetypesMML has two kinds of concepts: Common concepts (support) and content modules (clinical concepts).33
MML concepts as archetypesAn archetype was created for each concept on common and content modules9 archetypes for common concepts12+1 archetypes for content modulesThe extra archetype is a reused conceptArchetypes do not follow openEHR model34
ExamplePatient information archetype35
Example36
WorkCan MML conceptsberepresentedwitharchetypes?Can wegeneratecorrect MML XML fromthe MML archetypes?Can wemap MML tootherstandards?37
Correct MML from archetypesFordemostration, some MML archetypesweremappedwithconstantvalues and with a sample data sourceTheexample data instancesweremodified so theyhavejapanesewriting (kanji, hiragana)38
ResultOriginal XML<patientSummary>    <extractTime>2010-12-21T12:14:05</extractTime>    <id>ID01</id>    <demographics>        <patientName>被記</patientName>        <patientSurname>載者</patientSurname>        <dateOfBirth>1974-06-12</dateOfBirth>        <gender>M</gender>    </demographics></patientSummary>XQueryResult XML<?xml version="1.0" encoding="UTF-8"?><mmlNm:Name mmlNm:repCode="A“ mmlNm:tableId="MML0025">         <mmlNm:family>載者</mmlNm:family>         <mmlNm:given>被記</mmlNm:given>         <mmlNm:fullname>被記, 載者</mmlNm:fullname>      </mmlNm:Name>
WorkCan MML conceptsberepresentedwitharchetypes?Can wegeneratecorrect MML XML fromthe MML archetypes?Can wemap MML tootherstandards?40
Mapping to other standardsOnly MML clinical modules need to be mapped, support module classes will be inserted on the archetypes before mappingA project was proposed: mapping between openEHR-MML-HL7 CDATransform data from MML and HL7 CDA into openEHR XML data and store it with opereffa41
Proposed system42HL7 CDAopenEHRMMLTransformTransformTransformTransformOpereffaopenEHR
Where to start?We have the MML archetypes, we can choose openEHR archetypes to create the transformation from openEHR MMLA set of openEHR archetypes was selected from CKM (public online archetype repository)Already existing Japan related openEHR archetypes43
MappingFew MML concepts have similar scope that openEHR archetypes…MML Diagnosis record ≈ openEHR-EHR-Evaluation.problem-diagnosisMML Progress course ≈ openEHR-EHR-SECTION.soap.v1But mostly don’t!Missing archetypesMultiple archetypes to represent only one conceptDifferent granularity or internal structureDifferent codes!44
Missing archetypesSome concepts on MML are not represented yet with openEHR archetypes or information is Japan specificMML Health Insurance module?Japanese names?Subjective archetypes?Create new openEHR archetypes when needed45
Multiplearchetypestorepresentone conceptForthepatientidentification, 10 archetypeswherechosen.8 fromtheopenEHRrepository:openEHR-DEMOGRAPHIC-PERSON.person.v1openEHR-DEMOGRAPHIC-PARTY_IDENTITY.person_name.v1openEHR-DEMOGRAPHIC-ADDRESS.address.v1openEHR-DEMOGRAPHIC-CLUSTER.person_additional_data_iso.v1openEHR-DEMOGRAPHIC-CLUSTER.person_identifier_iso.v1openEHR-DEMOGRAPHIC-CLUSTER.person_death_data_iso.v1openEHR-DEMOGRAPHIC-CLUSTER.person_birth_data_iso.v1openEHR-DEMOGRAPHIC-CLUSTER.biometric_identifier_iso.v12 providedbyKobayashiShinji:openEHR-EHR-CLUSTER.person_name-japan.v1openEHR-EHR-CLUSTER.address-japan.v146
Different granularity47Join or split fields on the mapping process……but also, suggest improvements to current openEHR archetypes!
Different codesBoth MML and openEHR archetypes rely on internal terminologiesValid statusValid texts or codesMake table mappings between themE.g. sex48
DEMO49

Implementing dual model systems

  • 1.
  • 2.
  • 3.
    Using templatesThere are2 differentdefinitionsforwhat a templateis:OceantemplatesZilicstemplatesCurrentlythere are a lot of open sourceprojectsregardingopenEHRTemplates can notyetbecreatedwith open sourcetools3
  • 4.
    Using templatesFor opensource (non profit) projects, the only alternative is to edit XML ‘by hand’both ocean and zilics templates schemas are publicOpen EHR-Gen isworkingonthatOther commercial approaches usually transform the archetypes to their own model to simulate templates4
  • 5.
    Using templatesExport theschema from a template is not viablefor medium sized template 1,5mb (for comparison, HL7 CDA schema is only around 700kb)Currently templates mix clinical with GUITemplates specifications are currently changingNot yet defined, but in the future they will be (specialized) archetypes5
  • 6.
    QueriesAlso ADL queriessyntaxisnotdefinedyet(AQL, A-Path…). Neither AQL and A-Path can yetbeconsideredstandardAQL is a prototypeinside of OceantemplatedesignerA-Pathis a proposalfromZilicsAQL has more ‘buzz’6
  • 7.
    ArchetypesNot a singlearchetype repositoryCKM (primary source)NEHTA (Australia)SKL (Sweden)Same archetype in different repositories?Missing archetypes?Governance?Repository for multiple models?7
  • 8.
    Storing openEHR datainstancesopenEHRdoesnotsayanythingabouthow data shouldbestoredObjects?XML?Relationaldatasources (SQL)?Tokyo/Kyotocabinet?RDF triplets?Most of open sourceprojects use XML data sourcesopenEHR XML schemas are public8
  • 9.
    Our philosophyArchetypes (separatingknowledge from systems) is a very powerful methodology.Putting the clinical knowledge on the focusArchetype based systems are the future…9…but we can not throw our current systems data!
  • 10.
    Looking at theplay field…For archetype definition:Multiple models availableMultiple available repositories (and not all openEHR)Most standards can take benefit from using archetypes10
  • 11.
    Looking at theplay field…For legacy data integration:Not use templates, use archetypes (specialized o not)When importing legacy data, you want to use all current dataCurrent data in relational formGenerate unified XML views from distributed data sourcesOutput is XML (archetype data instances)If both input and output are XMLUse Xquery (and XPath)11
  • 12.
    IBIMELeaded by PhD.Prof. Montserrat RoblesTen years of experience in the field of Biomedical Informatics≈ 20 membersFunded by Regional, National and European R&D projects and technology transferhttp://www.ibime.upv.es12
  • 13.
    IBIME Group (UPV)LinkEHRArchetype EditorArchetype editionReference model independenceOpen SourceLinkEHR Integration Archetype EditorLegacy datasource mappingXQuery scripts automatic generationEHRFlex (EHR Viewer)13
  • 14.
    LinkEHR Archetype EditorAnymodel can be importedTested models: openEHR, ISO 13606, HL7 CDA, ASTM CCR and CDISC ODM. Therefore, it is possible to define archetypes based on these models.Archetype creation driven by the reference modelIncludes a syntactic and semantic validator.Connection with CKMIn the works: sample instance generator, CDA and openEHR specific editors…14
  • 15.
    LinkEHR Integration ArchetypeEditorTo generate XML documents conforming to the reference model is necessary to define how archetypes sources of data are related: mappings or correspondences.The user must specify how to calculate from one or several values of the data source the value of an attribute of the archetype. The data sources can be relational,XML or archetypes (working on it :)15
  • 16.
    EHR Viewer (EHRflex)EHRflexis an archetype-based EMR system.Independent of the reference model.Uses web technologies (Google Web Toolkit).Automatic generation of archetype-based interfaces for view and edit clinical data.Open source project.
  • 17.
  • 18.
    EHR Viewer (EHRflex)Opensource project: http://ehrflex.sourceforge.net/
  • 19.
    Real ExperiencesHospital GeneralUniversitario de ValenciaPangea-LE implementation for over 5 yearsIntegration of distributed data sources (more than 25 databases).Virtual Federated EHR viewer.Full migration to EN13606 EHR Extracts in development.
  • 20.
  • 21.
  • 22.
    Real ExperiencesHospital deFuenlabrada (Madrid)Use of openEHR and EN13606 archetypes for pressure ulcer nursing control.The archetype creation methodology was evaluated.Both reference models were compared and tested.
  • 23.
    Real ExperiencesHospital deFuenlabrada (Madrid)Use of EN13606 for medication conciliation between primary and specialised care.Agreed definition of a primary-care summary archetype.Communication of normalised legacy data to support patient transitions between primary care and the hospital.
  • 24.
    Real ExperiencesThe semanticinteroperability of the Patient Summary is being tested between the Hospital General Universitario in Valencia (HGUV) and the Hospital de Fuenlabrada in Madrid.Based both on the Spanish and epSOS definition of the contents of the Patient Summary.The information is communicated using the CEN EN13606 norm.
  • 25.
    Real ExperiencesHospital deFuenlabradaMadridCommunication of standardizedEN13606 informationEHRServerEHRServerHospital General UniversitarioValencia
  • 26.
    Methodology1. Agree aconcept definition and define the archetypeWe have used two different definitionsSpanish National Patient SummaryepSOS Patient Summary final datasetThey can be easily edited or modified with open source archetype editors like LinkEHR-Edhttp://www.linkehr.com
  • 27.
    Methodology2. Map thearchetype to original/legacy dataWith these mappings we can automatically generate transformation programs for the EHR system.ExistingEHR systemsXML
  • 28.
    Methodology3. Deploy thetransformation program in the EHR serverSet up a standard EN13606 extract server in both hospitals to generate and communicate the standardized informationTransformation is applied on demandWeb-service basedIncludes a standard EN13606 web viewerMappedArchetypeMappedArchetypeEHR viewerVHHISFHHISEHRServerEHRServerEN13606StandardInformationXML
  • 30.
    Real ExperiencesVirgen delRocío HospitalHL7 CDA can be archetyped. Archetypes can be used as templates for HL7.HL7 CDA has some characteristics that do not follow Object Oriented Modelling, but are XML Schema specifications. Archetypes are only applicable to OO models, so some tweaks had to be implemented.LinkEHR can use CDA archetypes to generate valid CDA instances of existing data.30
  • 31.
    MML-openEHR-HL7 CDA ProjectResearchstay at Yoshihara Laboratory in Kyoto UniversityMy thesis work: How we can integrate between different standards?31Differentparts of the world with different standards
  • 32.
    Same illness!WorkCan MMLconcepts be represented as archetypes?Can we generate correct MML XML from the MML archetypes?Can we map MML to other standards?32
  • 33.
    MML concepts asarchetypesMML has two kinds of concepts: Common concepts (support) and content modules (clinical concepts).33
  • 34.
    MML concepts asarchetypesAn archetype was created for each concept on common and content modules9 archetypes for common concepts12+1 archetypes for content modulesThe extra archetype is a reused conceptArchetypes do not follow openEHR model34
  • 35.
  • 36.
  • 37.
    WorkCan MML conceptsberepresentedwitharchetypes?Canwegeneratecorrect MML XML fromthe MML archetypes?Can wemap MML tootherstandards?37
  • 38.
    Correct MML fromarchetypesFordemostration, some MML archetypesweremappedwithconstantvalues and with a sample data sourceTheexample data instancesweremodified so theyhavejapanesewriting (kanji, hiragana)38
  • 39.
    ResultOriginal XML<patientSummary> <extractTime>2010-12-21T12:14:05</extractTime> <id>ID01</id> <demographics> <patientName>被記</patientName> <patientSurname>載者</patientSurname> <dateOfBirth>1974-06-12</dateOfBirth> <gender>M</gender> </demographics></patientSummary>XQueryResult XML<?xml version="1.0" encoding="UTF-8"?><mmlNm:Name mmlNm:repCode="A“ mmlNm:tableId="MML0025"> <mmlNm:family>載者</mmlNm:family> <mmlNm:given>被記</mmlNm:given> <mmlNm:fullname>被記, 載者</mmlNm:fullname> </mmlNm:Name>
  • 40.
    WorkCan MML conceptsberepresentedwitharchetypes?Canwegeneratecorrect MML XML fromthe MML archetypes?Can wemap MML tootherstandards?40
  • 41.
    Mapping to otherstandardsOnly MML clinical modules need to be mapped, support module classes will be inserted on the archetypes before mappingA project was proposed: mapping between openEHR-MML-HL7 CDATransform data from MML and HL7 CDA into openEHR XML data and store it with opereffa41
  • 42.
  • 43.
    Where to start?Wehave the MML archetypes, we can choose openEHR archetypes to create the transformation from openEHR MMLA set of openEHR archetypes was selected from CKM (public online archetype repository)Already existing Japan related openEHR archetypes43
  • 44.
    MappingFew MML conceptshave similar scope that openEHR archetypes…MML Diagnosis record ≈ openEHR-EHR-Evaluation.problem-diagnosisMML Progress course ≈ openEHR-EHR-SECTION.soap.v1But mostly don’t!Missing archetypesMultiple archetypes to represent only one conceptDifferent granularity or internal structureDifferent codes!44
  • 45.
    Missing archetypesSome conceptson MML are not represented yet with openEHR archetypes or information is Japan specificMML Health Insurance module?Japanese names?Subjective archetypes?Create new openEHR archetypes when needed45
  • 46.
    Multiplearchetypestorepresentone conceptForthepatientidentification, 10archetypeswherechosen.8 fromtheopenEHRrepository:openEHR-DEMOGRAPHIC-PERSON.person.v1openEHR-DEMOGRAPHIC-PARTY_IDENTITY.person_name.v1openEHR-DEMOGRAPHIC-ADDRESS.address.v1openEHR-DEMOGRAPHIC-CLUSTER.person_additional_data_iso.v1openEHR-DEMOGRAPHIC-CLUSTER.person_identifier_iso.v1openEHR-DEMOGRAPHIC-CLUSTER.person_death_data_iso.v1openEHR-DEMOGRAPHIC-CLUSTER.person_birth_data_iso.v1openEHR-DEMOGRAPHIC-CLUSTER.biometric_identifier_iso.v12 providedbyKobayashiShinji:openEHR-EHR-CLUSTER.person_name-japan.v1openEHR-EHR-CLUSTER.address-japan.v146
  • 47.
    Different granularity47Join orsplit fields on the mapping process……but also, suggest improvements to current openEHR archetypes!
  • 48.
    Different codesBoth MMLand openEHR archetypes rely on internal terminologiesValid statusValid texts or codesMake table mappings between themE.g. sex48
  • 49.