Cohort Builder: A Software Pipeline for Generating Patient Cohorts with Predetermined Baseline Characteristics from Medical Records and Raw Ophthalmic Imaging Data | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Cohort Builder: A Software Pipeline for Generating Patient Cohorts with Predetermined Baseline Characteristics from Medical Records and Raw Ophthalmic Imaging Data Sepehr Mousavi, Ali Garjani, Adham Elwakil, Laurent Pierre Brock, and 10 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-4177057/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract In clinical research, the analysis of patient cohorts is a widely employed method for investigating relevant questions in healthcare. Furthermore, the availability of large-scale datasets opens the way for the integration of AI models into clinical practices. The ability to extract appropriate patient cohorts and large-scale datasets from hospital databases is vital in order to unlock the potential of real-world data collected in clinics and answer pivotal medical questions through retrospective studies. However, existing medical data is often dispersed across various systems and databases, preventing a systematic approach allowing access and interoperability. Even when the data are readily accessible, researchers need to systematically combine them to form study-specific cohorts with predefined baseline characteristics, tailored to answer specific research inquiries. This process is costly, repetitive, and error-prone, as it requires sifting through Electronic Medical Records, confirming ethical approval, verifying status of patient consent, checking the availability of imaging data, and filtering based on disease-specific image biomarkers. Our objective is to give the ability to craft study-specific patient cohorts to clinical researchers through an automated data preparation and processing pipeline. We present Cohort Builder, a software pipeline designed to facilitate the creation of patient cohorts with predefined baseline characteristics from real-world ophthalmic imaging data and electronic medical records. The applicability of our approach extends beyond ophthalmology to other medical domains with similar requirements such as neurology, cardiology and orthopaedics. Ophthalmology Hospital Medicine Computational Biology Artificial Intelligence and Machine Learning Clinical Research Retrospective Study Planning Data Engineering Ophthalmology Real-world data Figures Figure 1 Figure 2 1. Introduction The advent of artificial intelligence (AI) and machine learning (ML) technologies heralds a new era in healthcare, offering unprecedented opportunities for advancements in diagnostics and patient care (Hamet and Tremblay 2017; Secinaro et al. 2021 ; Bohr and Memarzadeh 2020). In particular, specialties that utilise image-based diagnostics, such as ophthalmology, have seen significant benefits from the integration of AI for disease detection, medical imaging analysis, and predictive health outcomes (Ting et al. 2019 ; Badar, Haris, and Fatima 2020; Dai et al. 2021 ; Liu et al. 2022 ; Potapenko et al. 2022 ; Ran et al. 2019 ; Xiong et al. 2022 ; Yellapragada et al. 2022 ; Yim et al. 2020 ). The capabilities of AI to support early disease detection, enhance the precision of medical image interpretations, disease prediction and evolution have been widely recognized (Al Kuwaiti et al. 2023). However, the practical application of AI in clinical practice is contingent upon the availability of extensive, well-organised datasets (Kahn et al. 2007 ; Strickland 2000 ). The segmentation of patient data across various storage systems, coupled with the ethical and regulatory challenges associated with using such data for research, poses significant hurdles. Existing literature acknowledges the arduous but critical steps required to prepare medical imaging data for AI analysis, emphasising the need for ethical approvals, data anonymization, quality assurance, and structured data storage to support AI training effectively (Willemink et al. 2020 ; Diaz et al. 2021 ). Nevertheless, there exists a discernible gap in research regarding the methodologies for consolidating disparate data sources for medical imaging AI applications. This paper presents Cohort Builder, a pipeline to collect ophthalmic medical data of consenting patients from different sources (such as machine databases and electronic health records), and generate user-defined datasets to target specific research questions. The Cohort Builder pipeline is built to serve the needs of ophthalmology, but its concept can be applied to other medical fields with similar requirements. Our approach allows research funds and time to be allocated efficiently in the context of retrospective studies. 2. Methods Cohort Builder is a software pipeline designed to facilitate the creation of patient cohorts with predefined baseline characteristics from real-world ophthalmic imaging data. Due to its nature, it is comprised of the following elements: Image Management System We used the Discovery ® software by RetinAI as an Image Management System and Image Viewer. It can automatically label and extract AI-based biomarkers (Bogunovic et al. 2019 ; De Zanet et al. 2017) from medical image acquisitions. It also serves as a tool to perform automatic medical image segmentation, which allows monitoring of disease progression. Development Process The development of the software pipeline followed an iterative process, which was adopted to incorporate feedback from clinicians and refine the software's features. Python is the sole programming language, and Linux the sole target operating system. However, one can communicate with a CohortBuilder server from any operating system. Agile methodologies facilitated coordination among team members, and maintenance of a coherent backlog. Validation Validation and verification of the software pipeline were conducted to confirm its adherence to its predefined requirements and specifications to ensure the pipeline’s suitability to generate patient cohorts with predetermined baseline characteristics. For more details, see “Use Cases”. Performance Evaluation The performance of the software pipeline was evaluated to assess its efficiency in handling data processing tasks. Quantitative measures such as speed, scalability, resource usage, and error rates were analysed to estimate the software's effectiveness. Benchmarking against established standards provided valuable insights into its comparative performance. These numbers are reported in our documentation, on our GitHub repository (see section Availability and Accessibility ). User Interface The user interface for the system is a combination of a command-line interface for the “Upload” and “Download” functionalities of Cohort Extractor and a GUI for the Cohort Planner and Cohort Labeller modules implemented using Tableau products, which allow to generate data visualisations of underlying databases spreadsheets (see section Software Design and Architecture). Deployment A first instance of the Cohort Builder Pipeline has been deployed on the servers of the Swiss Vaudois Hospitals Federation and made available to clinical researchers within the Jules-Gonin University Eye hospital (Lausanne). A second instance has been deployed on the servers of the Swiss Ophthalmic Imaging Network (SOIN) (Bergin et al. 2022 ) and it is available to researchers and clinicians at partner institutions. Ethical Considerations Ethical considerations pertaining to data privacy, security, and potential biases were addressed throughout the development process. The implementation of a general consent (GC) system at the Jules-Gonin University Eye hospital involved inviting 57,810 patients, including adults, legal representatives, and minors, to indicate their decision regarding the reuse of their health data for research purposes. As of the current date, we have received responses from 31,169 patients, among which 4,503 have declined permission for the reuse of their data. The status of each consent request is recorded and taken into account, serving as a valuable data source for Cohort Builder. Availability and Accessibility The software, to which access is granted upon request, is available at https://github.com/JulesGoninRIO/cohortbuilder . 3. Results The software pipeline is composed of three main modules: Cohort Planner, Cohort Extractor and Cohort Labeller (as shown in Fig. 1 ). Integration of these subcomponents enhances the overall functionality and effectiveness of the pipeline, enabling clinical researchers to efficiently extract, label, and assess patient data for research purposes while ensuring data quality and reliability. 3.1 The Cohort Planner Module This module allows clinical researchers to estimate the number of potential patients available for analysis based on selected inclusion and exclusion criteria. It assists in planning data extraction by providing an estimate of the sample size available for analysis. CohortPlanner integrates practical statistical measures to enhance cohort utility. These measures include power calculations to determine sample size adequacy for planned cohorts and estimates of deviations from expected norms to assess the completeness and reliability of EMR data. 3.2 The Cohort Extractor Module The main component is a module that streamlines the process of cohort assembly. This is achieved by performing the automatic extraction of raw imaging data retrieved from the machine databases, as well as AI-assisted extraction of retinal biomarkers. It performs two main functionalities: uploading a cohort, and downloading it (as shown in Fig. 2 ). The process of “uploading” a cohort starts with the identification of patient groups based on specific diagnostic criteria. This can either be done directly via patient identifiers, or indirectly via selection criteria, such as age, gender, and more. Concurrently, patient consent for data usage is verified by querying the General consent database, ensuring compliance with privacy regulations and legal provisions on research involving human beings (HRA). Upon identification, the corresponding raw imaging data is gathered from a centralised image pool. Following this, imaging data is uploaded to an instance of Discovery ® software by RetinAI. After having retrieved the resulting analysis, one can perform automated, integrated post-hoc analysis in order to validate or augment Discovery ® ‘s data. At present, a machine learning model is used to further label gathered eye fundus images. The process of “downloading” a cohort involves the user specifying a configuration to define which image types and biomarkers are to be considered. The cohort is then downloaded from Discovery ® to the local file system in a selective manner, based on the aforementioned configured study data. 3.3 The Cohort Labeller Module Designed to facilitate expert labelling of the extracted patient dataset, this software module enables clinical researchers and clinicians to systematically assess each patient's characteristics and label them according to the cohort they belong to or identify relevant biomarkers. These labelled datasets are crucial for training AI algorithms and can be reused for future studies. Cohort Labeller is an interactive tool that facilitates dynamic data interaction. This platform enables the visualisation of specific scans, segmentation of chosen parameters, and the distribution of crucial fluids (IRF, SRF) via histogram overlays. It has increased data labelling efficiency, allows for the integration of treatment histories within the analysis, and supports the selection of displayed parameters, significantly streamlining the interpretative process for medical professionals. Cohort Labeller increases the usability of longitudinal data for ophthalmological research, accentuating Cohort Builder's utility in fostering data-driven insights in clinical settings. 3.4 The EMR Health Checker Module This software module, separate from the rest of the pipeline, provides indicators of the reliability of certain fields within the Electronic Medical Record (EMR) database. It offers a description of the data quality, helping to estimate the reliability of the extracted cohorts. The main indicators are extracted from a registry of medical consultations, diagnoses, treatment plans, and surgical interventions, before being combined and evaluated. These indicators can also be utilised for training assistant clinicians and improving clinical practice. 3.5 Use Cases The Cohort Builder pipeline has played a crucial role in the formation of patient cohorts with specific baseline characteristics for a range of ophthalmology projects. This summary highlights its application across various studies, outlining the creation of cohorts for patient groups identified by particular ocular conditions under the Swiss Ophthalmic Imaging Network (SPHN) initiative (Lawrence, Selter, and Frey 2020). Key applications of Cohort Builder included the creation of the following retrospective study cohorts. More information is available on the SOIN website at https://sphn.ch/network/projects/completed-projects_tiles/project-page_soin. 1. Grading of Uveitis Inflammation: A cohort to study inflammation in uveitis patients (3312 eyes; 534 patients; Fluorescein Angiography [FA]) (Amiot et al. 2023). 2. Comorbidity of Glaucoma and Diabetes: A cohort to compare patients with primary open-angle glaucoma (POAG) without other comorbidities, and patients with both POAG and T2D (77 patients; Optical Coherence Tomography [OCT]). 3. Central Serous Chorioretinopathy Recurrence: A cohort to compare recurrent versus non-recurrent central serous chorioretinopathy (CSCR) patients (344 eyes, 255 patients; OCT and Fundus Autofluorescence [FAF]). The dataset supported both statistical and machine learning analyses to identify factors influencing recurrence, as well as deep learning predictions for recurrence. 4. Retinal Layer Thicknesses in Diabetic Patients: A cohort study to measure retinal layer thicknesses across several diabetic patient subgroups was conducted, including various stages of non-proliferative diabetic retinopathy (NPDR) and proliferative diabetic retinopathy (PDR), alongside control groups (127 NPDR type I patients, 49 NPDR type II, 19 NPDR type III, 176 PDR, 75,751 controls; [OCT]). 5. Geographic Atrophy Identification: A cohort capturing geographic atrophy in wet age-related macular degeneration (100 patients; [OCT]), including equal numbers of cases and controls. 6. Photoreceptor Imaging using Adaptive Optics: A cohort of cellular-resolution images of cone photoreceptors captured using Adaptive Optics Scanning Laser Ophthalmoscopy (AOSLO) technology (43 patients; [AOSLO] and [OCT]). 7. OphtalmoLaus cohort: A cohort including diverse imaging modalities (2208 patients; [OCT], [OCT Angiography], [Color Fundus Images (CFI)], and [iris photographs]). The Cohort Builder pipeline facilitated the extraction of 46 independent eye parameters, including layer thicknesses and disease biomarkers. 8. Ocular Genomics: A cohort comparing OCT-derived parameters from the UK biobank (N=88,248; [OCT] and [CFI]) for genomic analysis (Bergmann et al. 2023; Tomasoni et al. 2023). 4. Discussion One notable limitation of our study is the absence of implementation of Fast Health Interoperability Resources (FHIR) standards. FHIR, developed by the Health Level Seven International (HL7) healthcare standards organisation, aims to improve interoperability between disparate systems in healthcare data exchange. Given the well-established need for extensive datasets in successful machine learning methods, ensuring interoperability among various data resources becomes imperative. Therefore, implementing FHIR standards for storing and querying health records is essential for ensuring the long-term usability and effectiveness of the Cohort Builder pipeline. Furthermore, the CohortExtractor program has been primarily constructed in order to correspond and interact with our own hospital infrastructure. This implies that the system is specialised, and would require some effort in order to adapt to an alternative storage arrangement, or to implement interactions with an alternative software to RetinAI’s Discovery ® . Naturally, our system still serves as a strong foundational implementation for other institutions. Our study's foundations extend beyond individual institutions, offering broad-reaching impacts on clinical research methodologies and large-scale retrospective studies. Our primary objective is to create comprehensive and minimally biased patient cohorts while upholding the integrity and quality of electronic medical record (EMR) data. These advancements hold significant potential to bolster clinical research endeavours against the risks associated with incomplete or compromised datasets. Furthermore, the adoption of the innovative infrastructure developed in this project holds promise for addressing prevalent challenges across various healthcare settings. 5. Conclusion By acknowledging the critical importance of patient cohort analysis in clinical research for addressing pertinent questions within medical practice, we propose a modular software solution to address the fragmentation of medical data across disparate systems and the lack of a systematic approach to access and interoperability, ensuring effective utilisation of real-world data. Cohort Builder is a software pipeline designed to streamline the creation of patient cohorts integrating information on patient consent status, diagnoses from electronic medical records, and disease-critical biomarkers. The pipeline comprises three main modules: Cohort Planner, Cohort Extractor, and Cohort Labeller. Cohort Planner assists clinicians in estimating potential patient numbers and planning data extraction. Cohort Extractor automates the extraction of retinal biomarkers, streamlining cohort assembly, while Cohort Labeller facilitates expert labelling of patient datasets for AI algorithm training and potential future studies. Cohort Planner, Cohort Extractor, and Cohort Labeller form a robust pipeline that not only automates data preparation and processing but also improves the efficiency and accuracy of patient cohort creation and analysis in clinical research settings. Cohort Builder’s versatility extends its applicability beyond ophthalmology to other medical domains with similar requirements. Declarations Acknowledgements This work was supported by the Swiss Personalized Health Network (2018DRI13 to Thomas J. Wolfensberger). This work was supported by the Claire et Selma Kattenburg Foundation. References Al Kuwaiti, Ahmed K, Nazer A, Al-Reedy S, Al-Shehri A, Al-Muhanna AV, Subbarayalu DA, Muhanna, Fahad A, Al-Muhanna (2023) A Review of the Role of Artificial Intelligence in Healthcare. J Personalized Med 13(6). https://doi.org/10.3390/jpm13060951 Amiot V, Eyraud OJ-D-TP, Guex-Crosier Y, Bergin C, Anjos André (2023) Florence Hoogewoud, and Mattia Tomasoni. Fully Automatic Grading of Retinal Vasculitis on Fluorescein Angiography Time-Lapse from Real-World Data in Clinical Settings. In 2023 IEEE 36th International Symposium on Computer-Based Medical Systems (CBMS). IEEE. https://doi.org/10.1109/cbms58004.2023.00301 Badar M, Haris M, and Anam Fatima (2020) Application of Deep Learning for Retinal Image Analysis: A Review. Comput Sci Rev 35(February):100203 Bergin et al (2022) SOIN / MI Data Lab: Personalized Ophthalmology through Collaborative Data Collection and Dynamic Patient Consent. Proceedings of MIE2022 (in Press), May Bergmann S, Vela S, Beyeler M, Trofimova O, Tomasoni M, Iuliani I, Presby D, and Florence Hoogewoud (2023) Phenotypic and Genetic Characteristics of Retinal Vascular Parameters and Their Association with Diseases. October. https://doi.org/10.21203/rs.3.rs-3413660/v1 Bogunovic H, Venhuizen F, Klimscha S, Apostolopoulos S, Bab-Hadiashar A, Bagci U, Beg MF et al (2019) RETOUCH: The Retinal OCT Fluid Detection and Segmentation Benchmark and Challenge. IEEE Trans Med Imaging 38(8):1858–1874 Bohr A (2020) and Kaveh Memarzadeh. Chapter 2 - The Rise of Artificial Intelligence in Healthcare Applications. In Artificial Intelligence in Healthcare, edited by Adam Bohr and Kaveh Memarzadeh, 25–60. Academic Press Dai L, Wu L, Li H, Cai C, Wu Q, Kong H, Liu R et al (2021) A Deep Learning System for Detecting Diabetic Retinopathy across the Disease Spectrum. Nat Commun 12(1):3242 De Zanet, Sandro C, Ciller S, Wolf (2017) and Raphael Sznitman. Pathological OCT Retinal Layer Segmentation Using Branch Residual U-Shape Networks. Medical Image Computing and Computer Assisted Intervention – MICCAI 2017, 294–301 Diaz O, Kushibar K, Osuala R, Linardos A, Garrucho L, Igual L, Radeva P, Prior F, Polyxeni Gkontra, and Karim Lekadir (2021) Data Preparation for Artificial Intelligence in Medical Imaging: A Comprehensive Guide to Open-Access Platforms and Tools. Physica Medica: PM: An International Journal Devoted to the Applications of Physics to Medicine and Biology. Official J Italian Association Biomedical Phys 83(March):25–37 Hamet P, and Johanne Tremblay (2017) Artificial Intelligence in Medicine. Metab Clin Exp 69S(April):S36–40 Kahn CE Jr, Carrino JA, Flynn MJ, Peck DJ, Horii SC (2007) DICOM and Radiology: Past, Present, and Future. J Am Coll Radiology: JACR 4(9):652–657 Lawrence AK, Selter L, Frey U (2020) SPHN - The Swiss Personalized Health Network Initiative. Stud Health Technol Inform 270(June):1156–1160 Liu X, Ali TK, Singh P, Shah A, McKinney SM, Ruamviboonsuk P, Turner AW et al (2022) Deep Learning to Detect OCT-Derived Diabetic Macular Edema from Color Retinal Photographs: A Multicenter Validation Study. Ophthalmol Retina 6(5):398–410 Potapenko I, Thiesson B, Kristensen M, Hajari JN, Ilginis T, Fuchs J, Hamann S, Morten la Cour (2022) Automated Artificial Intelligence-Based System for Clinical Follow-up of Patients with Age-Related Macular Degeneration. Acta Ophthalmol 100(8):927–936 Ran A, Ran CY, Cheung X, Wang H, Chen L-Y, Luo PP, Chan, Mandy OM, Wong et al (2019) Detection of Glaucomatous Optic Neuropathy with Spectral-Domain Optical Coherence Tomography: A Retrospective Training and Validation Deep-Learning Analysis. The Lancet. Digit Health 1(4):e172–e182 Secinaro S, Calandra D, Secinaro A, Muthurangu V, and Paolo Biancone (2021) The Role of Artificial Intelligence in Healthcare: A Structured Literature Review. BMC Med Inf Decis Mak 21(1):125 Strickland NH (2000) PACS (picture Archiving and Communication Systems): Filmless Radiology. Arch Dis Child 83(1):82–86 Ting DS, Wei LR, Pasquale L, Peng JP, Campbell AY, Lee PA, Keane (2019) and Tien Yin Wong. Artificial Intelligence and Deep Learning in Ophthalmology. The British Journal of Ophthalmology 103 (2): 167–75 Tomasoni et al (2023) Genome-Wide Association Studies of Retinal Vessel Tortuosity Identify Numerous Novel Loci Revealing Genes and Pathways Associated With Ocular and Cardiometabolic Diseases. Ophthalmol Sci 3(3):100288 Willemink MJ, Wojciech A, Koszek C, Hardell J, Wu D, Fleischmann H, Harvey LR, Folio RM, Summers DL, Rubin, and Matthew P. Lungren (2020) Preparing Med Imaging Data Mach Learn Radiol 295(1):4–15 Xiong J, Li F, Song D, Tang G, He J, Gao K, Zhang H et al (2022) Multimodal Machine Learning Using Visual Fields and Peripapillary Circular OCT Scans in Detection of Glaucomatous Optic Neuropathy. Ophthalmology 129(2):171–180 Yellapragada B, Hornauer S, Snyder K, Stella Yu, and Glenn Yiu (2022) Self-Supervised Feature Learning and Phenotyping for Assessing Age-Related Macular Degeneration Using Retinal Fundus Images. Ophthalmol Retina 6(2):116–129 Yim J, Chopra R, Spitz T, Winkens J, Obika A, Kelly C, Askham H et al (2020) Predicting Conversion to Wet Age-Related Macular Degeneration Using Deep Learning. Nat Med 26(6):892–899 Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-4177057","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":284616102,"identity":"a8bff01b-3c64-401f-a690-f50a462961da","order_by":0,"name":"Sepehr Mousavi","email":"","orcid":"","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Sepehr","middleName":"","lastName":"Mousavi","suffix":""},{"id":284616103,"identity":"98ad82e4-e798-4ce2-b47f-bdf7dbfc9d74","order_by":1,"name":"Ali Garjani","email":"","orcid":"","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Ali","middleName":"","lastName":"Garjani","suffix":""},{"id":284616104,"identity":"c15badcb-73b5-4a00-8384-3fc2dfa3daaa","order_by":2,"name":"Adham Elwakil","email":"","orcid":"","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Adham","middleName":"","lastName":"Elwakil","suffix":""},{"id":284616105,"identity":"f55428ed-70f4-49c5-b672-63c6b0b0d7a2","order_by":3,"name":"Laurent Pierre Brock","email":"","orcid":"https://orcid.org/0009-0004-8343-0168","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Laurent","middleName":"Pierre","lastName":"Brock","suffix":""},{"id":284616106,"identity":"54d13fbf-13bf-4494-a7fc-3f2abd86aa54","order_by":4,"name":"Alexandre Pierre Dherse","email":"","orcid":"","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Alexandre","middleName":"Pierre","lastName":"Dherse","suffix":""},{"id":284616107,"identity":"091e98d6-e091-4385-bd04-09e166f854ac","order_by":5,"name":"Edwige Forestier","email":"","orcid":"","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Edwige","middleName":"","lastName":"Forestier","suffix":""},{"id":284616108,"identity":"6ce0361c-db02-411f-a55a-d145fc704664","order_by":6,"name":"Marine Palaz","email":"","orcid":"","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Marine","middleName":"","lastName":"Palaz","suffix":""},{"id":284616109,"identity":"4a51fd1c-053b-46bd-86a9-0a7f8289473a","order_by":7,"name":"Emilien Seiler","email":"","orcid":"","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Emilien","middleName":"","lastName":"Seiler","suffix":""},{"id":284616110,"identity":"fae58b73-4e43-4d90-b27a-731d8a528ed2","order_by":8,"name":"Alexia Duriez","email":"","orcid":"","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Alexia","middleName":"","lastName":"Duriez","suffix":""},{"id":284616111,"identity":"61650a3a-b45e-4bd3-9a0d-75770b21d2c9","order_by":9,"name":"Thibaud Martin","email":"","orcid":"","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Thibaud","middleName":"","lastName":"Martin","suffix":""},{"id":284616112,"identity":"28e98837-5e55-471f-b061-4135d1d518e1","order_by":10,"name":"Thomas Wolfensburger","email":"","orcid":"","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Thomas","middleName":"","lastName":"Wolfensburger","suffix":""},{"id":284616113,"identity":"02d894c0-a257-4c02-a38f-1a432334e242","order_by":11,"name":"Reinier Schlingemann","email":"","orcid":"https://orcid.org/0000-0002-2300-8289","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland; Department of Ophthalmology, Amsterdam University Medical Centres, Amsterdam, The Netherlands","correspondingAuthor":false,"prefix":"","firstName":"Reinier","middleName":"","lastName":"Schlingemann","suffix":""},{"id":284616114,"identity":"53a3a378-4b86-465b-a7ab-caab8ba2c392","order_by":12,"name":"Ilenia Meloni","email":"","orcid":"https://orcid.org/0000-0002-2268-9772","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":false,"prefix":"","firstName":"Ilenia","middleName":"","lastName":"Meloni","suffix":""},{"id":284616115,"identity":"8ed24f9c-b00b-4fb1-8884-02b9215c3254","order_by":13,"name":"Mattia Tomasoni","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA9ElEQVRIie3OsYrCQBCA4QkBbVa2kwkBfQIhIgQLH2aDYBrF7qpDUq1NvPqCj2Fj58qBNgFbwSYSsDYIx9mIGzgJFm5ai/2rHdiPGQCd7l1jxRMb1cAUYASq/6YRSIIP0iGiwsoJFAS8UBBHSVrT3TZJPmFC6z/pOVt2/bAqHLguXxM37svDNoDWfOBaUYyjkDBmzGIFETmpADoH5po1jqMVMGEaXEF2qSS3nPiXiyQ+ocdATfZyi8dzMnRsSRjBPpSQtP3tfaEVzYcfVsSxHeIJ1jPlYV6S/f32KLX9xTnjkyah4yy5Ksh/+DyKUqDT6XQ6ZXdBj1CagO9JHQAAAABJRU5ErkJggg==","orcid":"https://orcid.org/0000-0001-8775-2384","institution":"Department of Ophthalmology, University of Lausanne, Fondation Asile des Aveugles, Jules Gonin Eye Hospital, Lausanne, Switzerland","correspondingAuthor":true,"prefix":"","firstName":"Mattia","middleName":"","lastName":"Tomasoni","suffix":""}],"badges":[],"createdAt":"2024-03-27 15:09:42","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-4177057/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-4177057/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":53667602,"identity":"f4b5b2d6-cac0-4ebf-92ac-64789a103027","added_by":"auto","created_at":"2024-03-28 17:07:19","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":119733,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eOverview of the Cohort Builder software pipeline.\u003c/strong\u003e The pipeline comprises three main modules: Cohort Planner, Cohort Extractor, and Cohort Labeller. Cohort Planner assists clinicians in estimating potential patient numbers and planning data extraction. Cohort Extractor automates the extraction of retinal biomarkers, streamlining cohort assembly, while Cohort Labeller facilitates expert labelling of patient datasets for AI algorithm training and potential future studies.\u003c/p\u003e","description":"","filename":"1.png","url":"https://assets-eu.researchsquare.com/files/rs-4177057/v1/655be37559a59919c9a7ccf9.png"},{"id":53667601,"identity":"aea080bd-80a5-4131-b7f4-b4e206085821","added_by":"auto","created_at":"2024-03-28 17:07:19","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":172292,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eThe 2 main functionalities of Cohort Extractor: Uploading a cohort and downloading a cohort.\u003c/strong\u003e The main component of our pipeline is a module that streamlines the process of cohort assembly by performing the automatic extraction of raw imaging data retrieved from the machine databases and AI-assisted extraction of retinal biomarkers. It performs two main functionalities: uploading a cohort and downloading it.\u003c/p\u003e","description":"","filename":"2.png","url":"https://assets-eu.researchsquare.com/files/rs-4177057/v1/350b090e2b787a8c16ef5993.png"},{"id":53667923,"identity":"06f0ff5a-3d78-4966-bb78-0fbbba847daa","added_by":"auto","created_at":"2024-03-28 17:15:20","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":637804,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-4177057/v1/2b38f7dc-c819-476f-96f2-dcc75f516a3f.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003e\u003cstrong\u003eCohort Builder: A Software Pipeline for Generating Patient Cohorts with Predetermined Baseline Characteristics from Medical Records and Raw Ophthalmic Imaging Data\u003c/strong\u003e\u003c/p\u003e","fulltext":[{"header":"1. Introduction","content":"\u003cp\u003eThe advent of artificial intelligence (AI) and machine learning (ML) technologies heralds a new era in healthcare, offering unprecedented opportunities for advancements in diagnostics and patient care (Hamet and Tremblay 2017; Secinaro et al. \u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e2021\u003c/span\u003e; Bohr and Memarzadeh 2020). In particular, specialties that utilise image-based diagnostics, such as ophthalmology, have seen significant benefits from the integration of AI for disease detection, medical imaging analysis, and predictive health outcomes (Ting et al. \u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e2019\u003c/span\u003e; Badar, Haris, and Fatima 2020; Dai et al. \u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e2021\u003c/span\u003e; Liu et al. \u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e2022\u003c/span\u003e; Potapenko et al. \u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e2022\u003c/span\u003e; Ran et al. \u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e2019\u003c/span\u003e; Xiong et al. \u003cspan citationid=\"CR22\" class=\"CitationRef\"\u003e2022\u003c/span\u003e; Yellapragada et al. \u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e2022\u003c/span\u003e; Yim et al. \u003cspan citationid=\"CR24\" class=\"CitationRef\"\u003e2020\u003c/span\u003e). The capabilities of AI to support early disease detection, enhance the precision of medical image interpretations, disease prediction and evolution have been widely recognized (Al Kuwaiti et al. 2023). However, the practical application of AI in clinical practice is contingent upon the availability of extensive, well-organised datasets (Kahn et al. \u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e2007\u003c/span\u003e; Strickland \u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e2000\u003c/span\u003e).\u003c/p\u003e \u003cp\u003eThe segmentation of patient data across various storage systems, coupled with the ethical and regulatory challenges associated with using such data for research, poses significant hurdles. Existing literature acknowledges the arduous but critical steps required to prepare medical imaging data for AI analysis, emphasising the need for ethical approvals, data anonymization, quality assurance, and structured data storage to support AI training effectively (Willemink et al. \u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e2020\u003c/span\u003e; Diaz et al. \u003cspan citationid=\"CR10\" class=\"CitationRef\"\u003e2021\u003c/span\u003e). Nevertheless, there exists a discernible gap in research regarding the methodologies for consolidating disparate data sources for medical imaging AI applications.\u003c/p\u003e \u003cp\u003eThis paper presents Cohort Builder, a pipeline to collect ophthalmic medical data of consenting patients from different sources (such as machine databases and electronic health records), and generate user-defined datasets to target specific research questions. The Cohort Builder pipeline is built to serve the needs of ophthalmology, but its concept can be applied to other medical fields with similar requirements.\u003c/p\u003e \u003cp\u003eOur approach allows research funds and time to be allocated efficiently in the context of retrospective studies.\u003c/p\u003e"},{"header":"2. Methods","content":"\u003cp\u003eCohort Builder is a software pipeline designed to facilitate the creation of patient cohorts with predefined baseline characteristics from real-world ophthalmic imaging data. Due to its nature, it is comprised of the following elements:\u003c/p\u003e \u003cp\u003e \u003cb\u003eImage Management System\u003c/b\u003e \u003c/p\u003e \u003cp\u003eWe used the Discovery\u003csup\u003e\u0026reg;\u003c/sup\u003e software by RetinAI as an Image Management System and Image Viewer. It can automatically label and extract AI-based biomarkers (Bogunovic et al. \u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e2019\u003c/span\u003e; De Zanet et al. 2017) from medical image acquisitions. It also serves as a tool to perform automatic medical image segmentation, which allows monitoring of disease progression.\u003c/p\u003e \u003cp\u003e \u003cb\u003eDevelopment Process\u003c/b\u003e \u003c/p\u003e \u003cp\u003eThe development of the software pipeline followed an iterative process, which was adopted to incorporate feedback from clinicians and refine the software's features. Python is the sole programming language, and Linux the sole target operating system. However, one can communicate with a CohortBuilder server from any operating system. Agile methodologies facilitated coordination among team members, and maintenance of a coherent backlog.\u003c/p\u003e \u003cp\u003e \u003cb\u003eValidation\u003c/b\u003e \u003c/p\u003e \u003cp\u003eValidation and verification of the software pipeline were conducted to confirm its adherence to its predefined requirements and specifications to ensure the pipeline\u0026rsquo;s suitability to generate patient cohorts with predetermined baseline characteristics. For more details, see \u0026ldquo;Use Cases\u0026rdquo;.\u003c/p\u003e \u003cp\u003e \u003cb\u003ePerformance Evaluation\u003c/b\u003e \u003c/p\u003e \u003cp\u003eThe performance of the software pipeline was evaluated to assess its efficiency in handling data processing tasks. Quantitative measures such as speed, scalability, resource usage, and error rates were analysed to estimate the software's effectiveness. Benchmarking against established standards provided valuable insights into its comparative performance. These numbers are reported in our documentation, on our GitHub repository (see section Availability and Accessibility\u003cb\u003e).\u003c/b\u003e\u003c/p\u003e \u003cp\u003e \u003cb\u003eUser Interface\u003c/b\u003e \u003c/p\u003e \u003cp\u003eThe user interface for the system is a combination of a command-line interface for the \u0026ldquo;Upload\u0026rdquo; and \u0026ldquo;Download\u0026rdquo; functionalities of Cohort Extractor and a GUI for the Cohort Planner and Cohort Labeller modules implemented using Tableau products, which allow to generate data visualisations of underlying databases spreadsheets (see section Software Design and Architecture).\u003c/p\u003e \u003cp\u003e \u003cb\u003eDeployment\u003c/b\u003e \u003c/p\u003e \u003cp\u003eA first instance of the Cohort Builder Pipeline has been deployed on the servers of the Swiss Vaudois Hospitals Federation and made available to clinical researchers within the Jules-Gonin University Eye hospital (Lausanne). A second instance has been deployed on the servers of the Swiss Ophthalmic Imaging Network (SOIN) (Bergin et al. \u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e2022\u003c/span\u003e) and it is available to researchers and clinicians at partner institutions.\u003c/p\u003e \u003cp\u003e \u003cb\u003eEthical Considerations\u003c/b\u003e \u003c/p\u003e \u003cp\u003eEthical considerations pertaining to data privacy, security, and potential biases were addressed throughout the development process. The implementation of a general consent (GC) system at the Jules-Gonin University Eye hospital involved inviting 57,810 patients, including adults, legal representatives, and minors, to indicate their decision regarding the reuse of their health data for research purposes. As of the current date, we have received responses from 31,169 patients, among which 4,503 have declined permission for the reuse of their data. The status of each consent request is recorded and taken into account, serving as a valuable data source for Cohort Builder.\u003c/p\u003e \u003cp\u003e \u003cb\u003eAvailability and Accessibility\u003c/b\u003e \u003c/p\u003e \u003cp\u003eThe software, to which access is granted upon request, is available at \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://github.com/JulesGoninRIO/cohortbuilder\u003c/span\u003e\u003cspan address=\"https://github.com/JulesGoninRIO/cohortbuilder\" targettype=\"URL\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e.\u003c/p\u003e"},{"header":"3. Results","content":"\u003cp\u003eThe software pipeline is composed of three main modules: Cohort Planner, Cohort Extractor and Cohort Labeller (as shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e). Integration of these subcomponents enhances the overall functionality and effectiveness of the pipeline, enabling clinical researchers to efficiently extract, label, and assess patient data for research purposes while ensuring data quality and reliability.\u003c/p\u003e \u003cdiv id=\"Sec4\" class=\"Section2\"\u003e \u003ch2\u003e3.1 The Cohort Planner Module\u003c/h2\u003e \u003cp\u003eThis module allows clinical researchers to estimate the number of potential patients available for analysis based on selected inclusion and exclusion criteria. It assists in planning data extraction by providing an estimate of the sample size available for analysis.\u003c/p\u003e \u003cp\u003eCohortPlanner integrates practical statistical measures to enhance cohort utility. These measures include power calculations to determine sample size adequacy for planned cohorts and estimates of deviations from expected norms to assess the completeness and reliability of EMR data.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec5\" class=\"Section2\"\u003e \u003ch2\u003e3.2 The Cohort Extractor Module\u003c/h2\u003e \u003cp\u003eThe main component is a module that streamlines the process of cohort assembly.\u003c/p\u003e \u003cp\u003eThis is achieved by performing the automatic extraction of raw imaging data retrieved from the machine databases, as well as AI-assisted extraction of retinal biomarkers. It performs two main functionalities: uploading a cohort, and downloading it (as shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e).\u003c/p\u003e \u003cp\u003eThe process of \u0026ldquo;uploading\u0026rdquo; a cohort starts with the identification of patient groups based on specific diagnostic criteria. This can either be done directly via patient identifiers, or indirectly via selection criteria, such as age, gender, and more. Concurrently, patient consent for data usage is verified by querying the General consent database, ensuring compliance with privacy regulations and legal provisions on research involving human beings (HRA). Upon identification, the corresponding raw imaging data is gathered from a centralised image pool. Following this, imaging data is uploaded to an instance of Discovery\u003csup\u003e\u0026reg;\u003c/sup\u003e software by RetinAI. After having retrieved the resulting analysis, one can perform automated, integrated post-hoc analysis in order to validate or augment Discovery\u003csup\u003e\u0026reg;\u003c/sup\u003e \u0026lsquo;s data. At present, a machine learning model is used to further label gathered eye fundus images.\u003c/p\u003e \u003cp\u003eThe process of \u0026ldquo;downloading\u0026rdquo; a cohort involves the user specifying a configuration to define which image types and biomarkers are to be considered. The cohort is then downloaded from Discovery\u003csup\u003e\u0026reg;\u003c/sup\u003e to the local file system in a selective manner, based on the aforementioned configured study data.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec6\" class=\"Section2\"\u003e \u003ch2\u003e3.3 The Cohort Labeller Module\u003c/h2\u003e \u003cp\u003eDesigned to facilitate expert labelling of the extracted patient dataset, this software module enables clinical researchers and clinicians to systematically assess each patient's characteristics and label them according to the cohort they belong to or identify relevant biomarkers. These labelled datasets are crucial for training AI algorithms and can be reused for future studies.\u003c/p\u003e \u003cp\u003eCohort Labeller is an interactive tool that facilitates dynamic data interaction. This platform enables the visualisation of specific scans, segmentation of chosen parameters, and the distribution of crucial fluids (IRF, SRF) via histogram overlays. It has increased data labelling efficiency, allows for the integration of treatment histories within the analysis, and supports the selection of displayed parameters, significantly streamlining the interpretative process for medical professionals. Cohort Labeller increases the usability of longitudinal data for ophthalmological research, accentuating Cohort Builder's utility in fostering data-driven insights in clinical settings.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec7\" class=\"Section2\"\u003e \u003ch2\u003e3.4 The EMR Health Checker Module\u003c/h2\u003e \u003cp\u003eThis software module, separate from the rest of the pipeline, provides indicators of the reliability of certain fields within the Electronic Medical Record (EMR) database. It offers a description of the data quality, helping to estimate the reliability of the extracted cohorts.\u003c/p\u003e \u003cp\u003eThe main indicators are extracted from a registry of medical consultations, diagnoses, treatment plans, and surgical interventions, before being combined and evaluated. These indicators can also be utilised for training assistant clinicians and improving clinical practice.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec8\" class=\"Section2\"\u003e \u003ch2\u003e3.5 Use Cases\u003c/h2\u003e \n\u003cp\u003eThe Cohort Builder pipeline has played a crucial role in the formation of patient cohorts with specific baseline characteristics for a range of ophthalmology projects. This summary highlights its application across various studies, outlining the creation of cohorts for patient groups identified by particular ocular conditions under the Swiss Ophthalmic Imaging Network (SPHN) initiative (Lawrence, Selter, and Frey 2020).\u003c/p\u003e\n\u003cp\u003eKey applications of Cohort Builder included the creation of the following retrospective study cohorts. More information is available on the SOIN website at https://sphn.ch/network/projects/completed-projects_tiles/project-page_soin.\u003c/p\u003e\n\u003cp\u003e1. Grading of Uveitis Inflammation: A cohort to study inflammation in uveitis patients (3312 eyes; 534 patients; Fluorescein Angiography [FA]) (Amiot et al. 2023).\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e2. Comorbidity of Glaucoma and Diabetes: A cohort to compare patients with primary open-angle glaucoma (POAG) without other comorbidities, and patients with both POAG and T2D (77 patients; Optical Coherence Tomography [OCT]).\u003c/p\u003e\n\u003cp\u003e3. Central Serous Chorioretinopathy Recurrence: A cohort to compare recurrent versus non-recurrent central serous chorioretinopathy (CSCR) patients (344 eyes, 255 patients; OCT and Fundus Autofluorescence [FAF]). The dataset supported both statistical and machine learning analyses to identify factors influencing recurrence, as well as deep learning predictions for recurrence.\u003c/p\u003e\n\u003cp\u003e4. Retinal Layer Thicknesses in Diabetic Patients: A cohort study to measure retinal layer thicknesses across several diabetic patient subgroups was conducted, including various stages of non-proliferative diabetic retinopathy (NPDR) and proliferative diabetic retinopathy (PDR), alongside control groups (127 NPDR type I patients, 49 NPDR type II, 19 NPDR type III, 176 PDR, 75,751 controls; [OCT]).\u003c/p\u003e\n\u003cp\u003e5. Geographic Atrophy Identification: A cohort capturing geographic atrophy in wet age-related macular degeneration (100 patients; [OCT]), including equal numbers of cases and controls.\u003c/p\u003e\n\u003cp\u003e6. Photoreceptor Imaging using Adaptive Optics: A cohort of cellular-resolution images of cone photoreceptors captured using Adaptive Optics Scanning Laser Ophthalmoscopy (AOSLO) technology (43 patients; [AOSLO] and [OCT]).\u003c/p\u003e\n\u003cp\u003e7. OphtalmoLaus cohort: A cohort including diverse imaging modalities (2208 patients; [OCT], [OCT Angiography], [Color Fundus Images (CFI)], and [iris photographs]). The Cohort Builder pipeline facilitated the extraction of 46 independent eye parameters, including layer thicknesses and disease biomarkers.\u003c/p\u003e\n\u003cp\u003e8. Ocular Genomics: A cohort comparing OCT-derived parameters from the UK biobank (N=88,248; [OCT] and [CFI]) for genomic analysis (Bergmann et al. 2023; Tomasoni et al. 2023).\u003c/p\u003e"},{"header":"4. Discussion","content":"\u003cp\u003eOne notable limitation of our study is the absence of implementation of Fast Health Interoperability Resources (FHIR) standards. FHIR, developed by the Health Level Seven International (HL7) healthcare standards organisation, aims to improve interoperability between disparate systems in healthcare data exchange. Given the well-established need for extensive datasets in successful machine learning methods, ensuring interoperability among various data resources becomes imperative. Therefore, implementing FHIR standards for storing and querying health records is essential for ensuring the long-term usability and effectiveness of the Cohort Builder pipeline.\u003c/p\u003e \u003cp\u003eFurthermore, the CohortExtractor program has been primarily constructed in order to correspond and interact with our own hospital infrastructure. This implies that the system is specialised, and would require some effort in order to adapt to an alternative storage arrangement, or to implement interactions with an alternative software to RetinAI\u0026rsquo;s Discovery\u003csup\u003e\u0026reg;\u003c/sup\u003e. Naturally, our system still serves as a strong foundational implementation for other institutions.\u003c/p\u003e \u003cp\u003eOur study's foundations extend beyond individual institutions, offering broad-reaching impacts on clinical research methodologies and large-scale retrospective studies. Our primary objective is to create comprehensive and minimally biased patient cohorts while upholding the integrity and quality of electronic medical record (EMR) data. These advancements hold significant potential to bolster clinical research endeavours against the risks associated with incomplete or compromised datasets.\u003c/p\u003e \u003cp\u003eFurthermore, the adoption of the innovative infrastructure developed in this project holds promise for addressing prevalent challenges across various healthcare settings.\u003c/p\u003e"},{"header":"5. Conclusion","content":"\u003cp\u003eBy acknowledging the critical importance of patient cohort analysis in clinical research for addressing pertinent questions within medical practice, we propose a modular software solution to address the fragmentation of medical data across disparate systems and the lack of a systematic approach to access and interoperability, ensuring effective utilisation of real-world data.\u003c/p\u003e \u003cp\u003eCohort Builder is a software pipeline designed to streamline the creation of patient cohorts integrating information on patient consent status, diagnoses from electronic medical records, and disease-critical biomarkers. The pipeline comprises three main modules: Cohort Planner, Cohort Extractor, and Cohort Labeller. Cohort Planner assists clinicians in estimating potential patient numbers and planning data extraction. Cohort Extractor automates the extraction of retinal biomarkers, streamlining cohort assembly, while Cohort Labeller facilitates expert labelling of patient datasets for AI algorithm training and potential future studies.\u003c/p\u003e \u003cp\u003eCohort Planner, Cohort Extractor, and Cohort Labeller form a robust pipeline that not only automates data preparation and processing but also improves the efficiency and accuracy of patient cohort creation and analysis in clinical research settings. Cohort Builder\u0026rsquo;s versatility extends its applicability beyond ophthalmology to other medical domains with similar requirements.\u003c/p\u003e"},{"header":"Declarations","content":"\u003ch2\u003eAcknowledgements\u003c/h2\u003e \u003cp\u003eThis work was supported by the Swiss Personalized Health Network (2018DRI13 to Thomas J. Wolfensberger). This work was supported by the Claire et Selma Kattenburg Foundation.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\u003cli\u003e\u003cspan\u003eAl Kuwaiti, Ahmed K, Nazer A, Al-Reedy S, Al-Shehri A, Al-Muhanna AV, Subbarayalu DA, Muhanna, Fahad A, Al-Muhanna (2023) A Review of the Role of Artificial Intelligence in Healthcare. J Personalized Med 13(6). \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.3390/jpm13060951\u003c/span\u003e\u003cspan address=\"10.3390/jpm13060951\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAmiot V, Eyraud OJ-D-TP, Guex-Crosier Y, Bergin C, Anjos Andr\u0026eacute; (2023) Florence Hoogewoud, and Mattia Tomasoni. Fully Automatic Grading of Retinal Vasculitis on Fluorescein Angiography Time-Lapse from Real-World Data in Clinical Settings. In 2023 IEEE 36th International Symposium on Computer-Based Medical Systems (CBMS). IEEE. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.1109/cbms58004.2023.00301\u003c/span\u003e\u003cspan address=\"10.1109/cbms58004.2023.00301\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBadar M, Haris M, and Anam Fatima (2020) Application of Deep Learning for Retinal Image Analysis: A Review. Comput Sci Rev 35(February):100203\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBergin et al (2022) SOIN / MI Data Lab: Personalized Ophthalmology through Collaborative Data Collection and Dynamic Patient Consent. Proceedings of MIE2022 (in Press), May\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBergmann S, Vela S, Beyeler M, Trofimova O, Tomasoni M, Iuliani I, Presby D, and Florence Hoogewoud (2023) Phenotypic and Genetic Characteristics of Retinal Vascular Parameters and Their Association with Diseases. October. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003ehttps://doi.org/10.21203/rs.3.rs-3413660/v1\u003c/span\u003e\u003cspan address=\"10.21203/rs.3.rs-3413660/v1\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBogunovic H, Venhuizen F, Klimscha S, Apostolopoulos S, Bab-Hadiashar A, Bagci U, Beg MF et al (2019) RETOUCH: The Retinal OCT Fluid Detection and Segmentation Benchmark and Challenge. IEEE Trans Med Imaging 38(8):1858\u0026ndash;1874\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBohr A (2020) and Kaveh Memarzadeh. Chapter 2 - The Rise of Artificial Intelligence in Healthcare Applications. In Artificial Intelligence in Healthcare, edited by Adam Bohr and Kaveh Memarzadeh, 25\u0026ndash;60. Academic Press\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eDai L, Wu L, Li H, Cai C, Wu Q, Kong H, Liu R et al (2021) A Deep Learning System for Detecting Diabetic Retinopathy across the Disease Spectrum. Nat Commun 12(1):3242\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eDe Zanet, Sandro C, Ciller S, Wolf (2017) and Raphael Sznitman. Pathological OCT Retinal Layer Segmentation Using Branch Residual U-Shape Networks. Medical Image Computing and Computer Assisted Intervention\u0026thinsp;\u0026ndash;\u0026thinsp;MICCAI 2017, 294\u0026ndash;301\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eDiaz O, Kushibar K, Osuala R, Linardos A, Garrucho L, Igual L, Radeva P, Prior F, Polyxeni Gkontra, and Karim Lekadir (2021) Data Preparation for Artificial Intelligence in Medical Imaging: A Comprehensive Guide to Open-Access Platforms and Tools. Physica Medica: PM: An International Journal Devoted to the Applications of Physics to Medicine and Biology. Official J Italian Association Biomedical Phys 83(March):25\u0026ndash;37\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eHamet P, and Johanne Tremblay (2017) Artificial Intelligence in Medicine. Metab Clin Exp 69S(April):S36\u0026ndash;40\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eKahn CE Jr, Carrino JA, Flynn MJ, Peck DJ, Horii SC (2007) DICOM and Radiology: Past, Present, and Future. J Am Coll Radiology: JACR 4(9):652\u0026ndash;657\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLawrence AK, Selter L, Frey U (2020) SPHN - The Swiss Personalized Health Network Initiative. Stud Health Technol Inform 270(June):1156\u0026ndash;1160\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLiu X, Ali TK, Singh P, Shah A, McKinney SM, Ruamviboonsuk P, Turner AW et al (2022) Deep Learning to Detect OCT-Derived Diabetic Macular Edema from Color Retinal Photographs: A Multicenter Validation Study. Ophthalmol Retina 6(5):398\u0026ndash;410\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ePotapenko I, Thiesson B, Kristensen M, Hajari JN, Ilginis T, Fuchs J, Hamann S, Morten la Cour (2022) Automated Artificial Intelligence-Based System for Clinical Follow-up of Patients with Age-Related Macular Degeneration. Acta Ophthalmol 100(8):927\u0026ndash;936\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eRan A, Ran CY, Cheung X, Wang H, Chen L-Y, Luo PP, Chan, Mandy OM, Wong et al (2019) Detection of Glaucomatous Optic Neuropathy with Spectral-Domain Optical Coherence Tomography: A Retrospective Training and Validation Deep-Learning Analysis. The Lancet. Digit Health 1(4):e172\u0026ndash;e182\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSecinaro S, Calandra D, Secinaro A, Muthurangu V, and Paolo Biancone (2021) The Role of Artificial Intelligence in Healthcare: A Structured Literature Review. BMC Med Inf Decis Mak 21(1):125\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eStrickland NH (2000) PACS (picture Archiving and Communication Systems): Filmless Radiology. Arch Dis Child 83(1):82\u0026ndash;86\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eTing DS, Wei LR, Pasquale L, Peng JP, Campbell AY, Lee PA, Keane (2019) and Tien Yin Wong. Artificial Intelligence and Deep Learning in Ophthalmology. The British Journal of Ophthalmology 103 (2): 167\u0026ndash;75\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eTomasoni et al (2023) Genome-Wide Association Studies of Retinal Vessel Tortuosity Identify Numerous Novel Loci Revealing Genes and Pathways Associated With Ocular and Cardiometabolic Diseases. Ophthalmol Sci 3(3):100288\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eWillemink MJ, Wojciech A, Koszek C, Hardell J, Wu D, Fleischmann H, Harvey LR, Folio RM, Summers DL, Rubin, and Matthew P. Lungren (2020) Preparing Med Imaging Data Mach Learn Radiol 295(1):4\u0026ndash;15\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eXiong J, Li F, Song D, Tang G, He J, Gao K, Zhang H et al (2022) Multimodal Machine Learning Using Visual Fields and Peripapillary Circular OCT Scans in Detection of Glaucomatous Optic Neuropathy. Ophthalmology 129(2):171\u0026ndash;180\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eYellapragada B, Hornauer S, Snyder K, Stella Yu, and Glenn Yiu (2022) Self-Supervised Feature Learning and Phenotyping for Assessing Age-Related Macular Degeneration Using Retinal Fundus Images. Ophthalmol Retina 6(2):116\u0026ndash;129\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eYim J, Chopra R, Spitz T, Winkens J, Obika A, Kelly C, Askham H et al (2020) Predicting Conversion to Wet Age-Related Macular Degeneration Using Deep Learning. Nat Med 26(6):892\u0026ndash;899\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"Hôpital Ophtalmique Jules-Gonin","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Clinical Research, Retrospective Study Planning, Data Engineering, Ophthalmology, Real-world data","lastPublishedDoi":"10.21203/rs.3.rs-4177057/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-4177057/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eIn clinical research, the analysis of patient cohorts is a widely employed method for investigating relevant questions in healthcare. Furthermore, the availability of large-scale datasets opens the way for the integration of AI models into clinical practices. The ability to extract appropriate patient cohorts and large-scale datasets from hospital databases is vital in order to unlock the potential of real-world data collected in clinics and answer pivotal medical questions through retrospective studies. However, existing medical data is often dispersed across various systems and databases, preventing a systematic approach allowing access and interoperability. Even when the data are readily accessible, researchers need to systematically combine them to form study-specific cohorts with predefined baseline characteristics, tailored to answer specific research inquiries. This process is costly, repetitive, and error-prone, as it requires sifting through Electronic Medical Records, confirming ethical approval, verifying status of patient consent, checking the availability of imaging data, and filtering based on disease-specific image biomarkers. Our objective is to give the ability to craft study-specific patient cohorts to clinical researchers through an automated data preparation and processing pipeline. We present Cohort Builder, a software pipeline designed to facilitate the creation of patient cohorts with predefined baseline characteristics from real-world ophthalmic imaging data and electronic medical records. The applicability of our approach extends beyond ophthalmology to other medical domains with similar requirements such as neurology, cardiology and orthopaedics.\u003c/p\u003e","manuscriptTitle":"Cohort Builder: A Software Pipeline for Generating Patient Cohorts with Predetermined Baseline Characteristics from Medical Records and Raw Ophthalmic Imaging Data","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2024-03-28 17:07:15","doi":"10.21203/rs.3.rs-4177057/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"14d63ade-d141-4b81-ae8c-b98871122bf7","owner":[],"postedDate":"March 28th, 2024","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":29961985,"name":"Ophthalmology"},{"id":29961986,"name":"Hospital Medicine"},{"id":29961987,"name":"Computational Biology"},{"id":29961988,"name":"Artificial Intelligence and Machine Learning"}],"tags":[],"updatedAt":"2024-03-28T17:07:15+00:00","versionOfRecord":[],"versionCreatedAt":"2024-03-28 17:07:15","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-4177057","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-4177057","identity":"rs-4177057","version":["v1"]},"buildId":"qtupq5eGEP_6zYnWcrvyt","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.