OpenMRS Open Medical Records System

Similar documents
Using the OpenMRS. system to strengthen health care delivery in Rwanda

Web Container Components Servlet JSP Tag Libraries

Client-server 3-tier N-tier

Implementing Electronic Medical Record Systems in Rural Haiti

SSC - Web development Model-View-Controller for Java web application development

JEE Web Applications Jeff Zhuk

Customer Bank Account Management System Technical Specification Document

Database Applications Recitation 10. Project 3: CMUQFlix CMUQ s Movies Recommendation System

Stock Trader System. Architecture Description

In this chapter, we lay the foundation for all our further discussions. We start

Web Service Caching Using Command Cache

Reporting and JSF. Possibilities, solutions, challenges. Slide 1. Copyright 2009, Andy Bosch,

enterprise^ IBM WebSphere Application Server v7.0 Security "publishing Secure your WebSphere applications with Java EE and JAAS security standards

Model-View-Controller. and. Struts 2

Tutorial: Building a Web Application with Struts

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Complete Java Web Development

Hello World Portlet Rendered with JSP for WebSphere Portal Version 4.1

IBM Rational Rapid Developer Components & Web Services

Accessing Data with ADOBE FLEX 4.6

How To Understand The Architecture Of Java 2Ee, J2Ee, And J2E (Java) In A Wordpress Blog Post

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

Web Frameworks and WebWork

Building Web Applications, Servlets, JSP and JDBC

Introduction to Oracle Mobile Application Framework Raghu Srinivasan, Director Development Mobile and Cloud Development Tools Oracle

Portals, Portlets & Liferay Platform

CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

Simplify Your Web App Development Using the Spring MVC Framework

Application Security

EAI-Low Level Design Document

Software Architecture Document

JAVA/J2EE DEVELOPER RESUME

Search Engine Optimization for a WebSphere Commerce System

IUCLID 5 Guidance and Support

Real SQL Programming 1

Creating Java EE Applications and Servlets with IntelliJ IDEA

Web Programming II JSP (Java Server Pages) ASP request processing. The Problem. The Problem. Enterprise Application Development using J2EE

Developing XML Solutions with JavaServer Pages Technology

Configuring Secure Socket Layer (SSL) for use with BPM 7.5.x

Core J2EE Patterns, Frameworks and Micro Architectures

Safe Harbor Statement

JBoss SOAP Web Services User Guide. Version: M5

Outline. CS 112 Introduction to Programming. Recap: HTML/CSS/Javascript. Admin. Outline

MVC pattern in java web programming

Open-Xchange Hosted Edition Directory Integration

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Web Development on the SOEN 6011 Server

An introduction to creating JSF applications in Rational Application Developer Version 8.0

Enterprise Application Development In Java with AJAX and ORM

Client/server is a network architecture that divides functions into client and server

Budget Event Management Design Document

CrownPeak Java Web Hosting. Version 0.20

Baidu: Webmaster Tools Overview and Guidelines

How to make a good Software Requirement Specification(SRS)

HPC PORTAL DEVELOPMENT PLATFORM

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

Web Applications. Originals of Slides and Source Code for Examples:

Video Administration Backup and Restore Procedures

Beginning POJOs. From Novice to Professional. Brian Sam-Bodden

JMS 2.0: Support for Multi-tenancy

What Is the Java TM 2 Platform, Enterprise Edition?

Deploying EMC Documentum WDK Applications with IBM WebSEAL as a Reverse Proxy

Rapid Application Development. and Application Generation Tools. Walter Knesel

AD-HOC QUERY BUILDER

Design Patterns. Design patterns are known solutions for common problems. Design patterns give us a system of names and ideas for common problems.

A framework for web-based product data management using J2EE

Get Success in Passing Your Certification Exam at first attempt!

Liferay Enterprise ecommerce. Adding ecommerce functionality to Liferay Reading Time: 10 minutes

CREATE A CUSTOM THEME WEBSPHERE PORTAL

CloudCERT (Testbed framework to exercise critical infrastructure protection)

Copyright 2008 The Pragmatic Programmers, LLC.

CatDV Pro Workgroup Serve r

: Test 217, WebSphere Commerce V6.0. Application Development

Spring Security 3. rpafktl Pen source. intruders with this easy to follow practical guide. Secure your web applications against malicious

CTSU SSO (Java) Installation and Integration Guide

Glassfish, JAVA EE, Servlets, JSP, EJB

The Google Web Toolkit (GWT): The Model-View-Presenter (MVP) Architecture Official MVP Framework

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Applets, RMI, JDBC Exam Review

JBoss Portlet Container. User Guide. Release 2.0

HP Operations Orchestration Software

McAfee One Time Password

PowerTier Web Development Tools 4

Tutorial: BlackBerry Object API Application Development. Sybase Unwired Platform 2.2 SP04

Aspect Oriented Programming. with. Spring

Link Analysis Tool Design Description Final Version

Transcription:

OpenMRS Open Medical Records System INF5750 Saptarshi Purkayastha, Research Fellow, NTNU, Norway (using material from EHSDI course)

OpenMRS A free open source medical record system A web application written in Java with a MySQL/Postgres/< > backend A framework rather than a single program - its functionality is typically provided through custom "modules Modules are deployable on runtime without having to restart the web server or web application

A global community (Impl map) Last release had 72 developers. Overall more than 300+ developers have written code in opensource way

Core EMR domain objects Obs is short for observation It can be measurement or a question, e.g. What is a person's HIV status? Are they pregnant? What is their height? What is their weight?

Many EMR's start as spreadsheets, using a flat table to hold observations of patients, e.g. Observations Patients

Table gets unmanageably big as we keep adding new observations Gets really complicated when we want multiple records of the same observation type, e.g. weight change over time Wasted space when columns aren't used

Each observation becomes a concept and a value like a question and an answer PATIENTS CONCEPTS OBSERVATIONS

Concept name is very specific and includes units Concept id

Observations typically come from an event such as: The patient visits a clinician A form is submitted which records observations An event such as this is called an Encounter It describes a formal interaction between a provider and a patient Encounters can have many observations

Thus for a single encounter we want to store the following: Patient Provider Time/date Location Observations

Disease-specific EMR (MDR-TB) Credit: WHO-TB and PIH

Inpatient Care Credit: Andrey Kozhushkov, Ghislain Kouematchoua (Göttingen)

Credit: Dave Thomas Research Data Coordination

Adaptive Turnaround Documents Credit: Vibha Anand, Paul Biondich (Regenstrief)

Eligibility Across Institutions Credit: Monica Waggoner

Google Maps Integration Credit: Owais Ahmed, Aamir Khan

Credit: Brian Mckown (AMPATH) ID Cards and Barcodes

Mateme Touchscreen Registration Credit: Jeff Rafter (Baobab), Evan Waters (PIH)

Credit: Rowan Seymour iphone App

Notifiable Condition Detector Credit: Shaun Grannis, Regenstrief Institute

OpenMRS Development Primer

Controllers use Service interfaces implement The different layers interact with each other through interfaces, making it easier to change implementations Service implementations use DAO interfaces implement DAO implementations use Session factory

All of the DAO methods need valid sessions and transactions This code has to be in every method public List<Example> getexamples() { Session session = sessionfactory.opensession(); session.begintransaction(); List<Example> examples = session.createcriteria(example.class).list(); session.gettransaction().commit(); session.close(); return examples; }

Is an architecture which separates the data (model) the business logic (controller) the presentation (view) Model Classes, DB Controller Servlets View JSPs

Model Helper Classes Controller Servlet classes Attributes View JSPs Request Response Client

The controller receives the request from the client Parameters are read from the request Model classes used for any business logic Controller doesn't return any HTML JSP creates the response Get parameters from request Consult the model classes Set attributes on request or session Forward request to JSP

public void doget(httpservletrequest request, HttpServletResponse) { String name = request.getparameter("name"); 1 String password = request.getparameter("password"); User user = Security.login(name, password); 2 request.setattribute("curuser", user); 3 } RequestDispatcher view = request.getrequestdispatcher("/login.jsp"); view.forward(request, response); 4 Gets parameters from the view Consults the model for any business logic Sets attributes to be used by view Forwards the request to the view 1 2 3 4

This JSP can now return an HTML response using the attributes set by the controller <p>result is: <%= ((User)request.getAttribute("user")).getName() %> </p> However, this still requires Java code, which might be quite complex if we need to generate something like a table of results One alternative to this is...

This requires the usebean and getproperty actions, e.g. <p>result is: <%= ((User)request.getAttribute("curUser")).getName() %> </p> <p>result is: <jsp:usebean id="curuser" class="user" scope="request" /> <jsp:getproperty name="curuser" property="name" /> </p>

The sole purpose of a Validator is to validate the command object of a form View Errors Validator Any errors it finds, it sends back to the view Command FormController Success Request Success

Controllers beans are configured with validator beans in XML, e.g. <bean id="personvalidator" class="ehsdi.personvalidator" /> <bean id="personform" class="ehsdi.personformcontroller"> <property name="commandname"><value>person</value></property> <property name="formview"><value>/personform</value></property> <property name="successview"><value>person.list</value></property> <property name="validator"> <ref bean="personvalidator" /> </property> </bean> Controller will now automatically validate the person when form is submitted

What if submitted values cannot even be bound to the command object? Spring will create its own error message, which will be displayed by <form:errors>, e.g. Failed to convert property value of type [java.lang.string] to required... Error Age: Command Object xa!fsb Binder Person Validator

Submission Binding Validation Form Editors Command object Validators Edit Person Person Name: Bob Smith name: Bob Smith NameValidator DOB: 28/05/81 Custom DateEditor DOB: 28-05-1981 PersonValidator Married: Yes Custom BooleanEditor married: true One validator can invoke another

login.jsp... <openmrs:portlet url="login"/>... portlet tag is handled by PortletTag login.htm

login Gets url attribute PortletTag.java /portlets/login.portlet Creates portlet URL Requests portlet URL openmrs-servlet.xml urlmapping *.portlet PortletController Maps URL to controller PortletController.java /portlets/login.portlet /portlets/login Gets servlet_path attribute Removes.portlet Forwards to view... openmrs-servlet.xml jspviewresolver /portlets/login /portlets/login.jsp Maps view to JSP login.jsp Displays JSP!

Much more details (openmrs.org) Lots of details but very flexible and modular