Adding SPARQL to the NHS Using Smart Apps and VistA

52 views
Skip to first unread message

rtweed

unread,
May 29, 2012, 4:26:26 AM5/29/12
to nhshackday
I thought I'd just capture some of the background behind our NHS Hack
Day project in a little more detail than was hurriedly thrown together
in the HackDay Wiki on Sunday in the heat of battle! I hope this is
helpful because I think that our project successfully demonstrated
that there is a significant strategic potential here: a real chance to
bypass a hugely costly and risky re-invention of the wheel by the NHS,
and instead to build upon, and contribute to, the work of Harvard
Medical School who are behind the SMART Platforms initiative in the
US.

A bit of background to the SMART Platforms concept. Harvard Medical
School's idea is this:

- there is a wealth of data locked up in proprietary systems in the
US, just as here. People are limited to the functionality that the
vendors provide to probe and visualise that data. If you have a cool
idea about a value-added feature, you have to go cap in hand to your
vendor who will probably expect a significant amount of money for the
privilege of implementing your idea, may or may not be bothered to do
it, and your colleagues at other locations using a different vendor's
system will be unable to benefit from your idea.

- meanwhile, by introducing a standard set of APIs for its iPhone and
the iOS operating system, Apple spawned a massive industry of "there's
an app for that", where anyone with a bright idea could knock up an
application, put it on the App Store, and anyone could use it.

So, thought Harvard Medical School: if we could define a set of
standards - a combination of data standards and technical/
architectural standards - we could create an "App Store" for
healthcare, where anyone with a limited set of technical skills could
design and implement applications in an EHR-independent way. In
effect, someone with a cool idea should be able to create that
application using Javascript (for visualisation) and SPARQL (the query
language for RDF-based data), and that application could be used on
any EHR that was extended to be SMART-compatible (what's known as a
SMART Container). If EHR vendors can be encouraged to make the data
their system retains via the SMART Container standards, any SMART App
will "just work". The SMART App developer doesn't have to know
anything about Cerner, Epic, Lorenzo, whatever. He/she can design and
build against a simulated EHR (Harvard provide one for free that
anyone can use for development), and everyone can benefit, regardless
of the EHR they use.

The data standard chosen by Harvard is RDF (Resource Definition
Format): part of Sir Tim Berners-Lee's Semantic Web stack. The
semantic accuracy/depth that is inherent in RDF is one of the key
reasons for its choice, but also its schema-less, extensible way of
representing complex data with deep, complex relationships. SMART
defines a standard datasets that any SMART Container should be capable
of generating on demand in RDF format, including:

- demographics
- medications
- problems
- vitals
- etc

The technical/architectural standards are pure web/Javascript. The
SMART Container simply needs to create an IFrame into which the Smart
App can be retrieved. The data is fetched from the SMART Container
system in RDF format by the Smart App which visualises that data using
your favourite Javascript framework/widgets. The SMART App queries
the RDF data using a query language known as SPARQL (pronounced
sparkle) which is another part of RDF and the Semantic Web.

Discovery of SMART Apps is via "manifests": small JSON objects that
define, inter alia, the URL that is used to fetch the app's main html
page. By telling the SMART Container "I want to run the SMART app
identified by this manifest", it will burst into life automatically.
All you need is the manifest. The SMART App itself can be sitting
anywhere in the web.

===================

So that's the background to SMART. Now for the Hack Day project which
was to try to see if anyone had an idea for an app that we could then
try building as a SMART App. I put this forward as I'm currently
engaged in a project with Harvard Medical School to implement what
will be the first true EHR that is enabled as a SMART Container. The
EHR that Harvard realised would be a good first bet is VistA: the EHR
that supports the healthcare provision by the US Dept of Veterans
Affairs (VA) (who provide all healthcare needs of military veterans
and their families across the US). VistA is freely available as an
Open Source EHR and a growing community of developers outside the VA
are enhancing and supporting VistA and making it available for use in
US hospitals and elsewhere. In the UK there is a groundswell of
opinion that VistA should be evaluated for use in the UK. The group I
work with are the WorldVistA community.

My part in the Harvard project is the technical side, and I've used my
Open Source web application development framework (EWD) to provide the
mechanics by which VistA can act as a SMART Container.

Meanwhile my WorldVistA colleague, George Lilly, based in New York, is
doing the real-time abstraction and mapping of patient data held in
VistA into RDF format. As part of this work he has implemented what's
called a "Triple Store" on top of VistA's Fileman data dictionary
(which, in turn, abstract the lower-level Mumps database). Triple
Stores are another key part of RDF and the Semantic Web, allowing
complex data to be stored as interlinked "triples": each triple
represents an Object, a Predicate and a Subject.

When the project is complete (in a few months' time), this will mean
that we will have a freely-available version of VistA that is enabled
as a SMART Container. You could use VistA as a full-blown EHR and
then you'd also have an EHR that can be immediately extended via SMART
Apps. However, there's an additional, and even cooler, twist to this:
we'll have a freely-available, Open Source Triple Store and SMART
platform: ie you'll be able to download, for free, a version of VistA
that you could simply use as a triple store and SMART Container, and
ignore its EHR capabilities entirely.

==============

So, the idea of the NHS Hack Day application was to build a proof of
concept around that latter idea: let's use a copy of VistA that George
and I are using for the SMART project, take some UK-sourced data,
convert it to RDF format, store it in George's Triple Store and then
build a SMART App that would query that data using SPARQL and
visualise that data using the ExtJS Javascript framework as both a
data grid and a radar chart.

The data we used was a from a HES data extract which Chris Wroe
converted to RDF. George Lilly assisted in its conversion and storage
into the Tripe Store. I then built the SMART App with suggestions for
its functionality from the rest of the team.

Although our SMART App didn't do a great deal per se, and wasn't as
immediately impressive, perhaps, as the many other excellent projects
that emerged from the NHS Hack Day, the strategic ramifications of its
successful creation and demonstration within 1.5 days are, in my
opinion, huge: the technology clearly works and is applicable to use
in the UK just as in the US. This is a set of wheels that the NHS can
avoid re-inventing.

We also demonstrated that in a few months time when our project is
completed and its deliverables are releasable, anyone in the UK will
be able, without asking anyone, and at no cost, download the
WorldVistA EHR and use it just as a SMART-enabled platform and Triple
Store. Extract data from your existing systems or use data sets that
are already being exchanged, convert them to RDF, import them to the
VistA Triple Store, and start letting your imagination run wild in the
form of a UK NHS App Store full of SMART Apps! You don't need to wait
until your favourite, friendly vendor makes their system SMART-
compatible (though let's hope they eventually will!)

=================

Some pointers to key resources I mentioned above:

- SMART Platforms background: http://smartplatforms.org
- WorldVistA: http://worldvista.org/
- EWD: http://www.mgateway.com
- NHS VistA: http://nhsvista.net/
- ExtJS: http://sencha.com

You can already download a free, pre-built, pre-configured, ready to
run Virtual Machine that includes VistA (complete with sample patient
data and set up for both inpatients and outpatients), GT.M (an Open
Source version of the Mumps database) and EWD (for web-enablement of
VistA). The VM is known as dEWDrop:

- http://www.fourthwatchsoftware.com

The current version does not yet include the SMART technology, but the
intention is that it soon will. However, for anyone interested in
VistA and its potential in the UK, the dEWDrop VM is a great way of
delving straight into a version that is already set up, albeit for use
in the US rather than the UK.

Rob Tweed

Email: rob....@gmail.com
Twitter: @rtweed














richard wilson

unread,
May 29, 2012, 5:36:25 AM5/29/12
to nhsha...@googlegroups.com
I will send you the summary document we wrote on Sunday.

Sent from my iPhone

rtweed

unread,
May 29, 2012, 5:47:29 AM5/29/12
to nhshackday
Apologies, Richard - I neglected to add your name as a team member in
the project. Richard worked with Chris to get and convert the HES
data extract, and was the main presenter of the project to the panel
of judges....and can be heard on the Radio4 World at One report on the
Hack Day!

Also on the team was Nick Booth and Phil Jones who helped on the
background thinking and design of the project.

Excellent project team - it was great to work with you all!

Rob

On May 29, 10:36 am, richard wilson <rcw1...@me.com> wrote:
> I will send you the summary document we wrote on Sunday.
>
> Sent from my iPhone
>
> > -http://www.fourthwatchsoftware.com
>
> > The current version does not yet include the SMART technology, but the
> > intention is that it soon will.  However, for anyone interested in
> > VistA and its potential in the UK, the dEWDrop VM is a great way of
> > delving straight into a version that is already set up, albeit for use
> > in the US rather than the UK.
>
> > Rob Tweed
>
> > Email: rob.tw...@gmail.com
> > Twitter: @rtweed

rtweed

unread,
Jun 1, 2012, 9:45:08 AM6/1/12
to nhshackday
Follow-up posting by the SMART team at Harvard Medical School:

http://www.smartplatforms.org/2012/06/uk-collaborators-build-smart-proof-of-concept-at-nhs-hack-day/
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages