Implementing Healthcare Messaging with XML

Document Sample
scope of work template
							Implementing Healthcare
  Messaging with XML
     Marc de Graauw




       http://www.marcdegraauw.com
   Dutch Healthcare
     the use case


       90.000 people
are hospitalized yearly due to
     wrong medication




       http://www.marcdegraauw.com
Geography & Software Design




         http://www.marcdegraauw.com
http://www.marcdegraauw.com
http://www.marcdegraauw.com
 Geography & Software Design
• How does geography affect software design?
• Canada
   – 9,984,670 km²
   – 33,115,600 inhabitants
   – 3.2/km² density
• UK
   – 244,820 km²
   – 60,587,300 inhabitants
   – 246/km² density
• The Netherlands
   – 41,526 km²
   – 16,570,613 inhabitants
   – 395/km² density

                      http://www.marcdegraauw.com
 Geography & Software Design
• Canada
  – is not densily populated
  – infrastructure in remote areas not very dense nor very reliable
  – different legislation regarding care and privacy in different
    provinces
• UK
  – relative dense population
  – still some remoter areas
  – National Health Service (actually 4, UK, Wales, Scotland, North
    Ireland)
• The Netherlands
  – densily populated
  – dense infrastructure anywhere
  – a single jurisdiction

                       http://www.marcdegraauw.com
                                          Healthcare
The Spine
                                          Information
Messa-                                       System
  ging
Services
                                          Healthcare
Patient                                   Information
Registry                                     System


Provider                                  Healthcare
Registry                                  Information
                                             System

 Clinical
Summary                                   Healthcare
                                          Information
                                             System
            http://www.marcdegraauw.com
                        UK
• “The Spine” is the national backbone
• Healthcare Information Systems at
  institutions and GP’s will not be online
  permanently
• Contains clinical summary of medical data
  needed for treatment
• Patient, provider registries et cetera

               http://www.marcdegraauw.com
                                                     Healthcare
                                      Messa-
 Clinical   Provider     Patient                     Information
                                        ging
Summary     Registry     Registry                       System
                                      Services


                                                     Healthcare
                                                     Information
                                                        System
                                      Messa-
 Clinical   Provider    Patient         ging
Summary     Registry    Registry      Services
                                                     Healthcare
                                                     Information
                                                        System

                                      Messa-
 Clinical   Provider     Patient        ging         Healthcare
Summary     Registry     Registry     Services       Information
                                                        System
                       http://www.marcdegraauw.com
                    Canada
• iEHR (Interoperable Electronic Health Record)
  per jurisdiction
• Different jurisdictions communicate through their
  iEHR message services (HIAL’s)
• Healthcare Information Systems at institutions
  and GP’s will not be online permanently
• Contains clinical summary of medical data
  needed for treatment
• Patient, provider registries et cetera

                  http://www.marcdegraauw.com
                                             Healthcare
                             HIB             Information
                           Messa-               System
BSN (“Burger                 ging
  Service                  Services
 Nummer”)                                    Healthcare
  Registry                 Patient           Information
                           Registry             System



                           Provider          Healthcare
                           Registry          Information
   UZI (PKI)                                    System
   Registry
                             Act
                           Registry          Healthcare
                                             Information
                                                System
               http://www.marcdegraauw.com
          The Netherlands
• “AORTA” is the national backbone
• Healthcare Information Systems at
  institutions and GP’s will be online 24x7
• No clinical data at backbone, only an index
  of where clinical information resides
• Clinical data stays at the source
• Only possible with dense infrastructure
• Patient, provider registries et cetera
               http://www.marcdegraauw.com
                      NICTIZ
• (Dutch EHR Standards Organization)
• Timeline
    – Medication File
    – Primary Care Summary
•   2003: start
•   2006: Healthcare Information Broker delivered
•   2006/7: First HIS qualifications
•   2009: General availability

                   http://www.marcdegraauw.com
                                      Ministry of Healthcare


              NICTIZ                                  CIBG
            National                               Healthcare
         Institute for ICT                        Professionals
              in Care                               Authority
                                             SBV-Z
           Healthcare                                            UZI-Register
                                        Unique Person Id
           Information                                           Healthcare
                                        Registry Provider
 Gov          Broker                                           Provider Registry


Market
            Hospitals               GP’s             Pharmacists                Others



                      Healthcare             Healthcare
                                                                   Regional
                        System                Access
                                                                   Facilities
                                             Providers
                       Suppliers http://www.marcdegraauw.com
                                             Healthcare
                             HIB             Information
                           Messa-               System
BSN (“Burger                 ging
  Service                  Services
 Nummer”)                                    Healthcare
  Registry                 Patient           Information
                           Registry             System



                           Provider          Healthcare
                           Registry          Information
   UZI (PKI)                                    System
   Registry
                             Act
                           Registry          Healthcare
                                             Information
                                                System
               http://www.marcdegraauw.com
                  AORTA
• all messages go through healthcare
  information broker
• three basic patterns:
  – HIS sends message to other HIS, HIB just
    routes
  – HIS sends message to HIB (mainly for registry
    updates and queries)
  – HIS queries several other HISses, HIB does
    registry lookups, accumulates data
                http://www.marcdegraauw.com
                                  HIB
                                                  Healthcare
   Message                                        Information
    to HIS                                           System



   Message                         Act
    to HIB                       Registry

                                                  Healthcare
                                                  Information
                                   Act               System
     Query                       Registry
(to multiple HIS)
                                                  Healthcare
                                                  Information
                                                     System
                    http://www.marcdegraauw.com
                                             Healthcare
                             HIB             Information
                           Messa-               System
BSN (“Burger                 ging
  Service                  Services
 Nummer”)                                    Healthcare
  Registry                 Patient           Information
                           Registry             System



                           Provider          Healthcare
                           Registry          Information
   UZI (PKI)                                    System
   Registry
                             Act
                           Registry          Healthcare
                                             Information
                                                System
               http://www.marcdegraauw.com
                                             Healthcare
                             HIB             Information
                           Messa-               System
BSN (“Burger                 ging
  Service                  Services
 Nummer”)                                    Healthcare
  Registry                 Patient           Information
                           Registry             System



                           Provider          Healthcare
                           Registry          Information
   UZI (PKI)                                    System
   Registry
                             Act
                           Registry          Healthcare
                                             Information
                                                System
               http://www.marcdegraauw.com
                                             Healthcare
                             HIB             Information
                           Messa-               System
BSN (“Burger                 ging
  Service                  Services
 Nummer”)                                    Healthcare
  Registry                 Patient           Information
                           Registry             System



                           Provider          Healthcare
                           Registry          Information
   UZI (PKI)                                    System
   Registry
                             Act
                           Registry          Healthcare
                                             Information
                                                System
               http://www.marcdegraauw.com
                                             Healthcare
                             HIB             Information
                           Messa-               System
BSN (“Burger                 ging
  Service                  Services
 Nummer”)                                    Healthcare
  Registry                 Patient           Information
                           Registry             System



                           Provider          Healthcare
                           Registry          Information
   UZI (PKI)                                    System
   Registry
                             Act
                           Registry          Healthcare
                                             Information
                                                System
               http://www.marcdegraauw.com
          Just enough HL7
• HL7 version 2 : currently used
• HL7v3:
  – XML based
  – Reference Information Model
• HL7v3 Message contains:
  – medical payload
  – Trigger Event Wrappers (Query Control etc.)
  – Transmission Wrapper
                http://www.marcdegraauw.com
  HL7v3 Layered Model

         HTTP, SSL
   SOAP / Web Services
HL7 Transmission Wrapper
HL7 Query Control Wrapper
    HL7 Medical Data




             TCP

   lower protocol layers
    http://www.marcdegraauw.com
Infrastructure example




      http://www.marcdegraauw.com
Actually, it’s not that simple...




          http://www.marcdegraauw.com
Schema Issues




  http://www.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


                http://www.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

                         http://www.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




                 http://www.marcdegraauw.com
The HL7v3 Schema’s




    http://www.marcdegraauw.com
The HL7v3 Schema’s




    http://www.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



                                    http://www.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
                    http://www.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!

                  http://www.marcdegraauw.com
Flatten the Schema’s




     http://www.marcdegraauw.com
The HL7v3 Schema’s




    http://www.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
                   http://www.marcdegraauw.com
Simplify the Schema’s




     http://www.marcdegraauw.com
 Layering




http://www.marcdegraauw.com
 Initiating Application                            Responding Application



  Medical Layer                                    Medical Layer




Control Query Layer                            Control Query Layer




Transmission Layer                             Transmission Layer




Web Services Layer                             Web Services Layer




                          HTTP Layer
                          http://www.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

                        Server
          HTTP Client / http://www.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
               http://www.marcdegraauw.com
       The HL7v3 Schema’s
• The Hl7 Schema’s were written with reuse
  in mind




              http://www.marcdegraauw.com
       SOAP
 Transmission
   Wrapper

    Control
    Wrapper

    Medical
     Data




http://www.marcdegraauw.com
SOAP
ANY
       Transmission
         Wrapper
           ANY
                                 Control
                                 Wrapper
                                     ANY

                                           Medical
                                            Data




       http://www.marcdegraauw.com
Layer the Schema’s




    http://www.marcdegraauw.com
The HL7v3 Schema’s

flatten            simplify             layer




          http://www.marcdegraauw.com
     The HL7v3 Schema’s

               James Clark:
  “validity is a relationship between a
document and a schema, not a property of
                 a document”




            http://www.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




         http://www.marcdegraauw.com
The HL7v3 Schema’s


don’t think of THE schema,
    but the SCHEMAS




      http://www.marcdegraauw.com
 VARIANTS
            The HL7v3 Schema’s
V1b




V1a




                 http://www.marcdegraauw.com
                                                    TIME
            V1              V2                 V3
Authentication
 and Security




  http://www.marcdegraauw.com
             Authentication
• Each Care Provider gets personal pass
  – Smartcard (UZI pass)
  – X.509 certificate
  – PKI-Government
  – Personal pass
    • guard safely
    • no sharing
    • PIN protected


                 http://www.marcdegraauw.com
http://www.marcdegraauw.com
Authentication with SSL




      http://www.marcdegraauw.com
http://www.marcdegraauw.com
http://www.marcdegraauw.com
http://www.marcdegraauw.com
   Authentication alternatives
• Authentication token w. message
  – X.509 one-way auth-style
    • sign {nonce + timetolive + id}
  – Kerberos-style
    • ticket from HIB, encrypted w. public key
  – WS-Security headers to transport the tokens




                  http://www.marcdegraauw.com
Authentication alternatives
           SOAP Envelope
            SOAP Header
             Auth Token


             SOAP Body
             HL7 payload




        http://www.marcdegraauw.com
Authentication alternatives
             SOAP Envelope
               SOAP Header
             Auth Token
                Auth Token
                   Auth Token

                SOAP Body
             HL7 payload
                HL7 payload
                    HL7 payload




        http://www.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

                        Server
          HTTP Client / http://www.marcdegraauw.com
    Authentication alternatives
• Authentication tokens in SOAP Headers
  separate them from the content
• HL7 sometimes allows multiple payloads,
  making this problem worse
• The token has to travel across layers with
  the paylaod
• This violates layering principles

               http://www.marcdegraauw.com
                     WS-*
• WS-* is confused about whether it is a
  document format or a message format
• document: relevant to the end user
• message: relevant to the mailman
• keep metadata with the document
• putting document metadata in SOAP
  headers violates layering design principles

               http://www.marcdegraauw.com
             Further points
• Make a lot of examples
  – complex XML cannot be understood from
    Schema alone
• Define your HTTP codes
• Define error handling on all levels
• Profile the Profiles
  – Make a subset of WSDL, WS-
    ReliableMessaging

                http://www.marcdegraauw.com
Questions?




http://www.marcdegraauw.com

						
Related docs