Suggesting standard semantics in nursing notes using an ICNP ontology.

The problem I am addressing is:  How do I automatically suggest standard nursing semantics when nurses are writing their patient notes in an Electronic Health Records (EHR)?

The aim of this project is to use Lucene to search nursing notes and suggest possible words from an International Classification of Nursing Practice (ICNP) ontology.

Constructing the first ontology.

Although the ICNP site contains its own Web Ontology Language (OWL) ontology, there exists comma delimited (CSV) files on the site which can be exported into the ontology development platform Protege 5 to construct an ontology from scratch. That way, I can understand the nuances and structure of the ontology. Other benefits of constructing my own ontology include:

  • I can import the CSV files into Excel
  • In Excel, I can add other CSV files such as mapping code to SNOMED
  • I can check my ontology against the official ICNP ontology for error correction
  • I can construct an OWL-DL ontology and use first-order logic to reason about my ontology
  • I can construct axioms, data, object and annotation objects.

An ontology requires a hierarchy of classes and subclasses to be made. As usual I tried to make the ontology ‘human readable’ by constructing parent classes using the ICNP ‘preferred terms’. I ran into problems immediately because there are many duplicate terms which confuse Protege. For example, the term ‘action’ has the same name as its parent class, this is forbidden in OWL. To overcome this, it is necessary to use the concept key as the parent class. Although it makes the ontology non-readable to humans, it solves the duplication problems.

More to come…

 

In search of the Wilga ghost

Back 2004 my son Matthew and I decided to embark on a 4000k road trip to find one of Australia’s most enduring folk tales: the Wilga screaming ghost!

I have a theory that a book seeks you out.  Particular books if you ignore them, tend to pop-up again and again.  A book called “A treasury of Australian Folk Tales” written in 1960 by Bill Beatty found its way via various book stores and relatives to my attention.  Inside it, a story called “Here’s a queer tale” caught my interest.

It tells of a screaming ghost, which apparently frequented the Wilga waterhole on the Barcoo river between the mid 1800’s and 1925.  There have been many independent eyewitness accounts over the years, one interesting one states that during the height of the ear splitting phenomenon, the water on the surface of the waterhole remained undisturbed.

As far as the legend goes, there are a few variations on the story. The one in the book says: “The story is consistent always, nothing but a series of terrifying, fiendish yells and screams arising suddenly and dying away mysteriously into silence”. Most of the versions of the story tend to center around the woman living in the house. The book’s version says: “A new hand employed at Ruthven station built a slab and bark hut near the waterhole. He brought his wife to live there. She was a typical bush woman, sensible, practical and accustomed all her life to the loneliness of the outback. The couple had been there for a short time when one night the husband arrived home late, having been delayed, to find his wife in a state of collapse. She could tell him of nothing she had seen, but the most appalling shrieks had come from the waterhole. Soon after this episode the station hand was away for two nights. On arrival home he found his wife hysterical. Crying and sobbing, she told him of the terrible screaming and wailing at the waterhole that had caused her to almost lose her reason”. Needless to say they packed their bags and hit the track without delay.

Another story relates that the woman killed her infant child and the screaming was her remorseful spook. Yet other tells of a boundary rider who was lost and his skeleton was found years later minus a leg, it was he who was screaming for the lost leg.  It was pick a story time, as Mat and I would be sitting out there miles from no-where, by our selves, in a place where the owner last visited three years ago. I decided to go with my personal favorite on this occasion, the book’s lost leg, less gruesome account.

The hole’s bad reputation regarding this rowdy spook grew and got better in the telling as the years rolled on. Still, I think you would agree that this industrial-strength banshee was worth a four-wheel drive trip to investigate.

car on track

Unfortunately, the ghost’s reach extended all the way to Southern NSW. The little devil sent a bolt of lightning through my stop light wire the day I was to leave and promptly vapourised it from the rear of the Hilux to behind the dash. It took me three days to replace the wire and adjacent wires that had been melted. This was repeated again without warning at Cunnamulla but I had the job down to a fine art by then and it only took me four hours to replace the wire. This was really bad karma I thought, if it was trying to tell me something it certainly got my attention. I was beginning to think maybe there are some places a bloke shouldn’t go.

I was ready to turn back, but with the urging of my son Mat, we decided to press on regardless.

With some research I found that a lot of the elements of the story seemed true. The Wilga waterhole is indeed on Ruthven station, which is about twenty kilometers from Isisford on the river road to Yaraka in central West Queensland. Isisford is about one hundred and twenty kilometers of sealed road from Backall situated on the Kidman way. The hole is impossible to find without local knowledge. I was fortunate in that the owner of the station, Grant McPherson, turned out to be an excellent fellow and a font of local knowledge.

grant

On the way to the station we passed a white monument that looked like it was designed by a beer slab stacker. It read “at this point, the party of Sir Thomas Mitchell turned South, crossed the Barcoo and headed back to Sydney”.  I really couldn’t contemplate walking back to Sydney from here.

It took about one and three quarter hours to drive from the Ruthven station front gate to the site. The track varied from ironstone gibbers to sand and was easy going except the last five kilometers when the track disappeared altogether over flood damaged land, The rutted ground was dotted with silted tussocks which made it slow going.

the track dissapeared

We arrived just before dark, set up camp and waited for any untoward audio to happen. As tea was being cooked, a quick scan of the surrounding area with a light revealed hundreds of pairs if shining violet eyes peering back as the local wolf spider population prepared to find theirs, I was quietly glad we were in a pop-top. Being the card-carrying chicken that I am, I packed a pair of earplugs, just in case. Lying there in dead silence, only punctuated by the chirping of crickets and the odd water bird call, I watched a few mindless assassin bugs circle the light overhead.  Just as I was about to slip off into dreamland, the curious sound of tree boughs breaking one after another in quick succession over a minute or so filled my nightly quota of illogical bush noises and the earplugs went straight in.

The next morning dawn broke over the waterhole. The Wilga hole is a truly beautiful place. Although the Barcoo was bone dry, waterholes such as the Oma, thirty mile and the Wilga still hang in there. The Wilga hole is permanent and has never gone dry in living memory. Locals put this down to the depth of the hole and the ring of Dogwood and Coolabah trees preventing evaporation.

water hole

Fishing is good with Yellowbelly, Forkytails and possibly the odd old cod swimming around. The village of Isisford holds a popular fishing competition each year along the river. The banks of the hole can be quite steep in places and young children should be watched constantly.

fishing

The Winter months are definitely the time to visit and you should carry your own water supply. Most of the animals are nocturnal and it took us a while to figure out some of the tracks in the sand. One track looked like a snake on drugs, we later discovered that the owner was a kind of land-going Goanna called a Perente that can grow to eight feet long. “That’s why there aren’t any snakes”, Grant suggested, “the Perentes ate them all!”  Also, Perentes make a din at night as they rummage through your camp so keep your supplies out of reach  (I’d hate to read in some tabloid later that “a Perente stole my baby!”).

parente

After confirming our position on the (very early 2004) GPS as 24deg.27min.68sec South 144deg.4min.56sec East we started walking due North along the parallel levee bank edge. I was surprised to find the ruin of the building that was mentioned in the story. The hearth and some of the forked bearers which held up the little stockyards still remain. Bits and pieces of discarded rusty horse gear litter the site. Even a greater surprise, was that there are two graves down a ways from the ruin.

two graves

mat graves

Local legend has it that these circular graves are the final resting place of the mother and her child. The grave perimeters are ringed with hand hewn ancient weathered wooden stakes. One is lager than the other and Ruthven’s owners are quite sensitive to possible damage that visitors may cause the graves, so please be respectful.  Oddly enough, just down the hill toward the waterhole there is an old bottle tip.

tip

Some of these bottles date from the turn of the last century and I found it fascinating fossicking through the area.

The station owner, Grant, came for a visit in the morning and showed us around some of the old European mustering brush yards and another non-permanent hole that was used for sheep washing (complete with its own spin dryer). Luckily, the second night was as uneventful as the first (yep, still had the earplugs in). With the benefit of a full moon, we could see various fauna strolling past including kangaroos stopping for a look at our strange sprawling mechanical abode that looked so out of place in this area of myth and legend.

mat phil fire

 

 

Hand-washing logger with health worker category switches

In this, is the latest iteration of the hand-wash logging prototype, I have added four switches. As a registered nurse and ambulance officer I know from first-hand experience how we all hate filling in paperwork. This embedded logger records the date time and duration of a hand-wash event. Although it works very well, I realised I don’t know who is doing the hand-washing. To remedy this I have fitted four switches to the prototype. Each switch represents a category of health worker, namely: nurse, allied health, doctor and other. I will have a stick-on membrane matrix switch strip on the sink for the health worker to push before or during a hand-wash event.

A video of the upgraded logger can be found here: https://youtu.be/mCwyqt1lMmo

The picture below is a mock-up of a hand wash sink at our local hospital with the water proof membrane switch and piezo electric transducer in place.

The logger generates a .csv file that can be imported into Excel.

Nursing semantic networks- a different take on interoperability. Part 4

Part three of this blog introduced the predicate vocabulary ‘FOAF’ which facilitates interoperability on the Semantic Web by using an ‘agreed-upon’ standard, namely the predicate in a triple. In this blog we’ll look at one solution which allows nurses to directly input their knowledge to assist non-clinical ontology designers struggling to decipher seemingly impenetrable clinical semantics. The blog will conclude with a real life input produced by a front-line surgical nurse.

An ontology designer wants the most accurate semantics, preferably direct from the source, in this case, the front-line nurse. In the past, ontology designers relied on ‘third-hand’ semantics from sources other than people who actually use the semantics. Consequently, third-hand semantics may be open to inaccurate interpretation, and it follows, inaccurate ontologies. Ideally, we would like nurses who use the semantics on a day-to-day basis to construct the ontology, unfortunately ‘therein lies the rub’.

The problem with ontologies is that they are written in RDF, a rigid and predictable machine language, obviously, we can’t expect nurses to sit down write out 1000 lines of RDF to describe their nursing environment. To enable nurses to directly input their semantics I introduce an extra step; nurses use a simple ‘node-arc-node’ graph program to construct their clinical environment which can be used to construct an ontology.

A ‘node-arc-node’ graph is a visual representation of the triple. Nurses use a visual knowledge acquisition program to move nodes representing a triple’s subjects and objects about on a screen. Nodes can be connected with an arc which represents a relationship. The program then translates the graphs into RDF which is used to construct the ontology.

My thinking is: the extra step may produce ‘pure’ semantics as opposed to the nurse simply describing what she/he does to an ontology designer. Underpinning the extra step is something I read in the literature; Patricia Benner noted that ‘knowledge is embedded in practice’. Getting nurses thinking about their place in the clinical environment, what they do, who (and what) they interact with, then drawing a graph describing it, may free ‘trapped’ knowledge. Critics may argue that a graph produces a perception, an abstract, or a snapshot of that nurse’s environment. I think our graphs (and their resultant ontologies) may be enhanced if we were to obtain multiple perceptions from nurses working in the same ward, we could triangulate the results to construct a clearer ontology.

An unexpected benefit of drawing graphs and constructing ontologies from them is that the same semantics are produced in two different forms. Semantics in graphs can be analysed by nurses and semantics in ontologies can be analysed by machines. This means that graphs may help nurses introduce or eliminate processes to improve patient care. Also, graphs contain detailed annotations which describe the function and purpose of ‘what nurses do’ to the non-clinician. Machines, on the other hand, can analyse the logical structure and consistency of an ontology and this may open the door to hospital-wide automated auditing.

We asked four nurses who knew nothing about ontologies, graphs or semantics to use the graph software to describe their environments. The nurses worked in the same hospital but in totally different specialities. The nurses produced quite detailed graphs of their respective surgical, emergency, transitional care and administration environments. The graph drawn by the surgical nurse can be viewed here: http://home.spin.net.au/semantic/surgical/surgical_nurse.html

We found that nurses tend to organise their nodes into ‘clusters’.  Clusters in the surgical example include:

  • Medication administration
  • Documentation
  • Referrals to allied health
  • Patient.

We found completely different process structures in each of the specialities, but there was one constant, the nurse’s role in each speciality was predominantly independent. Also, the surgical graph contained surprising ‘hidden’ nursing processes. These include, ‘finding drug keys’ and ‘finding other nurses to check drugs’.

In the next blog instalment I will look at what machine ‘robots’ found when they analysed each of the four ontologies which were constructed from the four graphs.

Nursing semantic networks- a different take on interoperability. Part 3

In part two in this ever-expanding blog about interoperability I introduced the smallest unit of knowledge and the key to interoperability in a semantic network, the ‘triple’. This, the third article, looks at the ‘nuts and bolts’ of the triple and considers how machines read them.

Last time we looked a simple triple example describing the relationship ‘Bob knows Alice’.

Why Bob and Alice? To explain, Bob and Alice are characters from a 1969 movie called ‘Bob & Carol & Ted & Alice’. The movie was a critical and commercial success, and consequently, the characters are traditionally used to illustrate human-human and human-computer interactions, especially in cryptographic exchanges.  Anyway, back to the triple, you may ask: “what is inside it”?

A real-life ‘Bob knows Alice’ triple is composed of three Universal Resource Indicators (URIs). The URL address on the navigation bar of your browser is a form of URI. The following example shows how a machine-readable triple may look if Bob and Alice work in the same hospital.

Machine-readable triple

<http://myHospital.org.au/Emergency/people#Bob>    (Subject)

<http://foaf:knows>                                                                  (Predicate)

<http://myHospital.org.au/Surgical/people#Alice>         (Object)

It is clear from the above example that a triple is just three URIs that point, describe and name resources on the Semantic Web. We can see that Bob and Alice work in the same hospital. Bob works in the emergency unit and Alice works in the surgical unit.  The triple may be linked to further resources that include Bob and Alice’s addresses, employment history, education level and role in the hospital. So, how do machines, which don’t like surprises, understand the triple? And how do they know what ‘knows’ means?

Triples, like the one above, are written in a rigid and predictable Resource Description Framework (RDF). RDF evolved from the eXtensible Markup Language (XML), another rigid and predictable framework. The predicate URI in the preceding triple contains the word ‘knows’ which delineates Bob and Alice’s relationship. The word ‘knows’ is a standard in a vocabulary of human relationship predicates called ‘FOAF’

The Friend-Of-A-Friend (FOAF) vocabulary

The FOAF[1] vocabulary provides a collection of basic predicates that can be used in triples to describe people’s activities. For example, the ‘knows’ predicate in the ‘Bob knows Alice’ triple points to the ‘knows’ standard in the FOAF vocabulary which is defined in the following specification:

Property: foaf:knows

knows – A person known by this person (indicating some level of reciprocated interaction between the parties).

Status: Stable

Domain: Having this property implies being a person

Range: Every value of this property is a person.

Vocabularies are one solution to interoperability on the Semantic Web. In the Semantic Web context, interoperability is defined as an agreement between the sender and receiver, usually two dissimilar systems, that any communications between them is understood by both parties.

Predicate vocabularies provide predicates whose meaning have reached consensus, and so, facilitate interoperability by ensuring that everyone using these predicates knows that they are self-descriptive, understandable and standardised to both parties. The Semantic Web is flexible, an ontology designer may invent his/her own ‘in house’ predicate vocabulary or use standard predicates in the FOAF global vocabulary. Either way, using a vocabulary’s predicates in a triple ensures that the triple is linked to a standard peer reviewed specification. So basically, you can connect two dissimilar systems because the predicate in the triple is a known and understandable standard which all parties in the communication agree on.

The next blog I will introduce a real ontology that was drawn by a front-line nurse to describe her surgical unit ‘reality’.

[1] http://www.foaf-project.org/

 

Hand washing event logger-working prototype

Hi, my hand washing event logger is now a working prototype. When I worked as a nurse in a medical unit a person was employed to stand and record hand washing events with a clip board. My device uses a piezo-electric transducer to provide ‘1s and 0s’ to an Arduino micro processor while water is flowing. The Arduino logs the date/time and duration of the hand wash event on an SD card.

DSC_0076

The LCD shows the last hand wash logged time and duration. The picture below is a screen shot of the time, day, month and duration being logged on the SD card.

DSC_0077

The aim of the project is to provide hand washing data collection using embedded technology. It doesn’t look very embedded at the moment! It is sitting on our kitchen bench logging sink events. Hopefully it will form the basis of a study in a hospital.

DSC_0079

A hand-washing event logger

The most effective way of combating the spread of super bugs in our hospitals is simple low-tech hand washing. The aim of this project is to accurately log date/time and duration of each hand wash event at a sink. The logger has to be battery powered, unobtrusive and safe. I trialed Radio Frequency IDentification (RFID) with a wrist band on the clinician. The band triggered the logger but these devices have limited proximity.

I thought about a water sensor or an Infrared beam to trigger the logger but these devices produce a considerable lag-time. I am now trialing a piezo-electric transducer. The transducer produces a small current which can be filtered and amplified to trigger an Arduino micro controller. So far, I have solved the false-positive triggering and floating earth problems which produce erroneous readings. The proof of concept trial depicted in the following pictures is very encouraging.

The picture below shows the wave shaping prototype connected to the Arduino. The display shows no activity and a previous 8 second flow of water from the faucet.

DSC_0051

The picture below shows filtered and shaped pulses coming from the transducer when the faucet is running.

Next I will add a real-time clock and SD card for logging purposes. The ultimate goal is WiFi linking to a central monitor. That shouldn’t be too hard!

Nursing semantic networks- a different take on interoperability. Part 2

In part one, we saw that resources including the largest resource, ontologies, seek out to connect with similar ‘better’ resources on the Semantic Web.  For example, say we want to examine the life of ‘Flipper’, the1960’s TV star. We can connect a whole bunch of resources on the Semantic Web which will bring a sharper focus to Flipper’s slice of reality. This connectivity is achievable by using an element called a ‘triple’.

Triples

The basic unit of knowledge on the semantic web is the ‘triple’. A triple is like a simple sentence containing subject, predicate and object; ‘Bob knows Alice’ was an example of a triple in part one. The predicate ‘knows’ is the relationship between subject ‘Bob’ and object ‘Alice’.

In Figure 1 we can see triples connecting Flipper to other resources describing his world. Triples easily identifiable in Figure 1 are: ‘Flipper is a dolphin’, ‘Flipper is a animal TV star’, ‘Flipper knows Sandy Ricks’ and ‘Flipper lives at coral key’. Using this simple Flipper example, we can see triples provide a sharper focus on Flipper and his life. Each resource connected to Flipper by a triple contains lots of extra information. The resources in Figure 1 don’t have to be an ontology, they can be anything, including databases, comma delimited documents, triple stores or virtually any resource. Suddenly, you, or a machine, can navigate about Flipper’s life and discover more and more stuff.

Figure 1: Flippers life on the Semantic Web

 flipper

Interoperability

The Semantic Web naturally lends itself to interoperability because of the Linking Of Data standards embedded in it. The thing is, it doesn’t matter what form or structure the resources come in, disparate resources can be linked on the Semantic Web by triples because triples are independent of the resources. Triples achieve linking by recognising similar semantics in the other resource. Triples are full of semantics.

Semantics

Semantics, in the context of Linking Of Data, are not just the meaning of one word or phrase; it is the sum of many descriptors associated with a triple. For example:

  • Names of concepts (terms)
  • Names of relationships
  • Any annotation that is placed to describe the concept or relationship for the benefit of humans
  • Any constraint which sets the rules of class membership.

A machine or person whose job it is to link ontologies is not limited to the above semantics to link resources together. A machine called a ‘reasoner’ will scan the ontology and infer a relationship between Bob and Alice because Bob and Alice may work in the same hospital unit, share the same individual constraints or belong to the same club. Also, a machine could trawl the Semantic Web ranking the linguistic ‘closeness’ of terms and relationships and automatically link stuff by ranking the probability that resources or people are connected in some way. For nurses, we can take a ‘snapshot’ of a nursing unit and analyse the processes that occur. If we can visualise the processes we can ‘tweak’ them to provide greater efficiencies which flow on to better patient outcomes.

Anyway, things get “curioser and curioser” from here on in. For instance, “how does a machine know what ‘knows’ means in the ‘Bob knows Alice’ triple?”. I was just going to write two articles but I may as well continue down the rabbit hole in upcoming articles. I will explain the ‘knows’ question and the difference between the machine-readable triple and the human-readable graph in the next instalment.

Nursing semantic networks- a different take on interoperability. Part 1

Introduction

Interoperability, the measure of how well disparate networks are able to communicate, is woven into the very fabric of the ‘web of data’, the so-called, Semantic Web (SW). As its name suggests, the SW uses ‘semantics’ to facilitate interoperability between islands of seemingly unrelated knowledge. First up, I will outline the Semantic Web in part 1, and in part 2, I will describe ‘semantics’ and how they are used to facilitate interoperability.

 

The Semantic Web

Sir Tim Berners-Lee, conceived the global SW, a web of linked data, with the same basic architecture as the existing World Wide Web (WWW). Consequently, both webs can co-habit and mesh together. However, there is one big difference between the two webs. Unlike the WWW which is organised for human consumption, the SW is entirely machine-readable. The SW is made up of linked data called ‘resources’. Resources can be anything under the Sun, including concrete entities like people, and abstract entities like thoughts and ideas.

 

Linking of data

Because machines don’t handle surprises very well resources are organised into a ridged  Resource Description Framework (RDF) which provides a predictable linking structure on the SW. How are resources linked? Resources are linked by common relationships. For example, a resource called ‘Bob’ may be linked to another resource called ‘Alice’ by a relationship called ‘knows’. So using two resources and their relationship, a tiny bit of knowledge is made; Bob knows Alice.

Berners-Lee’s idea that the usefulness of resources is enhanced by linking to ‘better’ resources underpins the SW. So, if enough resources are linked, they form a kind of ‘map of knowledge’. The SW contains billions of these maps, called ‘domain ontologies’. You can imagine ontologies are like islands of specific knowledge floating in a sea of resources such as documents, pictures, databases and descriptions. So, like islands, ontologies are ok by themselves but they are much more enhanced if ‘trade routes’ link to other islands and resources.

 

Domain ontologies

A domain ontology is a ‘snapshot’ or abstract of some part of human reality. The snapshot is constructed by linking resources and their relationships, the more resources and relationships, the sharper the focus. To this end, resources are always looking for similar resources to connect to, they use the gravity of their relationships to pull together and form new ontologies, like galaxies after the big bang. Suddenly,  they are machine-readable snapshots of human reality on the SW that machines can ‘read’ and analyse.

 

Meh, so what?

In the hospital setting, domain ontologies may describe hidden nursing knowledge and processes.  Because ontologies are machine-readable, robots called ‘intelligent agents’ can analyse hospital units such as surgical, emergency or administration looking for dependencies or errors in the logic of the unit.  The analysis of ontologies will save time and money by opening the door to automated auditing, freeing up nurses. Also, nurses will use ontologies to add and subtract resources and interventions in a unit which will provide enhanced efficiencies and better patient outcomes.

In the next installment, we will look at semantics in the context of the SW and how semantics facilitate interoperability by connecting resources together to describe even larger ontologies such as a hospital.