Skip to contents

This function determines the controlled hypertension status of a respondent based on their adjusted systolic and diastolic blood pressure measurements and medication usage.

Usage

determine_controlled_adjusted_hypertension(
  SBP_adj,
  DBP_adj,
  ANYMED2,
  CCC_32 = 2,
  CARDIOV = 2,
  DIABX = 2,
  CKD = 2
)

Arguments

SBP_adj

integer An integer representing the adjusted systolic blood pressure measurement of the respondent.

DBP_adj

integer An integer representing the adjusted diastolic blood pressure measurement of the respondent.

ANYMED2

integer An integer indicating whether the respondent is on medication for hypertension.

  • 1: Yes

  • 0: No

CCC_32

integer An optional integer indicating whether the respondent is actually on medication for hypertension.

  • 1: Yes

  • 2: No (default)

CARDIOV

integer An optional integer indicating the presence of cardiovascular disease, affecting medication status.

  • 1: Yes

  • 2: No (default)

DIABX

integer An optional integer indicating the presence of diabetes, affecting blood pressure thresholds.

  • 1: Yes

  • 2: No (default)

CKD

integer An optional integer indicating the presence of chronic kidney disease, affecting blood pressure thresholds.

  • 1: Yes

  • 2: No (default)

Value

integer The hypertension status:

  • 1: Hypertension controlled (BP < 140/90 mmHg (or < 130/80 mmHg if diabetes or CKD) when on hypertension medication)

  • 2: Hypertension not controlled (BP >= 140/90 mmHg (or >= 130/80 mmHg if diabetes or CKD) when on hypertension medication)

  • haven::tagged_na("a"): Not applicable

  • haven::tagged_na("b"): Missing

Details

This function assesses whether a respondent's hypertension is controlled using adjusted BP values:

     **Control Thresholds:**
     - General population: < 140/90 mmHg
     - Diabetes or CKD patients: < 130/80 mmHg

     **Logic:**
     - Only applies to respondents taking hypertension medication.
     - If adjusted BP is below the threshold, hypertension is "controlled" (1).
     - If adjusted BP is at or above the threshold, it is "not controlled" (2).

     **Missing Data Codes:**
     - `SBP_adj`, `DBP_adj`:
       - `996`: Valid skip. Handled as `haven::tagged_na("a")`.
       - `997-999`: Don't know, refusal, or not stated. Handled as `haven::tagged_na("b")`.
     - `ANYMED2`:
       - Tagged NA "a": Valid skip.
       - Tagged NA "b": Don't know, refusal, or not stated.
     - `CCC_32`, `CARDIOV`, `DIABX`, `CKD`:
       - `6`: Valid skip. Handled as `haven::tagged_na("a")`.
       - `7-9`: Don't know, refusal, or not stated. Handled as `haven::tagged_na("b")`.

See also

determine_controlled_hypertension() for controlled status with unadjusted BP

Examples

# Scalar usage: Single respondent
# Example 1: Respondent has adjusted SBP = 150, adjusted DBP = 95, and on medication.
determine_controlled_adjusted_hypertension(SBP_adj = 150, DBP_adj = 95, ANYMED2 = 1)
#> [1] 2
# Output: 2 (Hypertension not controlled due to high adjusted SBP and DBP despite medication usage).

# Example 2: Respondent has adjusted SBP = 120, adjusted DBP = 80, and on medication.
determine_controlled_adjusted_hypertension(SBP_adj = 120, DBP_adj = 80, ANYMED2 = 1)
#> [1] 1
# Output: 1 (Hypertension controlled as adjusted BP is below 140/90 mmHg and on medication).

# Example 3: Respondent has non-response BP values of 996 for both systolic and diastolic.
result <- determine_controlled_adjusted_hypertension(SBP_adj = 996, DBP_adj = 996, ANYMED2 = 0)
result # Shows: NA
#> [1] 2
haven::is_tagged_na(result, "a") # Shows: TRUE (confirms it's tagged NA(a))
#> [1] FALSE
format(result, tag = TRUE) # Shows: "NA(a)" (displays the tag)
#> [1] "2"

# Multiple respondents
determine_controlled_adjusted_hypertension(
  SBP_adj = c(150, 120, 135), DBP_adj = c(95, 80, 85),
  ANYMED2 = c(1, 1, 1), DIABX = c(2, 2, 1)
)
#> [1] 2 1 2
# Returns: c(2, 1, 2)