Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Wednesday, July 01, 2020 at 8:00 PM to 10:00 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Accepted for/Published in: JMIR Formative Research

Date Submitted: Nov 21, 2024
Date Accepted: Apr 7, 2025

The final, peer-reviewed published version of this preprint can be found here:

Analyzing Patient Complaints in Web-Based Reviews of Private Hospitals in Selangor, Malaysia, Using Large Language Model–Assisted Content Analysis: Mixed Methods Study

Sulaiman MH, Muda N, Abdul Razak F

Analyzing Patient Complaints in Web-Based Reviews of Private Hospitals in Selangor, Malaysia, Using Large Language Model–Assisted Content Analysis: Mixed Methods Study

JMIR Form Res 2025;9:e69075

DOI: 10.2196/69075

PMID: 40577714

PMCID: 12254706

Warning: This is an author submission that is not peer-reviewed or edited. Preprints - unless they show as "accepted" - should not be relied on to guide clinical practice or health-related behavior and should not be reported in news media as established information.

LLM-Assisted Content Analysis (LACA) on Online Reviews for Hospital Quality Improvements Activities

  • Muhammad Hafiz Sulaiman; 
  • Nora Muda; 
  • Fatimah Abdul Razak

ABSTRACT

Background:

LLM-Assisted Content Analysis (LACA) is a modification of traditional content analysis, leveraging the Large Language Model (LLM) to co-develop codebooks and automatically assign thematic codes to online reviews dataset.

Objective:

This article is intended to explore and set a recommendation on how LACA can be applied on online reviews to address quality issues in hospitals.

Methods:

Online reviews for 53 private hospitals in Selangor Malaysia were acquired. Fake reviews were filtered out and a sample of 200 reviews was randomly extracted and fed into gpt-4o-mini model API to produce a codebook which was then used to code (label) all reviews in the dataset. Patterns of thematic codes across the whole dataset were presented using python matplotlib. The thematic codes were then summarized into themes using factor analysis to increase interpretability.

Results:

14,938 online reviews were acquired in which 1,279 comments were detected to mention quality issues. gpt-4o-mini model subsequently inducted 41 thematic codes together with their definitions. Average Human-GPT inter-rater reliability is perfect (kappa = 0.81). Factor analysis identified six interpretable latent factors: 'Service & Communication Effectiveness’, 'Clinical Care & Patient Experience’, ‘Facilities & Amenities Quality’, ‘Appointment & Patient Flow’, ‘Financial & Insurance Management’ and 'Patient Rights & Accessibility'. The cumulative explained variance for the six factors is 0.74 and cronbach alpha is between 0.88 - 0.97 (good - excellent) for all factors except factor 6 (0.61 - questionable). The factors identified follow a global pattern of issues identified from literature.

Conclusions:

A data collection & processing pipeline made of python selenium, gpt-4o-mini model API, and factor analyzer module can run valid and reliable thematic analysis. Despite online reviews being subject to collection and information bias, insights from online analysis is real-time and can assist hospital managers to develop hypotheses and react to trending quality issues quickly once data collection & processing pipeline is established


 Citation

Please cite as:

Sulaiman MH, Muda N, Abdul Razak F

Analyzing Patient Complaints in Web-Based Reviews of Private Hospitals in Selangor, Malaysia, Using Large Language Model–Assisted Content Analysis: Mixed Methods Study

JMIR Form Res 2025;9:e69075

DOI: 10.2196/69075

PMID: 40577714

PMCID: 12254706

Download PDF


Request queued. Please wait while the file is being generated. It may take some time.

© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.