EHR data and AI to predict response to antidepressant treatment

Antidepressants are frequently prescribed for adults with depression, a common and often disabling psychiatric condition. However, identifying the most effective treatment for a particular patient is often a trial-and-error process that can result in prolonged morbidity, disability, and exposure to adverse effects, as well as substantial healthcare costs. Precision psychiatry aims to optimise treatment matching using patient-specific profiles, but there are few evidence-based predictors available to clinicians initiating antidepressant treatment.

Although average response rates are similar across different antidepressant classes, individual responses can vary widely in clinical practice. Therefore, accurately and scalably guiding antidepressant selection presents specific challenges. The gold standard for characterising antidepressant response from electronic health records (EHRs) remains expert chart review, which is labor- and time-intensive.

However, advances in machine learning (ML) and the growing availability of large-scale health data, such as EHRs, offer new opportunities for developing clinical decision-support tools that may address this challenge. In a recent study published in the peer-reviewed open-access medical journal Nature Partner Journals (npc) Digital Medicine, researchers used machine learning models to accurately predict differential treatment response probabilities for patients and between antidepressant classes based on real-world EHR data. The pipeline incorporated AI and non-AI features, as well as unstructured data (i.e. clinical notes) to maximize the use of information contained in EHRs.

The study included 17,556 patients who received a new antidepressant prescription from non-psychiatrists, and data were obtained from 20 years of EHRs spanning from January 1990 to August 2018. The patients had at least one International Classification of Diseases (ICD) code for depression and at least one ICD code for non-recurrent depression during their history.

ICD codes from EHR data were obtained for adult patients (age ≥ 18 years) with at least one visit (the first visit with an antidepressant prescription is defined as the “index visit” for each patient) with a diagnostic ICD code for a depressive disorder (defined as ICD-9-CM: 296.20–6, 296.30–6, and 311; ICD-10-CM: F32.0–9, F33.0–9) co-occurring with an antidepressant prescription, and at least one ICD code for non-recurrent depression (ICD-9-CM: 296.20–6 and 311; ICD-10-CM: F32.0–9) any time during their history.

The resulting models achieved good accuracy, discrimination, and positive predictive value, which could be valuable for further efforts aiming to provide clinical decision support for prescribers. However, the researchers noted several limitations, including missing data in EHRs(e.g. patients who may receive some of their care outside of the healthcare system), and secular trends in clinician prescribing or documentation practices that may have affected model performance.

In summary, the study presents a novel computational pipeline based on real-world EHR data for predicting differential responses to commonly used classes of antidepressants. The approach demonstrated here could be adapted to a wide variety of other clinical applications for optimising and individualising treatment selection.


  1. Sheu, Yh., Magdamo, C., Miller, M. et al. AI-assisted prediction of differential response to antidepressant classes using electronic health records. npj Digit. Med. 6, 73 (2023).

Implementing the EMR system in hospitals nationwide

During Minister’s Question Time, Health Minister Dr. Zaliha Mustafa informed the Malaysian Parliament that the implementation of the Electronic Medical Record (EMR) system at hospitals nationwide poses a challenge due to its high cost.

Upgrading hospital infrastructure and old equipment would contribute to a budget requirement that might reach a billion ringgit, making it necessary to take into account the sustainability of buildings.

In order to fully implement the system, cooperation from the finance ministry would be required, as the cost of the system itself is another contributing factor.

She made these statements in response to a supplementary question from fellow Parliamentarian Tan Hong Pin (PH-Bakri) who inquired about the constraints faced by the ministry in implementing the EMR system and when it could be fully integrated.

In the same discussion, Dr. Zaliha provided an update on the implementation of the Teleprimary Care — Oral Health Clinical Information System (TPC-OHCIS) system, stating that 103 health clinics have already been equipped with the system, and another 42 clinics in Negeri Sembilan will be equipped through the National EMR project. She also mentioned that there are currently 1,027 health clinics utilizing the MySejahtera application’s online appointment system, while 370 health clinics are providing virtual clinic services to their customers.

Responding to Tan Hong Pin’s original question about the current status of the EMR system implementation in hospitals and clinics nationwide, Dr. Zaliha added that the Health Ministry’s next plan is to expand all related systems more comprehensively to achieve the objective of an integrated health information system.

Meanwhile, on the other side of the Straits of Malacca, the Health Ministry of Indonesia has recently released a regulation mandating the implementation of the electronic medical record system in health service facilities throughout the nation by December 31, 2023.

World Tuberculosis Day 2023

German physician and microbiologist Dr. Robert Koch(b.1843 – d.1910) announced on the 24th March of 1882, that he had discovered the bacterium that causes tuberculosis, which opened the way towards diagnosing and curing this disease.

To commemorate this day in history, World Tuberculosis(TB) Day is observed as a Global Health Day of the World Health Organization(WHO) on 24 March, annually.

This World TB Day global event is to raise public awareness about the devastating health, social and economic consequences of tuberculosis, and to step up efforts to end the global tuberculosis epidemic.

The following DIY poster highlights this event.

To help step up efforts to end the global tuberculosis epidemic, a national health information system(NHIS) should be used to integrate TB data and ensure the data generated by the NHIS are reliable and complete and arrive rapidly enough to be used for a national tuberculosis program (NTP).

A good notification system is thus one of the key elements for the success of a national communicable disease prevention and control program, like the NTP.

The NTP as a national public health surveillance system receives TB notification that uses electronic medical record (EMR) / paper-based medical record data to provide situational awareness for TB-related events.

Although the public health surveillance system leverages the International Classification of Diseases(ICD) from abstracted information about medically coded TB inpatient medical records, ICD codes are not primarily used for public health surveillance purposes.

However, ICD codes provide one way to measure uptake in populations at increased risk of TB, and help provide public-use data files for public analysis, and the NTP to conduct their surveillance of TB through case findings lists to identify cases of reportable TB.

Special allocation for HKL for digitalisation of patient records

Image credit: Health Minister Dr. Zaliha visiting HKL on March 17, 2023, BERNAMA 2023

The Health Ministry of Malaysia has announced that it will allocate funds to the Kuala Lumpur Hospital (HKL) to digitalize patients’ medical records.

Currently, HKL as one of the country’s largest and busiest hospitals manages patient records manually and deals with over 16,000 records daily.

The move to digitize these records is expected to help HKL manage patients and their medical records more efficiently.

Speaking to reporters after the launch of “Buku Coffee Table Covid-19” at HKL, on March 17, Health Minister Dr. Zaliha Mustafa, who previously served at HKL as a medical doctor, stated that digitalizing patients’ medical records would be a great help to the hospital, and the Ministry would provide a special allocation for this purpose. However, Dr. Zaliha did not provide any specifics about the allocation.

Earlier, HKL Director Datin Dr. Rohana Johan expressed her desire to see all medical records digitalized for better management of the hospital and patients. She noted that around 16,000 patients’ medical records move in and out of Wisma Kayu—a building near HKL’s maternity hospital, nicknamed “Wisma Kayu” for its wooden infrastructure where all these records are kept, on a daily basis.

Image credit: CodeBlue, Malaysia

Dr. Rohana hoped that at least half of the records would be digitized before her retirement.

International Pi Day 2023

As it is Pi Day 2023, I like to dedicate this post to relate to the use of pi in Health Information Management(HIM).

We all first met the pi in elementary geometry at school and it occurs in one of the first equations that you can solve; that is to find the circumference or areas of circles.

We remember that Pi (π) is a mathematical constant that represents the ratio of the circumference of a circle to its diameter, approximately equal to 3.14159—when for pi, you substitute the fraction 22/7. Although it is a simple ratio of the circumference of a circle to its diameter, the decimal places appear to go on forever.

Pi is used extensively in mathematics and science, and its calculation has applications in various fields in healthcare too, including HIM.

For this post, I can think of three applications of pi, when pi is integral to HIM.

While the electronic medical record (EMR) is the core informational system for patient management across the healthcare system, the radiology information system (RIS) is considered the core system for the electronic management of imaging departments.

The RIS is the first example I can think of from my past inter-professional collaboration in a hospital setting, that pi is related in one way to HIM, i.e. through its use in medical imaging.

Medical imaging technologies, such as computed tomography (CT) and magnetic resonance imaging (MRI), use pi in their calculations to generate accurate images of the human body. The measurements of these images are based on the circumference and diameter of the scanned area, and pi is used to calculate these measurements accurately.

In addition to the RIS, pi is used in the calculation of various health-related metrics, such as body mass index (BMI) and blood pressure.

Obesity is a common problem worldwide that independently confers risk for chronic disease and early mortality.

HIM professionals use the International Classification of Diseases, Tenth Revision (ICD-10) codes as a tool for medical diagnoses, to medically code obesity, and also to identify obesity documentation in the electronic medical records(EMR) problem list.

Other available sources in the EMR use an individual’s body mass index (BMI) to identify and categorise obesity into the Z codes of ICD-10.

The ability to identify and manage the care of patients who meet the criteria for obesity in ambulatory settings has significantly improved with the increased use of health information technology, especially with the use of EMRs.

It is here in the EMR, that It is worthy to take note of the humble pie in the calculation of BMI involves dividing a person’s weight in kilograms by the square of their height in meters, which involves the use of pi in the calculation of the area of a circle (since the formula for the area of a circle is A = πr^2).

As HIM professionals involved in research, we surely used pi in statistical analysis and modeling in HIM.

For example, pi is used in the calculation of confidence intervals, which are used to estimate the range of values within which a population parameter (such as a mean or proportion) is likely to fall. This is important in HIM, as it allows researchers and analysts to make inferences about the health of a population based on a sample of data.

In summary, pi is used in various ways in HIM, including medical imaging, the calculation of health-related metrics, and statistical analysis and modeling.

Its precise calculation and properties make it a valuable tool in the field of HIM.