Note This repository is unmaintained as of 2023-05-03 as I am no longer employed by Somerset NHS Foundation Trust.
Yeovil Hospital's Mirth Connect FHIR Listener channel for use with InterSystems' TrakCare PAS (v2020 MR6.11)
This repo outlines the steps that have been taken to provide the technical deliverables required by the SIDeR programme, alongside the issues that were encountered during development, and how to deploy the resulting Mirth Connect channel.
Logs documenting the work undertaken to deploy these endpoints can be found in docs/worklogs.
The intended audience for this page are team members of the Solutions Development team at Yeovil Hospital, alongside technical partners and developers from other stakeholders in the programme should they wish to use this and adapt it to implement in their own systems.
This documentation is written under the assumption that the reader has prior experience using Mirth Connect.
NHS Somerset (SOMICB) started the SIDeR project to link up all main clinical and social care IT systems used in Somerset to improve and support direct care. Black Pear Software Ltd. (BP) is the technical partner that supports the project.
Stakeholders (as of 2022-11-01) are:
- Children's Hospice South West (CHSW)
- Devon Doctors (DD)
- Dorothy House Hospice (DHH)
- GP practices within Somerset (GPs)
- Somerset County Council (SCC)
- Somerset NHS Foundation Trust (SFT)
- South Western Ambulance Service NHS Foundation Trust (SWASFT)
- St Margaret’s Hospice (SMH)
- Yeovil Hospital (YH)
Black Pear have built a single-page web application for a shared care record, which will retrieve data relating to a patient from each stakeholder that can do so, and amalgamate it into this record. The record is not stored in a cache anywhere and is built on the fly. Care providers can then access this record through a contextual link (an embedded link within the PAS). Clients using the web app need to be able to make GET requests to RESTful HL7® FHIR® API endpoints to retrieve a set of seven FHIR resources that adhere to their respective NHS Care Connect API profiles to populate the record.
A contextual link needs to be added to our PAS to allow care providers access to the shared record. Refer to Interoperability patterns - Contextual launch in the SIDeR wiki for more information.
- Mirth Connect v3.12.0 (including supporting database instance)
- The latest release of yh-fhir-authentication-service (for securing endpoints with HTTPS, OAuth, and bearer tokens)
- Node.js >=18.12.1 (optional, for development)
This Mirth Connect channel has been tested on a Mirth Connect instance (v3.12.0) running on Windows 10 and Windows Server 2019, with an instance of SQL Server 2019 being used as the database backend for Mirth Connect.
Perform the following steps before deployment:
- Download and extract the latest release asset
- Navigate to the extracted directory
- Install the FHIR Connector extension (dist/fhir-3.12.0.yh001.zip) in Mirth Connect
- Import the FHIR Listener channel (dist/FHIRListener.xml) into Mirth Connect
- Declare variables listed in the channel description, in the configuration map
- Run the SQL queries found in
dist/sql
to create lookup tables
Issues with InterSystems' TrakCare PAS (used by YH) and staff misuse of the PAS have affected how the data is presented in the endpoints and how searches can be performed.
- AllergyIntolerance resources:
- Unable to provide SNOMED codes for allergies and intolerances in AllergyIntolerance resources due to there being free text inputs in TrakCare
- Low recordings of allergy and intolerance data in TrakCare:
- 350,513 non-deceased patients with records in TrakCare as of 2020-11-19
- 34,405 patients have ‘No Known Allergy’ recorded (9.8%)
- 13,139 patients have one or more allergies recorded (3.7%)
- 350,513 non-deceased patients with records in TrakCare as of 2020-11-19
- Due to the above issues, Paul Foster (CCIO at YH) on 2020-11-19 suggested we do not provide AllergyIntolerance resources (functionality is still present in the channel, however)
- Condition resources:
- Unable to provide Condition resources as conditions are held in SimpleCode, not TrakCare
- DocumentReference resources:
- Unable to provide DocumentReference resources as these are held in Patient Centre, not TrakCare
- Encounter resources:
- Discharge/end dates for outpatient Encounter resources are not provided due to poor data quality. Staff in outpatients misuse these input fields in TrakCare to mark when “all admin has been completed for that outpatient encounter” and not when the encounter has finished
- Unable to provide clinician contact details for Encounter resources due to the following:
- In TrakCare a care provider has a mobile number field against them, but it is rarely populated
- There is no internal contact number field in TrakCare
- If you want to reach say, a gynaecology consultant, you need to manually search a list on YH’s intranet for their secretary’s extension number, and there is no indication as to how current the list is
- Teams do not have a contact number
- Patient resources:
- Unable to provide SNOMED codes for religious affiliation as these are not in TrakCare (NHS Data Dictionary coding is provided, however)
- Unable to provide GP surgery/organisation
name
value for inline Organization FHIR resource as this data is also not held in TrakCare; using GP consultant name as a placeholder - A sizeable number of patient records without postcodes
- Every search request to a FHIR resource endpoint that is NOT the Patient FHIR resource endpoint MUST have a
patient
search parameter, this is to stop intentional or unintentional DOS attacks due to long-running SQL queries:GET [baseUrl]/AllergyIntolerance?criticality=[code]
will return a 500 errorGET [baseUrl]/AllergyIntolerance?patient=[id]&criticality=[code]
will work
This is due to YH not having direct control over the underlying databases of the PAS, so cannot add indexes or make appropriate performance tweaks to support searches without also filtering by a patient.
Contributions are welcome, and any help is greatly appreciated!
See the contributing guide for details on how to get started. Please adhere to this project's Code of Conduct when contributing.
- Adam Wiles (YH) - Procedure FHIR resource advice
- Anthony Smith (YH) - Logo design
- David Suckling (YH) - TrakCare database table structure and frontend support
- Dunmail Hodkinson (BP) - HL7 FHIR STU3 specification adherence and best practices advice
- George Dampier (YH) - MedicationStatement FHIR resource advice
- Jessica Male (YH) - TrakCare frontend support
- Julian Matthews (SFT) - Bug reports
- Jon Simpson (YH) - MedicationStatement FHIR resource advice
- Neil Hayes-Webster (YH) - SQL query optimisation
- Nicolas Noblet (YH) - SQL query optimisation, TrakCare database table structure advice
- Will Jehring (BP) - HL7 FHIR STU3 specification adherence advice
yh-fhir-listeners
is licensed under the MIT license.