SOA Masterclass - Fundamentals of SOA |11 February 2009 | Page 1 Fundamentals of SOA.
SOA approach for integration of departmental systems - Aalto · Satakunnan sairaanhoitopiirin...
Transcript of SOA approach for integration of departmental systems - Aalto · Satakunnan sairaanhoitopiirin...
Satakunnan sairaanhoitopiirin kuntayhtymä
SOA approach for integration of departmental systems
Case Satakunta Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT
THE RESEARCH QUESTION
Can we use Service Oriented Architecture (SOA) for integration of the departmental applications? Reusable solution?
5 Timo Itälä, 7.12.2011
SoberIT Functions, processes and (departmental) applications
MLII WebLAb Samba QPAti
Outpatients Inpatients Radu WinRadu
TOTI
Scheduling Personnell Material
Reporting, BI
Patient Admin: MUSTI, Seniori
Archive Vos Vos Pkl Pkl Outpatient
Clinic Inpatient
ward Lab Radiology Operating theatre Maternity
Care Patient Care Process
Management, Planning and Control Process
Resourcing Process
YKert HAIKARA
Pharmacy.
Jne.
Patient Record: WebKert, Seniori
Departmental applications
Departmental applications
Departmental applications
6 Timo Itälä, 7.12.2011
SoberIT
THE METHOD
Can we use Service Oriented Architecture (SOA) for integration of the departmental applications?
7 Timo Itälä, 7.12.2011
SoberIT The Method: Top-Down and Bottom-Up
! Care Processes
! Diagnostic services
! Generic services
! Enterprise service bus
! Applications with interfaces
8 Timo Itälä, 7.12.2011
SoberIT
TähystyksenTilaaja
Tutkimuspyyntö
Tähystystutkimuksia60 % ulkopuolisille
Lähete
TähystyksenTekijä
Tilaaja tekeetutkimuspyynnön
ja lähetteenTekijä arvioi
lähetteen
Sihteeri
MustiAjanvaraus
Sihteeri varaaajan potilaalle
Tutkimukseentulevatpotilaat
Sihteeri
Endobase- Käyttäjät
- Perustiedot- Tutkimukset
- Potilasrekisteri
Sihteeri syöttääpotilaat
Endobaseen
Potilas
Endobase- Kuvat
Lääkäri tekeetähystys-
tutkimuksen jaottaa koepalat
Lääkäri
Musti tai tk-järjestelmä
Endobase- Havainnotlomakkeella
- Valitut kuvat- Lausunto
Lääkäri kirjaahavainnot jamahdolliset
täsmennyksetsekä sanelee koko
lausunnon
Lääkäri
WebKert- Lausunto
Sihteeri päivittääkäyntitiedot Mustiinja kirjoittaa lääkärin
sanelemanlausunnon
potilaskertomukseen
Sihteeri
Lausunto
Lausuntotilaajalle
Lausuntopotilaalle
QPati
Patologi tutkiikoepalat ja sanelee
lausunnon
Patologiansihteeri
Lausunto
Patologian sihteerikirjoittaa lausunnon
Qpatiin (vaiWebKertiin?)
PatologianLausunto
Potilas
EndoView?Musti
- käyntitiedot- laskutustiedot
- tilastointi
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?
10 Timo Itälä, 7.12.2011
SoberIT The care process within specialized care
! 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
Business Process Modeling Notation (BPMN)
11 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT Task: An examination
! Examinations: ! Endoscopy ! Capsule camera ! Retinal image screening ! Video and still imaging in operating
theatre ! Audiogram ! Dermatology ! EKG ! etc...
15 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT
SERVICE ORIENTATION (SOA)
Can we use SOA for integration of the departmental applications?
17 Timo Itälä, 7.12.2011
SoberIT Identifying services
service service
service
Task
Sub-process
Process
A service can be a task, a sub-process or a process
”capture image and record findings”
”outpatient visit”
”a care process of a patient”
Thomas Erl: Service-Oriented
Architecture
18 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT Identifying web services
Service: RequestExamination Operation: SendRequestMessage
Service: ExecuteExamination Operations: ReceiveRequestMessage SendEndoscopyRequestMessage ReceiveEndoscopyResultMessage SendExaminationResultMessage
Service: ExecuteEndoscopyExamination Operations: ReceiveEndoscopyRequestMessge SendEndoscopyResultMessage
Service: PatientRecord Operations: ReceiveExaminationResultMessage .... 20 Timo Itälä, 7.12.2011
SoberIT Description of web services
WSDL
WSDL
WSDL WSDL
WSDL –Web Service Description Language ! Data Types ! Messages ! Services (portType) and their
operations ! Binding: Transmission ! Location of services(Endpoint)
21 Timo Itälä, 7.12.2011
SoberIT Request Examination: WSDL
Data Types Messages Services and operations Binding Location PartnerLink
22 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT Implementing web services Notification Control Action Entity
Patient Administration Endoscopy PatientRecord
Orchestration
WSDL WSDL WSDL WSDL
BPEL
BPEL Engine 25 Timo Itälä, 7.12.2011
SoberIT BPEL (Business Process Execution Language) BPEL orchestrates the services used by the process
BPEL Process Engine
! BPEL Process Model ! Partners and roles ! Variables ! Fault handlers ! Process Execution Logic
26 Timo Itälä, 7.12.2011
SoberIT 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> </process>
27 Timo Itälä, 7.12.2011
SoberIT Transport layer
! All departmental applications are connedted to LAN
! Message broker (Ensemble)
Patient Administration
Endobase WebKert EPR
Documents Images
Message Broker
ATJ Aida Toti
29 Timo Itälä, 7.12.2011
SoberIT Enterprise Service Bus (ESB)
Application
Managed Connection
Client Interface
Application Interface
Resource Adapter
Service Container
Invocation and ManagementFramework
ESB Endpoint
Enterprise Service Bus
WSDL
! ESB ! Message Oriented
Middleware ! Web Services ! Intelligent Routing
based on Content ! XML Data
transformation ! Endpoint = WSDL
Port:Operation 30 Timo Itälä, 7.12.2011
SoberIT Bottom-Up, Transport: Message broker
SELITYKSETLiittymät Toteutumattomat osajärjestelmät
JUVO Vuodeosastot- SIJAINTITIEDOT(ML 2, Radu, Upo, Toti, Puh.kesk.)- HOITOJAKSOT(Hoit.luok.,Infekt.,Maksuli,Mama,Mynla)- sis./ulos kirj.- REIPAS jonot- HILMO hoitoilmoitukset
Hoit.luokitus
MAKSULI Maksuliikenne- potilasmaksut
ML 2 Kliin.kemian lab.- pyynnöt, tulokset- laboratorion sisäinen osuus- verikortisto
VERTTI Verikeskus- Verituotteet- tilaukset- verikeskuksen sisäinenosuus
SAMBA Mikrobiologian lab.- laboratorion sisäinen osuus
RADU Rtg, Klf, Knf- lähetteet, lausunnot- röntgenin sisäinen osuus- ilmoittautumiset ja käyntitiedot- ajanvaraus- kuljetuslista
QPATI Patologian lab.- patologian laboratorion sisäinenosuus
YKERT Sairaskertomusten hallinta- SIJAINTITIEDOT(Radu, Upo,Juvo,- sairaskertomusten sijainnit (paperit)
Haikara Äitiyshuolto- esitiedot- raskaus- synnytys- vastasyntynyt
TOTI Toimenpideyksiköt- leikkaussalivaraukset- leikkauslistat- tehdyt leikkaukset- päivystysilmoitus
SAIRAALAINFEKTIOT- infektioiden seuranta
WEBKERTsairaskertomukset- sairaskertomustekstit
SYÖPÄREKISTERI
FTP- syöpäilmoitus
YLEISET REKISTERIT(kaikki käyttävät)- yksikkö-, osasto-, erikoisala-, laitos-- kunta-, postinumerorekisterit- lääkäri-, diagnoosirekisterit-, toimenpiderekisteri....
FTP- HETU, nimi, tutk
KUVANTAMISLAITTEET
TERVEYSKESKUS
OVT- lähete
OVT- lausunto
HL7- pyyntö
HL7- tulos
- pyyntö(veriryhmänsopivuus)
HL7- tulos
(veriryhmänsopivuus) HL7
- vastausHL7
- tilausOVT
- vastaus- tilaus
KANS.TERV.LAIT.
FTP- tartuntatauti
ilmoitus
UPO Poliklinikat- POTILASREKISTERI(kaikki käyttävät, paitsi Seniori)- KÄYNTITIEDOT(Mynla, Infekt., Maksuli, Haikara )- lähetetiedot- ajanvaraus- käyntitiedot- rtg-UPO rtg ajanvaraus
FYSIS Fysiatria- fysiatrian käynnit
SOSISSosiaalityöntekijät- sosiaalityöntekijöidenkäynnit
MYNLA- hinnoittelu
VÄESTÖREKISTERIKESKUS
FTP (OVT)- henkilötiedot
VRK SatSHP- henkilötiedot - henkilötiedot
-ilmoittautumiset
- RTG, KLF, KNFajanvaraus
HL7- lausunto
FTP- tulokset MEDREC Dialyysi
CD postitus (OVT)- synt.lapset
- tulokset
- tulokset
- pkl toimenpiteet
- äidin tiedot- veriryhmä, vasta-aineet
SATSHP:n POTILASTIETOJÄRJESTELMIENLIITTYMÄT JOISSA TIETO SIIRTYY FYYSISESTI
21.3.2005/T Seppänen
FTP- Potilaslista hoitojaksojen perusteella- Potilaslista ajanvarauste perusteella
- vastasyntyneentiedot
FTP (OVT)- vastasyntyneen tiedot
- kuolintiedot
SENIORI Psykiatria- potilasrekisteri- käynti- ja hoitotiedot (Mynla)- potilasmaksut
HL7- pyyntö
HL7- tulos
ORDER Tilaukset- lääketilaukset- materiaalitilaukset
SAMPO varasto / apteekkiMateriaalihallinto
- tilaukset
FINATaloushallinto
POWERPLAYTilastot / Raportit
FTPRadu,ML2,Toti,Fysis,Vertti,Maksuli,My
nla
FTPRadu, ML2, Toti, Fysis, Upo, Juvo,
Mama, Hoit.luok., Seniori, Fina
CASHMANAGER
PRIMAhenkilöstöh.
palkanmaksu
FTP- viitesuor
FTP-
todist.palkkiot- eml palkkiot
STAKESCD postitus- hilmotiedot
CD postitus- hilmotiedot
FTP- perintä
FTP- kyselytAKTIV KAPITAL
FTP- viitesuor
CD-postitus- E-ostot
TYKS
-luokitustiedot
NOS ksilpHL7Ajanvaraukset
TT2000+ Työterveysh.-Pyynnöt tehdääm ML2:eentyöpäytäintegraation kautta
Adapterit-UPO, JUVO, Webkert,ML2, Seniori,
miten uudet tiedot?ATJ
MD-TITANIA
LÄÄKITYS
Lähete-Palaute
Anestesia
Teho
NordDRG
AROMI/tilaukset
-hoitojakso- diagnoosit- toimenpiteet
-hoitojaksotiedot
SPR / Vok
FTP- veritilaukset /
varaukset
-laskutustietoja
Kuntosoft
Fysotools
HYS
FTP- E-ostot
- laskurivit
FTP- avohoito tiedot- hoitojaksotiedot-tuotepäätös nro:t
- E-osto laskut
AHA- KUNTOUTUS- määrärahaseuranta- kuntoutuspäätökset- OSTOPALVELUT- päätökset- APUVÄLINEET- välineiden vuokraus- väl. luokitusrekisteri
KERNEL- käyttäjähallinta- käyttäjien valikot- TaskMan tausta-ajojen hallinta
SANOMAT HL7/OVT- M-gate
- Datagate
Luettelo järjestelmistäjohon on liittymät
Muut liittymät
Peräkkäistiedostot
FTP-
henkilökunta
FTP- sairaslomat
FTP- palkat
DNApuhelinvaihde
LII potilaspuhelut FTP- puh.maksut
FTP- potilaat
- saldot-nimikkeet
Kuva-arkisto
Sovellukset
Säilytettävät
Korvattavat
Epäselvät
Kehitetään/poistetaan
Ulkopuoliste
Ensemble message broker
WSDL HL7 HL7 Endoscopy
31 Timo Itälä, 7.12.2011
SoberIT Satakunta ESB ! Enterprise Service Bus will connect all applications together and hide the
technical details ! Orchestration service will execute the processes
ESB
Application
Patient Administration
Departmental app
Patient Record
Application
Application
Application
Application
WSDL WSDL
Application
Public services
WSDL WSDL WSDL WSDL
Orchestration
BPEL
Departmental app
Departmental app
ESB Endpoint
Application Interface
32 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT 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 Timo Itälä, 7.12.2011
SoberIT Process and services execute in parallel
Car
e Pr
oces
s
Patient Assesment
Care planning
Care execution
Care assesment Discharge
Continue?
Yes
Serv
ice
Proc
ess
Service Delivery
Request for service Results of service
Many services can be ordered at the same time ! Laboratory tests ! Radiology
examinations ! Consultations ! Operations ! etc
But how to know that the result is available?
38
SoberIT
Car
e Pr
oces
s
Patient Assesment
Care planning
Care execution
Care assesment Discharge
Continue?
Yes
Serv
ice
Proc
ess
Service Delivery
Request for service Results of service
Solution: Notification of the result
BPMN notation: The Service sends signal
But how to model receiving the signal?
39
SoberIT
Car
e Pr
oces
s
Patient Assesment
Care planning
Care execution
Care assesment Discharge
Continue?
Yes
Serv
ice
Proc
ess
Service Delivery
Request for service Results of service
Receiving results
Receiving the signal of the results
BPMN notation: "Non-Interrupting event subprocess". Subprocess can receive results while main process is active
40
SoberIT
Car
e Pr
oces
s
Patient Assesment
Care planning
Care execution
Care assesment Discharge
Continue?
Yes
Serv
ice
Proc
ess
Service Delivery
Request for service Results of service
Receiving results
Other interested recipients of the signal
! One event can be of interest to many subprocesses
! One subprocess can be interested of many different events
Updating room
display
Radiology examination
readySecond opinion ready
Web Service: Updating room
display
Lab tests ready
Collecting process data
Process data
DW
41
SoberIT Event Driven Architecture (EDA)
Publish-Subscribe Model
Notation: ArchiMate
Serv
ice
Proc
ess
Service Delivery
Receiving results
Updating room
display
Radiology examination
readySecond opinion ready
Web Service: Updating room
display
Lab tests ready
Collecting process data
Process data
DW
43
SoberIT Event Driven Architecture (EDA)
Publish-Subscribe Model
Notation: ArchiMate
Serv
ice
Proc
ess
Service Delivery
Receiving results
Updating room
display
Radiology examination
readySecond opinion ready
Web Service: Updating room
display
Lab tests ready
Collecting process data
Process data
DW
WSDL WSDL WSDL WSDL
WSDL
WSDL
WSDL
44
SoberIT ESB can implement EDA ESB can implement distribution service Web Services described by WSDL documents
Subscriber Registry
Distribution Service
Publishers Subscribers
45 Timo Itälä, 7.12.2011
SoberIT Data Model to follow the care?
Car
e Pr
oces
s
Patient Assesment
Care planning
Care execution
Care assesment Discharge
Continue?
Yes
Serv
ice
Proc
ess
Service Delivery
Request for service Results of service
Care Process Instance
Care Service Instance
Care Process
Type
Care Service Type
Analogy: Product Data Management ! Type = Kind of Bike (Product code) ! Instance = Individual Bike (serial
number)
Process Data Management ! Type = Kind of Process (Process Type
Code) ! Instance = Individual execution of
Process (Process Instance ID)
Collecting process data
Process data
DW
47