Skip to contents

A patient is metformin-only prediabetes / PCOS when ALL hold: (1) a prediabetes or PCOS condition, (2) metformin exposure, (3) NO other diabetes drug (insulins, sulfonylureas, ... and every metformin combination product), and (4) NO diabetes mellitus condition. The legacy study excluded these patients (all their encounters) through a per-site file produced upstream; this builds the same set from OMOP so it can be validated against that file.

Usage

find_metformin_only_prediabetes_pcos(con, pcos = "icd10", schema = NULL)

Arguments

con

A DBI connection to an OMOP DuckDB.

pcos

PCOS concept set: "icd10" (default), "snomed" or "both".

schema

Optional schema holding the CDM tables.

Value

A data frame with person_id, has_prediabetes and has_pcos.

Details

Concept sets (ids checked against an Athena vocabulary; descendants come from concept_ancestor): prediabetes = 37018196 / 40316773 / 37201113 and source value R73.03; PCOS "icd10" = 40443308 / 35206936 and source value E28.2, "snomed" = 36683296 / 195501 (SNOMED 69878008, "Polycystic ovary"), "both" = all; metformin = RxNorm ingredient 6809 (1503297) and descendants, or the words metformin / glucophage in drug_source_value; other diabetes drug = ATC A10 (21600712) descendants that are not ATC A10BA biguanides (21600745), so a metformin combination counts as another drug, or other diabetes drug names in drug_source_value; diabetes = 201820 and descendants, or ICD-9 249/250 / ICD-10 E08-E13 source values. The whole history is used. Without a usable concept_ancestor the concept sets shrink to the listed ids and the source-value patterns, with a warning.