Using Eclipse BIRT in

81
© 2008 by Justin Miranda; made available under the EPL v1.0 | 18 March 2008 Using Eclipse BIRT in seriously! Justin Miranda [email protected]

description

Using Eclipse BIRT in. … seriously!. Justin Miranda [email protected]. Apologies. Partners In Health. Where we work. Rwinkwavu, Rwanda. Inshuti Mu Buzima Rwinkwavu, Rwanda. What we do. Health Facilities. Health Facility. Before. After. After. Before. Quality Health Care. - PowerPoint PPT Presentation

Transcript of Using Eclipse BIRT in

Page 1: Using Eclipse BIRT in

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

Using Eclipse BIRT in

… seriously!

Justin [email protected]

Page 2: Using Eclipse BIRT in

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

Apologies

2

Page 3: Using Eclipse BIRT in

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

PartnersIn Health

3

Page 4: Using Eclipse BIRT in

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

Where we work

4

Page 5: Using Eclipse BIRT in

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

Rwinkwavu, Rwanda

5

Page 6: Using Eclipse BIRT in

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

Inshuti Mu Buzima Rwinkwavu, Rwanda6

Page 7: Using Eclipse BIRT in

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

What we do

7

Page 8: Using Eclipse BIRT in

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

Page 9: Using Eclipse BIRT in

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

Page 10: Using Eclipse BIRT in

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

Medication

Page 11: Using Eclipse BIRT in

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

Food

11

Page 12: Using Eclipse BIRT in

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

Housing

Before After

Page 13: Using Eclipse BIRT in

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

Education

Page 14: Using Eclipse BIRT in

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

Mountains Beyond Mountains

14

Page 15: Using Eclipse BIRT in

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

Real World Challenges

15

Page 16: Using Eclipse BIRT in

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

Page 17: Using Eclipse BIRT in

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

Power Outage

17

Page 18: Using Eclipse BIRT in

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

Page 19: Using Eclipse BIRT in

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)

Page 20: Using Eclipse BIRT in

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

Multiple Languages

20

Page 21: Using Eclipse BIRT in

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

Page 22: Using Eclipse BIRT in

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

Page 23: Using Eclipse BIRT in

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

Paper … lots of it!

Page 24: Using Eclipse BIRT in

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

Page 25: Using Eclipse BIRT in

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

Open Source Medical Record System

Page 26: Using Eclipse BIRT in

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

Community

26

Community

Page 27: Using Eclipse BIRT in

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

Collaboration

27

Page 28: Using Eclipse BIRT in

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

Architecture

28

Page 29: Using Eclipse BIRT in

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

Buzzword Soup

29

Tomcat

Page 30: Using Eclipse BIRT in

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

Eclipse IDE

30

Page 31: Using Eclipse BIRT in

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

BIRT RCP Designer

31

Page 32: Using Eclipse BIRT in

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

Page 33: Using Eclipse BIRT in

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

Feature-Rich Design Tool

33

Page 34: Using Eclipse BIRT in

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

Page 35: Using Eclipse BIRT in

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

Extensibility

35

Page 36: Using Eclipse BIRT in

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

Configurability

36

Page 37: Using Eclipse BIRT in

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

Power Outage

37

Page 38: Using Eclipse BIRT in

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

Page 39: Using Eclipse BIRT in

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 DesignerDesign

Page 40: Using Eclipse BIRT in

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

Simple Charts

Page 41: Using Eclipse BIRT in

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

Page 42: Using Eclipse BIRT in

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

Data Quality Reports

Page 43: Using Eclipse BIRT in

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

Form Completeness

Page 44: Using Eclipse BIRT in

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

Complex Reports

44

Page 45: Using Eclipse BIRT in

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

Enrollments By Gender and Age

Page 46: Using Eclipse BIRT in

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

Patient Summary

46

Page 47: Using Eclipse BIRT in

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

Clinical Summary

Page 48: Using Eclipse BIRT in

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

Critical Reports

48

Page 49: Using Eclipse BIRT in

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)

Page 50: Using Eclipse BIRT in

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

Page 51: Using Eclipse BIRT in

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

Complex Data Model

51

WTF?

Page 52: Using Eclipse BIRT in

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 XRayMonday 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?

Page 53: Using Eclipse BIRT in

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 … PulseMonday Smith 190 lbs. 71 in. <xml> … nullTuesday Jones 180 lbs. 74 in. <xml> … null

alter table observation add column pulse integer(10);

Page 54: Using Eclipse BIRT in

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 ValueMonday Smith Weight 190

Friday Smith Height 71

Tuesday Jones Weight 180

Tuesday Jones Height 74

Concept DataType UnitsWeight Numeric Pounds

Height Numeric Inches

Xray Complex None

Date Patient Weight Height XRayMonday Smith 190 lbs. 71 in. null

Tuesday Jones 180 lbs. 74 in. <xml>

DataMeta Data

Observation

ObservationConcept

Page 55: Using Eclipse BIRT in

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

Page 56: Using Eclipse BIRT in

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 ValueMonday Smith Weight 190

Friday Smith Height 71

Tuesday Jones Weight 180

Tuesday Jones Height 74

Friday Smith Weight 191

Concept DataType UnitsWeight Numeric Pounds

Height Numeric Inches

Xray Complex None

Pulse Numeric Beats Per Minute

Observation Concept

Page 57: Using Eclipse BIRT in

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!

Page 58: Using Eclipse BIRT in

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!

Page 59: Using Eclipse BIRT in

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

Integrating BIRT

59

Page 60: Using Eclipse BIRT in

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

Architecture

60

Page 61: Using Eclipse BIRT in

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

Page 62: Using Eclipse BIRT in

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

Page 63: Using Eclipse BIRT in

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

Page 64: Using Eclipse BIRT in

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()

Page 65: Using Eclipse BIRT in

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

Page 66: Using Eclipse BIRT in

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

Page 67: Using Eclipse BIRT in

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

Extending BIRT

67

Page 68: Using Eclipse BIRT in

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??

Page 69: Using Eclipse BIRT in

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

Select OpenMRS Data Source

69

Page 70: Using Eclipse BIRT in

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

Configure Connection

70

Page 71: Using Eclipse BIRT in

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

Create Data Set

71

Page 72: Using Eclipse BIRT in

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

Page 73: Using Eclipse BIRT in

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

Select Columns

73

Page 74: Using Eclipse BIRT in

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)

Page 75: Using Eclipse BIRT in

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

Preview Data Set

75

Page 76: Using Eclipse BIRT in

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

Page 77: Using Eclipse BIRT in

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

Page 78: Using Eclipse BIRT in

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

Sept 2003

78

March 2003

Page 79: Using Eclipse BIRT in

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

[email protected]

Page 80: Using Eclipse BIRT in

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!

Page 81: Using Eclipse BIRT in

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