text:
@book{fuller2009measurement,
  title={Measurement error models},
  author={Fuller, Wayne A},
  volume={305},
  year={2009},
  publisher={John Wiley \& Sons}
}
@article{liaw2013towards,
  title={Towards an ontology for data quality in integrated chronic disease management: a realist review of the literature},
  author={Liaw, Siaw-Teng and Rahimi, Alireza and Ray, Pradeep and Taggart, Jane and Dennis, Sarah and de Lusignan, Simon and Jalaludin, B and Yeo, AET and Talaei-Khoei, Amir},
  journal={International journal of medical informatics},
  volume={82},
  number={1},
  pages={10--24},
  year={2013},
  publisher={Elsevier}
}
@article{kahn2012pragmatic,
  title={A pragmatic framework for single-site and multisite data quality assessment in electronic health record-based clinical research},
  author={Kahn, Michael G and Raebel, Marsha A and Glanz, Jason M and Riedlinger, Karen and Steiner, John F},
  journal={Medical care},
  volume={50},
  year={2012},
  publisher={NIH Public Access}
}@article{hersh2013caveats,
  title={Caveats for the use of operational electronic health record data in comparative effectiveness research},
  author={Hersh, William R and Weiner, Mark G and Embi, Peter J and Logan, Judith R and Payne, Philip RO and Bernstam, Elmer V and Lehmann, Harold P and Hripcsak, George and Hartzog, Timothy H and Cimino, James J and others},
  journal={Medical care},
  volume={51},
  number={8 0 3},
  pages={S30},
  year={2013},
  publisher={NIH Public Access}
}
@article{botsis2010secondary,
  title={Secondary use of EHR: data quality issues and informatics opportunities},
  author={Botsis, Taxiarchis and Hartvigsen, Gunnar and Chen, Fei and Weng, Chunhua},
  journal={Summit on Translational Bioinformatics},
  volume={2010},
  pages={1},
  year={2010},
  publisher={American Medical Informatics Association}
}
@article{sherman2016real,
  title={Real-world evidence—what is it and what can it tell us},
  author={Sherman, Rachel E and Anderson, Steven A and Dal Pan, Gerald J and Gray, Gerry W and Gross, Thomas and Hunter, Nina L and LaVange, Lisa and Marinac-Dabic, Danica and Marks, Peter W and Robb, Melissa A and others},
  journal={N Engl J Med},
  volume={375},
  number={23},
  pages={2293--2297},
  year={2016}
}
@article{callahan2017comparison,
  title={A comparison of data quality assessment checks in six data sharing networks},
  author={Callahan, Tiffany J and Bauck, Alan E and Bertoch, David and Brown, Jeff and Khare, Ritu and Ryan, Patrick B and Staab, Jenny and Zozus, Meredith N and Kahn, Michael G},
  journal={eGEMs},
  volume={5},
  number={1},
  year={2017},
  publisher={Ubiquity Press}
}
@article{walker_2013,
  title={A tool for assessing the feasibility of comparative effectiveness research},
  author={Walker, Alexander M and Patrick, Amanda R and Lauer, Michael S and Hornbrook, Mark C and Marin, Matthew G and Platt, Richard and Roger, V{\'e}ronique L and Stang, Paul and Schneeweiss, Sebastian},
  journal={Comp Eff Res},
  volume={3},
  pages={11--20},
  year={2013}
}
@article{austin_2011,
  title={Optimal caliper widths for propensity-score matching when estimating differences in means and differences in proportions in observational studies},
  author={Austin, Peter C},
  journal={Pharmaceutical statistics},
  volume={10},
  number={2},
  pages={150--161},
  year={2011},
  publisher={Wiley Online Library}
}
@article{rubin_2001,
  title={Using propensity scores to help design observational studies: application to the tobacco litigation},
  author={Rubin, Donald B},
  journal={Health Services and Outcomes Research Methodology},
  volume={2},
  number={3-4},
  pages={169--188},
  year={2001},
  publisher={Springer}
}
@article{perkins2017principled,
  title={Principled approaches to missing data in epidemiologic studies},
  author={Perkins, Neil J and Cole, Stephen R and Harel, Ofer and Tchetgen Tchetgen, Eric J and Sun, BaoLuo and Mitchell, Emily M and Schisterman, Enrique F},
  journal={American journal of epidemiology},
  volume={187},
  number={3},
  pages={568--575},
  year={2017},
  publisher={Oxford University Press}
}

@Book{xie2015,
  title = {Dynamic Documents with {R} and knitr},
  author = {Yihui Xie},
  publisher = {Chapman and Hall/CRC},
  address = {Boca Raton, Florida},
  year = {2015},
  edition = {2nd},
  note = {ISBN 978-1498716963},
  url = {http://yihui.name/knitr/},
}

@article{reps2018,
    author = {Reps, J. M.  and Schuemie, M. J.  and Suchard, M. A.  and Ryan, P. B.  and Rijnbeek, P. R. },
    title = "{{D}esign and implementation of a standardized framework to generate and evaluate patient-level prediction models using observational healthcare data}",
    journal = {Journal of the American Medical Informatics Association},
    volume = {25},
    number = {8},
    pages = {969-975},
    year = {2018},
    month = {04},
    issn = {1067-5027},
    doi = {10.1093/jamia/ocy032},
    url = {https://dx.doi.org/10.1093/jamia/ocy032},
    eprint = {http://oup.prod.sis.lan/jamia/article-pdf/25/8/969/27171328/ocy032.pdf},
}

@Article{nguyen2008,
   Author="Nguyen, N. D.  and Frost, S. A.  and Center, J. R.  and Eisman, J. A.  and Nguyen, T. V. ",
   Title="{{D}evelopment of prognostic nomograms for individualizing 5-year and 10-year fracture risks}",
   Journal="Osteoporos Int",
   Year="2008",
   Volume="19",
   Number="10",
   Pages="1431--1444",
   Month="Oct"
}

@Article{lee1995,
   Author="Lee, K. L.  and Woodlief, L. H.  and Topol, E. J.  and Weaver, W. D.  and Betriu, A.  and Col, J.  and Simoons, M.  and Aylward, P.  and Van de Werf, F.  and Califf, R. M. ",
   Title="{{P}redictors of 30-day mortality in the era of reperfusion for acute myocardial infarction. {R}esults from an international trial of 41,021 patients. {G}{U}{S}{T}{O}-{I} {I}nvestigators}",
   Journal="Circulation",
   Year="1995",
   Volume="91",
   Number="6",
   Pages="1659--1668",
   Month="Mar"
}

@Article{wilson1998,
   Author="Wilson, P. W.  and D'Agostino, R. B.  and Levy, D.  and Belanger, A. M.  and Silbershatz, H.  and Kannel, W. B. ",
   Title="{{P}rediction of coronary heart disease using risk factor categories}",
   Journal="Circulation",
   Year="1998",
   Volume="97",
   Number="18",
   Pages="1837--1847",
   Month="May"
}

@Article{engel2015,
   Author="Engel, C.  and Fischer, C. ",
   Title="{{B}reast cancer risks and risk prediction models}",
   Journal="Breast Care (Basel)",
   Year="2015",
   Volume="10",
   Number="1",
   Pages="7--12",
   Month="Feb"
}

@Article{perel2006,
   Author="Perel, P.  and Edwards, P.  and Wentz, R.  and Roberts, I. ",
   Title="{{S}ystematic review of prognostic models in traumatic brain injury}",
   Journal="BMC Med Inform Decis Mak",
   Year="2006",
   Volume="6",
   Pages="38",
   Month="Nov"
}

@Article{gage2001,
   Author="Gage, B. F.  and Waterman, A. D.  and Shannon, W.  and Boechler, M.  and Rich, M. W.  and Radford, M. J. ",
   Title="{{V}alidation of clinical classification schemes for predicting stroke: results from the {N}ational {R}egistry of {A}trial {F}ibrillation}",
   Journal="JAMA",
   Year="2001",
   Volume="285",
   Number="22",
   Pages="2864--2870",
   Month="Jun"
}

@Article{keogh2011,
   Author="Keogh, C.  and Wallace, E.  and Dillon, C.  and Dimitrov, B. D.  and Fahey, T. ",
   Title="{{V}alidation of the {C}{H}{A}{D}{S}2 clinical prediction rule to predict ischaemic stroke. {A} systematic review and meta-analysis}",
   Journal="Thromb. Haemost.",
   Year="2011",
   Volume="106",
   Number="3",
   Pages="528--538",
   Month="Sep"
}

@article{kahn_harmonized_2016,
	title = {A {Harmonized} {Data} {Quality} {Assessment} {Terminology} and {Framework} for the {Secondary} {Use} of {Electronic} {Health} {Record} {Data}},
	volume = {4},
	issn = {2327-9214},
	doi = {10.13063/2327-9214.1244},
	language = {eng},
	number = {1},
	journal = {EGEMS (Washington, DC)},
	author = {Kahn, Michael G. and Callahan, Tiffany J. and Barnard, Juliana and Bauck, Alan E. and Brown, Jeff and Davidson, Bruce N. and Estiri, Hossein and Goerg, Carsten and Holve, Erin and Johnson, Steven G. and Liaw, Siaw-Teng and Hamilton-Lopez, Marianne and Meeker, Daniella and Ong, Toan C. and Ryan, P. B. and Shang, Ning and Weiskopf, Nicole G. and Weng, Chunhua and Zozus, Meredith N. and Schilling, Lisa},
	year = {2016},
	pmid = {27713905},
	pmcid = {PMC5051581},
	keywords = {data completeness, data use \& quality, electronic health records},
	pages = {1244}
}

@article{huser_methods_2018,
	title = {Methods for examining data quality in healthcare integrated data repositories},
	volume = {23},
	issn = {2335-6936},
	language = {eng},
	journal = {Pacific Symposium on Biocomputing. Pacific Symposium on Biocomputing},
	author = {Huser, Vojtech and Kahn, Michael G. and Brown, Jeffrey S. and Gouripeddi, Ramkiran},
	year = {2018},
	pmid = {29218922},
	keywords = {Computational Biology, Computer Systems, Consumer Product Safety, Data Accuracy, Electronic Health Records, Humans, Sentinel Surveillance, United States},
	pages = {628--633}
}

@article{kahn_transparent_2015,
	title = {Transparent reporting of data quality in distributed data networks},
	volume = {3},
	issn = {2327-9214},
	doi = {10.13063/2327-9214.1052},
	language = {eng},
	number = {1},
	journal = {EGEMS (Washington, DC)},
	author = {Kahn, Michael G. and Brown, Jeffrey S. and Chun, Alein T. and Davidson, Bruce N. and Meeker, Daniella and Ryan, P. B. and Schilling, Lisa M. and Weiskopf, Nicole G. and Williams, Andrew E. and Zozus, Meredith Nahm},
	year = {2015},
	pmid = {25992385},
	pmcid = {PMC4434997},
	keywords = {comparative effectiveness, data use and quality, Informatics, observational data, research networks},
	pages = {1052}
}

@article{weiskopf_2013,
	title = {Methods and dimensions of electronic health record data quality assessment: enabling reuse for clinical research},
	volume = {20},
	issn = {1527-974X},
	shorttitle = {Methods and dimensions of electronic health record data quality assessment},
	doi = {10.1136/amiajnl-2011-000681},
	language = {eng},
	number = {1},
	journal = {Journal of the American Medical Informatics Association: JAMIA},
	author = {Weiskopf, Nicole Gray and Weng, Chunhua},
	month = jan,
	year = {2013},
	pmid = {22733976},
	pmcid = {PMC3555312},
	keywords = {Data Collection, Electronic Health Records, Humans, Information Dissemination, Quality Control, Reproducibility of Results, Research Design},
	pages = {144--151}
}

@Article{hernan_2016,
   Author="Hernan, M. A.  and Robins, J. M. ",
   Title="{{U}sing {B}ig {D}ata to {E}mulate a {T}arget {T}rial {W}hen a {R}andomized {T}rial {I}s {N}ot {A}vailable}",
   Journal="Am. J. Epidemiol.",
   Year="2016",
   Volume="183",
   Number="8",
   Pages="758--764",
   Month="04"
}

@article{rosenbaum_1983,
author = {Rosenbaum, P. and Rubin, D.},
year = {1983},
month = {04},
pages = {41-55},
title = {The Central Role of the Propensity Score in Observational Studies For Causal Effects},
volume = {70},
journal = {Biometrika},
doi = {10.1093/biomet/70.1.41}
}

@Article{tian_2018,
   Author="Tian, Y.  and Schuemie, M. J.  and Suchard, M. A. ",
   Title="{{E}valuating large-scale propensity score performance through real-world and synthetic data experiments}",
   Journal="Int J Epidemiol",
   Year="2018",
   Volume="47",
   Number="6",
   Pages="2005--2014",
   Month="12"
}

@Article{ryan_2013,
   Author="Ryan, P. B.  and Schuemie, M. J.  and Madigan, D. ",
   Title="{{E}mpirical performance of a self-controlled cohort method: lessons for developing a risk identification and analysis system}",
   Journal="Drug Saf",
   Year="2013",
   Volume="36 Suppl 1",
   Pages="95--106",
   Month="Oct"
}

@Article{vandenbroucke_2012,
   Author="Vandenbroucke, J. P.  and Pearce, N. ",
   Title="{{C}ase-control studies: basic concepts}",
   Journal="Int J Epidemiol",
   Year="2012",
   Volume="41",
   Number="5",
   Pages="1480--1489",
   Month="Oct"
}

@Article{maclure_1991,
   Author="Maclure, M. ",
   Title="{{T}he case-crossover design: a method for studying transient effects on the risk of acute events}",
   Journal="Am. J. Epidemiol.",
   Year="1991",
   Volume="133",
   Number="2",
   Pages="144--153",
   Month="Jan"
}

@Article{suissa_1995,
   Author="Suissa, S. ",
   Title="{{T}he case-time-control design}",
   Journal="Epidemiology",
   Year="1995",
   Volume="6",
   Number="3",
   Pages="248--253",
   Month="May"
}

@Article{farrington_1995,
   Author="Farrington, C. P.",
   Title="{{R}elative incidence estimation from case series for vaccine safety evaluation}",
   Journal="Biometrics",
   Year="1995",
   Volume="51",
   Number="1",
   Pages="228--235",
   Month="Mar"
}

@Article{whitaker_2006,
   Author="Whitaker, H. J.  and Farrington, C. P.  and Spiessens, B.  and Musonda, P. ",
   Title="{{T}utorial in biostatistics: the self-controlled case series method}",
   Journal="Stat Med",
   Year="2006",
   Volume="25",
   Number="10",
   Pages="1768--1797",
   Month="May"
}

@article{farrington_2011,
  author = {Farrington, C. P. and Karim Anaya-Izquierdo and Heather J. Whitaker and Mounia N. Hocine and Ian Douglas and Liam Smeeth},
  title = {Self-Controlled Case Series Analysis With Event-Dependent Observation Periods},
  journal = {Journal of the American Statistical Association},
  volume = {106},
  number = {494},
  pages = {417-426},
  year  = {2011},
  publisher = {Taylor & Francis},
  doi = {10.1198/jasa.2011.ap10108},
  URL = {https://doi.org/10.1198/jasa.2011.ap10108},
  eprint = { https://doi.org/10.1198/jasa.2011.ap10108 }
}

@Article{simpson_2013,
   Author="Simpson, S. E.  and Madigan, D.  and Zorych, I.  and Schuemie, M. J.  and Ryan, P. B.  and Suchard, M. A. ",
   Title="{{M}ultiple self-controlled case series for large-scale longitudinal observational databases}",
   Journal="Biometrics",
   Year="2013",
   Volume="69",
   Number="4",
   Pages="893--902",
   Month="Dec"
}

@Article{noren_2014,
   Author="Noren, G. N.  and Caster, O.  and Juhlin, K.  and Lindquist, M. ",
   Title="{{Z}oo or savannah? {C}hoice of training ground for evidence-based pharmacovigilance}",
   Journal="Drug Saf",
   Year="2014",
   Volume="37",
   Number="9",
   Pages="655--659",
   Month="Sep"
}

@Article{voss_2016,
   Author="Voss, E. A.  and Boyce, R. D.  and Ryan, P. B.  and van der Lei, J.  and Rijnbeek, P. R.  and Schuemie, M. J. ",
   Title="{{A}ccuracy of an {A}utomated {K}nowledge {B}ase for {I}dentifying {D}rug {A}dverse {R}eactions}",
   Journal="J Biomed Inform",
   Year="2016",
   Month="Dec"
}

@Article{lipsitch_2010,
   Author="Lipsitch, M.  and Tchetgen Tchetgen, E.  and Cohen, T. ",
   Title="{{N}egative controls: a tool for detecting confounding and bias in observational studies}",
   Journal="Epidemiology",
   Year="2010",
   Volume="21",
   Number="3",
   Pages="383--388",
   Month="May"
}

@Article{arnold_2016,
   Author="Arnold, B. F.  and Ercumen, A.  and Benjamin-Chung, J.  and Colford, J. M. ",
   Title="{{B}rief {R}eport: {N}egative {C}ontrols to {D}etect {S}election {B}ias and {M}easurement {B}ias in {E}pidemiologic {S}tudies}",
   Journal="Epidemiology",
   Year="2016",
   Volume="27",
   Number="5",
   Pages="637--641",
   Month="Sep"
}

@Article{prased_2013,
   Author="Prasad, V.  and Jena, A. B. ",
   Title="{{P}respecified falsification end points: can they validate true observational associations?}",
   Journal="JAMA",
   Year="2013",
   Volume="309",
   Number="3",
   Pages="241--242",
   Month="Jan"
}

@Article{zaadstra_2008,
   Author="Zaadstra, B. M.  and Chorus, A. M.  and van Buuren, S.  and Kalsbeek, H.  and van Noort, J. M. ",
   Title="{{S}elective association of multiple sclerosis with infectious mononucleosis}",
   Journal="Mult. Scler.",
   Year="2008",
   Volume="14",
   Number="3",
   Pages="307--313",
   Month="Apr"
}

@Article{schuemie_2018,
   Author="Schuemie, M. J.  and Hripcsak, G.  and Ryan, P. B.  and Madigan, D.  and Suchard, M. A. ",
   Title="{{E}mpirical confidence interval calibration for population-level effect estimation studies in observational healthcare data}",
   Journal="Proc. Natl. Acad. Sci. U.S.A.",
   Year="2018",
   Volume="115",
   Number="11",
   Pages="2571--2577",
   Month="03"
}

@Article{schuemie_2014,
   Author="Schuemie, M. J.  and Ryan, P. B.  and DuMouchel, W.  and Suchard, M. A.  and Madigan, D. ",
   Title="{{I}nterpreting observational studies: why empirical calibration is needed to correct p-values}",
   Journal="Stat Med",
   Year="2014",
   Volume="33",
   Number="2",
   Pages="209--218",
   Month="Jan"
}

@article{suchard_2013,
 author = {Suchard, M. A. and Simpson, S. E. and Zorych, Ivan and Ryan, P. B. and Madigan, David},
 title = {Massive Parallelization of Serial Inference Algorithms for a Complex Generalized Linear Model},
 journal = {ACM Trans. Model. Comput. Simul.},
 issue_date = {January 2013},
 volume = {23},
 number = {1},
 month = jan,
 year = {2013},
 issn = {1049-3301},
 pages = {10:1--10:17},
 articleno = {10},
 numpages = {17},
 url = {http://doi.acm.org/10.1145/2414416.2414791},
 doi = {10.1145/2414416.2414791},
 acmid = {2414791},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {Optimization, big data, parallel processing},
}

@Article{madigan_2013,
   Author="Madigan, D.  and Ryan, P. B.  and Schuemie, M.  and Stang, P. E.  and Overhage, J. M.  and Hartzema, A. G.  and Suchard, M. A.  and DuMouchel, W.  and Berlin, J. A. ",
   Title="{{E}valuating the impact of database heterogeneity on observational study results}",
   Journal="Am. J. Epidemiol.",
   Year="2013",
   Volume="178",
   Number="4",
   Pages="645--651",
   Month="Aug"
}

@inbook{rosenbaum_2005,
author = {Rosenbaum, P.},
publisher = {American Cancer Society},
isbn = {9780470013199},
title = {Sensitivity Analysis in Observational Studies},
booktitle = {Encyclopedia of Statistics in Behavioral Science},
chapter = {},
pages = {},
doi = {10.1002/0470013192.bsa606},
url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/0470013192.bsa606},
eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1002/0470013192.bsa606},
year = {2005},
keywords = {confounding, hidden bias, nonrandomized experiment, observational study, sensitivity analysis, treatment effects, unobserved bias},
abstract = {Abstract In an observational study, subjects are not randomly assigned to treatment or control, as they would be in a controlled clinical trial. As a consequence, differing outcomes in treated and control groups may not reflect effects of the treatment, but rather some way the groups were not comparable prior to treatment, that is, some hidden bias. A sensitivity analysis appraises how the conclusions of a study might be altered by hidden biases of various magnitudes.}
}

@Article{byrd_2006,
   Author="Byrd, J. B.  and Adam, A.  and Brown, N. J. ",
   Title="{{A}ngiotensin-converting enzyme inhibitor-associated angioedema}",
   Journal="Immunol Allergy Clin North Am",
   Year="2006",
   Volume="26",
   Number="4",
   Pages="725--737",
   Month="Nov"
}

@Article{norman_2013,
   Author="Norman, J. L.  and Holmes, W. L.  and Bell, W. A.  and Finks, S. W. ",
   Title="{{L}ife-threatening {A}{C}{E} inhibitor-induced angioedema after eleven years on lisinopril}",
   Journal="J Pharm Pract",
   Year="2013",
   Volume="26",
   Number="4",
   Pages="382--388",
   Month="Aug"
}

@Article{thompson_1993,
   Author="Thompson, T.  and Frable, M. A. ",
   Title="{{D}rug-induced, life-threatening angioedema revisited}",
   Journal="Laryngoscope",
   Year="1993",
   Volume="103",
   Number="1 Pt 1",
   Pages="10--12",
   Month="Jan"
}

@Article{circardi_2004,
   Author="Cicardi, M.  and Zingale, L. C.  and Bergamaschini, L.  and Agostoni, A. ",
   Title="{{A}ngioedema associated with angiotensin-converting enzyme inhibitor use: outcome after switching to a different treatment}",
   Journal="Arch. Intern. Med.",
   Year="2004",
   Volume="164",
   Number="8",
   Pages="910--913",
   Month="Apr"
}

@Article{mara_1996,
   Author="O'Mara, N. B.  and O'Mara, E. M. ",
   Title="{{D}elayed onset of angioedema with angiotensin-converting enzyme inhibitors: case report and review of the literature}",
   Journal="Pharmacotherapy",
   Year="1996",
   Volume="16",
   Number="4",
   Pages="675--679"
}

@Article{zaman_2002,
   Author="Zaman, M. A.  and Oparil, S.  and Calhoun, D. A. ",
   Title="{{D}rugs targeting the renin-angiotensin-aldosterone system}",
   Journal="Nat Rev Drug Discov",
   Year="2002",
   Volume="1",
   Number="8",
   Pages="621--636",
   Month="Aug"
}

@Article{sabroe_1997,
   Author="Sabroe, R. A.  and Black, A. K. ",
   Title="{{A}ngiotensin-converting enzyme ({A}{C}{E}) inhibitors and angio-oedema}",
   Journal="Br. J. Dermatol.",
   Year="1997",
   Volume="136",
   Number="2",
   Pages="153--158",
   Month="Feb"
}

@Article{powers_2012,
   Author="Powers, B. J.  and Coeytaux, R. R.  and Dolor, R. J.  and Hasselblad, V.  and Patel, U. D.  and Yancy, W. S.  and Gray, R. N.  and Irvine, R. J.  and Kendrick, A. S.  and Sanders, G. D. ",
   Title="{{U}pdated report on comparative effectiveness of {A}{C}{E} inhibitors, {A}{R}{B}s, and direct renin inhibitors for patients with essential hypertension: much more data, little new information}",
   Journal="J Gen Intern Med",
   Year="2012",
   Volume="27",
   Number="6",
   Pages="716--729",
   Month="Jun"
}

@Article{magid_2010,
   Author="Magid, D. J.  and Shetterly, S. M.  and Margolis, K. L.  and Tavel, H. M.  and O'Connor, P. J.  and Selby, J. V.  and Ho, P. M. ",
   Title="{{C}omparative effectiveness of angiotensin-converting enzyme inhibitors versus beta-blockers as second-line therapy for hypertension}",
   Journal="Circ Cardiovasc Qual Outcomes",
   Year="2010",
   Volume="3",
   Number="5",
   Pages="453--458",
   Month="Sep"
}

@Article{toh_2012,
   Author="Toh, S.  and Reichman, M. E.  and Houstoun, M.  and Ross Southworth, M.  and Ding, X.  and Hernandez, A. F.  and Levenson, M.  and Li, L.  and McCloskey, C.  and Shoaibi, A.  and Wu, E.  and Zornberg, G.  and Hennessy, S. ",
   Title="{{C}omparative risk for angioedema associated with the use of drugs that target the renin-angiotensin-aldosterone system}",
   Journal="Arch. Intern. Med.",
   Year="2012",
   Volume="172",
   Number="20",
   Pages="1582--1589",
   Month="Nov"
}

@Article{whelton_2018,
   Author="Whelton, P. K.  and Carey, R. M.  and Aronow, W. S.  and Casey, D. E.  and Collins, K. J.  and Dennison Himmelfarb, C.  and DePalma, S. M.  and Gidding, S.  and Jamerson, K. A.  and Jones, D. W.  and MacLaughlin, E. J.  and Muntner, P.  and Ovbiagele, B.  and Smith, S. C.  and Spencer, C. C.  and Stafford, R. S.  and Taler, S. J.  and Thomas, R. J.  and Williams, K. A.  and Williamson, J. D.  and Wright, J. T. ",
   Title="{2017 {A}{C}{C}/{A}{H}{A}/{A}{A}{P}{A}/{A}{B}{C}/{A}{C}{P}{M}/{A}{G}{S}/{A}{P}h{A}/{A}{S}{H}/{A}{S}{P}{C}/{N}{M}{A}/{P}{C}{N}{A} {G}uideline for the {P}revention, {D}etection, {E}valuation, and {M}anagement of {H}igh {B}lood {P}ressure in {A}dults: {E}xecutive {S}ummary: {A} {R}eport of the {A}merican {C}ollege of {C}ardiology/{A}merican {H}eart {A}ssociation {T}ask {F}orce on {C}linical {P}ractice {G}uidelines}",
   Journal="Circulation",
   Year="2018",
   Volume="138",
   Number="17",
   Pages="e426-e483",
   Month="Oct"
}

@Article{rassen_2012,
   Author="Rassen, J. A.  and Shelat, A. A.  and Myers, J.  and Glynn, R. J.  and Rothman, K. J.  and Schneeweiss, S. ",
   Title="{{O}ne-to-many propensity score matching in cohort studies}",
   Journal="Pharmacoepidemiol Drug Saf",
   Year="2012",
   Volume="21 Suppl 2",
   Pages="69--80",
   Month="May"
}

@Article{higgins_2003,
   Author="Higgins, J. P.  and Thompson, S. G.  and Deeks, J. J.  and Altman, D. G. ",
   Title="{{M}easuring inconsistency in meta-analyses}",
   Journal="BMJ",
   Year="2003",
   Volume="327",
   Number="7414",
   Pages="557--560",
   Month="Sep"
}

@Article{schuemie_2018b,
   Author="Schuemie, M. J.  and Ryan, P. B.  and Hripcsak, G.  and Madigan, D.  and Suchard, M. A. ",
   Title="{{I}mproving reproducibility by using high-throughput observational studies with empirical calibration}",
   Journal="Philos Trans A Math Phys Eng Sci",
   Year="2018",
   Volume="376",
   Number="2128",
   Month="Sep"
}
@book{Wickham_2015,
 author = {Wickham, Hadley},
 title = {R Packages},
 year = {2015},
 isbn = {1491910593, 9781491910597},
 edition = {1st},
 publisher = {O'Reilly Media, Inc.},
}

@Article{hernan_2002,
   Author="Hernan, M. A.  and Hernandez-Diaz, S.  and Werler, M. M.  and Mitchell, A. A. ",
   Title="{{C}ausal knowledge as a prerequisite for confounding evaluation: an application to birth defects epidemiology}",
   Journal="Am. J. Epidemiol.",
   Year="2002",
   Volume="155",
   Number="2",
   Pages="176--184",
   Month="Jan"
}

@Article{schneeweiss_2018,
   Author="Schneeweiss, S. ",
   Title="{{A}utomated data-adaptive analytics for electronic healthcare data to study causal treatment effects}",
   Journal="Clin Epidemiol",
   Year="2018",
   Volume="10",
   Pages="771--788"
}

@Article{duke_2017,
   Author="Duke, J. D.  and Ryan, P. B.  and Suchard, M. A.  and Hripcsak, G.  and Jin, P.  and Reich, C.  and Schwalm, M. S.  and Khoma, Y.  and Wu, Y.  and Xu, H.  and Shah, N. H.  and Banda, J. M.  and Schuemie, M. J. ",
   Title="{{R}isk of angioedema associated with levetiracetam compared with phenytoin: {F}indings of the observational health data sciences and informatics research network}",
   Journal="Epilepsia",
   Year="2017",
   Volume="58",
   Number="8",
   Pages="e101-e106",
   Month="08"
}

@misc{wiki:Open_science,
   author = "Wikipedia",
   title = "{Open science} --- {W}ikipedia{,} The Free Encyclopedia",
   year = "2019",
   howpublished = {\url{http://en.wikipedia.org/w/index.php?title=Open\%20science&oldid=900178688}},
   note = "[Online; accessed 24-June-2019]"
 }

 @misc{wiki:Science_2.0,
   author = "Wikipedia",
   title = "{Science 2.0} --- {W}ikipedia{,} The Free Encyclopedia",
   year = "2019",
   howpublished = {\url{http://en.wikipedia.org/w/index.php?title=Science\%202.0&oldid=887565958}},
   note = "[Online; accessed 09-July-2019]"
 }

 @misc{wikiquote:Ronald_Fisher,
   author = "Wikiquote",
   title = "Ronald Fisher --- Wikiquote{,}",
   year = "2019",
   url = "\url{https://en.wikiquote.org/w/index.php?title=Ronald_Fisher&oldid=2638030}",
   note = "[Online; accessed 2-August-2019]"
 }

@book{barendmons2018,
 Author = {Barend Mons},
 title = {Data Stewardship for Open Science: Implementing FAIR Principles},
 description = {Data Stewardship for Open Science: Implementing FAIR Principles (Book, 2018)},
 publisher = {Chapman and Hall/CRC},
 interhash = {e7380d7840f680b3d821e86b3db2fafe},
 intrahash = {7a2765c9c5ea63a379f1e4abde6d3fcb},
 year = {2018},
 month = {mar},
 isbn = {0815348185},
 url = {https://www.xarg.org/ref/a/0815348185/}
}

@Article{allison_2016,
   Author="Allison, D. B.  and Brown, A. W.  and George, B. J.  and Kaiser, K. A. ",
   Title="{{R}eproducibility: {A} tragedy of errors}",
   Journal="Nature",
   Year="2016",
   Volume="530",
   Number="7588",
   Pages="27--29",
   Month="Feb"
}

@article{Chen2018,
  doi = {10.1038/s41567-018-0342-2},
  url = {https://doi.org/10.1038/s41567-018-0342-2},
  year = {2018},
  month = nov,
  publisher = {Springer Nature},
  volume = {15},
  number = {2},
  pages = {113--119},
  author = {Xiaoli Chen and S\"{u}nje Dallmeier-Tiessen and Robin Dasler and Sebastian Feger and Pamfilos Fokianos and Jose Benito Gonzalez and Harri Hirvonsalo and Dinos Kousidis and Artemis Lavasa and Salvatore Mele and Diego Rodriguez Rodriguez and Tibor {\v{S}}imko and Tim Smith and Ana Trisovic and Anna Trzcinska and Ioannis Tsanaktsidis and Markus Zimmermann and Kyle Cranmer and Lukas Heinrich and Gordon Watts and Michael Hildreth and Lara Lloret Iglesias and Kati Lassila-Perini and Sebastian Neubert},
  title = {Open is not enough},
  journal = {Nature Physics}
}

@Article{garza_2016,
   Author="Garza, M.  and Del Fiol, G.  and Tenenbaum, J.  and Walden, A.  and Zozus, M. N. ",
   Title="{{E}valuating common data models for use with a longitudinal community registry}",
   Journal="J Biomed Inform",
   Year="2016",
   Volume="64",
   Pages="333--341",
   Month="12"
}

@article{Oliveira2019,
  doi = {10.1016/j.ijmedinf.2019.02.006},
  url = {https://doi.org/10.1016/j.ijmedinf.2019.02.006},
  year = {2019},
  month = jun,
  publisher = {Elsevier {BV}},
  volume = {126},
  pages = {35--45},
  author = {Jos{\'{e}} Lu{\'{\i}}s Oliveira and Alina Trifan and Lu{\'{\i}}s A. Basti{\~{a}}o Silva},
  title = {{EMIF} Catalogue: A collaborative platform for sharing and reusing biomedical data},
  journal = {International Journal of Medical Informatics}
}

@Article{wilkinson2016,
   Author="Wilkinson, M. D.  and Dumontier, M.  and Aalbersberg, I. J.  and Appleton, G.  and Axton, M.  and Baak, A.  and Blomberg, N.  and Boiten, J. W.  and da Silva Santos, L. B.  and Bourne, P. E.  and Bouwman, J.  and Brookes, A. J.  and Clark, T.  and Crosas, M.  and Dillo, I.  and Dumon, O.  and Edmunds, S.  and Evelo, C. T.  and Finkers, R.  and Gonzalez-Beltran, A.  and Gray, A. J.  and Groth, P.  and Goble, C.  and Grethe, J. S.  and Heringa, J.  and 't Hoen, P. A.  and Hooft, R.  and Kuhn, T.  and Kok, R.  and Kok, J.  and Lusher, S. J.  and Martone, M. E.  and Mons, A.  and Packer, A. L.  and Persson, B.  and Rocca-Serra, P.  and Roos, M.  and van Schaik, R.  and Sansone, S. A.  and Schultes, E.  and Sengstag, T.  and Slater, T.  and Strawn, G.  and Swertz, M. A.  and Thompson, M.  and van der Lei, J.  and van Mulligen, E.  and Velterop, J.  and Waagmeester, A.  and Wittenburg, P.  and Wolstencroft, K.  and Zhao, J.  and Mons, B. ",
   Title="{{T}he {F}{A}{I}{R} {G}uiding {P}rinciples for scientific data management and stewardship}",
   Journal="Sci Data",
   Year="2016",
   Volume="3",
   Pages="160018",
   Month="Mar"
}

@article{slater_1988,
    author = {Slater, Eve E. and Merrill, Debora D. and Guess, Harry A. and Roylance, Peter J. and Cooper, Warren D. and Inman, William H. W. and Ewan, Pamela W.},
    title = "{Clinical Profile of Angioedema Associated With Angiotensin Converting-Enzyme Inhibition}",
    journal = {JAMA},
    volume = {260},
    number = {7},
    pages = {967-970},
    year = {1988},
    month = {08},
   issn = {0098-7484},
    doi = {10.1001/jama.1988.03410070095035},
    url = {https://doi.org/10.1001/jama.1988.03410070095035},
    eprint = {https://jamanetwork.com/journals/jama/articlepdf/373511/jama\_260\_7\_035.pdf},
}

@Article{reps_2019,
   Author="Reps, J. M.  and Rijnbeek, P. R.  and Ryan, P. B. ",
   Title="{{I}dentifying the {D}{E}{A}{D}: {D}evelopment and {V}alidation of a {P}atient-{L}evel {M}odel to {P}redict {D}eath {S}tatus in {P}opulation-{L}evel {C}laims {D}ata}",
   Journal="Drug Saf",
   Year="2019",
   Month="May"
}
@Article{schuemie_2016,
   Author="Schuemie, M. J.  and Hripcsak, G.  and Ryan, P. B.  and Madigan, D.  and Suchard, M. A. ",
   Title="{{R}obust empirical calibration of p-values using observational data}",
   Journal="Stat Med",
   Year="2016",
   Volume="35",
   Number="22",
   Pages="3883--3888",
   Month="09"
}

@Article{johnston_2019,
   Author="Johnston, S. S.  and Morton, J. M.  and Kalsekar, I.  and Ammann, E. M.  and Hsiao, C. W.  and Reps, J. ",
   Title="{{U}sing {M}achine {L}earning {A}pplied to {R}eal-{W}orld {H}ealthcare {D}ata for {P}redictive {A}nalytics: {A}n {A}pplied {E}xample in {B}ariatric {S}urgery}",
   Journal="Value Health",
   Year="2019",
   Volume="22",
   Number="5",
   Pages="580--586",
   Month="May"
}
@Article{vashisht_2018,
   Author="Vashisht, R.  and Jung, K.  and Schuler, A.  and Banda, J. M.  and Park, R. W.  and Jin, S.  and Li, L.  and Dudley, J. T.  and Johnson, K. W.  and Shervey, M. M.  and Xu, H.  and Wu, Y.  and Natrajan, K.  and Hripcsak, G.  and Jin, P.  and Van Zandt, M.  and Reckard, A.  and Reich, C. G.  and Weaver, J.  and Schuemie, M. J.  and Ryan, P. B.  and Callahan, A.  and Shah, N. H. ",
   Title="{{A}ssociation of {H}emoglobin {A}1c {L}evels {W}ith {U}se of {S}ulfonylureas, {D}ipeptidyl {P}eptidase 4 {I}nhibitors, and {T}hiazolidinediones in {P}atients {W}ith {T}ype 2 {D}iabetes {T}reated {W}ith {M}etformin: {A}nalysis {F}rom the {O}bservational {H}ealth {D}ata {S}ciences and {I}nformatics {I}nitiative}",
   Journal="JAMA Netw Open",
   Year="2018",
   Volume="1",
   Number="4",
   Pages="e181755",
   Month="Aug"
}

@Article{ryan_2018,
   Author="Ryan, P. B.  and Buse, J. B.  and Schuemie, M. J.  and DeFalco, F.  and Yuan, Z.  and Stang, P. E.  and Berlin, J. A.  and Rosenthal, N. ",
   Title="{{C}omparative effectiveness of canagliflozin, {S}{G}{L}{T}2 inhibitors and non-{S}{G}{L}{T}2 inhibitors on the risk of hospitalization for heart failure and amputation in patients with type 2 diabetes mellitus: {A} real-world meta-analysis of 4 observational databases ({O}{B}{S}{E}{R}{V}{E}-4{D})}",
   Journal="Diabetes Obes Metab",
   Year="2018",
   Volume="20",
   Number="11",
   Pages="2585--2597",
   Month="11"
}

@Article{boland_2017,
   Author="Boland, M. R.  and Parhi, P.  and Li, L.  and Miotto, R.  and Carroll, R.  and Iqbal, U.  and Nguyen, P. A.  and Schuemie, M.  and You, S. C.  and Smith, D.  and Mooney, S.  and Ryan, P.  and Li, Y. J.  and Park, R. W.  and Denny, J.  and Dudley, J. T.  and Hripcsak, G.  and Gentine, P.  and Tatonetti, N. P. ",
   Title="{{U}ncovering exposures responsible for birth season - disease effects: a global study}",
   Journal="J Am Med Inform Assoc",
   Year="2017",
   Month="Sep"
}

@Article{yuan_2018,
   Author="Yuan, Z.  and DeFalco, F. J.  and Ryan, P. B.  and Schuemie, M. J.  and Stang, P. E.  and Berlin, J. A.  and Desai, M.  and Rosenthal, N. ",
   Title="{{R}isk of lower extremity amputations in people with type 2 diabetes mellitus treated with sodium-glucose co-transporter-2 inhibitors in the {U}{S}{A}: {A} retrospective cohort study}",
   Journal="Diabetes Obes Metab",
   Year="2018",
   Volume="20",
   Number="3",
   Pages="582--589",
   Month="03"
}

@Article{weinstein_2017,
   Author="Weinstein, R. B.  and Ryan, P.  and Berlin, J. A.  and Matcho, A.  and Schuemie, M.  and Swerdel, J.  and Patel, K.  and Fife, D. ",
   Title="{{C}hanneling in the {U}se of {N}onprescription {P}aracetamol and {I}buprofen in an {E}lectronic {M}edical {R}ecords {D}atabase: {E}vidence and {I}mplications}",
   Journal="Drug Saf",
   Year="2017",
   Volume="40",
   Number="12",
   Pages="1279--1292",
   Month="12"
}

@Article{wang_2017,
   Author="Wang, Y.  and Desai, M.  and Ryan, P. B.  and DeFalco, F. J.  and Schuemie, M. J.  and Stang, P. E.  and Berlin, J. A.  and Yuan, Z. ",
   Title="{{I}ncidence of diabetic ketoacidosis among patients with type 2 diabetes mellitus treated with {S}{G}{L}{T}2 inhibitors and other antihyperglycemic agents}",
   Journal="Diabetes Res. Clin. Pract.",
   Year="2017",
   Volume="128",
   Pages="83--90",
   Month="Jun"
}

@Article{ramcharran_2017,
   Author="Ramcharran, D.  and Qiu, H.  and Schuemie, M. J.  and Ryan, P. B. ",
   Title="{{A}typical {A}ntipsychotics and the {R}isk of {F}alls and {F}ractures {A}mong {O}lder {A}dults: {A}n {E}mulation {A}nalysis and an {E}valuation of {A}dditional {C}onfounding {C}ontrol {S}trategies}",
   Journal="J Clin Psychopharmacol",
   Year="2017",
   Volume="37",
   Number="2",
   Pages="162--168",
   Month="Apr"
}

@Article{ryan_2017,
   Author="Ryan, P. B.  and Schuemie, M. J.  and Ramcharran, D.  and Stang, P. E. ",
   Title="{{A}typical {A}ntipsychotics and the {R}isks of {A}cute {K}idney {I}njury and {R}elated {O}utcomes {A}mong {O}lder {A}dults: {A} {R}eplication {A}nalysis and an {E}valuation of {A}dapted {C}onfounding {C}ontrol {S}trategies}",
   Journal="Drugs Aging",
   Year="2017",
   Volume="34",
   Number="3",
   Pages="211--219",
   Month="03"
}

@article{Hripcsak2015,
	title = {Observational {Health} {Data} {Sciences} and {Informatics} ({OHDSI}): {Opportunities} for {Observational} {Researchers}},
	volume = {216},
	issn = {0926-9630},
	shorttitle = {Observational {Health} {Data} {Sciences} and {Informatics} ({OHDSI})},
	url = {http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4815923/},
	urldate = {2016-12-07},
	journal = {Studies in health technology and informatics},
	author = {Hripcsak, George and Duke, Jon D and Shah, Nigam H and Reich, Christian G and Huser, Vojtech and Schuemie, Martijn J and Suchard, Marc A and Park, Rae Woong and Wong, Ian Chi Kei and Rijnbeek, Peter R and van der Lei, Johan and Pratt, Nicole and Norén, G Niklas and Li, Yu-Chuan and Stang, Paul E and Madigan, David and Ryan, Patrick B},
	year = {2015},
	pmid = {26262116},
	pmcid = {PMC4815923},
	pages = {574--578}}
}

@article{moons_transparent_2015,
	title = {Transparent {Reporting} of a multivariable prediction model for {Individual} {Prognosis} or {Diagnosis} ({TRIPOD}): explanation and elaboration},
	volume = {162},
	issn = {1539-3704},
	shorttitle = {Transparent {Reporting} of a multivariable prediction model for {Individual} {Prognosis} or {Diagnosis} ({TRIPOD})},
	doi = {10.7326/M14-0698},
	abstract = {The TRIPOD (Transparent Reporting of a multivariable prediction model for Individual Prognosis Or Diagnosis) Statement includes a 22-item checklist, which aims to improve the reporting of studies developing, validating, or updating a prediction model, whether for diagnostic or prognostic purposes. The TRIPOD Statement aims to improve the transparency of the reporting of a prediction model study regardless of the study methods used. This explanation and elaboration document describes the rationale; clarifies the meaning of each item; and discusses why transparent reporting is important, with a view to assessing risk of bias and clinical usefulness of the prediction model. Each checklist item of the TRIPOD Statement is explained in detail and accompanied by published examples of good reporting. The document also provides a valuable reference of issues to consider when designing, conducting, and analyzing prediction model studies. To aid the editorial process and help peer reviewers and, ultimately, readers and systematic reviewers of prediction model studies, it is recommended that authors include a completed checklist in their submission. The TRIPOD checklist can also be downloaded from www.tripod-statement.org.},
	language = {eng},
	number = {1},
	journal = {Annals of Internal Medicine},
	author = {Moons, Karel G. M. and Altman, Douglas G. and Reitsma, Johannes B. and Ioannidis, John P. A. and Macaskill, Petra and Steyerberg, Ewout W. and Vickers, Andrew J. and Ransohoff, David F. and Collins, Gary S.},
	month = jan,
	year = {2015},
	pmid = {25560730},
	keywords = {Humans, Reproducibility of Results, prognosis, Multivariate Analysis, models, statistical, Diagnosis, Checklist, Decision Support Techniques, Guidelines as Topic, Publishing},
	pages = {W1--73}
}

@article{tibshirani_regression_1996,
	title = {Regression {Shrinkage} and {Selection} via the {Lasso}},
	volume = {58},
	issn = {0035-9246},
	url = {https://www.jstor.org/stable/2346178},
	abstract = {We propose a new method for estimation in linear models. The `lasso' minimizes the residual sum of squares subject to the sum of the absolute value of the coefficients being less than a constant. Because of the nature of this constraint it tends to produce some coefficients that are exactly 0 and hence gives interpretable models. Our simulation studies suggest that the lasso enjoys some of the favourable properties of both subset selection and ridge regression. It produces interpretable models like subset selection and exhibits the stability of ridge regression. There is also an interesting relationship with recent work in adaptive function estimation by Donoho and Johnstone. The lasso idea is quite general and can be applied in a variety of statistical models: extensions to generalized regression models and tree-based models are briefly described.},
	number = {1},
	urldate = {2019-07-09},
	journal = {Journal of the Royal Statistical Society. Series B (Methodological)},
	author = {Tibshirani, Robert},
	year = {1996},
	pages = {267--288}
}

@article{cutrona_validation_2013,
	title = {Validation of acute myocardial infarction in the {Food} and {Drug} {Administration}'s {Mini}-{Sentinel} program},
	volume = {22},
	issn = {1099-1557},
	doi = {10.1002/pds.3310},
	abstract = {PURPOSE: To validate an algorithm based upon International Classification of Diseases, 9(th) revision, Clinical Modification (ICD-9-CM) codes for acute myocardial infarction (AMI) documented within the Mini-Sentinel Distributed Database (MSDD).
METHODS: Using an ICD-9-CM-based algorithm (hospitalized patients with 410.x0 or 410.x1 in primary position), we identified a random sample of potential cases of AMI in 2009 from four Data Partners participating in the Mini-Sentinel Program. Cardiologist reviewers used information abstracted from hospital records to assess the likelihood of an AMI diagnosis based on criteria from the Joint European Society of Cardiology and American College of Cardiology Global Task Force. Positive predictive values (PPVs) of the ICD-9-based algorithm were calculated.
RESULTS: Of the 153 potential cases of AMI identified, hospital records for 143 (93\%) were retrieved and abstracted. Overall, the PPV was 86.0\% (95\% confidence interval; 79.2\%, 91.2\%). PPVs ranged from 76.3\% to 94.3\% across the four Data Partners.
CONCLUSIONS: The overall PPV of potential AMI cases, as identified using an ICD-9-CM-based algorithm, may be acceptable for safety surveillance; however, PPVs do vary across Data Partners. This validation effort provides a contemporary estimate of the reliability of this algorithm for use in future surveillance efforts conducted using the Food and Drug Administration's MSDD.},
	language = {eng},
	number = {1},
	journal = {Pharmacoepidemiology and Drug Safety},
	author = {Cutrona, Sarah L. and Toh, Sengwee and Iyer, Aarthi and Foy, Sarah and Daniel, Gregory W. and Nair, Vinit P. and Ng, Daniel and Butler, Melissa G. and Boudreau, Denise and Forrow, Susan and Goldberg, Robert and Gore, Joel and McManus, David and Racoosin, Judith A. and Gurwitz, Jerry H.},
	month = jan,
	year = {2013},
	pmid = {22745038},
	pmcid = {PMC3601831},
	keywords = {Adult, Aged, Aged, 80 and over, Algorithms, Databases, Factual, Female, Humans, International Classification of Diseases, Male, Middle Aged, Myocardial Infarction, Outcome Assessment (Health Care), Predictive Value of Tests, Reproducibility of Results, United States, United States Food and Drug Administration},
	pages = {40--54}
}

@article{rubbo_use_2015,
	title = {Use of electronic health records to ascertain, validate and phenotype acute myocardial infarction: {A} systematic review and recommendations},
	volume = {187},
	issn = {1874-1754},
	shorttitle = {Use of electronic health records to ascertain, validate and phenotype acute myocardial infarction},
	doi = {10.1016/j.ijcard.2015.03.075},
	abstract = {Electronic health records (EHRs) offer the opportunity to ascertain clinical outcomes at large scale and low cost, thus facilitating cohort studies, quality of care research and clinical trials. For acute myocardial infarction (AMI) the extent to which different EHR sources are accessible and accurate remains uncertain. Using MEDLINE and EMBASE we identified thirty three studies, reporting a total of 128658 patients, published between January 2000 and July 2014 that permitted assessment of the validity of AMI diagnosis drawn from EHR sources against a reference such as manual chart review. In contrast to clinical practice, only one study used EHR-derived markers of myocardial necrosis to identify possible AMI cases, none used electrocardiogram findings and one used symptoms in the form of free text combined with coded diagnosis. The remaining studies relied mostly on coded diagnosis. Thirty one studies reported positive predictive value (PPV)≥ 70\% between AMI diagnosis from both secondary care and primary care EHRs and the reference. Among fifteen studies reporting EHR-derived AMI phenotypes, three cross-referenced ST-segment elevation AMI diagnosis (PPV range 71-100\%), two non-ST-segment elevation AMI (PPV 91.0, 92.1\%), three non-fatal AMI (PPV range 82-92.2\%) and six fatal AMI (PPV range 64-91.7\%). Clinical coding of EHR-derived AMI diagnosis in primary care and secondary care was found to be accurate in different clinical settings and for different phenotypes. However, markers of myocardial necrosis, ECG and symptoms, the cornerstones of a clinical diagnosis, are underutilised and remain a challenge to retrieve from EHRs.},
	language = {eng},
	journal = {International Journal of Cardiology},
	author = {Rubbo, Bruna and Fitzpatrick, Natalie K. and Denaxas, Spiros and Daskalopoulou, Marina and Yu, Ning and Patel, Riyaz S. and {UK Biobank Follow-up and Outcomes Working Group} and Hemingway, Harry},
	year = {2015},
	pmid = {25966015},
	keywords = {Acute coronary syndrome, Clinical coding, Electronic health records, Electronic Health Records, Humans, Myocardial infarction, Myocardial Infarction, Phenotype, Reproducibility of Results, Validation studies},
	pages = {705--711}
}

@Article{dersimonian_1986,
   Author="DerSimonian, R.  and Laird, N. ",
   Title="{{M}eta-analysis in clinical trials}",
   Journal="Control Clin Trials",
   Year="1986",
   Volume="7",
   Number="3",
   Pages="177--188",
   Month="Sep"
}

@book{Martin_2008,
 author = {Martin, Robert C.},
 title = {Clean Code: A Handbook of Agile Software Craftsmanship},
 year = {2008},
 isbn = {0132350882, 9780132350884},
 edition = {1},
 publisher = {Prentice Hall PTR},
 address = {Upper Saddle River, NJ, USA},
}

@article{huser_multisite_2016,
	title = {Multisite {Evaluation} of a {Data} {Quality} {Tool} for {Patient}-{Level} {Clinical} {Data} {Sets}},
	volume = {4},
	issn = {2327-9214},
	doi = {10.13063/2327-9214.1239},
	abstract = {INTRODUCTION: Data quality and fitness for analysis are crucial if outputs of analyses of electronic health record data or administrative claims data should be trusted by the public and the research community.
METHODS: We describe a data quality analysis tool (called Achilles Heel) developed by the Observational Health Data Sciences and Informatics Collaborative (OHDSI) and compare outputs from this tool as it was applied to 24 large healthcare datasets across seven different organizations.
RESULTS: We highlight 12 data quality rules that identified issues in at least 10 of the 24 datasets and provide a full set of 71 rules identified in at least one dataset. Achilles Heel is a freely available software that provides a useful starter set of data quality rules with the ability to add additional rules. We also present results of a structured email-based interview of all participating sites that collected qualitative comments about the value of Achilles Heel for data quality evaluation.
DISCUSSION: Our analysis represents the first comparison of outputs from a data quality tool that implements a fixed (but extensible) set of data quality rules. Thanks to a common data model, we were able to compare quickly multiple datasets originating from several countries in America, Europe and Asia.},
	language = {eng},
	number = {1},
	journal = {EGEMS (Washington, DC)},
	author = {Huser, Vojtech and DeFalco, Frank J. and Schuemie, Martijn and Ryan, Patrick B. and Shang, Ning and Velez, Mark and Park, Rae Woong and Boyce, Richard D. and Duke, Jon and Khare, Ritu and Utidjian, Levon and Bailey, Charles},
	year = {2016},
	pmid = {28154833},
	pmcid = {PMC5226382},
	keywords = {Informatics, Common Data Model, Data Use and Quality, Electronic Health Record (EHR)},
	pages = {1239}
}

@Article{yoon_2016,
   Author="Yoon, D.  and Ahn, E. K.  and Park, M. Y.  and Cho, S. Y.  and Ryan, P.  and Schuemie, M. J.  and Shin, D.  and Park, H.  and Park, R. W. ",
   Title="{{C}onversion and {D}ata {Q}uality {A}ssessment of {E}lectronic {H}ealth {R}ecord {D}ata at a {K}orean {T}ertiary {T}eaching {H}ospital to a {C}ommon {D}ata {M}odel for {D}istributed {N}etwork {R}esearch}",
   Journal="Healthc Inform Res",
   Year="2016",
   Volume="22",
   Number="1",
   Pages="54--58",
   Month="Jan"
}

@Article {Hripcsak7329,
	author = "Hripcsak, George and Ryan, Patrick B. and Duke, Jon D. and Shah, Nigam H. and Park, Rae Woong and Huser, Vojtech and Suchard, Marc A. and Schuemie, Martijn J. and DeFalco, Frank J. and Perotte, Adler and Banda, Juan M. and Reich, Christian G. and Schilling, Lisa M. and Matheny, Michael E. and Meeker, Daniella and Pratt, Nicole and Madigan, David",
	title = "{Characterizing treatment pathways at scale using the OHDSI network}",
	volume = "113",
	number = "27",
	pages = "7329--7336",
	year = "2016",
	doi = "10.1073/pnas.1510502113",
	publisher = "National Academy of Sciences",
	issn = "0027-8424",
	URL = "https://www.pnas.org/content/113/27/7329",
	eprint = "https://www.pnas.org/content/113/27/7329.full.pdf",
	journal = "Proceedings of the National Academy of Sciences"
}

@Article{VONELM2008344,
  title = "The Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) statement: guidelines for reporting observational studies",
  journal = "Journal of Clinical Epidemiology",
  volume = "61",
  number = "4",
  pages = "344 - 349",
  year = "2008",
  issn = "0895-4356",
  doi = "10.1016/j.jclinepi.2007.11.008",
  url = "http://www.sciencedirect.com/science/article/pii/S0895435607004362",
  author = "Erik von Elm and Douglas G. Altman and Matthias Egger and Stuart J. Pocock and Peter C. Gøtzsche and Jan P. Vandenbroucke",
}

@article{WHOHypertension,
  title={Global brief on hypertension},
  author={Who, A},
  journal={World Health Organization},
  year={2013},
  url = "https://www.who.int/cardiovascular_diseases/publications/global_brief_hypertension/en/",
}

@Article{Rubbo2015phenotypes,
   Author="Rubbo, B.  and Fitzpatrick, N. K.  and Denaxas, S.  and Daskalopoulou, M.  and Yu, N.  and Patel, R. S.  and Hemingway, H.  and Danesh, J.  and Allen, N.  and Atkinson, M.  and Blaveri, E.  and Brannan, R.  and Brayne, C.  and Brophy, S.  and Chaturvedi, N.  and Collins, R.  and deLusignan, S.  and Denaxas, S.  and Desai, P.  and Eastwood, S.  and Gallacher, J.  and Hemingway, H.  and Hotopf, M.  and Landray, M.  and Lyons, R.  and O'Neil, T.  and Pringle, M.  and Sprosen, T.  and Strachan, D.  and Sudlow, C.  and Sullivan, F.  and Zhang, Q.  and Flaig, R. ",
   Title="{{U}se of electronic health records to ascertain, validate and phenotype acute myocardial infarction: {A} systematic review and recommendations}",
   Journal="Int. J. Cardiol.",
   Year="2015",
   Volume="187",
   Pages="705--711"
}

@Article{Swerdel2019phevaluator,
   Author="Swerdel, J. N.  and Hripcsak, G.  and Ryan, P. B. ",
   Title="{{P}he{V}aluator: {D}evelopment and {E}valuation of a {P}henotype {A}lgorithm {E}valuator}",
   Journal="J Biomed Inform",
   Year="2019",
   Pages="103258",
   Month="Jul"
}

@Article{Banda2017APHRODITE,
   Author="Banda, J. M.  and Halpern, Y.  and Sontag, D.  and Shah, N. H. ",
   Title="{{E}lectronic phenotyping with {A}{P}{H}{R}{O}{D}{I}{T}{E} and the {O}bservational {H}ealth {S}ciences and {I}nformatics ({O}{H}{D}{S}{I}) data network}",
   Journal="AMIA Jt Summits Transl Sci Proc",
   Year="2017",
   Volume="2017",
   Pages="48--57"
}

@Article{Hripcsak2019eMERGE,
   Author="Hripcsak, G.  and Shang, N.  and Peissig, P. L.  and Rasmussen, L. V.  and Liu, C.  and Benoit, B.  and Carroll, R. J.  and Carrell, D. S.  and Denny, J. C.  and Dikilitas, O.  and Gainer, V. S.  and Marie Howell, K.  and Klann, J. G.  and Kullo, I. J.  and Lingren, T.  and Mentch, F. D.  and Murphy, S. N.  and Natarajan, K.  and Pacheco, J. A.  and Wei, W. Q.  and Wiley, K.  and Weng, C. ",
   Title="{{F}acilitating phenotype transfer using a common data model}",
   Journal="J Biomed Inform",
   Year="2019",
   Pages="103253",
   Month="Jul"
}

@article{vanDerLei_1991,
  title={Use and abuse of computer-stored medical records},
  author={van der Lei, Johan},
  journal={Methods of information in medicine},
  volume={30},
  number={02},
  pages={79--80},
  year={1991},
  publisher={Schattauer GmbH}
}

@book{roebuck_2012,
  title={Data quality: high-impact strategies-what you need to know: definitions, adoptions, impact, benefits, maturity, vendors},
  author={Roebuck, Kevin},
  year={2012},
  publisher={Emereo Publishing}
}

@book{dasu_2003,
  title={Exploratory data mining and data cleaning},
  author={Dasu, Tamraparni and Johnson, Theodore},
  volume={479},
  year={2003},
  publisher={John Wiley \& Sons}
}

@Article{defalco_2013,
   Author="Defalco, F. J.  and Ryan, P. B.  and Soledad Cepeda, M. ",
   Title="{{A}pplying standardized drug terminologies to observational healthcare databases: a case study on opioid exposure}",
   Journal="Health Serv Outcomes Res Methodol",
   Year="2013",
   Volume="13",
   Number="1",
   Pages="58--67",
   Month="Mar"
}

@Article{makadia_2014,
   Author="Makadia, R.  and Ryan, P. B. ",
   Title="{{T}ransforming the {P}remier {P}erspective {H}ospital {D}atabase into the {O}bservational {M}edical {O}utcomes {P}artnership ({O}{M}{O}{P}) {C}ommon {D}ata {M}odel}",
   Journal="EGEMS (Wash DC)",
   Year="2014",
   Volume="2",
   Number="1",
   Pages="1110"
}

@Article{matcho_2014,
   Author="Matcho, A.  and Ryan, P.  and Fife, D.  and Reich, C. ",
   Title="{{F}idelity assessment of a clinical practice research datalink conversion to the {O}{M}{O}{P} common data model}",
   Journal="Drug Saf",
   Year="2014",
   Volume="37",
   Number="11",
   Pages="945--959",
   Month="Nov"
}

@Article{voss_2015,
   Author="Voss, E. A.  and Ma, Q.  and Ryan, P. B. ",
   Title="{{T}he impact of standardizing the definition of visits on the consistency of multi-database observational health research}",
   Journal="BMC Med Res Methodol",
   Year="2015",
   Volume="15",
   Pages="13",
   Month="Mar"
}

@Article{voss_2015b,
   Author="Voss, E. A.  and Makadia, R.  and Matcho, A.  and Ma, Q.  and Knoll, C.  and Schuemie, M.  and DeFalco, F. J.  and Londhe, A.  and Zhu, V.  and Ryan, P. B. ",
   Title="{{F}easibility and utility of applications of the common data model to multiple, disparate observational health databases}",
   Journal="J Am Med Inform Assoc",
   Year="2015",
   Volume="22",
   Number="3",
   Pages="553--564",
   Month="May"
}

@Article{hripcsak_2018,
   Author="Hripcsak, G.  and Levine, M. E.  and Shang, N.  and Ryan, P. B. ",
   Title="{{E}ffect of vocabulary mapping for conditions on phenotype cohorts}",
   Journal="J Am Med Inform Assoc",
   Year="2018",
   Volume="25",
   Number="12",
   Pages="1618--1625",
   Month="Dec"
}

@Article{hripcsak_2017,
   Author="Hripcsak, G.  and Albers, D. J. ",
   Title="{{H}igh-fidelity phenotyping: richness and freedom from bias}",
   Journal="J Am Med Inform Assoc",
   Year="2017",
   Month="Oct"
}

@book{olsen2007learning,
  title={The learning healthcare system: workshop summary},
  author={Olsen, LeighAnne and Aisner, Dara and McGinnis, J Michael and others},
  year={2007},
  publisher={Natl Academy Pr}
}

@Article{stang2010omop,
   Author="Stang, P. E.  and Ryan, P. B.  and Racoosin, J. A.  and Overhage, J. M.  and Hartzema, A. G.  and Reich, C.  and Welebob, E.  and Scarnecchia, T.  and Woodcock, J. ",
   Title="{{A}dvancing the science for active surveillance: rationale and design for the {O}bservational {M}edical {O}utcomes {P}artnership}",
   Journal="Ann. Intern. Med.",
   Year="2010",
   Volume="153",
   Number="9",
   Pages="600--606",
   Month="Nov"
}

@Article{overhage2012cdm,
   Author="Overhage, J. M.  and Ryan, P. B.  and Reich, C. G.  and Hartzema, A. G.  and Stang, P. E. ",
   Title="{{V}alidation of a common data model for active safety surveillance research}",
   Journal="J Am Med Inform Assoc",
   Year="2012",
   Volume="19",
   Number="1",
   Pages="54--60"
}

@Article{ryan2012omop,
   Author="Ryan, P. B.  and Madigan, D.  and Stang, P. E.  and Overhage, J. M.  and Racoosin, J. A.  and Hartzema, A. G. ",
   Title="{{E}mpirical assessment of methods for risk identification in healthcare data: results from the experiments of the {O}bservational {M}edical {O}utcomes {P}artnership}",
   Journal="Stat Med",
   Year="2012",
   Volume="31",
   Number="30",
   Pages="4401--4415",
   Month="Dec"
}

@Article{ryan2013omop,
   Author="Ryan, P. B.  and Stang, P. E.  and Overhage, J. M.  and Suchard, M. A.  and Hartzema, A. G.  and DuMouchel, W.  and Reich, C. G.  and Schuemie, M. J.  and Madigan, D. ",
   Title="{{A} comparison of the empirical performance of methods for a risk identification system}",
   Journal="Drug Saf",
   Year="2013",
   Volume="36 Suppl 1",
   Pages="S143--158",
   Month="Oct"
}

@Article{madigan2013design,
   Author="Madigan, D.  and Ryan, P. B.  and Schuemie, M. ",
   Title="{{D}oes design matter? {S}ystematic evaluation of the impact of analytical choices on effect estimates in observational studies}",
   Journal="Ther Adv Drug Saf",
   Year="2013",
   Volume="4",
   Number="2",
   Pages="53--62",
   Month="Apr"
}

@Article{cepeda_2018,
   Author="Cepeda, M. S.  and Reps, J.  and Fife, D.  and Blacketer, C.  and Stang, P.  and Ryan, P. ",
   Title="{{F}inding treatment-resistant depression in real-world data: {H}ow a data-driven approach compares with expert-based heuristics}",
   Journal="Depress Anxiety",
   Year="2018",
   Volume="35",
   Number="3",
   Pages="220--228",
   Month="03"
}

@Article{hill_1965,
   Author="Hill, A. B. ",
   Title="{{T}{H}{E} {E}{N}{V}{I}{R}{O}{N}{M}{E}{N}{T} {A}{N}{D} {D}{I}{S}{E}{A}{S}{E}: {A}{S}{S}{O}{C}{I}{A}{T}{I}{O}{N} {O}{R} {C}{A}{U}{S}{A}{T}{I}{O}{N}?}",
   Journal="Proc. R. Soc. Med.",
   Year="1965",
   Volume="58",
   Pages="295--300",
   Month="May"
}

repository: mokjpn/TheBookOfOhdsi

repo_name: mokjpn/TheBookOfOhdsi

extension: bib


text:
SET(CMAKE_SYSTEM_NAME Windows)

SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc-win32)
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++-win32)
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
SET(CMAKE_RANLIB i686-w64-mingw32-ranlib)

license: MIT

repository: shaggyfox/ShaggysGameLib

license_type: permissive

repo_name: shaggyfox/ShaggysGameLib

branch_name: refs/heads/master

extension: cmake


text:
package main

import (
	"bytes"
	"crypto/tls"
	"encoding/hex"
	"io"
	"net"
	"regexp"
	"sync"
	"sync/atomic"
	"time"
)

type ImapConnection struct {
	localConn  net.Conn
	remoteConn net.Conn
	id         int
	wg         sync.WaitGroup
	written    int64
	res        []*regexp.Regexp
	capRe      *regexp.Regexp
	poke       chan uint64
}

func (ic *ImapConnection) HexDump(h string, b []byte) {
	if *debug {
		logger.Printf("[DEBUG] [C:%08x] %s\n%s", ic.id, h, hex.Dump(b))
	}
}

func (ic *ImapConnection) DoWrite(b []byte) (err error) {
	if *debug {
		ic.HexDump("Sending:", b)
	}
	nw, ew := ic.localConn.Write(b)
	if nw > 0 {
		ic.written += int64(nw)
	}
	if ew != nil {
		err = ew
	}
	if nw != len(b) {
		err = io.ErrShortWrite
	}
	return
}

func (ic *ImapConnection) DoWriteReplace(b []byte) (err error) {
	// fortunately go's weird slice passing semantics are ideal here
	// we replace into (and thus corrupt) the elements of the backing
	// array, but as we never make things longer with a replace, we are
	// fine as we only overwrite stuff we are trying to write. We don't
	// corrupt the slice pointers though.
	if ic.capRe.Find(b) != nil {
		b = ic.capRe.ReplaceAll(b, []byte("$1$2"))
		if *debug {
			logger.Printf("[DEBUG] [C:%08x] Disabled COMPRESS=DEFLATE", ic.id)
		}
	}
	for _, re := range ic.res {
		// optimise for cases where regexp is not found to
		// avoid slice data copies
		if re.Find(b) != nil {
			b = re.ReplaceAll(b, []byte{})
		}
	}
	return ic.DoWrite(b)
}

// This is adapted from the source of io.Copy()
func (ic *ImapConnection) CopyProxy() (int64, error) {
	var err error
	src := ic.remoteConn
	bufSize := 64 * 1024
	buf := make([]byte, bufSize)

	rn := []byte{'\r', '\n'}

	var mta, mua uint64
	warned := false
	wpos := 0

	for {
		if *debug {
			logger.Printf("[DEBUG] [C:%08x] From MTA=%d to MUA=%d wpos %d", ic.id, mta, mua, wpos)
		}
		nr, er := src.Read(buf[wpos:])
		if nr > 0 {
			ic.HexDump("Got:", buf[wpos:wpos+nr])
			mta += uint64(nr)
			// count forward by the number of bytes we have left over
			// since the previous write
			wpos = wpos + nr
			// indicate we are alive
			ic.poke <- mua
			// look backwards through the slice for \r\n
			if idx := bytes.LastIndex(buf[0:wpos], rn); idx < 0 {
				// there is no \r\n in the data.

				if !warned && wpos > 256 {
					logger.Printf("[WARNING] [C:%08x] Data contains no line delimeters. This normally happens if compression is not disabled correctly by us, or if the MUA is attempting to start TLS within our TLS session. Try disabling TLS manually.", ic.id)
					warned = true
				}

				// if we can fit any more in, do another read
				if wpos < bufSize-len(rn) {
					if *debug {
						logger.Printf("[DEBUG] [C:%08x] No return [From MTA=%d to MUA=%d wpos=%d]", ic.id, mta, mua, wpos)
					}
					continue
				}
				if *debug {
					logger.Printf("[DEBUG] [C:%08x] No return large block [From MTA=%d to MUA=%d wpos=%d]", ic.id, mta, mua, wpos)
				}
				// We can't filter it.
				// just write it out
				err = ic.DoWrite(buf[0:wpos])
				mua += uint64(wpos)
				if err != nil {
					break
				}
				wpos = 0
			} else {
				chunkLen := idx + len(rn)
				if *debug {
					logger.Printf("[DEBUG] [C:%08x] Write up to %d [From MTA=%d to MUA=%d wpos=%d]", ic.id, chunkLen, mta, mua, wpos)
				}
				// write the buffer up to and including the index
				err = ic.DoWriteReplace(buf[0:chunkLen])
				// err = ic.DoWrite(buf[0:chunkLen])
				mua += uint64(chunkLen)
				if err != nil {
					break
				}
				if chunkLen < wpos {
					n := wpos - chunkLen
					if *debug {
						logger.Printf("[DEBUG] [C:%08x] Copy buffer (n=%d,chunkLen=%d) [From MTA=%d to MUA=%d wpos=%d]", ic.id, n, chunkLen, mta, mua, wpos)
					}
					copy(buf[0:n], buf[chunkLen:wpos])
					wpos = n
				} else {
					wpos = 0
				}
			}
		}
		if er == io.EOF {
			if ew := ic.DoWrite(buf[0:wpos]); ew != nil {
				err = ew
			} else {
				mua += uint64(wpos)
			}
			wpos = 0
			break
		}
		if er != nil {
			err = er
			if ew := ic.DoWrite(buf[0:wpos]); ew != nil {
				err = ew
			} else {
				mua += uint64(wpos)
			}
			wpos = 0
			break
		}
	}
	if *debug {
		logger.Printf("[DEBUG] [C:%08x] From MTA %d From MUA %d (FINAL)", ic.id, mta, mua)
	}
	return ic.written, err
}

func (ic *ImapConnection) Proxy() {
	defer func() {
		if ic.localConn != nil {
			ic.localConn.Close()
		}
		if ic.remoteConn != nil {
			ic.remoteConn.Close()
		}
		logger.Printf("[INFO] [C:%08x] Closed connection to %s", ic.id, *remote)
		atomic.AddInt64(&openConnections, -1)
	}()

	proto := "tcp"
	if *ipv6 {
		proto = "tcp6"
	} else if *ipv4 {
		proto = "tcp4"
	}

	logger.Printf("[INFO] [C:%08x] New %s connection to %s", ic.id, proto, *remote)

	// First open the remote connection
	if *ssl {
		conf := &tls.Config{}
		c, err := tls.Dial(proto, *remote, conf)
		if err != nil {
			logger.Printf("[INFO] [C:%08x] Could not connect using TLS to %s: %s", ic.id, *remote, err)
			return
		}
		ic.remoteConn = c
	} else {
		c, err := net.Dial(proto, *remote)
		if err != nil {
			logger.Printf("[INFO] [C:%08x] Could not connect in plain to %s: %s ", ic.id, *remote, err)
			return
		}
		ic.remoteConn = c
	}
	ic.poke = make(chan uint64, 64)
	defer close(ic.poke)
	go func() {
		last := time.Now()
		for {
			select {
			case rx, ok := <-ic.poke:
				if !ok {
					if *debug {
						logger.Printf("[DEBUG] [C:%08x] idle monitor exiting", ic.id)
					}
					return
				}
				if *debug {
					logger.Printf("[DEBUG] [C:%08x] connection is not idle", ic.id)
				}
				now := time.Now()
				if now.Sub(last) > 10*time.Second {
					last = now
					logger.Printf("[INFO] [C:%08x] Sent %d bytes", ic.id, rx)
				}
			case <-time.After(*timeout):
				logger.Printf("[INFO] [C:%08x] Closing idle connection", ic.id)
				ic.localConn.Close()
				ic.remoteConn.Close()
			}
		}
	}()
	ic.wg.Add(2)
	go func() {
		//io.Copy(ic.localConn, ic.remoteConn)
		ic.CopyProxy()
		ic.wg.Done()
	}()
	go func() {
		io.Copy(ic.remoteConn, ic.localConn)
		ic.localConn.Close() // this causes the other end to close eventually, via IDLE etc.
		ic.wg.Done()
	}()
	ic.wg.Wait()
}

repository: abligh/goimapfilter

repo_name: abligh/goimapfilter

extension: go


text:
// Package onlineconf reads configuration files generated by OnlineConf.
//
// It opens indexed CDB files and maps them in the memory.
// If OnlineConf modifies them then they are automatically reopened.
package onlineconf

import (
	"fmt"
	"io"
	"log"
	"strconv"
	"sync"

	"github.com/fsnotify/fsnotify"
	"github.com/jbarham/go-cdb"
)

const configDir = "/usr/local/etc/onlineconf"

var watcher *fsnotify.Watcher

func init() {
	modules.byName = make(map[string]*Module)
	modules.byFile = make(map[string]*Module)

	var err error
	watcher, err = fsnotify.NewWatcher()
	if err != nil {
		panic(err)
	}

	err = watcher.Add(configDir)
	if err != nil {
		panic(err)
	}

	go func() {
		for {
			select {
			case ev := <-watcher.Events:
				//log.Println("fsnotify event:", ev)

				if ev.Op&fsnotify.Create == fsnotify.Create {
					modules.Lock()
					module, ok := modules.byFile[ev.Name]
					modules.Unlock()

					if ok {
						module.reopen()
					}
				}

			case err := <-watcher.Errors:
				log.Printf("Watch %v error: %v\n", configDir, err)
			}
		}
	}()
}

// SetOutput sets the output destination for the standard logger.
func SetOutput(w io.Writer) {
	log.SetOutput(w)
}

type Module struct {
	m    sync.RWMutex
	name string
	file string
	cdb  *cdb.Cdb
}

func newModule(name string) *Module {
	file := fmt.Sprintf("%s/%s.cdb", configDir, name)
	cdb, err := cdb.Open(file)
	if err != nil {
		panic(err)
	}
	return &Module{name: name, file: file, cdb: cdb}
}

func (m *Module) reopen() {
	log.Printf("Reopen %s\n", m.file)
	m.m.Lock()
	defer m.m.Unlock()
	cdb, err := cdb.Open(m.file)
	if err != nil {
		log.Printf("Reopen file %v error: %v\n", m.file, err)
	} else {
		m.cdb.Close()
		m.cdb = cdb
	}
}

func (m *Module) get(path string) (byte, []byte) {
	m.m.RLock()
	defer m.m.RUnlock()
	data, err := m.cdb.Data([]byte(path))
	if err != nil || len(data) == 0 {
		if err != io.EOF {
			log.Printf("Get %v:%v error: %v", m.file, path, err)
		}
		return 0, data
	}
	return data[0], data[1:]
}

// GetStringIfExists reads a string value of a named parameter from the module.
// It returns the boolean true if the parameter exists and is a string.
// In the other case it returns the boolean false and an empty string.
func (m *Module) GetStringIfExists(path string) (string, bool) {
	format, data := m.get(path)
	switch format {
	case 0:
		return "", false
	case 's':
		return string(data), true
	default:
		log.Printf("%s:%s: format is not string\n", m.name, path)
		return "", false
	}
}

// GetIntIfExists reads an integer value of a named parameter from the module.
// It returns this value and the boolean true if the parameter exists and is an integer.
// In the other case it returns the boolean false and 0.
func (m *Module) GetIntIfExists(path string) (int, bool) {
	str, ok := m.GetStringIfExists(path)
	if !ok {
		return 0, false
	}

	i, err := strconv.Atoi(str)
	if err != nil {
		log.Printf("%s:%s: value is not an integer: %s\n", m.name, path, str)
		return 0, false
	}

	return i, true
}

// GetString reads a string value of a named parameter from the module.
// It returns this value if the parameter exists and is a string.
// In the other case it panics unless default value is provided in
// the second argument.
func (m *Module) GetString(path string, d ...string) string {
	if val, ok := m.GetStringIfExists(path); ok {
		return val
	} else if len(d) > 0 {
		return d[0]
	} else {
		panic(fmt.Sprintf("%s:%s key not exists and default not found", m.name, path))
	}
}

// GetInt reads an integer value of a named parameter from the module.
// It returns this value if the parameter exists and is an integer.
// In the other case it panics unless default value is provided in
// the second argument.
func (m *Module) GetInt(path string, d ...int) int {
	if val, ok := m.GetIntIfExists(path); ok {
		return val
	} else if len(d) > 0 {
		return d[0]
	} else {
		panic(fmt.Sprintf("%s:%s key not exists and default not found", m.name, path))
	}
}

var modules struct {
	sync.Mutex
	byName map[string]*Module
	byFile map[string]*Module
}

// GetModule returns a named module.
// It panics if module not exists.
func GetModule(name string) *Module {
	modules.Lock()
	defer modules.Unlock()

	if module, ok := modules.byName[name]; ok {
		return module
	}

	module := newModule(name)

	modules.byName[module.name] = module
	modules.byFile[module.file] = module

	return module
}

var tree struct {
	sync.Mutex
	module *Module
}

func getTree() *Module {
	if tree.module != nil {
		return tree.module
	}

	tree.Lock()
	defer tree.Unlock()

	if tree.module != nil {
		return tree.module
	}

	tree.module = GetModule("TREE")
	return tree.module
}

// GetStringIfExists reads a string value of a named parameter from the module "TREE".
// It returns the boolean true if the parameter exists and is a string.
// In the other case it returns the boolean false and an empty string.
func GetStringIfExists(path string) (string, bool) {
	return getTree().GetStringIfExists(path)
}

// GetIntIfExists reads an integer value of a named parameter from the module "TREE".
// It returns this value and the boolean true if the parameter exists and is an integer.
// In the other case it returns the boolean false and 0.
func GetIntIfExists(path string) (int, bool) {
	return getTree().GetIntIfExists(path)
}

// GetString reads a string value of a named parameter from the module "TREE".
// It returns this value if the parameter exists and is a string.
// In the other case it panics unless default value is provided in
// the second argument.
func GetString(path string, d ...string) string {
	return getTree().GetString(path, d...)
}

// GetInt reads an integer value of a named parameter from the module "TREE".
// It returns this value if the parameter exists and is an integer.
// In the other case it panics unless default value is provided in
// the second argument.
func GetInt(path string, d ...int) int {
	return getTree().GetInt(path, d...)
}

repository: mrsndmn/onlineconf-go

repo_name: mrsndmn/onlineconf-go

gha_license_id: MIT


text:
DESCRIPTION = "Systemd Service script to run mpv in a loop with a PNG file for demo purposes."
HOMEPAGE = "https://mender.io"
LICENSE = "Apache-2.0"

SRC_URI = " \
	file://${PN}.service \
	file://demo-image-locked.png \
	file://demo-image-unlocked.png \
	file://LICENSE \
"
LIC_FILES_CHKSUM = "file://${S}/../LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"

inherit systemd

SYSTEMD_SERVICE_${PN} = "${PN}.service"
FILES_${PN} += "${systemd_unitdir}/system/${PN}.service"
RDEPENDS_${PN} = "mpv"
LICENSE_FLAGS_WHITELIST += "commercial"

do_install() {
  install -d ${D}/${systemd_unitdir}/system
  install -m 0644 ${WORKDIR}/${PN}.service ${D}/${systemd_unitdir}/system
  install -d ${D}/${sysconfdir}/
  install -m 0644 ${WORKDIR}/demo-image-unlocked.png ${D}/${sysconfdir}/
  install -m 0644 ${WORKDIR}/demo-image-locked.png ${D}/${sysconfdir}/
  ln -s demo-image-unlocked.png  ${D}/${sysconfdir}/demo-image.png
}

repository: pasinskim/meta-dmoseley-local-config

repo_name: pasinskim/meta-dmoseley-local-config

extension: bb


text:
package model

// Acquirer involved in the card payment.
type Acquirer5 struct {

	// Identification of the acquirer (for example the bank identification number BIN).
	Identification *GenericIdentification53 `xml:"Id"`

	// Version of the payment acquirer parameters of the POI.
	ParametersVersion *Max256Text `xml:"ParamsVrsn,omitempty"`
}

func (a *Acquirer5) AddIdentification() *GenericIdentification53 {
	a.Identification = new(GenericIdentification53)
	return a.Identification
}

func (a *Acquirer5) SetParametersVersion(value string) {
	a.ParametersVersion = (*Max256Text)(&value)
}

gha_language: Go


text:
package day11_test

import (
	"io/ioutil"

	. "github.com/dcarley/adventofcode/2017/day11"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/ginkgo/extensions/table"
	. "github.com/onsi/gomega"
)

var _ = Describe("Day11", func() {
	Describe("Part1", func() {
		DescribeTable("examples",
			func(path string, expected int) {
				distance, err := Part1(path)
				Expect(err).ToNot(HaveOccurred())
				Expect(distance).To(Equal(expected))
			},
			Entry("ne,ne,ne", "ne,ne,ne", 3),
			Entry("ne,ne,sw,sw", "ne,ne,sw,sw", 0),
			Entry("ne,ne,s,s", "ne,ne,s,s", 2),
			Entry("se,sw,se,sw,sw", "se,sw,se,sw,sw", 3),
		)

		It("should solve puzzle input", func() {
			path, err := ioutil.ReadFile("day11.input")
			Expect(err).ToNot(HaveOccurred())

			distance, err := Part1(string(path))
			Expect(err).ToNot(HaveOccurred())
			Expect(distance).To(Equal(643))
		})
	})

	Describe("Part2", func() {
		It("should solve puzzle input", func() {
			path, err := ioutil.ReadFile("day11.input")
			Expect(err).ToNot(HaveOccurred())

			distance, err := Part2(string(path))
			Expect(err).ToNot(HaveOccurred())
			Expect(distance).To(Equal(1471))
		})
	})
})


text:
SUMMARY = "Firmware for rtl8723bs"
LICENSE = "CLOSED"

PACKAGE_ARCH = "all"

PR = "r0"

SRC_URI = "file://rtl8723b_fw.zip"

S = "${WORKDIR}"

PACKAGES = "${PN}"
FILES_${PN} += "${base_libdir}/firmware"

do_install() {
	install -d ${D}${base_libdir}/firmware
	install -d ${D}${base_libdir}/firmware/rtl_bt
	install -m 0644 rtl8723b_fw.bin ${D}${base_libdir}/firmware/rtl_bt
}

repository: avlogic/meta-edision

repo_name: avlogic/meta-edision