Fundamentos de HL7 - Antonio Cardoso Martins
Transcrição
Fundamentos de HL7 - Antonio Cardoso Martins
Fundamentos de HL7 Português / Maio 2008 Pós-graduação em sistemas de informação para a saúde Faculdade de Engenharia da Universidade Católica Portuguesa For internal use only / Copyright © Siemens AG 2006. 2008. All rights reserved. O Porquê do “Level 7” OSI Model Open Systems Interconnection Model. Health Level 7 Application Session Transport Network Datalink Modelo OSI Presentation A standard approach to network design developed by the International Standards Organization (ISO) that introduces modularity by dividing the complex set of functions into more manageable, self-contained, functional slices. The seven layers, from the innermost layer Physical Universidade Católica – curso de sistemas de informação para a saúde Page 2 Maio-2008 Siemens Healthcare Portugal Modelo OSI 7. Application Layer – Funções de alto nivel que dão suporte às actividades das aplicações e sistemas 6. Presentation Layer – relacionado com “character set” e codificação dos dados, e a forma como são apresentados (no ecrã ou impressora) 5. Session Layer – tarefas de início/ fim de sessões; coordenação da interação entre processos e aplicação 4. Transport Layer – integridade e qualidade na comunicação de dados(“end-to-end”) 3. Network Layer - Mecanismo de início/routing/Manutenção/fim de ligações entre sistemas 2. Link Layer – Plataforma que permite a comunicação de dados através “physical data link” 1. Physical Layer – Nível mecânico e electrico através dos quais os “devices” estão fisicamente ligados e os dados transmitidos Universidade Católica – curso de sistemas de informação para a saúde Page 3 Maio-2008 Siemens Healthcare Portugal Definição de HL7 numa palavra: Interoperabilidade Universidade Católica – curso de sistemas de informação para a saúde Page 4 Maio-2008 Siemens Healthcare Portugal Interoperability - Interoperabilidade Main Entry: in·ter·op·er·a·bil·i·ty Function: noun Date: 1977 : ability of a system ... to use the parts or equipment of another system Source: Merriam-Webster web site interoperability : ability of two or more systems or components to exchange information and to use the information that has been exchanged. Source: IEEE Standard Computer Dictionary: A Compilation of IEEE Standard Computer Glossaries, IEEE, 1990] Interoperabilidade Interoperabilidade Semântica Funcional Universidade Católica – curso de sistemas de informação para a saúde Page 5 Maio-2008 Siemens Healthcare Portugal Interoperabilidade semântica Um Sistema só pode “compreender” a informação recebida se conhecer: A definição de cada elemento da mensagem e a sua relação com os outros elementos terá de possuir o modelo semântico da informação A terminologia para representar os elementos codificados, incluindo a sua relação e definição Universidade Católica – curso de sistemas de informação para a saúde Page 6 Maio-2008 Siemens Healthcare Portugal Princípios de HL7 HL7 permite: Receber, enviar, partilhar e “integrar” a informação Melhorando: A gestão e a prática clínica entre serviços Foi especificamente criado para: Ser flexível, “cost effective” Criar “guidelines” Fornecer metodologias Universidade Católica – curso de sistemas de informação para a saúde Page 7 Maio-2008 Siemens Healthcare Portugal Histórico das versões de HL7 Held first meeting in March 1987 Published Version 1.0 in October 1987 Published Version 2.0 - 1988 Published Version 2.1 – 1990 Implementation Support Guide 1991 Member of ANSI - 1991 Charter member of HISPP 1992 ANSI Accredited - 1994 Published Version 2.2 - 1994 Ver 2.2 Implementation Guide 1995 Ver 2.2 - ANSI Std, 1996 Ver 2.3 - ANSI Std, May 1997 Ver 2.3.1 - ANSI Std, Apr 1999 Ver 2.4 - ANSI Std, Oct. 2000 Ver 2.5 - ANSI Std, June 2003 Ver 3.0 Present & Future Universidade Católica – curso de sistemas de informação para a saúde Page 8 Maio-2008 Siemens Healthcare Portugal Vocabulário HL7 ACK - Acknowledgement: an HL7 message which can be used to acknowledge the receipt of another message or can be used to keep things in sync with another application There is also an "ACK Enhanced Mode" message ADT - Admit I Discharge I Transfer message: an HL7 message that contains patient demographic information ANSI - American National Standards Institute: HL7 is an ANSI Certified Standard ASTM - American Society for Testing and Materials: A standard used for exchanging lab results EDIFACT or EDI - A standard used for electronic data exchange. There is a U.S. version called X.12 and an International version called UN/EDIFACT Universidade Católica – curso de sistemas de informação para a saúde Page 9 Maio-2008 Siemens Healthcare Portugal Vocabulário HL7 Message - Base unit of HL7 communications: made up of Segments and groups of Segments MLLP - Minimal Lower Layer Protocol: recommended protocol by HL7 for streaming messages and widely used over TCP/IP by new HL7 interface applications OBX - Observation/Results segment: intended to cover all types of patient specific observation reports, except pharmacy ORM - A general order message (supplies, lab tests, procedures, anything) ORU - Observation results message (used to report almost anything, but not for images) Universidade Católica – curso de sistemas de informação para a saúde Page 10 Maio-2008 Siemens Healthcare Portugal Vocabulário HL7 HIPAA - Health Insurance Portability and Accountability Act: U.S. based security regulations for Healthcare ICD-9 - International Classification of Diseases: a list of codes maintained by the World Health Organization (WHO) LOI NC - Laboratory Observation Identifier Names and Codes: used to encode lab orders and results in a standard vocabulary Interface Engine - An application that can take various versions of HL7 messages and convert them to other versions of HL7 messages. Typically, it can also route the messages to multiple destinations based on rules Universidade Católica – curso de sistemas de informação para a saúde Page 11 Maio-2008 Siemens Healthcare Portugal Vocabulário HL7 Segment - An HL7 segment is a logical grouping of data fields. Segments of a message may be required or optional. They may occur only once in a message or they may be allowed to repeat. Each segment is identified by a unique three character code known as the Segment ID TCP/IP - Transaction Control Protocol/Internet Protocol. A set of protocols for Layers 3 (Network) and 4 (Transfer) of the OSI network model. TCP/IP has been developed over a period of 15 years under the auspices of the Department of Defense. It is a de facto standard, particularly as higherlevel layers over ethernet. Although it builds upon the OSI model, TCP/IP is not OSI-compliant Universidade Católica – curso de sistemas de informação para a saúde Page 12 Maio-2008 Siemens Healthcare Portugal Vocabulário HL7 Event - The event that initiates an exchange of messages is called a trigger event. The HL7 Standard is written from the assumption that an event in the real world of health care creates the need for data to flow among systems. The realworld event is called the trigger event. For example, the trigger event "a patient is admitted" may cause the need for data about that patient to be sent to a number of other systems X.12 - A standards used for insurance and billing XML - A standard used for defining information in a structured way and to communicate it that way too Universidade Católica – curso de sistemas de informação para a saúde Page 13 Maio-2008 Siemens Healthcare Portugal Clinical Context Management (CCOW) For facilitating the integration of applications at the point of use An end user focused standard that complements HL7's traditional emphasis on data interchange and enterprise workflow Using a technique know as context management A clinical user's experience is one of interacting with a single system When, in fact they maybe using multiple, Independent applications from many different systems, each via its native user interface Universidade Católica – curso de sistemas de informação para a saúde Page 14 Maio-2008 Siemens Healthcare Portugal HOSPITAL INFORMATION SYSTEM Exemplo de um Workflow External Lab Universidade Católica – curso de sistemas de informação para a saúde Page 15 Maio-2008 Siemens Healthcare Portugal Quando é que são enviadas as mensagens ? Mensagens são “enviadas” depois da ocorrência de um Evento Quando é registado um pedido de exame para um doente. Doente é admitido no Hospital Um exame é finalizado (Pronto para “Billing”) Como são enviadas as mensagens ? Normalmente via TCP/IP (idêntico ao DICOM) Provavelmente via um Interface Engine Universidade Católica – curso de sistemas de informação para a saúde Page 16 Maio-2008 Siemens Healthcare Portugal Estrutura do HL7 EVENTOS A01 – Admissão de um doente Desencadeiam MENSAGENS São feitas de SEGMENTOS CAMPOS ADT A01 Message PID – Patient Identification Segment Contêm ELEMENTOS Podem ter Patient Name COMPONENTES Podem ter SUB-COMPONENTES <Last Name>^ <First name> <Own surname> Universidade Católica – curso de sistemas de informação para a saúde Page 17 Maio-2008 Siemens Healthcare Portugal Evento EVENTOS Desencadeiam MENSAGENS An event is something that happens within a healthcare facility that requires that some information is sent for notification or status update purposes Example Events: A03 - Discharge/End Visit notification A08 - Update Patient Information notification O01 - Order Request sent O02 - Order Response sent R01 - Unsolicited Observation Results sent Universidade Católica – curso de sistemas de informação para a saúde Page 18 Maio-2008 Siemens Healthcare Portugal Mensagem EVENTOS Desencadeiam MENSAGENS São feitas de: SEGMENTOS Example Messages: ADT - Admission, Discharge, and Transfer ORM - Order ORU - Observation Result /Unsolicited (HL 7 Abstract Message Syntax) Brackets [ ] = Optional Segment Note: [{ ... }] and {[ ... ]} Braces { } = Repeating Segment are equivalent Angle Brackets with Vertical Bars < | |> = Choice of 1 Segment of group (Le., from ORM*O01, <OBR| RQD| RQ1 | RXO |ODS | ODT> lets you choose one of the following Segments: OBR or RQD or RQ1 or RXO or ODS or ODT) Universidade Católica – curso de sistemas de informação para a saúde Page 19 Maio-2008 Siemens Healthcare Portugal ADT^A03 – Discharge (Fim da visita) (HL 7 Abstract Message Syntax) ADT^A03 MSH EVN PID [ PD1 [{ ROL PV1 [ PV2 [{ ROL [{ DB1 [{ DG1 [ DRG [{ PR1 [{ ROL }] [{ OBX [ PDA ] }] }] }] ] ADT Message Message Header Event Type Patient Identification Additional Demographics Role Patient Visit Patient Visit - Additional Info. Role Disability Information Diagnosis Information Diagnosis Related Group }] Procedures Role }] ] Observation/Result Patient Death and Autopsy ] }] Universidade Católica – curso de sistemas de informação para a saúde Page 20 Maio-2008 Siemens Healthcare Portugal Segmento MENSAGENS São feitas de SEGMENTOS FIELDS Contêm ELEMENTOS Exemplo de Segmentos: MSH - Message Header MSA – Message Acknowledgement PID - Patient Identification PV1 - Patient Visit OBR - Observation Request Universidade Católica – curso de sistemas de informação para a saúde Page 21 Maio-2008 Siemens Healthcare Portugal EVN – Event Type Segment (HL 7 Abstract Message Syntax) SEQ LEN DT OPT 1 3 10 B 2 26 TS 3 26 4 3 5 250 6 7 RP/# TBL# ITEM# ELEMENT NAME 0003 00099 Event Type Code R 00100 Recorded Date/Time TS 0 00101 Date/Time Planned Event IS 0 0062 00102 Event Reason Code XCN 0 0188 00103 Operator 10 26 TS 0 01278 Event Occurred 180 HD 0 01534 Event Facility Y 1 2 3 45 6 EVN|A01|200501131242|200501111042|01||200501131242<CR> Todos os segmentos iniciam com o identificador de segmento e terminam com um caracter especial (fim de segmento: hex “0D”) Universidade Católica – curso de sistemas de informação para a saúde Page 22 Maio-2008 Siemens Healthcare Portugal Legenda SEQ = Ordinal Position OPT = Optionality R = Required O = Optional C = Conditional X = Not Used B = Backward Compatibility RP/# = Repetition N or blank = No Repetition Y = Indefinite Repetition Y/# = Repetition to Number TBL# = Table blank = No Table 1 - 8999 = HL7/User Defined Table 9000 > = External Table DT = Data Type (see HL7 v2.4 - 2.9) Universidade Católica – curso de sistemas de informação para a saúde Page 23 Maio-2008 Siemens Healthcare Portugal Elementos ou campos(fields) SEGMENTOS Contêm Podem ter FIELDS Exemplo de elementos: ELEMENTOS COMPONENTES Patient name Date/time of birth Sex São definidos Pelos “Data types” O “Data Type” determina se o elemento poderá ter componentes ou não Universidade Católica – curso de sistemas de informação para a saúde Page 24 Maio-2008 Siemens Healthcare Portugal Exemplo de um Elemento (PID) (HL 7 Abstract Message Syntax) SEQ LEN DT OPT 1 4 SI 2 20 3 RP/# TBL# ITEM# ELEMENT NAME O 00104 Set Id – Patient ID CX O 00105 Patient ID (External ID) 20 CX R y 00106 Patient ID (Internal ID) 4 20 CX O y 00107 Alternate ID 5 46 XPN R y 00108 Patient Name 6 448 XPN O 00109 Mother's Maiden Name 7 26 TS O 00110 Date Birthday 8 1 IS O 00111 Sex 9 48 XPN O 00112 Patient Alias 10 1 IS O 00113 Race 11 106 XAD O 00114 Patient address 12 4 IS O 00115 County code 13 40 XTN O 00116 Phone number 0001 Y 0005 Y Y PID|1||104093|98007092|Walker^Sky||19700621 |M|||TRAVESSA SRA. MERCULES N17 2DRT.^^CASTELO BRANCO^5^6000^PORTUGAL||272325834 Universidade Católica – curso de sistemas de informação para a saúde Page 25 Maio-2008 Siemens Healthcare Portugal Valores codificados em tabelas pré-definidas IS - coded value for user-defined tables The value of such a field follows the formatting rules for a ST field except that it is drawn from a site-defined (or user-defined) table of legal values There shall be an HL7 table number associated with IS data types An example of an IS field is Item # = 00111, Element Name = Sex, Length = 1, User Table = 0001 - Administrative Sex: A Ambiguous F Female M Male N Not applicable o Other U Unknown Universidade Católica – curso de sistemas de informação para a saúde Page 26 Maio-2008 Siemens Healthcare Portugal Componente FIELDS Exemplo de Componentes ELEMENTOS COMPONENTES Podem ter SUB-COMPONENTES São definidos Pelos “Data types” (for XPN Data Type): <Family Name (FN)> ^<Given Name (ST)> ^<Second ... given ... (ST)> ^<Suffix (ST)> ^<Prefix (ST)> ^<Degree (IS)> ^<Name Type Code (ID)> O “Data Type” determina se o componente poderá ter sub-componentes ou não Universidade Católica – curso de sistemas de informação para a saúde Page 27 Maio-2008 Siemens Healthcare Portugal Sequências de escape em campos de texto When a field of Data Type TX, FT, or CF is being encoded, the escape character may be used to signal certain special characteristics of portions of the text field .... \H\ \N\ \F\ \8\ \T\ \R\ \E\ \Xdddd \Zdddd \ \ start highlighting (see standard) normal text (end highlighting) field separator: I or as coded component separator: A or as coded subcomponent separator: & or as coded repetition separator: .... or as coded escape character: \ or as coded hexadecimal data locally defined escape sequence Extracted from HL7 v2.4 - 2.10.1 Universidade Católica – curso de sistemas de informação para a saúde Page 28 Maio-2008 Siemens Healthcare Portugal MSH – Message Header Segment Segmento Inicial de todas Mensagens HL7 Encoding Characters ^ = Component Separator ~ = Repetition Separator \ = Escape Character & = Subcomponent Separator Receiving Application Receiving Facility Message Time /Date Message number MSH|^~\&|HIS_ADT|HIS|SAS|SAS|200501131235||ADT^A03|530757||P|2.3.1<CR> Message Type Segment ID Sending Application Sending Facility HL7 Version Number Field separator Universidade Católica – curso de sistemas de informação para a saúde Page 29 Maio-2008 Siemens Healthcare Portugal Perspectiva simplificada Uma mensagem é um conjunto de segmentos Os segmentos são um conjunto de elementos Elementos são “strings” com as suas posições definidas na especificação do segmento Os caracteres “delimitadores” separam os dados (dependente da implementação) Universidade Católica – curso de sistemas de informação para a saúde Page 30 Maio-2008 Siemens Healthcare Portugal Exemplo de uma Admissão ADT^A01 (Internamento) MSH|^~\&|HIS||MAGICSAS||200501131236||ADT^A01|530762|D|P|2.3.1 EVN|A01|200501131236|||| PID|1||104093|98007092|Walker^Sky||19700621|F|||TRAVESSA SRA. MERCULES N17 2DRT.^^CASTELO BRANCO^5^6000^PORTUGAL|| 272325834 NK1|SILVA^MARIA^WI^WIFE|||NK^NEXT OF KIN PV1|1|I|2000^2012^01|||00110*DR JONES||SUR||ADM|A0||||||||INT-25002913 |||||||||||||||||||||||||20050113|| IN1|1|119529976|SEGURANCA SOCIAL|| O Doente Sky Walker foi admitido em 2005/01/13 às 12:36 para “Consultar” DR JONES(#00110) para cirúrgia (SUR) e Foi-lhe atribuido o quarto 2012 cama 01 na enfermaria 2000. Tem como parente a sua esposa Maria Silva Universidade Católica – curso de sistemas de informação para a saúde Page 31 Maio-2008 Siemens Healthcare Portugal O Sucesso da comunicação depende dos mecanismos de controlo Message Acknowledgement ACK: Original Mode Originally because of unreliable connections Now mostly used to say, "I've got the data" ACK: Enhanced Mode A Request for General ACK I Reliably Received the Message ACK Committed to Reliably Stored Message Similar to Original, but a Higher Standard A Request for Application ACK I Application ACK Receiver has Processed the Message Can also be used to Return Status Universidade Católica – curso de sistemas de informação para a saúde Page 32 Maio-2008 Siemens Healthcare Portugal Exemplo de mensagem de controlo MSH|^~\&|HIS||MAGICSAS|SIEMENS|200501131236||ADT^A01|530762|D|P| 2.3.1 EVN|A01|200501131236|||| PID|1||104093|98007092|Walker^Sky||19700621|F|||TRAVESSA SRA. MERCULES N17 2DRT.^^CASTELO BRANCO^5^6000^PORTUGAL|| 272325834 NK1|SILVA^MARIA^WI^WIFE|||NK^NEXT OF KIN PV1|1|I|2000^2012^01|||00110*DR JONES||SUR||ADM|A0|||||||| INT-25002913|||||||||||||||||||||||||20050113|| IN1|1|119529976|SEGURANCA SOCIAL|| MSH|^~\&|MAGICSAS|SIEMENS|HIS||20041130114927||ACK^A01| 200411301149280257444|P|2.2 MSA|AA|530762 Universidade Católica – curso de sistemas de informação para a saúde Page 33 Maio-2008 Siemens Healthcare Portugal Pontos Fracos das Versões 2.X Ambiguidade nas referencias entre segmentos Não suporta um agrupamento semântico de mensagens de forma a criar “packages” de informação mais compreensivel Limitado pelas tecnologias do passado e pela necessidade de manter a compatibilidadecom estas. Não retira vantagens das actuais tecnologias de modelação/representação e communicaçãoda informação Versão 2.X é o “Passado” e o “Presente”; Versão 3 é o “Presente” e o “Futuro” Universidade Católica – curso de sistemas de informação para a saúde Page 34 Maio-2008 Siemens Healthcare Portugal HL7 encapsulado no XML <ADT_A03> <MSH> <MSH.1>|</MSH.1> <MSH.2>^~\&</MSH.2> <MSH.3> <EI.1>HIS</EI.1> </MSH.3> <MSH.5> <EI.1>MAGICSAS</EI.1> </MSH.5> <MSH.7>20050113123500+0000</MSH.7> <MSH.9> <CM_MSH.1>ADT</CM_MSH.1> <CM_MSH.2>A03</CM_MSH.2> </MSH.9> <MSH.10>530757</MSH.10> <MSH.11> <PT.1>D</PT.1> </MSH.11> <MSH.12>P</MSH.12> <MSH.13>2,000000</MSH.13> </MSH> <EVN> <EVN.1>A03</EVN.1> <EVN.2>20050113123500+0000</EVN.2> </EVN> <PID> <PID.1>1</PID.1> <PID.3> <CX.1>175464</CX.1> </PID.3> <PID.4> <CX.1>24000025</CX.1> </PID.4> <PID.5> <XPN.1>PIEDADE</XPN.1> <XPN.2>ROMERA CARDOSO</XPN.2> </PID.5> <PID.7>20040102000000+0000</PID.7> <PID.8>F</PID.8> <PID.11> <XAD.1>RUA RELOGIO N 25</XAD.1> <XAD.3>CASTELO BRANCO</XAD.3> <XAD.4>5</XAD.4> <XAD.5>6000</XAD.5> <XAD.6>PORTUGAL</XAD.6> </PID.11> <PID.13> <XTN.1>968176099</XTN.1> </PID.13> Universidade Católica – curso de sistemas de informação para a saúde Page 35 Maio-2008 Siemens Healthcare Portugal Exemplo de uma mensagem HL7 versão 3.0 <PatientRole xsi:schemaLocation="urn:hl7-org:v3/COCT_HD050000 COCT_HD050000.xsd"> <classCode code="PAT"/> <id root="2.16.840.1.113883.19.3.2409" extension=“NATIONAL_ID" assigningAuthorityName="Hospital E - Patients" validTime="-2003-10-05"/> <addr use="RES"> <streetAddressLine>2222 Home Street</streetAddressLine> <city>Ann Arbor</city> <state>MI</state> <postalCode>99999</postalCode> <country>USA</country> </addr> <telecom value="555-555-2005" use="H"/> <statusCode code=“ACTIVE"/> <effectiveTime> <low value="2002-02-11T14:00:00-06:00" inclusive="true"/> <high value="2002-02-11T17:00:00-06:00" inclusive="false"/> </effectiveTime> <confidentialityCode code="CODE" codeSystem="2.16.840.1.113883.5.25" codeSystem Name="Confidentiality" displayName="Display name"/> Universidade Católica – curso de sistemas de informação para a saúde Page 36 Maio-2008 Siemens Healthcare Portugal Obrigado! António Cardoso Martins ([email protected]) Universidade Católica – curso de sistemas de informação para a saúde Page 37 Maio-2008 Siemens Healthcare Portugal