opensafely / os-sch-children-2021

update of risk of covid outcome associated with living with kids
MIT License
0 stars 2 forks source link

Nit: Blood pressure expected values #9

Open CarolineMorton opened 3 years ago

CarolineMorton commented 3 years ago

Diastolic and systolic BP are switched around in expected values. i.e. 80 for systolic, and 120 for diastolic. This should be the other way round:

    # Blood pressure
    bp_sys=patients.mean_recorded_value(
        systolic_blood_pressure_codes,
        on_most_recent_day_of_measurement=True,
        on_or_before="2020-12-20",
        include_measurement_date=True,
        include_month=True,
        return_expectations={
            "float": {"distribution": "normal", "mean": 80, "stddev": 10},
            "date": {"latest": "2020-12-19"},
            "incidence": 0.95,
        },
    ),

    bp_dias=patients.mean_recorded_value(
        diastolic_blood_pressure_codes,
        on_most_recent_day_of_measurement=True,
        on_or_before="2020-12-20",
        include_measurement_date=True,
        include_month=True,
        return_expectations={
            "float": {"distribution": "normal", "mean": 120, "stddev": 10},
            "date": {"latest": "2020-12-19"},
            "incidence": 0.95,
        },
    ),
hjforbes commented 3 years ago

Amended, thanks