About the data intro

DataLoch brings together routinely collected health care data from primary and secondary care in the Lothian region covering a population of 900,000 people. These data enable researchers to answer important questions about how the wellbeing of people could be improved, and support service-management decisions within the NHS.

There are many examples of how health data research has delivered insights to help solve challenging health problems, including diagnosing rare diseases, improving the performance and equity of care, identifying diseases early, and assessing the effectiveness of health services. Data extracts approved for researcher access are minimised, which means we provide no more data than the minimum needed to fulfil the specific approved application.

Data Security


Preparing the data

DataLoch works with data in several ways, including:

  • collaborating with clinicians to improve the data quality;
  • linking datasets to enable broad insights;
  • translating data into common standard definitions; and
  • maintaining a high-quality metadata catalogue with the support of NHS expertise.


Accessing the data we host

The below datasets are linkage ready. If you don’t see the data for your research here, please contact us to either request access to our complete Metadata Catalogue or to start a discussion about bringing the relevant data together to support your proposal development. 

Connect with Us

Laptop on a desk with some printed sheets containing graphs and charts.

About the data - lower section

Primary care



  Information about the characteristics of people registered with GPs plus date of registration.

Clinical events


  Codes used by GPs to summarise such things as symptoms, examinations, observations, test results, screenings, vaccines, operations, therapeutic procedures, and diagnoses, as well as administrative items such as recording reports.


Secondary care



  Information about the characteristics of people using NHS Lothian hospitals or facilities.

Emergency Department Attendances


  Arrival and discharge details from all Emergency Attendances in NHS Lothian, covering Accident and Emergency departments, Minor Injury units, and Obstetrics Triage. Includes dates, times, incident circumstances, triage details, and referral and discharge information.

Admissions and Discharges

Scottish Morbidity Record (SMR01) and TrakCare

  Information about admissions and discharges from any NHS Lothian hospital or facility, including dates, times, specialties involved, and reason for admission. 

Data comes both direct from hospital systems (TrakCare) and those reported nationally (SMR01).

Outpatient Attendances 

Scottish Morbidity Record (SMR00)

  Information about outpatient attendances at any NHS Lothian hospital or facility, including dates, times, conditions and procedures.

Maternity Services 

Scottish Morbidity Record (SMR02)

  Information about maternity inpatient and day cases at any NHS Lothian hospital or facility, including dates, times, conditions and procedures.

Mental Health Services

Scottish Morbidity Record (SMR04)

  Patient records relating to all inpatients and day cases admitted to, and discharged from, mental health facilities in NHS Lothian.

Scottish Cancer Registry 

Scottish Morbidity Record (SMR06)

  Record of cancer episodes at any NHS Lothian hospital or facility. Each record covers a separate primary cancer registration and comprises patient data, diagnosis, pathology, staging, and treatment information. Also includes dates, primary and secondary cancer, and any information from a corresponding death record.

Critical Care Ward information


  Data relating to patients requiring critical care treatment (i.e. in intensive care and high-dependency units), such as admissions, severity of illness, organ-support treatments and therapies, and outcomes of treatment.


Diagnostic tests and investigations

Laboratory results


  Covering both primary and secondary care, this includes laboratory test results undertaken in NHS Lothian’s haematology, biochemistry, and microbiology labs.



Systemic Anti-Cancer Therapy (SACT)


  A South-East Scotland regional dataset taken from the ChemoCare prescribing system. Includes chemotherapy, immunotherapy, and other drug treatments for cancer.



  A South-East Scotland regional dataset taken from the AIRA radiotherapy planning and delivery system. Includes dosing, fractionation, and related metadata and images.

National Cancer Quality Audit and Cancer Registration datasets

  Includes a number of tumour-specific datasets based on relevant data collated from across Scotland. Within each of these datasets are details such as tumour type, recurrence, treatments, and staging.


Linked national datasets

Cause of death

National Records of Scotland

  Nationally curated data showing the date and cause(s) of death.


Public Health Scotland

  Summary of prescriptions that are dispensed in the community (i.e. not within hospitals) throughout the NHS Lothian region.

Scottish Index of Multiple Deprivation


  Summary data capturing the relative deprivation status of geographic areas of Scotland. Any dataset containing a postcode can be linked to summary deprivation data thereby supporting research into the relationships between living in specific areas and health.


Datasets processed by DataLoch based on the datasets above

Health conditions

  The DataLoch team has, where possible, combined the codes used by GPs, hospital/facilities, and national records to summarise patient conditions, based on the defined standards from the HDR UK Phenotype Library.
COVID-19   A combination of COVID-19-related data, such as laboratory test results, symptoms, treatments, complications, vaccinations, and hospitalisation outcomes. 



About the data last paragraph

GRAPHIC - How we make data research ready