Commentary

Article

Harnessing AI to Streamline Clinical Trials, Optimize Pharmacy, and Personalize Cancer Treatment

Artificial intelligence (AI) is rapidly transforming oncology by enhancing clinical trial design, streamlining patient recruitment, improving precision medicine, and optimizing pharmacy operations, while raising important challenges around data ethics, bias, and integration into clinical workflows.

Artificial intelligence (AI) is revolutionizing oncology practice and research. In clinical trials, AI-driven tools are being used to improve study design, patient recruitment, and data analysis, all while making clinical trials more precise and efficient. Deep learning has shown great promise in image recognition, diagnostics, and pattern recognition in oncology workflows.1 Machine learning (ML) algorithms can rapidly and accurately match patients to clinical trials, optimize trial designs, and reveal deeper patterns from real-world data (RWD).2

In oncology pharmacy, AI is helping providers make more informed decisions, such as choosing personalized therapies that support precision medicine approaches based on the patient’s lifestyle, genetic profile, and clinical presentation.AI is also being used to monitor medication adherence and management through remote patient monitoring.Despite challenges with integration into new systems, data quality, and ethical responsibilities, AI’s role in oncology shows promising proof of the potential to fast-track drug development, improve patient outcomes, and optimize how clinical trials are designed and conducted.

AI’s impact on oncology is not theoretical. Deep learning models have already achieved dermatologist-level accuracy in identifying skin cancer through imaging algorithms.14 In another example, deep learning has been shown to predict microsatellite instability directly from histology slides in gastrointestinal cancers, demonstrating its power in advancing oncologic diagnostics.22 A 2021 systematic review found that deep learning algorithms demonstrated high diagnostic accuracy across multiple imaging modalities, often matching or surpassing human expert performance in medical imaging tasks, including oncology.12

Doctor examines patient medical history. Image Credit: © Maryna - stock.adobe.com

Doctor examines patient medical history. Image Credit: © Maryna - stock.adobe.com

Clinical trials bring new cancer treatments to patients but involve a lengthy timeline and high costs. AI is now being used to streamline different stages of clinical trials. One major application is in patient eligibility and selection. Traditionally, finding eligible patients for oncology trials is time consuming because researchers have to manually sort through electronic health records (EHRs) to identify patients that meet the specified criteria.Using natural language processing (NLP) and large language models (LLMs) can speed up this process. Researchers at the National Institutes of Health (NIH) have developed an AI tool called TrialGPT that is able to analyze patient information alongside clinical trial databases to match patients with appropriate clinical trials. During initial testing, TrialGPT helped providers spend 40% less time screening patients, all while maintain the same level of accuracy. With streamlined trial enrollment, the creation of clinical evidence is accelerated.

Building on this, a recent study by Jin et al showed that LLMs significantly outperform traditional keyword searches by interpreting subtle clinical terminology in patient records and trial criteria. This capability allows for more inclusive and efficient patient-trial matching, which is reinforcing the potential of AI-driven tools to transform oncology research.27 However, researchers have warned that generalizability and transparency remain primary concerns. AI models trained on data from academic institutions may perform poorly in community settings with more diverse patient populations. Additionally, if these models do not clearly explain how eligibility decisions are made, clinicians may be less reluctant to adopt them, especially in high stakes cancer trials. Addressing these issues will be vital for the successful integrating of LLMs in future trial workflows.

AI isn’t just helping with patient recruitment; it’s also changing how clinical trials are designed. By utilizing and analyzing historical trial data, patient outcomes, and RWD, AI can help create stronger, more predictive studies.25 Recurrent neural networks have already demonstrated success in predicting clinical outcomes such as early detection of heart failure from longitudinal HER data, which is an approach that could similarly be used for identifying high-risk oncology patients.11 ML can identify which patient groups are most likely to have a positive response from a new treatment which helps modify inclusion criteria, such as adaptive trial designs allowing for dose modifications or treatment switches mid-trial based on initial biomarker data.19 Recent research highlights AI’s ability to integrate structured and unstructured health data across systems, making trial protocols more dynamic and patient centered.24

AI also makes it easier to run adaptive trials that adjust treatments or doses as the study progresses by using real-time diagnostic or biomarker information. The FDA’s Real-World Evidence Program underscores how these data streams, including EHRs and claim data, can support regulatory decisions, further validating their use in AI-driven oncology trials.26

Another area where AI is making an impact is in how control groups and trial end points are handled. Instead of relying on large placebo groups, researchers can utilize EHRs to create “synthetic” control cohorts.

AI algorithms can also keep an eye on new trial data to spot safety or effectiveness signals faster than traditional methods would allow. These advancements help make clinical trials faster, cheaper, and more precise. To support this process, computational pathology has also begun adopting best practices and regulatory guidance for AI-driven diagnostics, while keeping consistency and clinical trust in trial endpoints and data pipelines.23

AI is also changing everyday oncology pharmacy practice. AI can take over tasks such as scheduling, coding, or data entry so that other clinicians can dedicate more time to patient care.4 Oncology clinicians and providers face the challenge of integrating a huge amount of information, such as tumor types, patient disease characteristics, treatment guidelines, and insurance coverage, when deciding on therapies. AI can be integrated in clinical decision support systems to help process this information quickly to recommend personalized treatment options, which has been successfully demonstrated in cardiology.20

However, for these recommendations to be trusted and adopted by clinicians, the AI systems have to be explainable, meaning the outputs can be clearly articulated and justified.3 Deep learning applications in cardiovascular medicine have highlighted parallel barriers to adoption, including the need for large, well-annotated datasets, model transparency, and rigorous validation—all of which are equally essential in oncology pharmacy.7 For example, an AI system might automatically check a new chemotherapy order against the latest guidelines and the patient’s specific genetic markers or suggest more personalized alternative treatment regimens or dose adjustments with fewer adverse effects. These kinds of real-time, point-of-case recommendations can speed up decision-making and improve precision medicine selection.21

Medication management and adherence to oral oncolytics is another area where AI can be used. Many cancer patients take oral treatments at home, where monitoring can be tricky. Smart pillboxes combined with AI can not only track when patients take their meds, but also cross-checking dosing times with reported symptoms. This can help catch problems early and trigger early interventions, avoiding toxicity, hospitalizations, or treatment discontinuations.

A recent systematic review identified a wide range of smart medication systems (eg, sensor-equipped pods, pill bottes, and automated dispensers) that can capture real-time adherence data and share it with patients and clinicians, though usability and integration into existing workflows remain key challenges.13 On the operational side, AI can improve medication safety by validating complex chemotherapy dose calculations, which often times is an area for potential error. By being trained on pharmacy data, AI can verify calculations or flag when a dose looks unusual. Al-driven forecasting models like those utilizing neural networks (eg, long short-term memory) and XGBoost have demonstrated superior accuracy in predicting pharmaceutical sales patterns and inventory changes, which allows for better inventory management and cost containment in hospital pharmacy operations.8

Despite the promise of AI in oncology, several challenges must be addressed to ensure its responsible and ethical implementation. Most important among these are data privacy and ethical governance. Many AI models are trained on clinical data originally collected for unrelated purposes, which raises questions about informed consent, secondary data use, and confidentiality protections governed by the Health Insurance Portability and Accountability Act (HIPAA).

However, traditional privacy protections, such as HIPAA, may be insufficient in the era of big data, where AI models trained on deidentified information can sometimes re-identify patients or infer sensitive health conditions.10 Beyond privacy concerns, AI introduces additional ethical challenges, such as ensuring accountability for algorithmic errors, maintain transparency, and managing unintended consequences.9 If health information is used to train AI algorithms, explicit authorization or a HIPAA-compliant deidentification process is required meaning data has to be stripped of all identifiers to qualify as deidentified under HIPAA’s “safe harbor” standard.15,16 Secondary use of data may require and institutional review board oversight or patient consent, depending on the intent or use. Experts have emphasized that AI-driven trial matching and treatment forecasting requires intense regulatory oversight to ensure algorithms meet standards for clinical efficacy, safety, and fairness.5,17

Equally important is the issue of bias. If an AI system is trained on data that lacks representation of diverse populations, including ethnicity, age, geography, race, and socioeconomic status, the recommendations may not be generalized to broader populations.18 Some experts have also cautioned against inflated expectations surrounding early ML applications, warning that models deployed without adequate transparency, validation, or interpretability may create more harm than benefit. ML models frequently suffer from poor reproducibility. Recently published in JAMA Viewpoint, a study showed that many clinical algorithms cannot be reliable reproduced due to issues such as hidden randomness, lack of shared code, and incomplete documentation.6 This is concerning in oncology where environmental exposure, access to care, and genomic variations differ across patient populations. Inclusive data collection, detailed regulatory oversight, and routine bias auditing are vital to improving care for all using AI.

About the Author

Paul Alebrande is a PharmD candidate at the University of North Carolina Eshelman School of Pharmacy.

Despite these challenges, AI and ML are already reshaping oncology in measurable ways: accelerating trial timelines, refining treatment selection, and enhancing pharmacy operations. Al-powered NLP tools are already in clinical use: For example, an NLP algorithm was recently used in the VA Health System, and it accurately extracted multiple myeloma staging from unstructured clinical notes, demonstrating the viability of automated oncology data extraction. These milestones point towards a future where health care professionals can utilize AI to understand large sums of clinical data in real time, allowing for faster, smarter, and more personalized treatments to patients who need them most. The path forward demands collaboration between providers, data scientist, ethicists, regulators, and patients themselves. If these partnerships are created thoughtfully, AI could bring in a new era of cancer care defined by precision, equity, and innovation.

REFERENCES
  1. Esteva A, Robicquet A, Ramsundar B, et al. A guide to deep learning in healthcare. Nat Med. 2019;25(1):24-29. doi:10.1038/s41591-018-0316-z
  2. Liu Y, Chen PC, Krause J, Peng L. How to read articles that use machine learning: users’ guides to the medical literature. JAMA. 2019;322(18):1806-1816. doi:10.1001/jama.2019.16489
  3. Amann J, Blasimme A, Vayena E, Frey D, Madai VI. Explainability for artificial intelligence in healthcare: a multidisciplinary perspective. BMC Med Inform Decis Mak. 2020;20(1):310. doi:10.1186/s12911-020-01332-6
  4. Topol EJ. High-performance medicine: the convergence of human and artificial intelligence. Nat Med. 2019;25(1):44-56. doi:10.1038/s41591-018-0300-7
  5. Parikh RB, Obermeyer Z, Navathe AS. Regulation of predictive analytics in medicine. Science. 2019;363(6429):810-812. doi:10.1126/science.aaw0029
  6. Beam AL, Manrai AK, Ghassemi M. Challenges to the reproducibility of machine learning models in health care. JAMA. 2020;323(4):305-306. doi:10.1001/jama.2019.20866
  7. Krittanawong C, Johnson KW, Rosenson RS, et al. Deep learning for cardiovascular medicine: a practical primer. Eur Heart J. 2019;40(25):2058-2073. doi:10.1093/eurheartj/ehz056
  8. Cuocolo R, Caruso M, Perillo T, Ugga L, Petretta M. Machine learning in oncology: a clinical appraisal. Cancer Lett. 2020;481:55-62. doi:10.1016/j.canlet.2020.03.032
  9. Gianfrancesco MA, Tamang S, Yazdany J, Schmajuk G. Potential biases in machine learning algorithms using electronic health record data. JAMA Intern Med. 2018;178(11):1544-1547. doi:10.1001/jamainternmed.2018.3763
  10. Rajpurkar P, Chen E, Banerjee O, Topol EJ. AI in health and medicine. Nat Med. 2022;28(1):31-38. doi:10.1038/s41591-021-01614-0
  11. Choi E, Schuetz A, Stewart WF, Sun J. Using recurrent neural network models for early detection of heart failure onset. J Am Med Inform Assoc. 2017;24(2):361-370. doi:10.1093/jamia/ocw112
  12. Aggarwal R, Sounderajah V, Martin G, et al. Diagnostic accuracy of deep learning in medical imaging: a systematic review and meta-analysis. NPJ Digit Med. 2021;4(1):65. doi:10.1038/s41746-021-00438-z
  13. Chen JH, Asch SM. Machine learning and prediction in medicine—beyond the peak of inflated expectations. N Engl J Med. 2017;376(26):2507-2509. doi:10.1056/NEJMp1702071
  14. Esteva A, Kuprel B, Novoa RA, et al. Dermatologist-level classification of skin cancer with deep neural networks. Nature. 2017;542(7639):115-118. doi:10.1038/nature21056
  15. HealthIT.gov. How HIPAA allows the use of de-identified health data. Accessed July 22, 2025. https://www.healthit.gov/topic/privacy-security-and-hipaa
  16. US Department of Health and Human Services. Guidance regarding methods for de-identification of protected health information. Accessed July 22, 2025. https://www.hhs.gov/hipaa/for-professionals/privacy/special-topics/de-identification/index.html
  17. FDA. Artificial Intelligence/Machine Learning (AI/ML)-Based Software as a Medical Device (SaMD) Action Plan. January 2021. Accessed July 22, 2025. https://www.fda.gov/media/145022/download
  18. MITRE. Artificial Intelligence in Oncology: Advancing Equity and Ethics. Published June 2023. https://www.mitre.org/publications
  19. Makady A, de Boer A, Hillege H, Klungel O, Goettsch W. What is real-world data? A review of definitions based on literature and stakeholder interviews. Value Health. 2017;20(7):858-865. doi:10.1016/j.jval.2017.03.008
  20. Johnson KW, Torres Soto J, Glicksberg BS, et al. Artificial intelligence in cardiology. J Am Coll Cardiol. 2018;71(23):2668-2679. doi:10.1016/j.jacc.2018.03.521
  21. Dilsizian SE, Siegel EL. Artificial intelligence in medicine and cardiac imaging: harnessing big data and advanced computing to provide personalized medical diagnosis and treatment. Curr Cardiol Rep. 2014;16(1):441. doi:10.1007/s11886-013-0441-8
  22. Kather JN, Pearson AT, Halama N, et al. Deep learning can predict microsatellite instability directly from histology in gastrointestinal cancer. Nat Med. 2019;25(7):1054‑1056. doi:10.1038/s41591-019-0462-y
  23. Abels E, Pantanowitz L, Aeffner F, et al. Computational pathology definitions, best practices, and recommendations for regulatory guidance: a white paper from the Digital Pathology Association. J Pathol Inform. 2019;10:9. doi:10.4103/jpi.jpi_93_18
  24. Yu KH, Beam AL, Kohane IS. Artificial intelligence in healthcare. Nat Biomed Eng. 2018;2(10):719-731. doi:10.1038/s41551-018-0305-z
  25. Kourou K, Exarchos TP, Exarchos KP, Karamouzis MV, Fotiadis DI. Machine learning applications in cancer prognosis and prediction. Comput Struct Biotechnol J. 2015;13:8-17. doi:10.1016/j.csbj.2014.11.005
  26. FDA. Framework for FDA’s Real-World Evidence Program. December 2018.https://www.fda.gov/media/120060/download
  27. Jin Q, Wang Z, Floudas CS, Chen F, Gong C, Bracken‑Clarke D, Xue E, Yang Y, Sun J, Lu Z. Matching patients to clinical trials with large language models. Nat Commun. 2024;15(1):9074. doi:10.1038/s41467-024-53081-z

Newsletter

Stay informed on drug updates, treatment guidelines, and pharmacy practice trends—subscribe to Pharmacy Times for weekly clinical insights.

Related Videos
Pharmacist discussing medication with patient | Image Credit: © wichayada - stock.adobe.com
Hematology -- Image credit: DIgilife | stock.adobe.com