Difference between revisions of "Electronic Prescribing Integration"

From TMS Support Wiki
Jump to navigation Jump to search
Line 48: Line 48:
We have connected to numerous PAS systems using an ODBC connection, examples being: Careflow MMS (CACHE or IRIS), MS SQL, MySQL. Essentially - if there is a 64 bit ODBC driver available, we should be able to connect.
We have connected to numerous PAS systems using an ODBC connection, examples being: Careflow MMS (CACHE or IRIS), MS SQL, MySQL. Essentially - if there is a 64 bit ODBC driver available, we should be able to connect.


The queries being performed to retrieve the demographic data vary with the underlying PAS system. Many trusts set up a view or stored procedure on the PAS database that we can use to pull the required demographic data. With more common connections (Careflow for example) we have 'standard' queries that we are able to utilise, for example:
The queries being performed to retrieve the demographic data vary with the underlying PAS system. Many trusts set up a view or stored procedure on the PAS database that we can use to pull the required demographic data. With more common connections (Careflow for example) we have 'standard' queries that we are able to utilise, for example:<blockquote>SELECT patient_hospital_no.lnkphn, patient_basic.forenames, patient_basic.surname, patient_basic.nhs_no, patient_demographics.sex, patient_demographics.telephone_no, TRIM(LEADING ', ' FROM ifnull(patient_demographics.address1,'',UPPER(patient_demographics.address1))||ifnull(patient_demographics.address2,'',','||UPPER(patient_demographics.address2))||ifnull(patient_demographics.address3,'',', '||UPPER(patient_demographics.address3))||ifnull(patient_demographics.address4,'',', '||UPPER(patient_demographics.address4))||ifnull(patient_demographics.postcode,'',','||UPPER(patient_demographics.postcode))) address, patient_demographics.birth_date FROM JAC.patient_basic patient_basic, JAC.patient_demographics patient_demographics, JAC.patient_hospital_no patient_hospital_no WHERE patient_demographics.lnkpid = patient_basic.lnkpid AND patient_hospital_no.lnkpid = patient_basic.lnkpid AND patient_hospital_no.lnkphn = ' " & PatientID.ToUpper & "'"''</blockquote>
 
SELECT patient_hospital_no.lnkphn, patient_basic.forenames, patient_basic.surname, patient_basic.nhs_no, patient_demographics.sex, patient_demographics.telephone_no, TRIM(LEADING ', ' FROM ifnull(patient_demographics.address1,'',UPPER(patient_demographics.address1))||ifnull(patient_demographics.address2,'',','||UPPER(patient_demographics.address2))||ifnull(patient_demographics.address3,'',', '||UPPER(patient_demographics.address3))||ifnull(patient_demographics.address4,'',', '||UPPER(patient_demographics.address4))||ifnull(patient_demographics.postcode,'',','||UPPER(patient_demographics.postcode))) address, patient_demographics.birth_date FROM JAC.patient_basic patient_basic, JAC.patient_demographics patient_demographics, JAC.patient_hospital_no patient_hospital_no WHERE patient_demographics.lnkpid = patient_basic.lnkpid AND patient_hospital_no.lnkpid = patient_basic.lnkpid AND patient_hospital_no.lnkphn = ' " & PatientID.ToUpper & "'"


===HL7 Query link===
===HL7 Query link===

Revision as of 09:42, 7 March 2022

Introduction

This document outlines the requirements for an interface between TMS Insights Prescription Tracking System (PTS) and an Electronic Prescribing (ePrescribing) module.

The reason for the interface between the two systems is to save pharmacy staff time re-entering information into PTS that has already been entered into the other system.

Whereas ePrescribing systems tend to focus on the ordering and dispensing of individual drugs and the management of stock, the focus for PTS is in managing the workflow of ‘prescriptions’ for individual patients through the whole dispensing process – from when an order is placed through to completion, collection and delivery back to the Ward.

A ‘prescription’ in PTS is defined as a group of medicines that will be processed as one unit of work for an individual patient.

There are several circumstances where PTS & ePrescribing systems need to interface:

1) When a prescription is manually entered in PTS and the user enters a patient identifier (Hospital number or NHS number). An interface is required here to return demographic information to save the user having to type these details into PTS. This interface is provided as part of the system, while it’s not required many Trusts implement this to assist booking in prescriptions.

2) When an ‘order’ is created in the ePrescribing system this information is sent to PTS so that it can be tracked. In addition to the patient demographics more information is required about the order so that PTS can group medicines into ‘prescriptions’ for each patient, assign prescription types and allocate each prescription to a Ward and Dispensary.

3) When Prescription tracking information needs to be sent back to the ePrescribing system &/or to an additional system (such as a whiteboard or bed management system) when the status of a Prescription changes &/or an activity is recorded against a Prescription.

Automatic ePrescribing links (option 2) are chargeable and you should obtain a quotation if required.

Demographics for Manual Data Entry

PTS has a ‘booking-in’ screen for entering prescription information in manually. Options can be defined (by Prescription Type) to allow the following demographics to be captured:

  • Local ID (e.g. Hospital Number)
  • National ID (e.g. NHS Number)
  • Forename*
  • Surname*
  • Prescription Type
  • Ward*
  • No. of Items
  • Drugs
    • Drug name
    • Dose units
    • Dose frequency
  • Title*
  • Gender*
  • DOB*
  • Mobile Phone no.*
  • E-Mail Address*
  • Address*
  • Date/Time prescription requested
  • Visit number / Episode ID*

A * next to an entry in the above lists indicates a field that we can potentially get from the patient demographics held in the ePrescribing system.

ODBC link

PTS can be configured (by amending a DLL file on the PTS application server) to retrieve demographic fields via an ODBC connection when a patients hospital or NHS number is entered. Typically a 64 bit system DSN would be configured to connect to the source system and PTS would use this to retrieve the demographic information for the prescription type being entered from the hospital / NHS number that was entered.

We have connected to numerous PAS systems using an ODBC connection, examples being: Careflow MMS (CACHE or IRIS), MS SQL, MySQL. Essentially - if there is a 64 bit ODBC driver available, we should be able to connect.

The queries being performed to retrieve the demographic data vary with the underlying PAS system. Many trusts set up a view or stored procedure on the PAS database that we can use to pull the required demographic data. With more common connections (Careflow for example) we have 'standard' queries that we are able to utilise, for example:

SELECT patient_hospital_no.lnkphn, patient_basic.forenames, patient_basic.surname, patient_basic.nhs_no, patient_demographics.sex, patient_demographics.telephone_no, TRIM(LEADING ', ' FROM ifnull(patient_demographics.address1,,UPPER(patient_demographics.address1))||ifnull(patient_demographics.address2,,','||UPPER(patient_demographics.address2))||ifnull(patient_demographics.address3,,', '||UPPER(patient_demographics.address3))||ifnull(patient_demographics.address4,,', '||UPPER(patient_demographics.address4))||ifnull(patient_demographics.postcode,,','||UPPER(patient_demographics.postcode))) address, patient_demographics.birth_date FROM JAC.patient_basic patient_basic, JAC.patient_demographics patient_demographics, JAC.patient_hospital_no patient_hospital_no WHERE patient_demographics.lnkpid = patient_basic.lnkpid AND patient_hospital_no.lnkpid = patient_basic.lnkpid AND patient_hospital_no.lnkphn = ' " & PatientID.ToUpper & "'"

HL7 Query link

Webservice link

Automatic order tracking

ePrescribing messages sent to PTS API to create Prescriptions in PTS.

HL7 listener

FHIR listener

ODBC 'pull' model

Call PTS API directly

Outbound HL7 messages