© 2008 by Justin Miranda; made available under the EPL v1.0 | 18 March 2008 Using Eclipse BIRT in...

Post on 20-Jan-2016

213 views 0 download

Transcript of © 2008 by Justin Miranda; made available under the EPL v1.0 | 18 March 2008 Using Eclipse BIRT in...

© 2008 by Justin Miranda; made available under the EPL v1.0 | 18 March 2008

Using Eclipse BIRT in

… seriously!

Justin Mirandajustin@openmrs.org

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Apologies

2

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

PartnersIn Health

3

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Where we work

4

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Rwinkwavu, Rwanda

5

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Inshuti Mu Buzima Rwinkwavu, Rwanda6

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

What we do

7

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.08

Health Facility

Before After

Health Facilities

Before After

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.09 Quality Health Care

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.010

Medication

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Food

11

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0Community Health Workers12

Housing

Before After

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.013

Education

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Mountains Beyond Mountains

14

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Real World Challenges

15

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.016

HTTP Packet

Slow Internet

Power SurgesViruses

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Power Outage

17

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.018

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.019

Power Outages (very common where we work)

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Multiple Languages

20

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

We work in remote locations …

21

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.022 … really remote.

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.023

Paper … lots of it!

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

What the heck is OpenMRS?

24

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.025

Open Source Medical Record System

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Community

26

Community

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Collaboration

27

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Architecture

28

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Buzzword Soup

29

Tomcat

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Eclipse IDE

30

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.031

BIRT RCP Designer

31

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Why did we choose BIRT?

32

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Feature-Rich Design Tool

33

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Multiple Output Types

34

.pdf .doc .xls .html

… and more

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Extensibility

35

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Configurability

36

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Power Outage

37

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Built-in Surge Protection

38

… that is a joke

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

So how does OpenMRS use BIRT?

39

BIRT Runtime Engine API BIRT Design Engine API

Integration

Extension

Open Data Access API

BIRT RCP Designer

Design

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.040

Simple Charts

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.041

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.042

Data Quality Reports

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.043

Form Completeness

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Complex Reports

44

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.045

Enrollments By Gender and Age

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Patient Summary

46

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.047

Clinical Summary

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Critical Reports

48

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.049

Patients Lost to Follow-Up(Translation: Patients who have missed multiple visits)

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

How do we integrate & extend BIRT?

50

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Complex Data Model

51

WTF?

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Simple Approach

Date Patient Weight Height XRay

Monday Smith 190 lbs. 71 in. null

Tuesday Jones 180 lbs. 74 in. <xml>

52

Observation

ProblemsHow do I add a new observation type (i.e. Pulse)?What if weight, height, and X-ray observations were taken on different days?How do I store multiple Weights for a patient?

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

How do I add Pulse?

53

Date Patient Weight Height XRay … Pulse

Monday Smith 190 lbs. 71 in. <xml> … null

Tuesday Jones 180 lbs. 74 in. <xml> … null

alter table observation add column pulse integer(10);

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Concept Dictionary

54

Date Patient Concept Value

Monday Smith Weight 190

Friday Smith Height 71

Tuesday Jones Weight 180

Tuesday Jones Height 74

Concept DataType Units

Weight Numeric Pounds

Height Numeric Inches

Xray Complex None

Date Patient Weight Height XRay

Monday Smith 190 lbs. 71 in. null

Tuesday Jones 180 lbs. 74 in. <xml>

DataMeta Data

Observation

ObservationConcept

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.055

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

How do I add Pulse?

56

Date Patient Concept Value

Monday Smith Weight 190

Friday Smith Height 71

Tuesday Jones Weight 180

Tuesday Jones Height 74

Friday Smith Weight 191

Concept DataType Units

Weight Numeric Pounds

Height Numeric Inches

Xray Complex None

Pulse Numeric Beats Per Minute

Observation Concept

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

How does this make the data model less complex?

57

SELECT obs.value

FROM patient, obs, concept

WHERE patient.patient_id = obs.patient_id

AND concept.concept_id = obs.concept_id

AND concept.concept_name = ‘WEIGHT’

AND patient.patient_id = ?

ORDER BY obs.obsdatetime DESC LIMIT 1

Ugh!

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

But OpenMRS makes it simple!

58

OpenMRSLogic Service

191.0 lbs“LAST WEIGHT”

LogicService.evaluate(patients, “LAST WEIGHT”)

Nice!

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Integrating BIRT

59

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Architecture

60

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

OpenMRS uses DEAPI and REAPI

61

Design Engine API

<xml>ReportDesign(.rptdesign)

OpenMRS BIRT Report Module

<csv>DataSet

(.csv)

1

Report Engine API

3

<xml>ReportDoc

(.rptdocument)

Export Dataset

Prepare Dataset

Run Report

2

4Modify Report

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Export Dataset

PatientID LAST CD4 COUNT

LAST WEIGHT

HIV POSITIVE

ENROLLED DATE

1 390 55.0 TRUE 01/01/2008

2 500 59.0 TRUE 02/01/2008

3 203 53.0 TRUE 03/01/2008

4 429 50.0 TRUE 03/07/2008

5 1023 81.0 FALSE 03/10/2008

6 139 49.0 TRUE 03/18/2008

62

DataSet_03_18_2008.csv

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

OpenMRS Report Module

63

Design Engine API

<xml>ReportDesign(.rptdesign)

OpenMRS BIRT Report Module

<csv>DataSet

(.csv)

1

Report Engine API

3

<xml>ReportDoc

(.rptdocument)

Export Dataset

Prepare Dataset

Run Report

2

4Modify Report

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Prepare Dataset (Design Engine API)

64

<xml>ReportDesign(.rptdesign)

<?xml version="1.0" encoding="UTF-8"?><report> ...

<data-sources> <oda-data-source>

<property name="HOME"> /tmp/birt/reports/datasets

</property> </oda-data-source></data-sources><data-sets> <oda-data-set>

<property name="queryText"> select * from DataSet_03_18_2008.csv </property>

</oda-data-set></datasets>

...</report>

Design Engine API

OpenMRS BIRT Report Module

BirtReportService.prepareDataset()

DataSourceHandle.setProperty()

OdaDataSetHandle.setQueryText()

ReportDesignHandle.save()

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

OpenMRS Report Module

65

Design Engine API

<xml>ReportDesign(.rptdesign)

OpenMRS BIRT Report Module

<csv>DataSet

(.csv)

1

Report Engine API

3

<xml>ReportDoc

(.rptdocument)

Export Dataset

Prepare Dataset

Run Report

2

4Modify Report

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Run Report (Report Engine API)

66

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Extending BIRT

67

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

OpenMRS ODA Plugin

68

Report Designer

SQL Flat FileXMLWeb

Service(SOAP)

Data

OpenMRS(REST)

XMLData

CSVData

OpenMRSLogic

REST API??

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Select OpenMRS Data Source

69

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Configure Connection

70

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Create Data Set

71

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.072

OpenMRSLogic

REST API

GET COLUMNS

<Columns> <Column>PATIENT ID</Column> <Column>CD4 COUNT</Column> <Column>WEIGHT</Column> ...</Columns>

Report Designer

SQL Flat FileXMLWeb

Service(SOAP)

OpenMRS(REST)

Get Columns

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Select Columns

73

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Report Designer

Execute Query

74

OpenMRS(REST)

OpenMRSLogic

REST API

GET PATIENT ID, LAST WEIGHT, LAST CD4 COUNT FROM PATIENT

<?xml version="1.0" encoding="utf-8"?><dataset entity="PATIENT">    <columns>        <column token="PATIENT ID"/>        <column token="LAST WEIGHT"/>        <column token="LAST CD4 COUNT"/>    </columns>    <rows>        <row>            <value>1</value>            <value>180</value>            <value>209</value>        </row>        <row>            <value>2</value>            <value>200</value>            <value>198</value>        </row>    </rows></dataset>

SQL Flat FileXMLWeb

Service(SOAP)

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Preview Data Set

75

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Back to the Real World

76

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.077

Diagnosed with HIV and TB

Started on ARV Regimen

Started on TB Regimen

Started on Food Program

Joseph Jeune

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Sept 2003

78

March 2003

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

We need your help … join OpenMRS!

79

justin@openmrs.org

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Thank You

80

Thank you to the Eclipse and BIRT Communities!

Using Eclipse BIRT in the Real World … Seriously | © 2008 by Justin Miranda; made available under the EPL v1.0

Resources

Partners In Health – www.pih.org OpenMRS – www.openmrs.org OpenMRS IRC – irc.freenode.net #openmrs Eclipse BIRT – http://www.eclipse.org/birt BIRT Exchange – http://www.birt-exchange.com BIRT World - http://birtworld.blogspot.com BIRT Newsgroup - news://news.eclipse.org/eclipse.birt

81