Researchers from the BC Centre for Excellence in HIV/AIDS and affiliated institutions have developed a methodological framework for constructing opioid agonist therapy episodes in administrative health data. Published in BMC Methods, the study addresses limitations in current methods that rely heavily on fixed permissible gaps and often overlook switches between medications, concurrent therapies, and the temporal complexity of dispensing patterns. The new approach aims to more precisely reflect real-world opioid agonist therapy use within large-scale administrative datasets.
The study analyzed opioid agonist therapy dispensations from people living with HIV in British Columbia, Canada, between 2010 and 2020. The data were sourced from the Seek and Treat for Optimal Prevention of HIV/AIDS study, a population-based longitudinal cohort. The sample included 1,559 individuals diagnosed with either opioid use disorder alone or concurrent opioid use disorder and stimulant use disorder who received at least one opioid agonist therapy dispensation during the study period.
Current methods for constructing treatment episodes often oversimplify the temporal dynamics of dispensations, which can result from patient behavior, prescriber decisions, or pharmacy workflow. The permissible gap framework, commonly used in previous studies, defines a continuous episode by specifying the maximum allowable gap between two consecutive dispensations. However, this method fails to account for overlap lengths, which can lead to misclassification of treatment exposure and biased estimates of associations with clinical outcomes.
To address these challenges, the authors integrated three key components into their framework: Allen’s interval algebra, temporal margins, and drug-specific permissible gaps. Allen’s interval algebra is a temporal logic system that characterizes the full range of temporal relationships between two dispensations. It defines seven base relations—meets, overlaps, before, starts, finishes, contains, and equals—and their inverses, allowing for a detailed characterization of each pair of dispensations.
Temporal margins were incorporated to distinguish short from long overlaps within the same opioid agonist therapy medication. Short overlaps, defined as those within a specific margin, were interpreted as continuation of therapy and recoded as meets. Longer overlaps were retained to avoid inappropriate inflation of episode length. This distinction is crucial for differentiating between routine pharmacy variation and clinically significant changes in treatment circumstances.
Drug-specific permissible gaps defined the maximum interruption allowed before an episode was classified as discontinued. These gaps were mapped onto the before relation in Allen’s algebra and were informed by British Columbia clinical guidelines and the half-lives of the medications. Permissible gaps were set at six days or less for buprenorphine/naloxone, five days or less for methadone and slow-release oral morphine, and three days or less for injectable opioid agonist therapy.
Using this combined framework, the researchers identified four types of opioid agonist therapy episodes: monotherapy, transition therapy, multitherapy, and transition-multitherapy. Monotherapy episodes involved the continuous dispensation of a single medication. Transition therapy episodes reflected switches from one medication to another while maintaining continuity of care. Multitherapy episodes indicated the concurrent use of two or more medications, and transition-multitherapy episodes involved both switching and concurrent use within the same episode.
The results showed that the before relation predominated across all opioid agonist therapies, particularly for methadone, where it occurred in 99.43% of dispensations. The equals relation was notably prevalent for buprenorphine at 21.46% and slow-release oral morphine at 20.87%. To build monotherapy episodes, the authors applied a temporal margin of seven days, while a 14-day margin was used to differentiate transition from multitherapy episodes. This selection was informed by empirical data and clinical expertise, including input from a clinical pharmacist specializing in opioid agonist therapy.
The analysis identified 10,386 episodes in total. The majority, 93.53%, were monotherapy episodes. Transition therapy episodes accounted for 3.72%, multitherapy episodes for 2.27%, and transition-multitherapy episodes for less than 1%. The median duration of all episodes was 39 days, with an interquartile range of 13 to 165 days. The most frequent co-dispensation pattern involved a return to the initial therapy following a period of overlap, accounting for 82.12% of identified sequences.
The study highlights the importance of rigorous methodological approaches in ensuring valid inferences from administrative health data. By integrating Allen’s relations with temporal margins and permissible gaps, the framework provides a more nuanced construction of opioid agonist therapy treatment episodes that better reflects the complexity of real-world use. This approach allows for a more precise assessment of treatment retention, adherence, and care discontinuity.
Limitations of the study include the inherent constraints of administrative health databases, which capture medications dispensed rather than actual ingestion. The data also do not include information on patient intentions or provider-directed holds. Additionally, the data ended in March 2020 and therefore do not capture changes in opioid agonist therapy delivery that occurred during the COVID-19 pandemic. The authors recommend that future studies apply this framework to post-2020 data to assess how shifts in prescribing practices influence episode structure.
The framework is transferable to other settings and populations with suitable parameter adjustments. Allen’s relations, temporal margins, and drug-specific permissible gaps operate on interval timing rather than on population-specific fields, making the method adaptable for non-HIV populations and international contexts. This contribution to methodological tools for administrative health data facilitates more precise assessments of opioid agonist therapy outcomes, which are increasingly relevant as treatment evolves to meet the complex needs of patients with opioid use disorder.
The study was not a prespecified secondary analysis of the STOP HIV/AIDS cohort but was undertaken to address the complexity observed in opioid agonist therapy data from a prior project and within the context of an ongoing project examining the impact of stimulant use disorder on treatment retention. The authors aimed to bridge the gap between clinical practice and dispensation data by developing a framework that accounts for the irregularities inherent in administrative records. The data source, PharmaNet, records all dispensed prescription medications from British Columbia community and hospital outpatient pharmacies for at-home use. It excludes inpatient dispensations, over-the-counter medications, and antiretroviral drugs for HIV treatment provided by the BC Centre for Excellence in HIV/AIDS. Because the database captures dispensations rather than actual medication use, the researchers implemented a sequence of logic-based corrections to address errors such as inconsistent days supply, misaligned service dates, and implausible quantity-per-day values. These corrections were adapted from published methodologies and previous analyses, involving the consolidation of split-dose dispensations and the recalculation of days supply or quantity dispensed to produce clinically plausible patterns.
Among the 2,094,532 opioid agonist therapy dispensations analyzed, 21,977 were flagged for potential errors, and 8,993 were corrected. The authors noted that this difference was expected given the specific population and refinements to the correction rules, while remaining broadly comparable to prior analyses. The framework also accounted for hospitalizations, as PharmaNet does not include dispensations provided during hospital stays. Based on inpatient continuity of care guidelines, the researchers assumed that opioid agonist therapy continued in some form during patients’ hospital stays if an admission occurred amid an ongoing episode. This assumption was critical for accurately defining episode start and end dates when treatment was initiated following hospitalization or when regimen changes occurred post-discharge.
The selection of temporal margins was informed by both empirical data and clinical expertise. For monotherapy episodes, a seven-day margin was chosen after comparing scenarios with no margin, a seven-day margin, and a fourteen-day margin. Without a margin, large mean and maximum shifts in dates of service were observed for some slow-release oral morphine dispensations, driven by accumulated overlaps. Applying a seven-day margin reduced this mean difference by approximately 98%, effectively minimizing distortions while preserving clinically appropriate continuity. For differentiating transitions from multitherapy, a fourteen-day margin was selected based on the observation that most co-dispensation periods were less than fourteen days. Input from a clinical pharmacist specializing in opioid agonist therapy and current treatment guidelines supported this range as representing intentional transitions. Longer overlap periods were more likely to reflect concurrent therapy rather than transitional switching. This approach contrasts with previous methods that applied temporal margins to both overlaps and before relations, which could make the definition of discontinuation dependent on the margin choice. The current framework preserves the before relation through clinically informed permissible gaps, ensuring discontinuation windows remain grounded in pharmacology.
The distribution of temporal relations in the cohort closely mirrored those reported in a different therapeutic area, supporting the consistency of the interval-based approach. The most frequent co-dispensation pattern involved slow-release oral morphine and methadone, consistent with clinical practice for patients with more severe opioid use disorder. Dispensation sequences further showed that individuals receiving methadone or slow-release oral morphine who were initiated on buprenorphine/naloxone often reverted to their original therapy. This pattern could reflect the higher retention observed with methadone and suggests a broader preference for full-agonist therapies. The study acknowledges that external validation through chart review or comparison with a clinical gold standard would have strengthened the framework but was beyond the scope of this methodological study. To enhance internal validity, an opioid agonist therapy-specialized clinical pharmacist reviewed all data-cleaning and episode-construction steps, and the conceptual framework was vetted by three physicians with addiction expertise.
Subject of Research: Methodological framework for constructing opioid agonist therapy episodes in administrative health data
Article Title: A methodological framework for constructing opioid agonist therapy episodes in administrative health data
Article References: Yazdani, K., Tam, C., Fisher, C. C., Emerson, S. D., Trigg, J., Kooij, K. W., De Vera, M. A., Vila-Rodriguez, F., Hogg, R. S., Montaner, J. S. G., & Lima, V. D. (2026). A methodological framework for constructing opioid agonist therapy episodes in administrative health data. BMC Methods, 3(1), Article 11. https://doi.org/10.1186/s44330-026-00064-9
Image Credits: AI Generated
DOI: 10.1186/s44330-026-00064-9
Keywords: opioid agonist therapy, administrative health data, Allen's interval algebra, temporal margins, pharmacovigilance, British Columbia, HIV, opioid use disorder, methodology, BMC Methods, methodological, framework
Cite Scienmag News
Gregory Coleman. (November 11, 2026). New Framework Maps Complex Opioid Therapy Patterns in Health Data. Scienmag. https://scienmag.com/new-framework-maps-complex-opioid-therapy-patterns-in-health-data/
Gregory Coleman. "New Framework Maps Complex Opioid Therapy Patterns in Health Data." Scienmag, 11 November 2026, https://scienmag.com/new-framework-maps-complex-opioid-therapy-patterns-in-health-data/. Accessed 11 November 2026.
Gregory Coleman. "New Framework Maps Complex Opioid Therapy Patterns in Health Data." Scienmag. November 11, 2026. https://scienmag.com/new-framework-maps-complex-opioid-therapy-patterns-in-health-data/








