SlideShare uma empresa Scribd logo
1 de 27
Marc de Graauw marc@marcdegraauw.com Schema Issues
Marc de Graauw marc@marcdegraauw.com XML Schema Schema Validator valid? yes / no XML doc
Marc de Graauw marc@marcdegraauw.com Schema's serve multiple masters Schema’s serve more than one purpose design validation contract code generation those purposes often need different Schema’s
Marc de Graauw marc@marcdegraauw.com Schema's serve multiple masters design + reuseability, composability, simplicity - performance validation + performance, strictness, error messages, completeness - reuseability, composability, simplicity, readability contract + readability, strictness, completeness - performance code generation + simplicity, readability - reuseability, composability
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s Let’s look at an example Get Person Demographics Query Send in person id Get name, address, birthdate et cetera
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s QUPA_101102_V01 MCCI_MT000300UV01 COCT_MT040203UV01 COCT_MT150003UV03 COCT_MT030203UV02 MFMI_MT700711 COCT_MT090300UV01 COCT_MT150000UV02 COCT_MT070000UV01 COCT_MT710000UV01 COCT_MT150003UV03 COCT_MT070000UV01 COCT_MT710000UV01 COCT_MT090100 COCT_MT150000UV02 COCT_MT070000UV01 COCT_MT710000UV01 COCT_MT150003UV03 COCT_MT070000UV01 COCT_MT710000UV01 COCT_MT090003 COCT_MT150003UV03 MCAI_MT900001 QUPA_MT101102_V01 QUPA_MT101101_V01
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s The XML document, though abbreviated, isn’t difficult (SOAP omitted here...) Transmission Wrapper: message-id, creation date Act Wrapper: query issuer etc. Payload: person-id The Schema is very simple 5 includes and 1 element but not very readable! the schema inclusion tree is very complex
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s Schema’s should be readable tools can solve this but they make you dependent on the tool Therefore: flatten the Schema’s remove all includes put included schema’s where they belong For readability: make the Schema resemble the instance Readable Schema’s generate readable code!
Marc de Graauw marc@marcdegraauw.com Flatten the Schema’s
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s HL7 datatypes TS: Point in Time CS: Simple Coded Value ST: Character String Translate to XSD datetime, string HL7 datatypes predate XSD datatypes With a lot of HL7 datatypes, nothing happens except translation to XSD datatypes Do this in the source, generates much more readable code
Marc de Graauw marc@marcdegraauw.com Simplify the Schema’s
Marc de Graauw marc@marcdegraauw.com Layering
Marc de Graauw marc@marcdegraauw.com Responding Application Initiating Application Medical Layer Medical Layer Control Query Layer Control Query Layer Transmission Layer Transmission Layer Web Services Layer Web Services Layer HTTP Layer
Marc de Graauw marc@marcdegraauw.com HL7 Medical Application HL7v3  Medical Content HL7 Control Query Processing Application HL7v3  Acts HL7 Transmission Wrapper Adapter HL7v3  Messages HL7 web services Messaging Adapter SOAP Messages HTTP Client / Server
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s layer the Schema’s anonimyze with xs:any <xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded"/> SOAP Headers, soap:Body anon HL7 Transmission Wrapper, Act anon HL7 Act Wrapper, medical payload anon
Marc de Graauw marc@marcdegraauw.com SOAP Transmission  Wrapper Control  Wrapper Medical  Data
Marc de Graauw marc@marcdegraauw.com SOAP ANY Transmission  Wrapper ANY Control  Wrapper ANY Medical  Data
Marc de Graauw marc@marcdegraauw.com Layer the Schema’s
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s flatten simplify layer
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s Not very readable without Schema editor not practically feasible Generated from database Fix them with XSLT or other: Flatten the Schema’s  Remove unneeded datatype hierarchies Layer the Schema’s Makes the Schema’s much more readable Generates simpler code  New ITS (HL7 Schemaset) is coming, but the approach sketched here will probably remain valid
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s James Clark:  “validity is a relationship between a document and a schema, not a property of a document”
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s schema’s can be equivalent:  when two schema’s consider  the same set of documents valid  the schema’s are equivalent
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s don’t think of THE schema, but the SCHEMAS
Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s VARIANTS V1b V1a TIME V3 V1 V2

Mais conteúdo relacionado

Semelhante a Hl7v3 schema issues

When Kafka Is the Source of Truth With Ricardo Ferreira | Current 2022
When Kafka Is the Source of Truth With Ricardo Ferreira | Current 2022When Kafka Is the Source of Truth With Ricardo Ferreira | Current 2022
When Kafka Is the Source of Truth With Ricardo Ferreira | Current 2022
HostedbyConfluent
 
Authentication and signatures overview
Authentication and signatures   overviewAuthentication and signatures   overview
Authentication and signatures overview
Marc de Graauw
 
How to Get Cloud Architecture and Design Right the First Time
How to Get Cloud Architecture and Design Right the First TimeHow to Get Cloud Architecture and Design Right the First Time
How to Get Cloud Architecture and Design Right the First Time
David Linthicum
 

Semelhante a Hl7v3 schema issues (20)

When Kafka Is the Source of Truth With Ricardo Ferreira | Current 2022
When Kafka Is the Source of Truth With Ricardo Ferreira | Current 2022When Kafka Is the Source of Truth With Ricardo Ferreira | Current 2022
When Kafka Is the Source of Truth With Ricardo Ferreira | Current 2022
 
Web application technologies
Web application technologiesWeb application technologies
Web application technologies
 
API First with play and swagger
API First with play and swaggerAPI First with play and swagger
API First with play and swagger
 
Authentication and signatures overview
Authentication and signatures   overviewAuthentication and signatures   overview
Authentication and signatures overview
 
Everything you want to know about microservices
Everything you want to know about microservicesEverything you want to know about microservices
Everything you want to know about microservices
 
Semplificare l'observability per progetti Serverless
Semplificare l'observability per progetti ServerlessSemplificare l'observability per progetti Serverless
Semplificare l'observability per progetti Serverless
 
Detailed information on webservice by websoles
Detailed information on webservice by websolesDetailed information on webservice by websoles
Detailed information on webservice by websoles
 
Web services Tutorial /Websoles Strategic Digital Solutions
Web services Tutorial /Websoles Strategic Digital SolutionsWeb services Tutorial /Websoles Strategic Digital Solutions
Web services Tutorial /Websoles Strategic Digital Solutions
 
Web services | Websoles
Web services | WebsolesWeb services | Websoles
Web services | Websoles
 
Best Web services tutorial | Websoles Strategic Digital Solutions
Best Web services tutorial | Websoles Strategic Digital SolutionsBest Web services tutorial | Websoles Strategic Digital Solutions
Best Web services tutorial | Websoles Strategic Digital Solutions
 
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
The Good, The Bad, and The Avro (Graham Stirling, Saxo Bank and David Navalho...
 
Search for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code AnalysisSearch for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code Analysis
 
Let me connect your Vertex
Let me connect your VertexLet me connect your Vertex
Let me connect your Vertex
 
Introduction to SSL and How to Exploit & Secure
Introduction to SSL and How to Exploit & SecureIntroduction to SSL and How to Exploit & Secure
Introduction to SSL and How to Exploit & Secure
 
How to Get Cloud Architecture and Design Right the First Time
How to Get Cloud Architecture and Design Right the First TimeHow to Get Cloud Architecture and Design Right the First Time
How to Get Cloud Architecture and Design Right the First Time
 
GCSECS-DefensiveDesign.pptx
GCSECS-DefensiveDesign.pptxGCSECS-DefensiveDesign.pptx
GCSECS-DefensiveDesign.pptx
 
A4 from rad to mvc
A4 from rad to mvcA4 from rad to mvc
A4 from rad to mvc
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 
(BDT312) Using the Cloud to Scale from a Database to a Data Platform | AWS re...
(BDT312) Using the Cloud to Scale from a Database to a Data Platform | AWS re...(BDT312) Using the Cloud to Scale from a Database to a Data Platform | AWS re...
(BDT312) Using the Cloud to Scale from a Database to a Data Platform | AWS re...
 
XSS Primer - Noob to Pro in 1 hour
XSS Primer - Noob to Pro in 1 hourXSS Primer - Noob to Pro in 1 hour
XSS Primer - Noob to Pro in 1 hour
 

Mais de Marc de Graauw

Elektronische handtekening in de zorg
Elektronische handtekening in de zorgElektronische handtekening in de zorg
Elektronische handtekening in de zorg
Marc de Graauw
 
Tokenauthenticatie en xml signature in detail
Tokenauthenticatie en xml signature in detailTokenauthenticatie en xml signature in detail
Tokenauthenticatie en xml signature in detail
Marc de Graauw
 
XML tekortkomingen en pluspunten
XML   tekortkomingen en pluspuntenXML   tekortkomingen en pluspunten
XML tekortkomingen en pluspunten
Marc de Graauw
 
Versiecontrole in de keten
Versiecontrole in de ketenVersiecontrole in de keten
Versiecontrole in de keten
Marc de Graauw
 
Luister niet naar de gebruiker
Luister niet naar de gebruikerLuister niet naar de gebruiker
Luister niet naar de gebruiker
Marc de Graauw
 

Mais de Marc de Graauw (11)

Elektronische handtekening in de zorg
Elektronische handtekening in de zorgElektronische handtekening in de zorg
Elektronische handtekening in de zorg
 
Identiteit in de ict
Identiteit in de ictIdentiteit in de ict
Identiteit in de ict
 
Tokenauthenticatie en xml signature in detail
Tokenauthenticatie en xml signature in detailTokenauthenticatie en xml signature in detail
Tokenauthenticatie en xml signature in detail
 
Reliable messaging
Reliable messagingReliable messaging
Reliable messaging
 
Overzicht aorta
Overzicht aortaOverzicht aorta
Overzicht aorta
 
XML tekortkomingen en pluspunten
XML   tekortkomingen en pluspuntenXML   tekortkomingen en pluspunten
XML tekortkomingen en pluspunten
 
Versioning theory
Versioning theoryVersioning theory
Versioning theory
 
Versiecontrole in de keten
Versiecontrole in de ketenVersiecontrole in de keten
Versiecontrole in de keten
 
Unicode
UnicodeUnicode
Unicode
 
Luister niet naar de gebruiker
Luister niet naar de gebruikerLuister niet naar de gebruiker
Luister niet naar de gebruiker
 
Overzicht hl7v3
Overzicht hl7v3Overzicht hl7v3
Overzicht hl7v3
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

Hl7v3 schema issues

  • 1. Marc de Graauw marc@marcdegraauw.com Schema Issues
  • 2. Marc de Graauw marc@marcdegraauw.com XML Schema Schema Validator valid? yes / no XML doc
  • 3. Marc de Graauw marc@marcdegraauw.com Schema's serve multiple masters Schema’s serve more than one purpose design validation contract code generation those purposes often need different Schema’s
  • 4. Marc de Graauw marc@marcdegraauw.com Schema's serve multiple masters design + reuseability, composability, simplicity - performance validation + performance, strictness, error messages, completeness - reuseability, composability, simplicity, readability contract + readability, strictness, completeness - performance code generation + simplicity, readability - reuseability, composability
  • 5. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s Let’s look at an example Get Person Demographics Query Send in person id Get name, address, birthdate et cetera
  • 6. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s
  • 7. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s
  • 8. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s QUPA_101102_V01 MCCI_MT000300UV01 COCT_MT040203UV01 COCT_MT150003UV03 COCT_MT030203UV02 MFMI_MT700711 COCT_MT090300UV01 COCT_MT150000UV02 COCT_MT070000UV01 COCT_MT710000UV01 COCT_MT150003UV03 COCT_MT070000UV01 COCT_MT710000UV01 COCT_MT090100 COCT_MT150000UV02 COCT_MT070000UV01 COCT_MT710000UV01 COCT_MT150003UV03 COCT_MT070000UV01 COCT_MT710000UV01 COCT_MT090003 COCT_MT150003UV03 MCAI_MT900001 QUPA_MT101102_V01 QUPA_MT101101_V01
  • 9. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s The XML document, though abbreviated, isn’t difficult (SOAP omitted here...) Transmission Wrapper: message-id, creation date Act Wrapper: query issuer etc. Payload: person-id The Schema is very simple 5 includes and 1 element but not very readable! the schema inclusion tree is very complex
  • 10. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s Schema’s should be readable tools can solve this but they make you dependent on the tool Therefore: flatten the Schema’s remove all includes put included schema’s where they belong For readability: make the Schema resemble the instance Readable Schema’s generate readable code!
  • 11. Marc de Graauw marc@marcdegraauw.com Flatten the Schema’s
  • 12. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s
  • 13. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s HL7 datatypes TS: Point in Time CS: Simple Coded Value ST: Character String Translate to XSD datetime, string HL7 datatypes predate XSD datatypes With a lot of HL7 datatypes, nothing happens except translation to XSD datatypes Do this in the source, generates much more readable code
  • 14. Marc de Graauw marc@marcdegraauw.com Simplify the Schema’s
  • 15. Marc de Graauw marc@marcdegraauw.com Layering
  • 16. Marc de Graauw marc@marcdegraauw.com Responding Application Initiating Application Medical Layer Medical Layer Control Query Layer Control Query Layer Transmission Layer Transmission Layer Web Services Layer Web Services Layer HTTP Layer
  • 17. Marc de Graauw marc@marcdegraauw.com HL7 Medical Application HL7v3 Medical Content HL7 Control Query Processing Application HL7v3 Acts HL7 Transmission Wrapper Adapter HL7v3 Messages HL7 web services Messaging Adapter SOAP Messages HTTP Client / Server
  • 18. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s layer the Schema’s anonimyze with xs:any <xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded"/> SOAP Headers, soap:Body anon HL7 Transmission Wrapper, Act anon HL7 Act Wrapper, medical payload anon
  • 19. Marc de Graauw marc@marcdegraauw.com SOAP Transmission Wrapper Control Wrapper Medical Data
  • 20. Marc de Graauw marc@marcdegraauw.com SOAP ANY Transmission Wrapper ANY Control Wrapper ANY Medical Data
  • 21. Marc de Graauw marc@marcdegraauw.com Layer the Schema’s
  • 22. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s flatten simplify layer
  • 23. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s Not very readable without Schema editor not practically feasible Generated from database Fix them with XSLT or other: Flatten the Schema’s Remove unneeded datatype hierarchies Layer the Schema’s Makes the Schema’s much more readable Generates simpler code New ITS (HL7 Schemaset) is coming, but the approach sketched here will probably remain valid
  • 24. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s James Clark: “validity is a relationship between a document and a schema, not a property of a document”
  • 25. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s schema’s can be equivalent: when two schema’s consider the same set of documents valid the schema’s are equivalent
  • 26. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s don’t think of THE schema, but the SCHEMAS
  • 27. Marc de Graauw marc@marcdegraauw.com The HL7v3 Schema’s VARIANTS V1b V1a TIME V3 V1 V2