wiki:PMI Lookup

Version 7 (modified by Nick Holden, 11 years ago) ( diff )

--

PMI Lookup

Outline

The Patient Master Index Lookup is a web service which - given a patient's s-Number - retrieves basic demographic data from the UHLT's patient master index via a JDBC connection and returns the information in a serialized version of the Onyx Participant Java object (org.obiba.onyx.core.domain.participant.Participant).

Note, this implies the client (or invoker) of this service is written in Java and knows about the Onyx Participant object. So, this is a fairly restrictive web service! A more generalized access method would entail redevelopment using XML as the medium rather than a serialized Java object.

Configuration

Configuration takes into account possible differing database requirements. During development, this aspect is managed within the maven project structure but eventually - on deployment - gets placed within the webapp/WEB-INF/patient-lookup-ws-data.xml file. This is something administrators should be aware of. This file needs to be edited before a system is workable. It needs to be held within a secure environment.

The following details try to elucidate the problems of configuration across differing contexts...

Database

The whole point of the PMI Lookup is to interface with a database. Moreover it is really only a service provided to another system; in this instance the Onyx questionnaire. This presents some problems...

  1. Unit tests need to be light weight
  2. For a developer testing Onyx, it is good to be able to eliminate yet another complex dependency (Onyx uses one type of database, whereas in the clinical environment the PMI Lookup is using a different type of database).
  3. The clinical environment in a test context
  4. The clinical environment in a live context

The pmi-lookup-*-config.properties file

Within the project there are three versions of this file.

  1. One for unit testing, which uses a transitory HSQLDB database
  2. One for "integration" testing with Onyx (== development)
  3. One for the clinical environment, covering both live and test contexts (== production)

Build Profiles

Any unit testing automatically uses HSQLDB.
Elsewhere, invoking install or deploy needs a maven profile. The two profiles provided (in the POM) are development and production. If not quoted, builds are development by default. When you build an artifact, the word "development" or "production" is folded into the artifact name. Only production builds are suitable for the clinical environment.

Testing

To do a web-based test of the PMI lookup service access the following URL from Nick's UHL desktop PC. It will not work from anywhere else. Or from there, if the UHL network team decide to change his IP address without telling him. In which case, change the valve restriction in the xml context file (in /etc/tomcat6/Catalina/localhost).

http://uhlbriccsdev.xuhl-tr.nhs.uk:8080/patient-lookup-ws/participant/S0021047/onyx.xml

Note: See TracWiki for help on using the wiki.