Satakunnan sairaanhoitopiirin kuntayhtymä SOA approach for integration of departmental systems Case Satakunta
Agenda! Departmental applications, need for integration! Business processes and business services! Web services, identification and implementation! Enterprise service bus! Discussion! Add-On: Event Driven Architcture SOA 2
Satakunta health district, project! Satakunta Health District! Specialized care services! Owned by the municipalities! Area: 275 000 inhabitants! SerAPI Tekes Finnwell research project! Oct 2006 - Aug 2007! SOLEA Tekes research project 2008-2011 3
The application map 4
THE RESEARCH QUESTION Can we use Service Oriented Architecture (SOA) for integration of the departmental applications? Reusable solution? 5
Functions, processes and (departmental) applications Pkl Pkl Outpatient Clinic Vos Inpatient Vos ward Archive Lab Radiology Operating Maternity Pharmacy. theatre Care Patient Care Process Patient Admin: MUSTI, Seniori Patient Record: WebKert, Seniori Resourcing Process Scheduling Personnell Material Management, Planning and Control Process Reporting, BI Outpatients Inpatients Departmental applications YKert Departmental applications MLII WebLAb Samba QPAti Radu TOTI WinRadu HAIKARA Departmental applications Jne. 6
THE METHOD Can we use Service Oriented Architecture (SOA) for integration of the departmental applications? 7
The Method: Top-Down and Bottom-Up! Care Processes! Diagnostic services! Generic services! Enterprise service bus! Applications with interfaces 8
THE RESULTS SOA approach for integration of departmental systems 9
Business process of Endoscopy An example of a departmental application within a care process! Take and store images! Redord findings as notes! Print images and notes How to model a generic process? Potilas Patologi tutkii koepalat ja sanelee lausunnon Lausunto Patologian sihteeri kirjoittaa lausunnon Qpatiin (vai WebKertiin?) Patologian sihteeri Tilaaja tekee tutkimuspyynnön ja lähetteen Tekijä arvioi lähetteen Sihteeri varaa ajan potilaalle Sihteeri syöttää potilaat Endobaseen Lääkäri tekee tähystystutkimuksen ja ottaa koepalat Lääkäri kirjaa havainnot ja mahdolliset täsmennykset sekä sanelee koko lausunnon Sihteeri päivittää käyntitiedot Mustiin ja kirjoittaa lääkärin saneleman lausunnon potilaskertomukseen Tähystyksen Tilaaja Tähystyksen Tekijä Sihteeri Sihteeri Lääkäri Potilas Lääkäri Lausunto Sihteeri QPati Patologian Lausunto Lausunto potilaalle Musti tai tkjärjestelmä Tutkimuspyyntö Tähystystutkimuksia 60 % ulkopuolisille Lähete Musti Ajanvaraus Tutkimukseen tulevat potilaat Endobase - Käyttäjät - Perustiedot - Tutkimukset - Potilasrekisteri Endobase - Kuvat Endobase - Havainnot lomakkeella - Valitut kuvat - Lausunto Musti - käyntitiedot - laskutustiedot - tilastointi WebKert - Lausunto Lausunto tilaajalle EndoView? 10
The care process within specialized care Business Process Modeling Notation (BPMN)! Care process: tasks related to the care itself! A generic model: all different cases are covered! The model of the care process! Process consist of activities and their sequence! Process is triggered by an event! The customer of the process is the patient! The owner of the process: The doctor in charge! The instance of the care process: An episode of a patient 11
The care process and services! The care process plans, executes and assesses the care! The care process is a consumer of several services! Any activity can make request for a service 12
The care process and services! Service requests are made by the doctor! Lab tests, radiology tests, endoscopy tests etc...! Medication orders, therapies etc are requested services! Visit to outpatient clinic can be seen as a service which is requested by the receiving doctor himself! Inpatient episode can be seen as a service! A care process consists of multiple services 13
A care process, a service process and a task Orders: Referral, test orders Assesment: Results, Dictation Delivery of care Bookings, Work lists, Registration, Procedures, Recording the results, Transcription Tasks Capture an image, Record findings Example: Endoscopy 14
Task: An examination! Examinations:! Endoscopy! Capsule camera! Retinal image screening! Video and still imaging in operating theatre! Audiogram! Dermatology! EKG! etc... 15
An examination task: Endoscopy Care Process Referral for diagnosis Assesment: The doctor makes a request for an endoscopy examination Care Service Process Booking for the examination Registration at the reception Task Capture an image, Record findings Example: Endoscopy Endoscopy Examination Capture an image, Record findings 16
SERVICE ORIENTATION (SOA) Can we use SOA for integration of the departmental applications? 17
Identifying services Task outpatient visit service service capture image and record findings Thomas Erl: Service-Oriented Architecture Process Sub-process service a care process of a patient A service can be a task, a sub-process or a process 18
Modeling web services! A service consists of one or multiple operations! A Message Exchange Pattern (MEP) is related to an operation! Request-Response operation! A service receives a request message and sends a reply message! Solicit-Response operation! A service sends a request message and waits for a reply message! One-way operation! A service receives a message! Notification operation! A service sends a message! A fault message can be replied(fault)! Synchronous - Asynchronous 19
Identifying web services Service: RequestExamination Operation: SendRequestMessage Service: ExecuteExamination Operations: ReceiveRequestMessage SendEndoscopyRequestMessage ReceiveEndoscopyResultMessage SendExaminationResultMessage Service: ExecuteEndoscopyExamination Operations: ReceiveEndoscopyRequestMessge SendEndoscopyResultMessage Service: PatientRecord Operations: ReceiveExaminationResultMessage... 20
Description of web services WSDL Web Service Description Language! Data Types! Messages! Services (porttype) and their operations! Binding: Transmission! Location of services(endpoint) WSDL WSDL WSDL WSDL 21
Request Examination: WSDL Data Types Messages Services and operations Binding Location PartnerLink 22
Properties of web services! Loosely coupled - minimize dependencies! Autonomy - encapsulation! Abstraction - hide logic! Reusability - generic services! Composability - services are composed of services! Stateless - stateful! Synchronous - asynchronous! Service contract - service description! Service role: requestor or provider 23
Directory of examination services! What service is used for certain examination?! Directory of examinations is also a service! Execute Examination -service is using directory to find out the proper examination service! BPEL code has a service call for directory service 24
Implementing web services Notification Control Action Entity WSDL WSDL WSDL WSDL Patient Administration Orchestration Endoscopy PatientRecord BPEL 25 BPEL Engine
BPEL (Business Process Execution Language) BPEL orchestrates the services used by the process! BPEL Process Model! Partners and roles! Variables! Fault handlers! Process Execution Logic BPEL Process Engine 26
Execute Examination -service <?xml version="1.0" encoding="utf-8"?> <!-- edited with XMLSpy v2007 rel. 3 sp1 (http://www.altova.com) by timo itala (Conceptia Oy) --> <process name="teetutkimus" xmlns:tutkimus="http://satshp.namespace/tutkimus/schema" xmlns:tns="http://satshp.namespace" targetnamespace="http:// satshp.namespace" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://docs.oasis-open.org/wsbpel/2.0/process/executable ws-bpel_executable.xsd" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <partnerlinks> <partnerlink name="tutkimus" partnerlinktype="tns:teetutkimustype" myrole="teetutkimusserviceprovider"/> <partnerlink name="tahystystutkimus" partnerlinktype="tns:teetahystystutkimustype" partnerrole="teetahystystutkimusserviceprovider" myrole="teetutkimusserviceprovider"/> <partnerlink name="potilaskertomus" partnerlinktype="tns:potilaskertomustype" partnerrole="potilaskertomusserviceprovider"/> </partnerlinks> <variables> <variable name="input" messagetype="tns:tutkimuspyyntosanoma"/> <variable name="tahystystutkimuspyynto" messagetype="tns:tahystystutkimuspyyntosanoma"/> <variable name="tahystystutkimustulos" messagetype="tns:tahystystutkimustulossanoma"/> <variable name="output" messagetype="tns:tutkimustulossanoma"/> </variables> <faulthandlers> <catchall> <sequence> <exit/> </sequence> </catchall> </faulthandlers> <sequence name="main"> <receive xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" name="receiveinput" partnerlink="tutkimus" porttype="tns:teetutkimus" operation="luetutkimuspyynto" variable="input" createinstance="yes"/> <sequence name="teetahystystutkimus"> <assign name="muodosta_tahystystutkimuspyynto"> <copy> <from variable="input" part="tutkimuspyyntosanoma"> </from> <to variable="tahystystutkimuspyynto" part="tahystystutkimustulossanoma"/> </copy> </assign> <invoke name="teetahystystutkimus" partnerlink="tahystystutkimus" porttype="tns:teetahystystutkimus" operation="luetahystystutkimuspyynto" inputvariable="tahystystutkimuspyynto"/> <receive name="vastaanotatahystystutkimustulos" partnerlink="tahystystutkimus" porttype="tns:teetahystystutkimus" operation="lahetatahystystutkimustulos" variable="tahystystutkimustulos"/> <assign name="muodosta_tahystystutkimuspyynto"> <copy> <from variable="tahystystutkimustulos" part="tutkimuspyyntosanoma"/> <to variable="output" part="tutkimustulossanoma"/> </copy> </assign> </sequence> <invoke name="lahetatutkimustulos" partnerlink="potilaskertomus" porttype="tns:potilaskertomus" operation="luetutkimustulos" inputvariable="tutkimustulos"/> </sequence> 27 </process>
ENTERPRISE SERVICE BUS (ESB) 28
Transport layer Message Broker! All departmental applications are connedted to LAN! Message broker (Ensemble) Patient Adminis tration Endobase Toti Aida WebKert EPR Documents Images ATJ 29
Enterprise Service Bus (ESB) Enterprise Service Bus Service Container Invocation and Management Framework WSDL Client Interface! ESB! Message Oriented Middleware! Web Services! Intelligent Routing based on Content! XML Data transformation! Endpoint = WSDL Port:Operation ESB Endpoint Application Managed Connection Resource Adapter Application Interface 30
FTP - potilaat FTP - henkilökunta STAKES AKTIV KAPITAL puhelinvaihde henkilöstöh. palkanmaksu FTP - palkat TERVEYSKESKUS VÄESTÖREKISTERI KESKUS FTP - sairaslomat TT2000+ Työterveysh. -Pyynnöt tehdääm ML2:een työpäytäintegraation kautta CD postitus - hilmotiedot FTP - perintä FTP - kyselyt FTP - viitesuor FTP - puh.maksut FTP - viitesuor FTP - todist.palkkiot - eml palkkiot SANOMAT HL7/OVT - M-gate - Datagate Peräkkäistiedostot Luettelo järjestelmistä johon on liittymät Muut liittymät CD postitus (OVT) - synt.lapset CD postitus - hilmotiedot FTP (OVT) - vastasyntyneen tiedot - kuolintiedot FTP (OVT) - henkilötiedot - potilasrekisteri - käynti- ja hoitotiedot (Mynla) - potilasmaksut - potilasmaksut LÄÄKITYS Lähete-Palaute Kuva-arkisto Anestesia Teho AROMI/ tilaukset - henkilötiedot - laskutustietoja sairaskertomukset - sairaskertomustekstit HL7 - tulos (veriryhmän sopivuus) HL7 - pyyntö HL7 - tulos HL7 - pyyntö HL7 - tulos - henkilötiedot HL7 - lausunto OVT - lähete OVT - lausunto - pyyntö (veriryhmän sopivuus) - Verituotteet - tilaukset - verikeskuksen sisäinen osuus FTP - veritilaukset / varaukset SPR / Vok - POTILASREKISTERI (kaikki käyttävät, paitsi Seniori) - KÄYNTITIEDOT (Mynla, Infekt., Maksuli, Haikara ) - lähetetiedot - ajanvaraus - käyntitiedot - rtg-upo rtg ajanvaraus - lähetteet, lausunnot - röntgenin sisäinen osuus - ilmoittautumiset ja käyntitiedot - ajanvaraus - kuljetuslista FTP - HETU, nimi, tutk KUVANTAMISLAITTEET - pyynnöt, tulokset - laboratorion sisäinen osuus - verikortisto HL7 - vastaus - RTG, KLF, KNF ajanvaraus - patologian laboratorion sisäinen osuus FTP - syöpäilmoitus SYÖPÄREKISTERI HL7 - tilaus - ilmoittautumiset HL7 Ajanvaraukset - vastasyntyneen tiedot FTP - tulokset - tulokset - tilaus - laboratorion sisäinen osuus FTP - tartuntatauti ilmoitus KANS.TERV.LAIT. - fysiatrian käynnit Sosiaalityöntekijät - sosiaalityöntekijöiden käynnit MEDREC Dialyysi OVT - vastaus NOS ksilp - esitiedot - raskaus - synnytys - vastasyntynyt - äidin tiedot - veriryhmä, vasta-aineet - tulokset - leikkaussalivaraukset - leikkauslistat - tehdyt leikkaukset - päivystysilmoitus - pkl toimenpiteet - toimenpiteet FTP - avohoito tiedot - hoitojaksotiedot -tuotepäätös nro:t - E-osto laskut - määrärahaseuranta - kuntoutuspäätökset - OSTOPALVELUT - päätökset - APUVÄLINEET - välineiden vuokraus - väl. luokitusrekisteri - lääketilaukset - materiaalitilaukset - infektioiden seuranta - SIJAINTITIEDOT (Radu, Upo,Juvo, - sairaskertomusten sijainnit (paperit) -hoitojakso - diagnoosit - SIJAINTITIEDOT (ML 2, Radu, Upo, Toti, Puh.kesk.) - HOITOJAKSOT (Hoit.luok.,Infekt.,Maksuli,Mama,Mynla) - sis./ulos kirj. - REIPAS jonot - HILMO hoitoilmoitukset - hoitojaksotiedot FTP - Potilaslista hoitojaksojen perusteella - Potilaslista ajanvarauste perusteella FTP Radu,ML2,Toti,Fysis,Vertti,Maksuli,My nla CD-postitus - E-ostot FTP - E-ostot - tilaukset - saldot -nimikkeet FTP Radu, ML2, Toti, Fysis, Upo, Juvo, Mama, Hoit.luok., Seniori, Fina Adapterit -UPO, JUVO, Webkert,ML2, Seniori, miten uudet tiedot? - luokitustiedot - hinnoittelu Taloushallinto - laskurivit HYS TYKS SAMPO varasto / apteekki Materiaalihallinto POWERPLAY Tilastot / Raportit ATJ (kaikki käyttävät) - yksikkö-, osasto-, erikoisala-, laitos- - kunta-, postinumerorekisterit - lääkäri-, diagnoosirekisterit-, toimenpiderekisteri... - käyttäjähallinta - käyttäjien valikot - TaskMan tausta-ajojen hallinta SoberIT Bottom-Up, Transport: Message broker SATSHP:n POTILASTIETOJÄRJESTELMIEN LIITTYMÄT JOISSA TIETO SIIRTYY FYYSISESTI 21.3.2005/T Seppänen LII potilaspuhelut DNA SENIORI Psykiatria VRK SatSHP WEBKERT UPO Poliklinikat RADU Rtg, Klf, Knf FYSIS Fysiatria SOSIS TOTI Toimenpideyksiköt NordDRG JUVO Vuodeosastot Hoit.luokitus Kuntosoft Fysotools FINA Ensemble message broker CASH MANAGER PRIMA MD-TITANIA MAKSULI Maksuliikenne ML 2 Kliin.kemian lab. Haikara Äitiyshuolto AHA - KUNTOUTUS ORDER Tilaukset MYNLA Sovellukset Korvattavat Epäselvät Säilytettävät SELITYKSET Liittymät Toteutumattomat osajärjestelmät VERTTI Verikeskus QPATI Patologian lab. SAMBA Mikrobiologian lab. SAIRAALAINFEKTIOT YKERT Sairaskertomusten hallinta YLEISET REKISTERIT Kehitetään/ poistetaan Ulkopuoliste KERNEL WSDL HL7 HL7 Endoscopy 31
Satakunta ESB! Enterprise Service Bus will connect all applications together and hide the technical details! Orchestration service will execute the processes ESB ESB Endpoint Application Interface Application Application Application Application Application Application Patient Adminis tration Orchestration Depart mental app Depart mental app Depart mental app Patient Record Public services WSDL BPEL WSDL WSDL WSDL WSDL WSDL 32
DISCUSSION SOA approach for integration of departmental systems 33
Generic integration of departmental applications! Service Oriented Architecture: Integrating a departmental application! Departmental applications are integrated using their native interfaces! Departmental applications are described as web services using WSDL descriptions! Directory of examination services is updated! BPEL code is updated and tested! GoLive! Benefits! Standardization of the integration of departmental applications! Reusable processes are created! Standardization of processes 34
Future research! Data model! ESB confirmed data, unique identifiers! Service Directories! How to build, use and maintain?! Naming standards! Services, operations, messages, data items! Testing procedures! Services and processes! Faults, exeptions and recovery routines! Load and stress testing! Versioning! Version control! Environment control! Agreements, SLAs 35
ADD ON Event Driven SOA, EDA Publish-Subscribe Model 36
Case Emergency Clinic! Problem: Patients wait too long! Why do they have to wait?! What could be done about that?! First model the process so that you understand the problem 37
Process and services execute in parallel Yes Care Process Patient Assesment Care planning Care execution Care assesment Continue? Discharge Request for service Results of service Many services can be ordered at the same time! Laboratory tests! Radiology examinations! Consultations! Operations! etc Service Process Service Delivery But how to know that the result is available? 38
Solution: Notification of the result Yes Care Process Patient Assesment Care planning Care execution Care assesment Continue? Discharge Request for service Results of service BPMN notation: The Service sends signal Service Process Service Delivery But how to model receiving the signal? 39
Receiving the signal of the results Yes Care Process Patient Assesment Care planning Care execution Receiving results Care assesment Continue? Discharge Request for service Results of service BPMN notation: "Non-Interrupting event subprocess". Subprocess can receive results while main process is active Service Process Service Delivery 40
Other interested recipients of the signal Yes Care Process Patient Assesment Care planning Care execution Receiving results Care assesment Continue? Discharge Request for service Results of service Service Process Service Delivery Lab tests ready Radiology examination ready Second opinion ready Updating room display Web Service: Updating room display! One event can be of interest to many subprocesses! One subprocess can be interested of many different events Process data Collecting process data DW 41
How to distribute signals! How to solve many-to-many messaging? 42
Event Driven Architecture (EDA) Publish-Subscribe Model Receiving results Service Process Service Delivery Lab tests ready Radiology examination ready Second opinion ready Updating room display Web Service: Updating room display Process data Collecting process data DW Notation: ArchiMate 43
Event Driven Architecture (EDA) Publish-Subscribe Model WSDL Receiving results Service Process Service Delivery WSDL WSDL WSDL WSDL WSDL Lab tests ready Radiology examination ready Second opinion ready Updating room display Web Service: Updating room display WSDL Process data Collecting process data DW Notation: ArchiMate 44
ESB can implement EDA ESB can implement distribution service Web Services described by WSDL documents Publishers Distribution Service Subscriber Registry Subscribers 45
DATA MODEL 46
Data Model to follow the care? Yes Care Process Patient Assesment Care planning Care execution Care assesment Continue? Discharge Request for service Results of service Service Process Care Process Instance Service Delivery Care Process Type Analogy: Product Data Management! Type = Kind of Bike (Product code)! Instance = Individual Bike (serial number) Care Service Instance Care Service Type Process data Collecting process data DW Process Data Management! Type = Kind of Process (Process Type Code)! Instance = Individual execution of Process (Process Instance ID) 47
QUESTIONS? timo.itala@aalto.fi 48