- Research article
- Open Access
Development of an algorithm to detect and reduce complexity of drug treatment and its technical realisation
BMC Medical Informatics and Decision Making volume 20, Article number: 154 (2020)
The increasing complexity of current drug therapies jeopardizes patient adherence. While individual needs to simplify a medication regimen vary from patient to patient, a straightforward approach to integrate the patients’ perspective into decision making for complexity reduction is still lacking. We therefore aimed to develop an electronic, algorithm-based tool that analyses complexity of drug treatment and supports the assessment and consideration of patient preferences and needs regarding the reduction of complexity of drug treatment.
Complexity factors were selected based on literature and expert rating and specified for integration in the automated assessment. Subsequently, distinct key questions were phrased and allocated to each complexity factor to guide conversation with the patient and personalize the results of the automated assessment. Furthermore, each complexity factor was complemented with a potential optimisation measure to facilitate drug treatment (e.g. a patient leaflet). Complexity factors, key questions, and optimisation strategies were technically realized as tablet computer-based application, tested, and adapted iteratively until no further technical or content-related errors occurred.
In total, 61 complexity factors referring to the dosage form, the dosage scheme, additional instructions, the patient, the product, and the process were considered relevant for inclusion in the tool; 38 of them allowed for automated detection. In total, 52 complexity factors were complemented with at least one key question for preference assessment and at least one optimisation measure. These measures included 29 recommendations for action for the health care provider (e.g. to suggest a dosage aid), 27 training videos, 44 patient leaflets, and 5 algorithms to select and suggest alternative drugs.
Both the set-up of an algorithm and its technical realisation as computer-based app was successful. The electronic tool covers a wide range of different factors that potentially increase the complexity of drug treatment. For the majority of factors, simple key questions could be phrased to include the patients’ perspective, and, even more important, for each complexity factor, specific measures to mitigate or reduce complexity could be defined.
Complexity of drug treatment arises from different characteristics in the medication regimen or external circumstances that may encumber drug administration for a patient. These complexity factors are manifold  and can potentially lead to nonadherence  and unplanned hospitalisations [3, 4]. They can be assigned to six categories depending on whether they are related to the dosage form (e.g. the use of transdermal patches ), the dosage scheme (e.g. an once weekly administration ), additional instructions concerning the use of a drug such as the coordination of the drug administration with a meal , the patient (e.g. swallowing difficulties ), the product (e.g. an intricate packaging ), or the medication process itself (e.g. frequently changing prescriptions ).
Besides consideration of single complexity factors such as the number of drugs in a medication regimen or the dosing frequency , the medication regimen complexity index (MRCI) is probably the most frequently used tool to assess complexity related to the medication regimen in a standardized way . However, there is no tool currently available that covers all aspects potentially influencing complexity of drug treatment. Moreover, analysing and reducing the complexity of drug treatment remains time-consuming , even though the complexity in drug treatment could often be reduced significantly by simple measures . In various health care settings, electronic tools have been developed to facilitate integration of decision aids in routine care  and also for reducing complexity in drug treatment it has been shown that individual complexity factors can be reduced by electronic decision aids . Also the MRCI was transferred into an electronic decision aid  and tested in the home care setting . Among patients in the intervention group, 8% of patients dropped below a MRCI score of 24.5 when the decision aid was used compared to 4.5% of patients when the decision aid was not used, suggesting that a tool that covers all areas of complexity would be even more successful.
However, there still remains the risk that patients do not adhere to the medication regimen after it has been changed, particularly if they have not been involved in the process of decision-making [19,20,21] and if complexity aspects relevant for the individual patient are not specifically addressed. Hence, a potential algorithm and its technical realisation should consider patient preferences to ensure that suggested changes and trainings are tailored to the patients’ needs with maximum chance of acceptance.
The aim of this study was therefore to develop an algorithm as well as its technical realisation that comprehensively assesses and reduces complexity of drug treatment. To this end, complexity factors must be specified that could be considered in such an automated analysis, appropriate strategies to assess and integrate the patients’ perspective must be developed and integrated, and, finally, feasible suggestions to mitigate complexity must be provided.
As a prerequisite to the tool development, four key functionalities were defined:
Functionality I: Easy access to structured medication data.
Functionality II: Comprehensive, automated analysis of the drug treatment’s complexity based on distinct complexity factors.
Functionality III: Personalization of the automated analysis to the patient’s perspective and actual problems.
Functionality IV: Suggestion of appropriate measures to reduce or mitigate the identified complexity factors.
The respective functionalities were developed as follows:
Access to structured medication data
In Germany, all patients with chronic medication intake are entitled to a nationally standardized medication schedule providing information on the active ingredient, the brand name, the dosage form, the strength, the dosing frequency, the unit, instructions for use, and the indication of each drug . This paper-based document has a two-dimensional data matrix code which can be scanned to transfer the medication data and, thus, offers an easy access to structured prescription data (XML-data). After starting the tool, the user should be able to scan the data matrix code of medication schedules to upload the medication data for analysis.
Automated assessment of complexity factors
Based on all available information of a medication schedule, the tool should comprehensively assess complexity factors that actually represent a relevant problem for patients in routine care and, thus, should be considered in the automated analysis. To do so, we combined a literature-based with a qualitative approach. As described previously by our group, 91 complexity factors were identified  which had to be rated for their relevance by experts to decide upon their inclusion in the tool. We therefore formed an expert panel of 10 experts (clinical pharmacologists, general practitioners, and pharmacists involved in the development of the electronic tool and their colleagues) to rate factors previously characterised in the literature as having little relevance (1 point), medium relevance (2 points), and high relevance (3 points). Complexity factors rated with less than 25 points were subsequently discussed within the expert panel to decide whether or not they should be further considered in the development process of the tool. If during the expert discussion new complexity factors were identified, these factors could be included in the final list if all experts agreed.
The adapted set of complexity factors was then rated in a second round by another six experts to verify the result. The final decision on the factors that should be considered in the automated assessment was made by the authors based on the results of the expert ratings and the influence of each complexity factor on complexity of drug treatment. For example, some complexity factors only indirectly influence complexity and therefore could not or only with difficulty be optimised within routine care (e.g. a lack of interest in drug treatment or a low income). For the final set of complexity factors, feasibility of automated detection was checked and respective rules and criteria for automated detection were specified whenever possible.
Personalization of the analysis to patient needs
The patients’ perspective on the identified complexity factors and, thus, the relevance for the individual patient should be assessed interactively and stored in the tool. To do so, we allocated so called key questions to all factors that could be automatically detected by the tool. For example if a patient had to use an inhaler, a key question addressing problems with correct inhaling was phrased. These key questions were developed following a previously described approach . Briefly, it is a five-step process involving patients and health care professionals to develop and validate key questions. Thereby it can be ensured that the key questions are specific to a complexity factor, comprehensible for patients, suitable to indeed identify a patients difficulties and implementable in patient visits.
For factors that could not be detected automatically (e.g. cognitive impairment), distinct questions should be phrased to assess whether this factor was relevant for the patient. Consequently these distinct questions cannot be linked to the automated detection of complexity factors but allow to consider additional factors besides the automated analysis when reducing complexity of drug treatment with the tool. As an example, swallowing problems cannot be detected from a medication schedule, but were identified as a relevant complexity factor.
Suggestion of optimisation measures tailored to the patient’s needs
Based on the patients’ responses to key questions, optimisation measures should be proposed selectively for factors that are relevant for the patient. Hence, at least one potential strategy to reduce or mitigate the respective complexity factor was allocated to each factor and a key question or a distinct question for its detection was phrased. The strategies belonged to one of the following three categories:
Recommendations for action of the health care provider, e.g. to recommend a dosage aid
Training material, e.g. patient leaflets
Algorithms to modify the medication regimen, e.g. by selecting an alternative drug with less frequent dosing
Technical implementation of the functionalities
The functionalities were then implemented in a windows-based computer app using the programming language C Sharp (.NET 4.5) and the GUI toolkit Windows Forms. This app can access current medication data on all drugs available in Germany in a Microsoft SQL database, meaning that the XML-data obtained from the medication schedule can be compared with this database to identify matching entries. On the medication level this was done via the so-called “Pharmazentralnummer” (Pharmacy Product Number) which is an ID unique to each medicinal product in Germany. Consequently, additional information about a medication (e.g. the type of inhaler) can be retrieved, which is important for the targeted proposal of key questions and optimisation measures. Moreover, appropriate alternative drugs can be suggested by the algorithms as an optimisation measure in this way.
For some complexity factors, identification is based on key words in the free texts of the medication schedule. To this end, respective keywords were defined, allowing the XML-Data of the medication schedule to be screened for them.
To ensure the reliable and error-free performance, the tool was tested with exemplary medication schedules to find potential technical or content-related errors. Therefore fictional medication schedules were created to ensure that automated detection of each complexity factor could be iteratively checked. Thereby, the user interface design was optimised for the intended use by ensuring a sufficient font size, a clear presentation, and the ease of use. Testing was independently and iteratively performed by two pharmacists.
Access to structured medication information
The tool was made available on tablet computers. Via a specific scanner, the data matrix code of the medication schedules could be scanned (Fig. 1).
Automated assessment of complexity factors
Out of the 91 factors increasing treatment complexity  34 complexity factors were excluded due to a low relevance according to the expert panel. Four complexity factors were additionally included based on expert opinion, i.e. diverse storage conditions of the patient’s individual drugs; administration of only one drug at one specific point in time, as a challenging dosage scheme; the same active ingredient in different preparations, which might potentially confuse the patient; and occasional, episodic treatment with a drug, e.g. an antibiotic.
Accordingly, the final list of complexity factors comprised a total of 61 factors (Table 1), which where almost evenly distributed amongst all six categories : 13 factors were assigned to the category dosage form, 14 to the category dosage scheme, eight to the category additional instructions, ten to the category patient, five to the category product, and 11 to the category process.
Of 61 complexity factors, 38 (62%) could be identified automatically from the structured medication data of a medication schedule, either by using structured information, such as the dosage scheme, or by searching index words in free-text fields. For instance, for the complexity factor “Meal-dependent administration”, the detection was based on the keywords “meal”, “food”, “eat”, “breakfast”, “lunch”, or “dinner”.
Personalization of analysis to patients’ needs
For every complexity factor that allowed for automated detection, at least one specific key question was developed (Table 1 ;). For three dosage forms different devices are available that differ substantially in their way of use. Therefore, it was necessary to develop different key questions for the different devices.
For 14 of the remaining 23 complexity factors, which could not be identified automatically, eight distinct questions were developed and implemented in the software that allowed for detection of the respective factors (e.g. swallowing difficulties). Hence, a total of 52 complexity factors could ultimately be considered in the analysis of treatment complexity by the electronic tool. The remaining nine complexity factors were too vague to be included as single complexity factors. However, we phrased an open-ended question inviting the patients to report any further difficulties with their drug treatment that have not been addressed by the previously identified complexity factors (i.e. “Is there anything else that is difficult for you in using your medication?”).
Recommendation of optimisation measures tailored to the patients’ needs
A total of 105 optimisation measures to reduce or mitigate treatment complexity were newly developed or adapted for inclusion in the tool (Table 1).
These included five algorithms suggesting alternative treatments (e.g. different dosage forms or drugs with different dose strengths), 44 patient leaflets (e.g. illustrating how to use a particular dosage form), which were developed based on already existing educational material [24,25,26], 27 training videos from the Deutsche Atemwegsliga e.V. (German Airway League, a registered, charitable association informs patients and doctors about respiratory and lung diseases and is not sponsored by the pharmaceutical industry) for inhaler devices  and, 29 recommendations for action referring to three topics:
Recommendations of aids that facilitate medication administration and therefore could be proposed to the patient, for instance a spacer.
Recommendations to explain a certain aspect of medication administration to the patient, for example the administration of dosage forms for oropharyngeal use.
Recommendations to review a certain aspect of the medication regimen and to consider changing the medication regimen, for example to change the time of administration.
Technical implementation of the functionalities
The four functionalities were integrated and aligned in the tool (Fig. 2) in a way that the user is automatically guided through the application (Fig. 3). The tool was tested with approximately 50 exemplary medication schedules until no further technical or content-related errors occurred. Testing revealed that the tool reliably identifies complexity factors and, thus, proposes targeted optimisation measures to reduce complexity in drug treatment.
The developed electronic tool comprised 52 complexity factors covering a wide range of factors contributing to treatment complexity. Thereby, almost two in three complexity factors could be automatically detected if structured medication data was entered as provided by a medication schedule. This applied in particular to the complexity factors related to the dosage form, the dosage scheme, or additional instructions, thereby confirming the results of the MRCI decision aid [12, 17].
In contrast, most complexity factors relating to the patient, the product, or the medication process could not be detected by the electronic tool, either because this information could not be deduced from data currently stored on the medication schedules or structured information to develop respective algorithms is currently not available. Hence, to integrate also these factors, either alternative data sources such as electronic health records would be needed (e.g. to have access to the patients’ diseases) and more thorough information particularly on product characteristics would be required, e.g. on the packaging of each drug or individual tablet shape and size. With such information, the medication schedule could for instance be searched for packages that are difficult to open such as child-resistant containers  and algorithm-based packages that are easier to open could be suggested.
Moreover, to develop more complex algorithms, e.g. for the automated detection of sound-alike drugs, either structured data on resembling drug names could be integrated or an algorithm to identify such drug pairs based on linguistic approaches, such as an analysis of orthographic and phonetic similarities of all drug names in a medication regimen, could be specified .
In total, about one third of the complexity factors considered relevant by the experts could not be automatically evaluated by our complexity tool. To compensate this shortcoming in the short term, we used distinct questions that complemented the automated assessment and address potential problems of the patient with the current treatment regimen. This approach proved to be sufficient for many relevant challenges in a patient’s life such as swallowing difficulties, diverse storage conditions, or complicated packaging. However, factors relating to the patients’ capabilities, their health literacy or their life style could not be assessed by a single question and hence were not considered in our assessment even though they were rated as important by the experts in the first place.
Nevertheless, the inclusion of health care professionals in the selection of the complexity factors considered in the tool and the development of the key questions ensures that the final electronic tool meets the needs of routine care. Thus, it should be made sure that the tool can be implemented easily in patient care and that relevant patient problems are addressed, which can be solved or mitigated directly by a health care professional. However, in order to reduce the influence of the professional background and the personal experiences in patient care of each individual on the final algorithm, several health care professionals with different professions or specialisations have been involved. In general, the included key questions clearly distinguish the analysis with our electronic tool from a simple complexity assessment and allow for patient-specific selection of optimisation measures (personalized intervention). The actual impact of this approach on routine care will be tested in a prospective pilot study and compared to other approaches to reduce treatment complexity that do not consider the patient preferences. A future widespread use of the tool in the health care system is conceivable because it could be used in different settings, such as pharmacies, ambulatory care and, also hospitals. Even individualization of the recommended optimisation measures to the setting appears possible; for use in a pharmacy, an algorithm to change the dosage form could for example be replaced by the recommendation for action to contact a doctor and suggest an alternative drug. Furthermore, specific patient populations might need adapted optimisation measures, such as blind or visually handicapped patients who will benefit less from standard information brochures but might need materials with verbal explanations. This work has several limitations. First, the analysis of complexity of drug treatment is based on structured medication data from the nationally standardized medication schedule and, thus, there is a risk that not all of the patient’s drugs are considered, e.g. because the medication schedule is not up-to-date or not comprehensive. In particular, pro re nata (as needed) medication and non-prescription drugs might not be included in the medication schedule, for example because they are forgotten or not considered as relevant by health care professionals and patients. However, in order to comprehensively assess and reduce treatment complexity with the electronic tool, it would be essential to include all medications used by the patient in the medication schedule.
Second, the automated identification of complexity factors is partly based on the identification of index words in the free text fields of the medication schedule. Therefore, accurate identification depends on the correctness and comprehensiveness of the medication schedule and correct spelling of the index words. Moreover the definition of index words might not be comprehensive enough to cover all possible notations health care professionals might use. In particular, the use of non-standard abbreviations in the free text fields of the medication schedule could result in complexity factors not being detected in the automated analysis. Third, the tool was tested with a limited number of exemplary medication schedules. It is, therefore, possible that not all possible cases are considered when specifying criteria for the automated detection of individual factors; hence, some complexity factors may have escaped detection by the electronic tool. However, the tool will be tested in a pilot study with a large number of actual medication schedules issued by different prescribers allowing further optimisation of the electronic tool and adaptation to routine care.
We developed an algorithm-based electronic tool that covered a wide range of different factors that are known to increase complexity of drug treatment. The majority of factors could be identified in an automated analysis by the tool and key questions could be phrased to assess whether these complexity factors indeed pose a problem for a specific patient. Relevant complexity factors that were not suitable for an automated detection were considered by distinct questions and a general, open-ended question. The electronic tool combines an automated screening with a personalized intervention to comprehensively assess, mitigate, or antagonize treatment complexity. This electronic tool is designed to tailor medication regimens to the needs of the individual patient and is now ready for testing in a prospective pilot study.
Availability of data and materials
Data sharing is not applicable to this article as no reusable datasets were generated or analyzed during the current study.
Medication Regimen Complexity Index
Schmidt SJ, Wurmbach VS, Lampert A, Bernard S, Consortium H, Haefeli WE, et al. Individual factors increasing complexity in drug treatment – a narrative review. Eur J Clin Pharmacol. 2020;76(6):745–54.
Pantuzza LL, Ceccato M, Silveira MR, Junqueira LMR, Reis AMM. Association between medication regimen complexity and pharmacotherapy adherence: a systematic review. Eur J Clin Pharmacol. 2017;73(11):1475–89.
Wimmer BC, Bell JS, Fastbom J, Wiese MD, Johnell K. Medication regimen complexity and number of medications as factors associated with unplanned hospitalizations in older people: a population-based cohort study. J Gerontol A Biol Sci Med Sci. 2016;71(6):831–7.
Wimmer BC, Cross AJ, Jokanovic N, Wiese MD, George J, Johnell K, et al. Clinical outcomes associated with medication regimen complexity in older people: a systematic review. J Am Geriatr Soc. 2017;65(4):747–53.
Lampert A, Seiberth J, Haefeli WE, Seidling HM. A systematic review of medication administration errors with transdermal patches. Expert Opin Drug Saf. 2014;13(8):1101–14.
Moore TJ, Walsh CS, Cohen MR. Reported medication errors associated with methotrexate. Am J Health Syst Pharm. 2004;61(13):1380–4.
Freigofas J, Haefeli WE, Schottker B, Brenner H, Quinzler R. Indirect evidence for proton pump inhibitor failure in patients taking them independent of meals. Pharmacoepidemiol Drug Saf. 2014;23(7):768–72.
Schiele JT, Quinzler R, Klimm HD, Pruszydlo MG, Haefeli WE. Difficulties swallowing solid oral dosage forms in a general practice population: prevalence, causes, and relationship to dosage forms. Eur J Clin Pharmacol. 2013;69(4):937–48.
Notenboom K, Leufkens HG, Vromans H, Bouvy ML. Learning from patients: identifying design features of medicines that cause medication use problems. Int J Pharm. 2017;517(1–2):128–34.
Mira JJ, Orozco-Beltran D, Perez-Jover V, Martinez-Jimeno L, Gil-Guillen VF, Carratala-Munuera C, et al. Physician patient communication failure facilitates medication errors in older polymedicated patients with multiple comorbidities. Fam Pract. 2013;30(1):56–63.
Muir AJ, Sanders LL, Wilkinson WE, Schmader K. Reducing medication regimen complexity: a controlled trial. J Gen Intern Med. 2001;16(2):77–82.
George J, Phun YT, Bailey MJ, Kong DC, Stewart K. Development and validation of the medication regimen complexity index. Ann Pharmacother. 2004;38(9):1369–76.
Elliott RA. Reducing medication regimen complexity for older patients prior to discharge from hospital: feasibility and barriers. J Clin Pharm Ther. 2012;37(6):637–42.
Witticke D, Seidling HM, Lohmann K, Send AF, Haefeli WE. Opportunities to reduce medication regimen complexity: a retrospective analysis of patients discharged from a university hospital in Germany. Drug Saf. 2013;36(1):31–41.
Varghese J, Kleine M, Gessner SI, Sandmann S, Dugas M. Effects of computerized decision support system implementations on patient outcomes in inpatient care: a systematic review. J Am Med Inform Assoc. 2018;25(5):593–602.
Quinzler R, Schmitt SP, Pritsch M, Kaltschmidt J, Haefeli WE. Substantial reduction of inappropriate tablet splitting with computerised decision support: a prospective intervention study assessing potential benefit and harm. BMC Med Inform Decis Mak. 2009;9:30.
McDonald MV, Peng TR, Sridharan S, Foust JB, Kogan P, Pezzin LE, et al. Automating the medication regimen complexity index. J Am Med Inform Assoc. 2013;20(3):499–505.
McDonald MV, Feldman PH, Barron-Vaya Y, Peng TR, Sridharan S, Pezzin LE. Outcomes of clinical decision support (CDS) and correlates of CDS use for home care patients with high medication regimen complexity: a randomized trial. J Eval Clin Pract. 2016;22(1):10–9.
Robinson JH, Callister LC, Berry JA, Dearing KA. Patient-centered care and adherence: definitions and applications to improve outcomes. J Am Acad Nurse Pract. 2008;20(12):600–7.
Aljumah K, Hassali MA. Impact of pharmacist intervention on adherence and measurable patient outcomes among depressed patients: a randomised controlled study. BMC Psychiatry. 2015;15:219.
Wilson SR, Strub P, Buist AS, Knowles SB, Lavori PW, Lapidus J, et al. Shared treatment decision making improves adherence and outcomes in poorly controlled asthma. Am J Respir Crit Care Med. 2010;181(6):566–77.
Kassenärztliche Bundesvereinigung: Medikationplan. https://www.kbv.de/html/medikationsplan.php (2019). Accessed 05 June 2020.
Wurmbach VS, Schmidt SJ, Lampert A, Bernard S, Thürmann PA, Haefeli WE, et al. Evaluation eines Konzepts zur Entwicklung von Leitfragen zur Erkennung von Schwierigkeiten bei der Arzneimittelanwendung. Krankenhauspharmazie. 2019;40(2):110.
Lampert A, Wien K, Haefeli WE, Seidling HM. Guidance on how to achieve comprehensible patient information leaflets in four steps. Int J Qual Health Care. 2016;28(5):634–8.
Deutsche Atemwegsliga e.V. Checklisten für die richtige Inhalationstechnik. http://www.atemwegsliga.de/checklisten.html. Accessed 16. July 2019.
Haefeli WE, Seidling H, Quinzler R. Arzneimittel richtig anwenden. Stuttgart: Georg Thieme Verlag; 2013.
Ciociano N, Bagnasco L. Look alike/sound alike drugs: a literature review on causes and solutions. Int J Clin Pharm. 2014;36(2):233–42.
We thank the Deutsche Atemwegsliga e. V. (German Airway League) for their permission to use their information on the correct use of different inhalers from their website for the development of patient leaflets and to link their training videos in the electronic tool.
This work was supported by the Innovation Funds of The Federal Joint Committee, Germany under Grant number 01VSF16019. Furthermore we acknowledge financial support by Deutsche Forschungsgemeinschaft within the funding programme Open Access Publishing, by the Baden-Württemberg Ministry of Science, Research and the Arts and by Ruprecht-Karls-Universität Heidelberg. The funding had no influence on the conduct of the project, the interpretation of the data, or the writing of the manuscript.
Ethics approval and consent to participate
The ethical approval was granted by the responsible Ethics Committee of the Medical Faculty of Heidelberg University (S-327/2017) and the Ethics Committee of the University of Witten/Herdecke (135/2017).
Written informed consent to participate in the study was obtained from all health care professionals and patients involved in the validation of the key questions. Oral informed consent was obtained from all patients participating in the pilot testing of the key questions in terms of their comprehensibility.
Consent for publication
Hanna M. Seidling is a member of the Editorial Board of BMC Medical Informatics and Decision Making. The authors declare that they have no further competing interests with regard to this work.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Wurmbach, V.S., Schmidt, S.J., Lampert, A. et al. Development of an algorithm to detect and reduce complexity of drug treatment and its technical realisation. BMC Med Inform Decis Mak 20, 154 (2020). https://doi.org/10.1186/s12911-020-01162-6
- Clinical decision support systems
- Shared decision making
- Medication regimen complexity