A Parser for MedTech32 to Determine Blood Pressures from GP Subjective/Objective Notes and Lab Measurements from LabInbox

 

Background

Solution

Software Requirements

Using the Tool

File Downloads

 

Background

Issue One

The MedTech32 PMS is used by a high majority (~80%) of GPs in New Zealand. During consultations, GPs often enter notes into the patient EMR and in the PMS, there are two areas for this – the Subjective notes section and the Objective notes section (see Figure).

However, an issue with the way BPs needs to be entered is that the entry needs to follow the convention ‘\\bp’. If this is not followed, the system will not automatically extract BPs that get entered this way into the database table that contains BP measurements. Analysing the notes fields shows us that there are lots of instances where the busy GPs have simply entered something like ‘bp 160/100’ instead of following protocol. This means that is we analyse the BPs by extracting only the BPs from the BPs table of the PMS, we will missing out on quite a few. However, the notes field is stored as an ugly blob field which contains a lot of control characters, for a hypothetical patient it may look like:

The first row shows the different fields we get when we export the notes field into a text file.

Issue Two

The lab test results get sent to the GPs that get stored in the ‘Provider Inbox’. A GP can easily look at these values by opening the corresponding record, however, if we need to analyse say uric acid levels for all patients in the practice, there is no way to extract this information at a practice level. Extracting lab test results from TestSafe is an option, but here we want to extract the data from a specific practice. Shown below is what a test result would look like within the PMS (data based on the training dataset that gets shipped out with a new MedTech installation).

 

Using the built-in SQL query tool we can extract the lab inbox data to a text file, but assuming Charlene Abbott’s MMID is ABCDEF, this is what the resulting text would look like for the above record.

 

Solution

We developed a tool to extract BPs from notes, and lab test results from the lab inbox. The tool is dependent on having two files on the local disk – the file containing subjective and objective notes; and the lab inbox. Both files can be created using the SQL query tool within MedTech. Feel free to contact me if you need any assistance with this process. Note that currently we are interested in extracting only ACR, Uric Acid, eGFR, HbA1C and Microalbumin and as such the tool has been programmed to extract only these labs. However, extending the tool to extract other measurements is possible and will be done as the requirements arise.

 

Software Requirements

1.        .NET 3.5 sp1 framework. Download it from here if you don’t have it.

2.        Windows XP/Vista

 

Using the Tool

The tool is trivial to use. Download the zip file, extract the files into a folder and then run FileParser.exe by double clicking it. This should bring up the following dialog.

To parse the BPs, go to Options -> Parse BPs and then select the file with subjective/objective notes. The tool will create a new file ‘CLEANED__BPs’ in the same folder as the subjective/objective notes file.

To parse labs, go to Options -> Parse Labs and select the file with lab inbox data. Upon parsing this file, the tool will create a new file ‘CLEANED__’ followed by the name of the selected lab test. Another option is to select ‘All Labs’ which will parse the lab inbox file to extract all lab test results (of course only for the limited set of lab tests we are interested in) and create a new file which will have a corresponding screening code in it.

The tool can be used to view the results as well, but this option is disabled by default. If you uncheck the ‘Disable editing/viewing data’ option under View before parsing a file, then you will be able to view the various results as well. Here is an example of parsing the lab inbox for ‘All Labs’.

You can then sort if by the different columns if required. The information is editable, so when there was a logical error, such as the GP entering a BP value of 1309/5 instead of 130/95, the tool will show a sys/dia value of 1309/5. The user can manually correct such issues and then do Options -> Export Grid Data to export the updated file into a new text file.

 

File Downloads

Click here to download the zip file (that contains the required files).