@article {Pineda19004440, author = {Arturo Lopez Pineda and Armin Pourshafeie and Alexander Ioannidis and Collin McCloskey Leibold and Avis Chan and Jennifer Frankovich and Carlos D. Bustamante and Genevieve L. Wojcik}, title = {Medal: a patient similarity metric using medication prescribing patterns}, elocation-id = {19004440}, year = {2019}, doi = {10.1101/19004440}, publisher = {Cold Spring Harbor Laboratory Press}, abstract = {Patient similarity offers an exciting potential to improve our understanding of treatment patterns. Medication history is a valuable source of information given the clinical considerations taken during the physician{\textquoteright}s prescription process. However, available similarity methods do not consider timeliness of event occurrence in the longitudinal care of patients.In this observational cohort study, we propose an event alignment algorithm, Medal, which uses a dynamic programming approach for pairwise alignment of medication histories. To test our algorithm, we obtained the medication usage from a cohort of patients with pediatric acute-onset neuropsychiatric syndrome (PANS). After calculating a distance metric with Medal, we compute a hierarchical clustering and explore the most appropriate number of clusters.We identified four clusters in PANS with distinct medication usage histories, driven primarily by penicillin. We foresee that our algorithm could be used to identify clusters in other syndromes treated with multiple medication regimens.Competing Interest StatementALP declares that the research presented in this study was done while he was employed by Stanford University, but at the time of submission he is now employed by Genentech, Inc., a member of the Roche group. The rest of the authors declare no competing interests.Funding StatementResearch reported in this publication was partially supported via institutional funds from Stanford University. CDB is a Chan Zuckerberg Biohub investigator. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.Author DeclarationsAll relevant ethical guidelines have been followed and any necessary IRB and/or ethics committee approvals have been obtained.YesAll necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived.YesAny clinical trials involved have been registered with an ICMJE-approved registry such as ClinicalTrials.gov and the trial ID is included in the manuscript.Not ApplicableI have followed all appropriate research reporting guidelines and uploaded the relevant Equator, ICMJE or other checklist(s) as supplementary files, if applicable.YesThe data that supports the findings of this study is available for research purposes upon written request, which will be reviewed on a case-by-case basis by Dr. Jennifer Frankovich, director of the Stanford PANS clinic (http://med.stanford.edu/pans), and Stanford{\textquoteright}s Institutional Review Board (IRB). http://med.stanford.edu/pans.html}, URL = {https://www.medrxiv.org/content/early/2019/08/26/19004440}, eprint = {https://www.medrxiv.org/content/early/2019/08/26/19004440.full.pdf}, journal = {medRxiv} }