We performed a secondary analysis of data from the B-positive cohort project, a prospective study of pregnant women and their infants at a primary care maternity facility (Gugulethu Midwife Obstetric Unit [GMOU]) in Cape Town. The B-positive project aimed to comprehensively assess the effect of the World Health Organization (WHO) prevention of vertical transmission of HIV Option B + policy in the Western Cape province, South Africa. Between January 2017 and July 2018, consecutive pregnant women aged ≥ 18 years, living with and without HIV were enrolled at their first antenatal visit to GMOU. Participants attended up to three antenatal study visits depending on the gestational age at enrolment, and four post-natal study visits. At each visit, data were collected on medicine use, nutrition and food security, mental and physical health, and combination antiretroviral therapy (ART) use and adherence in women living with HIV (WLHIV). Baseline demographic and medical information was elicited at the first visit. Data were collected using standardized questionnaires by trained study field-workers and entered onto a REDCap database. Only the data on antenatal medicine use were used here. We did not assess adherence to ART or other medicines, a limitation which is noted below.
The suburb of Gugulethu has high levels of poverty and an antenatal HIV prevalence of approximately 30% . GMOU is a midwife-run public sector health care facility that provides antenatal care and manages uncomplicated deliveries. If clinically indicated, women are referred to public hospitals at any stage during pregnancy or the peripartum period. Participants were enrolled at GMOU and continued follow-up regardless of referral. In South Africa, obstetric care is free at public sector facilities; most women attend at least one antenatal visit and deliver at a health care facility. Midwives are able to prescribe and dispense supplements (iron and folate), antibiotics for the treatment of urinary tract and sexually-transmitted infections and ART. In line with WHO guidelines, regular HIV screening is offered throughout pregnancy and breast-feeding. All WLHIV are initiated on life-long ART.
Antenatal medicine use was collected by standardized interviewer-administered questionnaires at up to three visits and aimed to elicit a comprehensive report of medicine use during the preceding periods (Supplementary File 1). Women were asked to recall all prescription medication, OTC medicines and remedies, and traditional and herbal treatments. The source of medication was determined (clinic, hospital, pharmacy, grocery stores, traditional healers, spiritual healers, family and friends). Participants were asked about treatments for chronic medical conditions (e.g., HIV, hypertension, cardiac, endocrine, psychiatric conditions) and treatments for intercurrent infections (e.g., tuberculosis, sexually transmitted infections [STI], urinary tract infections.) They were asked to report on symptoms per organ system and, if present, whether they had taken any medicine or remedy to alleviate these. This combination of open-ended questions followed by specific indication-orientated and medicine-orientated enquiries has been shown to optimize response for medicine use collected at interview . Medicine names and tradenames were recorded. Medicine Identification Aids with photographs of common packaging and formulations were available to the interviewers. Data from the interviews were entered into a REDCap [12, 13] database using a unique study number.
The Maternity Case Record (MCR) is a patient-held document that records all clinical consultations and investigations relating to pregnancy and delivery in the public sector in South Africa. From the first antenatal visit, the MCR documents medical conditions and current medication use elicited from the woman during the consultation by the midwife. It is updated by the attending clinician (midwife or doctor) at all subsequent visits and is retained at the site of delivery. The Western Cape Pregnancy Exposure Registry (PER) was established at GMOU in 2016 and digitized data elements from the MCR, including medicine use . Registry data were entered electronically using the primary care information system which is standard in the public health facilities in the province. Women entered the Registry at their first visit to GMOU. Data were updated from the MCR after pregnancy outcome. Syndromic treatment for STI was entered from the STI register at GMOU, a paper register which documents ward-stock dispensing for vaginal discharge and genital ulcer syndromes, syphilis and vaginal candida infections. Ward stock is bulk medicine stock received by the facility; dispensing is not recorded electronically against a patient name. The Registry served as the data source for clinician records for the cohort.
Electronic dispensing records
The Western Cape Provincial Health Data Centre (PHDC) is a health information exchange leveraged on a unique patient identifier which is used in all public sector health services in the Western Cape province . The PHDC curates dispensing data from electronic pharmacy systems (outpatient and inpatient) and was the source of the EDR. Medicines that are prescribed but not collected were not included; nor were medicines dispensed directly as ward-stock, or OTC medication. The indication for the prescription was not recorded.
The PER and PHDC are resources of the Western Cape Provincial Government and fall within its ethical and legal authority. The relevant datasets were requested and issued to the investigators under the study number; no identifiers were included.
Anatomical therapeutic chemical classification
The Anatomical Therapeutic Chemical (ATC) classification is an international classification system maintained by the WHO which assigns an alphanumeric code to medicines . There are five levels of coding describing organ system, therapeutic, pharmacological, and chemical properties. The medicines in each dataset were coded as far as possible using the ATC system. The Herbal ATC classification  is a similar system that codes herbal remedies by indication for use. We were unable to apply this system to the traditional and complementary products in this study as 1) the indication for use was not universally available; and 2) not all the agents contained herbal elements. For these analyses we included all traditional and complementary medicines and remedies as a single category: traditional, complementary, and alternative medication (TCAM). If there was no evidence of medicine use in a dataset, this was categorized as none.
We combined all three datasets into a Master List which provided a comprehensive record of all medicines taken per participant classified by ATC, or as TCAM or none. Each medicine appeared only once per participant regardless of how many times it was reported during pregnancy or whether it was reported in one, two, or all three datasets.
The groups within ATC level 1 are too diverse to analyze as aggregates, therefore analyses were performed at ATC level 2 (pharmacological or therapeutic subgroups) for all medicines. Agents commonly used at level 2 (i.e., > 10% in the Master List) as well as ART (J05), combination therapy for tuberculosis treatment, isoniazid (J04AC01) for tuberculosis preventive therapy (TBPT) in WLHIV, antidiabetic agents (A10) and known teratogens (e.g., anti-epileptics, psycholeptics) were analyzed at the 5th ATC level. For these analyses, ATC codes less than level 5 were excluded to prevent misclassification. ART was prescribed per the South African Guideline for the Prevention of Mother to Child Transmission of Communicable Diseases: 1st line regimen comprising a two-drug nucleotide reverse transcriptase (NRTI) backbone with a non-nucleotide reverse transcriptase inhibitor; and 2nd line regimen, an NRTI backbone with a protease inhibitor . ART was regarded as a single product. Based on syndromic management guidelines , treatment for STI was classified as metronidazole (P01AB01) alone or with/without azithromycin (J01FA10) and/or amoxicillin (J01CA04) and/or ceftriaxone (J01DD04); or ceftriaxone alone. Intramuscular benzathine penicillin (J01CE08) treatment for syphilis was classified separately. In addition, iron, folate (B03) and combination vitamin agents (A11, A12) were grouped in the single category of vitamins and supplements.
Data were analyzed using STATA 15 (College Station, TX: StataCorp LP). Continuous demographic variables were summarized using medians and interquartile ranges (IQR). Categorical variables were described using proportions and compared using frequency tables. Venn diagrams graphically described the overlap between the three data sources for selected categories .
Cohen’s kappa with 95% CI was used to evaluate the agreement between the three datasets. Kappa values were interpreted using the Landis and Koch categories : almost perfect (> 0.80), substantial (0.61 – 0.80), moderate (0.41 – 0.60), fair (0.21 – 0.40), slight (0.00 – 0.20), and poor (< 0.00). The performance of Cohen’s kappa calculations is affected by prevalence (being less reliable at low prevalence) and we also reported Prevalence and Bias-adjusted Kappa (PABAK) which assumes a prevalence of 50% and an absence of bias.
For medicine categories sufficiently represented in each of the data sources, Latent Class Analysis (LCA) was used to estimate the ‘true’ prevalence of use and the sensitivity, specificity and positive predictive value (PPV) of each data source in absence of recognized gold standard . For each category, we considered a two-classes LCA model with the presence/absence of the medication in each of the three sources as observed variables. We fitted the models by penalized maximum likelihood and used the χ2 goodness-of-fit (GOF) test to assess the assumption of conditional independence implicit in the model. As the use of the theorical χ2 distribution is not warranted when data are sparse (as in our case), we applied the empirical distribution of the test statistics to calculate the p-value for the GOF. We obtained the empirical distribution by generating 4000 samples from the null assumption of perfect fit and computing the corresponding statistic at each iteration . Estimated model parameters were used to calculate the statistics of interest and the quantified uncertainty by means and 95% CI (bootstrapped with 4000 samples). R statistical software v. 4.1 (Vienna, Austria: R Foundation for Statistical Computing) and the R package random LCA  were used for the LCA calculations.
The parent and sub-studies were approved by the University of Cape Town Human Research Ethics Committee (REF 541/2015, 749/2015 and 197/2020) and the Western Cape Government Department of Health Provincial Health Research Committee (REF WC_2016RP6_286). All women provided informed consent including for access of their clinical records and linked electronic health information.