Data Resource Profile: The Hospital Electronic Prescribing and Medicines Administration (HEPMA) National Data Collection in Scotland

Abstract Introduction To support both electronic prescribing and documentation of medicines administration in secondary care, hospitals in Scotland are currently implementing the Hospital Electronic Prescribing and Medicines Administration (HEPMA) software. Driven by the COVID-19 pandemic, agreements have been put in place to centrally collate data stemming from the operational HEPMA system. The aim was to develop a national data resource based on records created in secondary care, in line with pre-existing collections of data from primary care. Methods HEPMA is a live clinical system and updated on a continuous basis. Data is automatically extracted from local systems at least weekly and, in most cases, on a nightly basis, and integrated into the national HEPMA dataset. Subsequently, the data are subject to quality checks including data consistency and completeness. Records contain a unique patient identified (Community Health Index number), enabling linkage to other routinely collected data including primary care prescriptions, hospital admission episodes, and death records. Results The HEPMA data resource captures and compiles information on all medicines prescribed within the ward/hospital covered by the system; this includes medicine name, formulation, strength, dose, route, and frequency of administration, and dates and times of prescribing. In addition, the HEPMA dataset also captures information on medicines administration, including dates and time of administration. Data is available from January 2019 onwards and held by Public Health Scotland. Conclusion The national HEPMA data resource supports cross-sectional/point-prevalence studies including drug utilisation studies, and also offers scope to conduct longitudinal studies, e.g., cohort and case-control studies. With the possibility to link to other relevant datasets, additional areas of interest may include health policy evaluations and health economics studies. Access to data is subject to approval; researchers need to contact the electronic Data Research and Innovation Service (eDRIS) in the first instance.


Key features
• The national Hospital Electronic Prescribing and Medicines Administration (HEPMA) data resource is a collection of data stemming from the electronic prescribing system currently being implemented in hospitals across Scotland.
• This resource has initially been created in the wake of the COVID-19 pandemic to foster understanding of the impact of pharmacological treatment options on patients' health.
• Data is available from 2019 onwards, with increasing coverage over time in line with the incremental implementation of the underlying prescribing system.
• The HEPMA dataset captures and compiles information on all medicines prescribed within the ward/hospital covered by the system; this includes, e.g., medicine name, dose, and dates and times of prescribing.
The HEPMA dataset also captures information on medicines administration, including dates and time of administration.
• HEPMA can easily be linked to other national datasets from Scotland -for instance, those containing hospital admission episodes or deaths, thus enabling a wide range of research projects.
• Work is ongoing to broaden access to the data for approved research projects through Trusted Research Environments (TREs).For inquires, the electronic Data Research and Innovation Service (eDRIS) should be contacted in the first instance.

Background
Digitisation in healthcare is advancing rapidly in line with the expanding availability of advanced information technology.As a consequence, digital prescribing systems are increasingly being implemented in various settings, including in secondary care.Hospital Electronic Prescribing and Medicines Administration (HEPMA) is a software solution intended to replace both paper-based prescribing and documentation of medicines administration in hospital settings.HEPMA is aimed at simplifying processes and improving patient safety by offering functionalities such as remote access to records and interaction checks, thereby enabling accurate and efficient medicines reconciliation and use [1].Aside from providing clinical decision support, the digitisation of prescribing and administration may also improve workflow, reduce the incidence of missed and/or delayed dosing through the generation of administration lists for a clinical area, and reduce medication errors [2,3].Furthermore, digitisation in secondary care simplifies clinical audits and facilitates the availability of data for research purposes with the wider aim of improving quality and consistency of care [1].The introduction of HEPMA in Scotland, covering a population of approximately 5.5m people [4] and 277 acute and community hospitals [5], is underpinned by the Scottish Government's digital strategy [6], and will bring digitisation of prescribing in hospital settings in line with primary care.Electronic prescribing has been supported in General Practices in Scotland since the 1980s, and electronic transmission of prescriptions to community pharmacies was introduced in 2009; since 2009, these data are routinely collected on a national level and made available upon request for both quality improvement and research purposes [7,8].
Driven by the COVID-19 pandemic and the need for information to foster understanding of the impact of potential pharmacological COVID-19 treatment options on patients' health, agreements have been put in place to centrally collate data stemming from the operational HEPMA system.The aim was to develop a national data resource based on records created in secondary care, in line with existing collections of data from primary care [7].Work is ongoing to broaden access to the data for approved research projects through Trusted Research Environments (TREs).

Methods
The implementation of HEPMA significantly changes existing working practices and, therefore, roll-out is performed incrementally across clinical areas.Although funded by the Scottish Government [9] the responsibility for the implementation of HEPMA lies with the territorial NHS Scotland Health Boards, independent bodies tasked with providing healthcare provision to their respective populations, to enable a seamless transition, considering the complexities involved [1].Whilst electronic prescribing systems in secondary care have been adopted in local areas in Scotland since 1997 [10], at the time of writing (May 2023), HEPMA in its current form has been implemented in six out of the 14 territorial Health Boards: Ayrshire & Arran, Dumfries & Galloway, Forth Valley, Greater Glasgow & Clyde, Lanarkshire, and Lothian, covering approximately 65% of the Scottish population and 9,115 out of a total of 12,869 (71%) acute hospital beds [11].Implementation is under way in a further six Health Boards -Grampian, Highlands, Tayside, and the three Island Boards of Orkney, Shetland, and the Western Isles -encompassing a further 2,638 (20%) of the available acute beds.The remaining two Health Boards, Borders and Fife, are expected to have completed implementation by December 2025 [12].
HEPMA is a live clinical system and is used to directly support patient care; as such, data is updated on a continuous basis.Local HEPMA systems can be accessed by clinicians within their respective area and, in addition to supporting the immediate provisioning of patient care, locally captured data may be used to facilitate clinical audits and for quality improvement.For the purpose of the national HEPMA data resource, data is automatically extracted from local systems at least weekly and, in most cases, on a nightly basis, and transferred by secure processes to NHS National Services Scotland (NSS) where they are integrated into the national HEPMA dataset.The data are then made available to Public Health Scotland (PHS) for quality checks including data consistency and completeness (Figure 1).PHS is the national public health body for Scotland working in partnership to provide leadership to improve and protect the health and wellbeing of the people of Scotland.PHS functions include disease surveillance and oversight of screening and vaccination programmes; PHS also acts as the national repository for health data across the life course of patients as they interact with the healthcare system [13].In this capacity, PHS can provide access to the national HEPMA dataset for both clinical auditing/quality improvement as well as research purposes to clinicians without direct access to the live clinical system (e.g., those working in primary care) and/or researchers interested in using the data more broadly, with the necessary permissions.
The specification for data extracted from local HEPMA systems was developed in a system-agnostic style, i.e., a consistent data structure can be used for all local systems.Data extracts comprise two separate files: a prescription file; and an administration file.These files contain any new or updated prescriptions and all medicine administrations, respectively, that have occurred since the last data extract.Prescription and administration files are then linked using an algorithm primarily based on patient ID, prescription ID, and prescribed/administered dates to simplify further use.Data directly collected from operational HEPMA systems are also routinely linked to national reference data sets to provide a richer and standardised dataset within the national data resource.For instance, additional demographic and geographical information about the patient (e.g., level of deprivation [14] and classification of urban/rural residency [15]) are obtained through deterministic linkage of a patient's Community Health Index (CHI) number, a unique patient identifier assigned to every resident, to the national CHI registry.Local medicines dictionaries are mapped onto the NHS dictionary of medicines and devices (dm+d) [16], thus providing a standardised terminology as well as links to other classification systems such as legacy British National Formulary (BNF) codes and information relating to the Anatomical Therapeutic Chemical (ATC) classification/Defined Daily Dose (DDD) measurements [17].The extract specification also allows for the collection of information on indication when those become available in future HEPMA system developments.
The presence of the unique patient identifier (CHI number) also enables linkage to a range of other datasets both clinical and administrative.These include, for instance, hospital inpatient admissions and outpatient clinic attendances (Scottish Morbidity Records, SMR); medicines prescribed and dispensed in the community (Prescribing Information System, PIS); and death records (National Records for Scotland, NRS), to name just a few [18].In brief, national-level datasets available in Scotland cover all residents, or an estimated 5.5 million people as of mid-2021 [4].Data is routinely collected in electronic form and is, as far as possible, standardised to facilitate further usage using agreed data formats and coding systems, such as the International Classification of Diseases 10 th Edition (ICD-10 [19]).These administrative datasets are frequently used for quality assurance (e.g., auditing), benchmarking (national statistics), and research.Population coverage and content of specific datasets, available time frames, and data quality -as well as possibilities for linkages -have been described in detail elsewhere [7,18,20,21].

Results
HEPMA data is available through PHS from January 2019 onwards; however, data coverage differs by Health Board due to the incremental implementation of the system.Up to March 2023, the HEPMA national dataset contained approx.23.2m prescription and 127.1m medicines administration records.Figure 2 gives an overview of the extent of data availability.
Similar to other national medicines datasets in Scotland, the national HEPMA data resource captures and compiles information on all medicines prescribed within the ward/hospital covered by the system; this includes medicine name, formulation, strength, dose, route, and frequency of administration, and dates and times of prescribing.In addition, for the first time, the HEPMA dataset also captures information on medicines administration, including dates and time of administration, as part of an existing Scottish national where applicable, records also include reasons for delayed or missed administrations.Since HEPMA records (similar to other health and social care records in Scotland) incorporate the CHI number, records can easily be linked to other national datasets -for instance, those containing hospital admission episodes or deaths [18,21].This enables the conduct of a wide range of studies aimed at understanding medicines use and evaluating health outcomes including the consideration of medicines administration in secondary care.Additionally, the capability to link to medicines dispensed in primary care allows taking a whole system approach to exploring the impact of medicines, a previous gap in the available data.
The data themselves can very broadly be categorised into three areas: first, patient demographics; second, details relating to the prescription; and third, information pertaining to administrations of the prescribed medicine (Table 1).Missed and/or delayed administrations are also captured and will normally have a reason for this recorded.
The data quality within the national HEPMA data resource is high since data are extracted from a live clinical system aimed at supporting the prescribing and administration of medicines; i.e., all data are directly generated in clinical practice.Data quality including data consistency and completeness are monitored continuously by the data controller (PHS).

Discussion
While the COVID-19 pandemic was the primary driver behind the rapid development of a national database capturing data from HEPMA clinical systems across Scotland and initial permissions restricted the use of the data to COVID-19 related research, going forwards, the national HEPMA data resource will be valuable for future research now that use restrictions have been lifted.Thus far, patient-level data from in-patient settings that can be used for research purposes are scarce; hence, the availability of this dataset, eventually covering all hospitals in Scotland, is a major achievement that will benefit research in a wide range of areas of interest.For instance, the data resource supports cross-sectional/point-prevalence studies including drug utilisation studies aimed at evaluating uptake and usage of medicines in a secondary care setting over time, and also offers scope to conduct longitudinal studies, e.g., cohort and case-control studies, with the possibility to link to other relevant datasets if and where required.Although the primary focus of using the HEPMA dataset thus far has been on drug utilisation research and studies of treatment outcomes (via record linkage), a variety of other research questions can potentially be addressed when combining HEPMA data with additional datasets from across Scotland; possible areas of interest may include health policy evaluations and health economics studies.
Studies conducted using HEPMA data to-date have primarily focused on COVID-19 treatments and the use of antibiotics based on early permissions and clinical relevance at the time; consequently, initial projects focused on characterising patients who tested positive for COVID-19, describing medication use in the treatment of COVID-19 and associated outcomes, and reviewing changing patterns of medicines use throughout the pandemic.Two exemplar projects confirming the feasibility of linking HEPMA to other datasets were aimed at describing the use of dexamethasone, remdesivir and tocilizumab in hospitalised patients; and the uptake of monoclonal antibodies and antiviral drugs to prevent severe disease in non-hospitalised patients, respectively [23,24].In contrast, projects focusing on antibiotics were inspired by the emerging availability of patient-level data related to medicines administration in hospital.Unlike aggregatelevel data, HEPMA enables, for the first time, not only the description and analysis of prescribing patterns by patient characteristics in a secondary care setting but also the calculation of duration of therapy.Although projects focusing on the use of antibiotics during in-patient stays so far solely relied on HEPMA data, these studies highlighted the added value of having access to granular, patient-level data in a Restrictions to access may apply Health Board b Scottish Index of Multiple Deprivation [14] Different levels of categorisation available Urban-rural classification [15] Different a not exhaustive.b independent regional bodies tasked with providing healthcare provision to their respective populations.ATC -Anatomical Therapeutical Chemical; BNF -British National Formulary; dm+d -Dictionary of Medicines and Devices.
hospital setting by utilising the availability of detailed and reliable medicines administration data to calculate duration of therapy by route of administration (i.e., oral vs IV) [25].See also Table 2 for further details.Furthermore, HEPMA data on drug exposure in specific populations has also been provided to internal and external partners for a number of purposes.For instance, HEPMA data has been used to offer insights into COVID-19 management, including a description of observed changes in the use of certain medications over time and rates of hospitalisations and deaths following initial treatment aimed at health system senior management; and to supply information on exposure to specific drugs (e.g., valproate) for surveillance purposes.This aligns with the ambition for Scotland to provide comprehensive coverage of medicines exposure and treatment outcomes to support policy, practice, and individual clinical decision-making taking a whole system prescribing approach -i.e., capturing, longitudinally, individual patients' journeys of medicine use throughout the healthcare system.This will enable a better understanding of access to medicines, potential inequalities in access, and the safe and effective use of medicines across the life cycle; with potential opportunities to generate intelligence that may inform future clinical trials and/or health technology assessments.

Strengths and weaknesses
For the first time, the HEPMA data resource provides comprehensive, patient-level data on the use of medicines in secondary care to be included in Scottish national medicines repository datasets.Major strengths of the HEPMA dataset are its coverage, the granularity of data captured, the timeliness of information, and the data quality.Although the HEPMA system has not yet been implemented in all Health Boards, the data is already broadly representative by capturing data from most of the larger hospitals; once implementation has been completed, the national HEPMA dataset will cover Scotland in its entirety.The content of the data is extensive, with detailed information provided about both prescriptions and individual administrations.In addition, the feasibility of linking HEPMA data to other datasets offers wide-ranging possibilities, including an unprecedented opportunity to combine drug exposure data from both primary and secondary care.Based on how data is generated, recorded, and processed, the quality of the data is high: due to the active usage of the system for patient care, the majority of variables have a high level of completeness, accuracy, and reliability.Furthermore, the presence of a single software supplier in Scotland facilitates a high level of standardisation of data items across Health Boards.
The main limitations of the HEPMA data resource are two-fold.Firstly, data is being collected for purposes other than research, and there is a degree of flexibility in the operational system underpinning the data collection.This means that not all desirable information may be available; and the data may not always be as uniform as expected.For instance, reasons for medicines not being administered are programmable by individual Health Boards and, as such, may lead to variations in the codes being used.Indication for drug use is at present not included in the national data resource; nevertheless, this can be mitigated by linking HEPMA data to other datasets if specific disease areas or conditions are of interest.Furthermore, the system currently does not provide a method to easily link clinically related prescriptions because any change in the dosage instructions or the route of administration results in a new prescription being recorded.However, in the context of antibiotic prescribing, PHS has developed and validated a methodology to allow grouping of related prescriptions/administration.It is planned that future versions of HEPMA will contain a dedicated variable for this purpose.Secondly, HEPMA naturally only captures data in wards where it has been implemented -and although the system is eventually being rolled-out across all hospitals in Scotland, some areas might not be covered.As an example, Intensive Care Units (ICUs) may already have a different electronic system in place -i.e., there would be no need to implement HEPMA in these areas, resulting in potential gaps in data coverage.
As an additional point of note: HEPMA data is relatively complex and its use requires a good understanding of both the clinical context from which it has been generated, and the more technical aspects of data collection and presentation.Therefore, it is highly recommended to discuss research proposals with local clinicians and consult the data controller (i.e., PHS) to gain an understanding of what can -and cannot -reasonably be done with the data.

Data access
The national HEPMA data resource is controlled by PHS, and access to data is subject to approval.Researchers need to contact the electronic Data Research and Innovation Service (eDRIS) at PHS who will guide the research team through the process, which involves submitting an application to the Public Benefit and Privacy Panel for Health and Social Care (PBPP) [27].Once the application has been approved, data are extracted and provided to researchers in anonymised form as flat files, usually in .csvformat.Access will be made available through the National Safe Haven, a secure, closed environment designed to safeguard the data [21,28]; analytical software including, for example, SPSS, Stata and R/R Studio (Posit) as well as standard MS Office applications are available within this environment.Although the National Safe Haven can be accessed remotely (certain restrictions apply), it is only available from within the UK; researchers from other countries aiming to analyse linked datasets from Scotland would need to collaborate with a researcher/institution situated in the UK.
Metadata files and other supporting documents are currently under development and will be available through the PHS website in due course.In the meantime, enquiries can be directed to eDRIS in the first place (phs.edris@phs.scot).

Conclusions
Based on advances in digital technologies and accelerated by the COVID-19 pandemic, data obtained through an electronic prescribing system currently being implemented in hospitals in Scotland are collated in the national HEPMA data resource.By providing detailed data on the prescribing and administration of medicines within hospital settings -linkable to a range of other data sources including hospital discharge and death records as well as prescriptions issued in primary care -this data resource offers an unprecedented opportunity to conduct studies on medicines use.

Figure 1 :
Figure 1: Hospital Electronic Prescribing and Medicines Administration resource data collection process

Figure 2 :
Figure 2: Cumulative number of prescription and administration records in the national Hospital Electronic Prescribing and Medicines Administration data resource, January 2019 to March 2023

Table 1 :
Hospital Electronic Prescribing and Medicines Administration resource data collection process

Table 2 :
Examples of projects using HEPMA data, either alone or linked to other data sources