A Pharmacoepidemiology Database System for Monitoring Risk Due to the Use of Medicines by New Zealand Primary Care Patients



The use of large record-linked healthcare databases for drug safety research and surveillance is now accepted practice. New Zealand’s standardized national healthcare datasets provide the potential to automate the conduct of pharmacoepidemiological studies to provide rapid validation of medicine safety signals.


Our objectives were to describe the methodology undertaken by a semi-automated computer system developed to rapidly assess risk due to drug exposure in New Zealand’s population of primary care patients and to compare results from three studies with previously published findings.


Data from three national databases were linked at the patient level in the automated studies. A retrospective nested case–control design was used to evaluate risk for upper gastrointestinal bleeding (UGIB), acute kidney failure (AKF), and serious arrhythmia associated with individual medicines, therapeutic classes of medicines, and concurrent use of medicines from multiple therapeutic classes.


The patient cohort available for each study included 5,194,256 patients registered between 2007 and 2014, with a total of 34,630,673 patient-years at risk. An increased risk for UGIB was associated with non-steroidal anti-inflammatory drugs (NSAIDs) (adjusted odds ratio [AOR] 4.16, 95% confidence interval [CI] 3.90–4.43, p < 0.001) and selective serotonin reuptake inhibitors (AOR 1.39, 95% CI 1.20–1.62, p < 0.001); an increased risk for AKF was associated with NSAIDs (AOR 1.78, 95% CI 1.73–1.83, p < 0.001) and proton pump inhibitors (AOR 1.78, 95% CI 1.72–1.83, p < 0.001); and an increased risk for serious arrhythmia was associated with fluoroquinolones (AOR 1.38, 95% CI 1.26–151, p < 0.001) and penicillins (AOR 1.69, 95% CI 1.61–1.77, p < 0.001).


Automated case–control studies using New Zealand’s healthcare datasets can replicate associations of risk with drug exposure consistent with previous findings. Their speed of conduct enables systematic monitoring of risk for adverse events associated with a wide range of medicines.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6


  1. 1.

    Torre C, Martins AP. Overview of pharmacoepidemiological databases in the assessment of medicines under real-life conditions. In: Lunet N, editor. Epidemiology—current perspectives on research and practice. Rijeka: InTech; 2012. p. 131–54.

    Google Scholar 

  2. 2.

    Stang PE, Ryan PB, Racoosin JA, et al. Advancing the science for active surveillance: rationale and design for the Observational Medical Outcomes Partnership. Ann Intern Med. 2010;153:600–6.

    Article  PubMed  Google Scholar 

  3. 3.

    Huser V, DeFalco FJ, Schuemie M, et al. Multisite evaluation of a data quality tool for patient-level clinical datasets. eGEMs (Generating Evidence & Methods to improve patient outcomes). 2016;4(1):Article 24. doi:10.13063/2327-9214.1239. https://egems.academyhealth.org/articles/abstract/10.13063/2327-9214.1239/. Accessed 31 July 2017.

  4. 4.

    Coloma PM, Schuemie MJ, Trifiro G, et al. Combining electronic healthcare databases in Europe to allow for large-scale drug safety monitoring: the EU-ADR Project. Pharmacoepidemiol Drug Saf. 2011;20:1–11.

    Article  PubMed  Google Scholar 

  5. 5.

    García Rodríguez LA, Herings R, Johansson S. Use of multiple international healthcare databases for the detection of rare drug-associated outcomes: a pharmacoepidemiological programme comparing rosuvastatin with other marketed statins. Pharmacoepidemiol Drug Saf. 2010;19(12):1218–24.

    Article  PubMed  Google Scholar 

  6. 6.

    Goettsch WG, Janknegt R, Herings RM. Increased treatment failure after 3-days’ courses of nitrofurantoin and trimethoprim for urinary tract infections in women: a population-based retrospective cohort study using the PHARMO database. Br J Clin Pharmacol. 2004;58(2):184–9.

    Article  PubMed  PubMed Central  Google Scholar 

  7. 7.

    Pouwels S, Lalmohamed A, Souverein P, et al. Use of proton pump inhibitors and risk of hip/femur fracture: a population-based case-control study. Osteoporos Int. 2011;22(3):903–9.

    CAS  Article  PubMed  Google Scholar 

  8. 8.

    Blank ML, Parkin L, Paul C, Herbison P. A nationwide nested case-control study indicates an increased risk of acute interstitial nephritis with proton pump inhibitor use. Kidney Int. 2014;86:837–44.

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  9. 9.

    Grey C, Jackson R, Schmidt M, et al. One in four major ischaemic heart disease events are fatal and 60% are pre-hospital deaths: a national data-linkage study (ANZACS-QI 8). Eur Heart J. 2017;38(3):172–80.

    PubMed  Google Scholar 

  10. 10.

    Tomlin AM, Gillies TD, Tilyard MW, Dovey SM. Variation in pharmaceutical costs of New Zealand general practices: a national database linkage study. J Public Health. 2016;38(1):138–46.

    Article  Google Scholar 

  11. 11.

    Bibby S, Milne R, Beasley R. Hospital admissions for non-cystic fibrosis bronchiectasis in New Zealand. NZ Med J. 2015;128(1421):30–8.

    Google Scholar 

  12. 12.

    Davis P, Milne B, Parker K, et al. Efficiency, effectiveness, equity (E3). Evaluating hospital performance in three dimensions. Health Policy. 2013;112(1–2):19–27.

    Article  PubMed  Google Scholar 

  13. 13.

    Grey C, Jackson R, Wells S, et al. Ethnic differences in case fatality following an acute ischaemic heart disease event in New Zealand: ANZACS-QI 13. Eur J Prev Cardiol. 2016;23(17):1823–30.

    Article  PubMed  Google Scholar 

  14. 14.

    Gillies TD, Tomlin AM, Dovey SM, Tilyard MW. Ethnic disparities in asthma treatment and outcomes in children aged under 15 years: analysis of national databases. Prim Care Respir J. 2013;22(3):312–8.

    Article  PubMed  Google Scholar 

  15. 15.

    Hernandez-Diaz S, Rodriguez LA. Association between nonsteroidal anti-inflammatory drugs and upper gastrointestinal tract bleeding/perforation. Arch Intern Med. 2000;160:2093–9.

    CAS  Article  PubMed  Google Scholar 

  16. 16.

    de Abajo FJ, Rodriguez LA, Montero D. Association between selective serotonin reuptake inhibitors and upper gastrointestinal bleeding: population-based case-control study. BMJ. 1999;319(7217):1106–9.

    Article  PubMed  PubMed Central  Google Scholar 

  17. 17.

    van Walraven C, Mamdani MM, Wells PS, Williams JI. Inhibition of serotonin uptake by antidepressants and upper gastrointestinal bleeding in elderly patients: a retrospective cohort study. BMJ. 2001;323(7314):655–8.

    Article  PubMed  PubMed Central  Google Scholar 

  18. 18.

    Wessinger S, Kaplan M, Choi L, et al. Increased use of selective serotonin reuptake inhibitors in patients admitted with gastrointestinal haemorrhage: a multi-centre retrospective analysis. Aliment Pharmacol Ther. 2006;23(7):937–44.

    CAS  Article  PubMed  Google Scholar 

  19. 19.

    Dalton SO, Johansen C, Mellemkjaer L, et al. Use of selective serotonin reuptake inhibitors and risk of upper gastrointestinal bleeding: population-based cohort study. Arch Intern Med. 2003;163(1):59–64.

    CAS  Article  PubMed  Google Scholar 

  20. 20.

    de Abajo FJ, Garcia-Rodriguez LA. Risk of upper gastrointestinal tract bleeding associated with selective serotonin reuptake inhibitors and venlafaxine therapy: interaction with non-steroidal anti-inflammatory drugs and effect of acid-suppressing agents. Arch Gen Psychiatry. 2008;65(7):795–803.

    Article  PubMed  Google Scholar 

  21. 21.

    Lanas A, Garcia-Rodriguez LA, Arroyo MT, et al. Risk of upper gastrointestinal ulcer bleeding associated with selective cyclo-oxygenase-2-inhibitors, traditional non-aspirin non-steroidal anti-inflammatory drugs, aspirin and combinations. Gut. 2006;55(12):1731–8.

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  22. 22.

    Huang ES, Strate LL, Ho WW, et al. A prospective study of aspirin use and the risk of gastrointestinal bleeding in men. PLoS One. 2010;5(12):e15721. doi:10.1371/journal.pone.0015721.

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  23. 23.

    Klepser DG, Collier DS, Cochran GL. Proton pump inhibitors and acute kidney injury: a nested case-control study. BMC Nephrol. 2013;14:150. doi:10.1186/1471-2369-14-150.

    Article  PubMed  PubMed Central  Google Scholar 

  24. 24.

    Leonard CE, Freeman CP, Newcomb CW, et al. Proton pump inhibitors and traditional nonsteroidal anti-inflammatory drugs and the risk of acute interstitial nephritis and acute kidney injury. Pharmacoepidemiol Drug Saf. 2012;21:1155–72.

    CAS  Article  PubMed  Google Scholar 

  25. 25.

    Schneider V, Levesque LE, Zhang B, et al. Association of selective and conventional nonsteroidal antiinflammatory drugs with acute renal failure: a population-based nested case-control analysis. Am J Epidemiol. 2006;164:881–9.

    Article  PubMed  Google Scholar 

  26. 26.

    Chou CI, Shih CJ, Chen YT, et al. Adverse effects of oral nonselective and cyclooxygenase-2-selective NSAIDs on hospitalization for acute kidney injury: a nested case-control cohort study. Medicine. 2016;95(9):e2645. doi:10.1097/MD.0000000000002645.

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  27. 27.

    Hsu CC, Wang H, Hsu YH, et al. Use of nonsteroidal anti-inflammatory drugs and risk of chronic kidney disease in subjects with hypertension: a nationwide longitudinal cohort study. Hypertension. 2015;66(3):524–33.

    CAS  Article  PubMed  Google Scholar 

  28. 28.

    Lazarus B, Chen Y, Wilson FP, et al. Proton pump inhibitor use and the risk of chronic kidney disease. JAMA Intern Med. 2016;176(2):238–46.

    Article  PubMed  PubMed Central  Google Scholar 

  29. 29.

    Xie Y, Bowe B, Li T, et al. Proton pump inhibitors and risk of incident CKD and progression to ESRD. J Am Soc Nephrol. 2016;27(10):3153–63.

    Article  PubMed  PubMed Central  Google Scholar 

  30. 30.

    Inghammar M, Svanstrom H, Melbye M, et al. Oral fluoroquinolone use and serious arrhythmia: bi-national cohort study. BMJ. 2016;352:i843. doi:10.1136/bmj.i843.

    Article  PubMed  PubMed Central  Google Scholar 

  31. 31.

    Ray WA, Murray KT, Hall K, et al. Azithromycin and the risk of cardiovascular death. N Engl J Med. 2012;366:1881–90.

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  32. 32.

    Lu ZK, Yuan J, Li M, et al. Cardiac risks associated with antibiotics: azithromycin and levofloxacin. Expert Opin Drug Saf. 2015;14(2):295–303.

    CAS  Article  PubMed  Google Scholar 

  33. 33.

    WHO Collaborating Centre for Drug Statistics Methodology. Guidelines for ATC classification and DDD assignment 2013. Oslo: WHO; 2012.

    Google Scholar 

  34. 34.

    Arfe A, Scotti L, Varas-Lorenzo C, et al. Non-steroidal anti-inflammatory drugs and risk of heart failure in four European countries: nested case-control study. BMJ. 2016;354:i4857. doi:10.1136/bmj.i4857.

    Article  PubMed  Google Scholar 

  35. 35.

    Information Services Division NHS Scotland. Measuring Long-Term Conditions in Scotland. ISD Scotland. 2008. https://www.isdscotland.org/Health-Topics/Hospital-Care/Diagnoses/2008_08_14_LTC_full_report.pdf. Accessed 4 Apr 2017.

  36. 36.

    Barnett K, Mercer SW, Norbury M, et al. Epidemiology of multimorbidity and implications for health care, research, and medical education: a cross-sectional study. Lancet. 2012;380(9836):37–43.

    Article  PubMed  Google Scholar 

  37. 37.

    Rahman M, Shad F, Smith MC. Acute kidney injury: a guide to diagnosis and management. Am Fam Physician. 2012;86(7):631–9.

    PubMed  Google Scholar 

  38. 38.

    Khalili H, Bairami S, Kargar M. Antibiotics induced acute kidney injury: incidence, risk factors, onset time and outcome. Acta Med Iran. 2013;51(12):871–8.

    PubMed  Google Scholar 

  39. 39.

    Medsafe. Drug-induced QT prolongation and Torsades de Pointes—the facts. http://www.medsafe.govt.nz/profs/PUArticles/DrugInducedQTProlongation.htm. Accessed 4 Apr 2017.

  40. 40.

    Garcia Rodriguez LA, Jick H. Risk of upper gastrointestinal bleeding and perforation associated with non-steroidal anti-inflammatory drugs. Lancet. 1994;343(8900):769–72.

    CAS  Article  PubMed  Google Scholar 

  41. 41.

    Deyo RA, Cherkin DC, Ciol MA. Adapting a clinical comorbidity index for use with ICD-9-CM administrative databases. J Clin Epidemiol. 1992;45:613–9.

    CAS  Article  PubMed  Google Scholar 

  42. 42.

    New Zealand Casemix Project Group. The New Zealand casemix system: an overview. December 2015 v1.2. https://www.health.govt.nz/publication/new-zealand-casemix-system-overview-0. Accessed 7 July 2017.

  43. 43.

    Mera RM, Beach KJ, Powell GE, Pattishall EN. Semi-automated risk estimation using large databases: quinolones and clostridium difficile associated diarrhea. Pharmacoepidemiol Drug Saf. 2010;19:610–7.

    Article  PubMed  Google Scholar 

  44. 44.

    Trifiro G, Pariente A, Coloma PM, et al. Data mining on electronic health record databases for signal detection in pharmacovigilance: which events to monitor? Pharmacoepidemiol Drug Saf. 2009;18:1176–84.

    Article  PubMed  Google Scholar 

  45. 45.

    Coloma PM, Trifiro G, Schuemie MJ, et al. Electronic healthcare databases for active drug safety surveillance: is there enough leverage? Pharmacoepidemiol Drug Saf. 2012;21:611–21.

    Article  PubMed  Google Scholar 

  46. 46.

    Vandenbroucke J. Observational research, randomised trials, and two views of medical science. PloS Med. 2008;5(3):e67. doi:10.1371/journal.pmed.0050067.

    Article  PubMed  PubMed Central  Google Scholar 

  47. 47.

    Papanikolaou PN, Christidi GD, Ioannidis JP. Comparison of evidence on harms of medical interventions in randomized and nonrandomized studies. CMAJ. 2006;174:635–41.

    Article  PubMed  PubMed Central  Google Scholar 

  48. 48.

    Vandenbroucke JP. What is the best evidence for determining harms of medical treatment? CMAJ. 2006;174:645–6.

    Article  PubMed  PubMed Central  Google Scholar 

Download references

Author information



Corresponding author

Correspondence to Andrew M. Tomlin.

Ethics declarations

In New Zealand, ethics committee review is not required for secondary use of data for the purpose of quality assurance or outcome analysis where the researchers are bound by a professional or an employment obligation to preserve confidentiality and the patient information is not identifiable. Ethical guidelines for observational studies: National Ethics Advisory Committee. http://www.neac.health.govt.nz/.

Conflicts of interest

David Reith is chair of the Medicines Adverse Reactions Committee of Medsafe, the New Zealand medicines and medical devices safety authority. Murray Tilyard is CEO and Hywel Lloyd is Director of Informatics at BPAC Clinical Solutions: findings from this study could be utilized in the electronic decision support tools that it markets. Andrew Tomlin, David Woods, Alesha Smith, and John Fountain have no conflicts of interest that are directly relevant to the content of this study.


No sources of funding were used to assist in the preparation of this study. The research was conducted as a component of the usual employment of the authors by BPACnz and the University of Otago. BPACnz is a registered charity co-owned by the University of Otago, ProCare Health Limited, South Link Health, General Practice New Zealand, Pegasus Health, and the Royal New Zealand College of General Practitioners.

Electronic supplementary material

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Tomlin, A.M., Reith, D.M., Woods, D.J. et al. A Pharmacoepidemiology Database System for Monitoring Risk Due to the Use of Medicines by New Zealand Primary Care Patients. Drug Saf 40, 1259–1277 (2017). https://doi.org/10.1007/s40264-017-0579-1

Download citation