ALGAE Testing Part 3: Study Member Features

An automated protocol for assigning early life exposures to longitudinal cohort studies

Testing Part 3: Study Member Features

by Kevin Garwood

Testing Overview Previous Next

Background

This area describes features that are related to calculating life stages and for indicating the data quality of residential address histories. Because of limited resources, we only tested the features in the early life analysis. However, apart from the need to handle trimester boundaries for prematurely born study members, these variables are handled in the same way across analyses.

Tests relating to life stage calculations include: birth dates that are chosen in order to make a life stage include a leap year day; blank gestation-age-at-birth values to test that imputation works; and gestation-age-at-birth values that test whether the protocol correctly calculates the boundaries of Trimester 2 and Trimester 3 for prematurely born study members.

The tests also assess whether the protocol correctly preserves the absent_during_exp_period and at_1st addr_conception fields found in the staging_study_member_data table.

If the tests for this area pass, then test cases in the address history and exposure areas can assume that the temporal boundaries of the exposure time frame and of individual life stages have been done correctly.

This area describes features that mainly relate to calculations of life stages. It also ensures that the absent_during_exp_period and at_1st_addr_conception flags found in the table staging_study_member_data also appear in the sensitivity variable table early_sens_variables.

Coverage

Input Fields Covered by Test Cases

Table Field
staging_study_member_data birth_date
staging_study_member_data gestation_age_at_birth

Output Fields Covered by Test Cases

Table Field
early_sens_variables gestation_age_at_birth
early_sens_variables is_gestation_age_imputed
early_sens_variables absent_during_exp_period
early_sens_variables at_1st_addr_conception
early_life_stages life_stage
early_life_stages start_date
early_life_stages end_date
early_life_stages life_stage_duration

Test Case Design

Check that absent_during_exp_period and at_1st_addr_conception appear in the sensitivity variables

These fields appear in the original_study_member_data file and are later standardised when they are copied to the staging table staging_study_member_data. The flags are not used to compute any exposures, but they are preserved in the sensitivity variables to allow researchers to relate exposures with these data quality variables. These two flags first appear in original_study_member_data

Use a study member who has a missing gestation-age-at-birth value

The protocol needs to show that it can change any blank estimated_gestation_age values in the staging_study_member_data table. By default, the protocol will replace any blank with 38 (weeks).

Develop a test case that considers leap years to calculate life stage durations

A test study member has a birth date of November 18, 1991 so that Trimester 2 will span a leap year day of February 29, 1992. The test confirms that the protocol will still correctly calculate the duration and boundaries of all life stages used in the exposure time frame.

Include a study member who has a typical gestation-age-at-birth value

Testing efforts should be able to show that the protcol correctly processes a typical estimated_gestation_age field value in the table staging_study_member_data.

Use prematurely-born study members to test cleaning features for Trimester 2 and Trimester 3

The boundaries of early life stage boundaries are usually made in relation to the number of days from conception date, which in turn will depend on the gestation-age-at-birth values. Very low values for gestation age can cause the boundaries of T2 and T3 to overlap with the first year of life. In some cases, there will be no T3 and in others, the end date of T2 will need to be adjusted so that it ends the day before the birth date. The test cases need scenarios where study members have 23, 25, and 26 weeks, which can show these problems.