Data Availability
All data were linked, stored and analysed securely within the OpenSAFELY platform (https://opensafely.org/), a data analytics platform created with the approval of NHS England to address urgent COVID-19 research questions. Patient data has been pseudonymised for analysis and linkage using industry standard cryptographic hashing techniques; all pseudonymised datasets transmitted for linkage onto OpenSAFELY are encrypted; access to the platform is via a virtual private network (VPN) connection, restricted to a small group of researchers; the researchers hold contracts with NHS England and only access the platform to initiate database queries and statistical models; all database activity is logged; only aggregate statistical outputs leave the platform environment following best practice for anonymisation of results such as statistical disclosure control for low cell counts. The aggregate statistical outputs are available online: https://github.com/opensafely/OS_OC_v001-research/tree/release-candidates/released_outputs. Similarly, the analytical codebase used in this study is openly available for inspection and re-use at https://github.com/opensafely/OS_OC_v001-research. All codelists used are openly available at OpenSAFELY Codelists (https://www.opencodelists.org/codelist/user/martinaf/online-consultations-snomed-v01/28bba9bc/). Detailed pseudonymised patient data is potentially re-identifiable and therefore not shared. The queried pseudonymised records are available through the OpenSAFELY framework. Further details on our information governance can be found under information governance and ethics.