From ffe31e01410313f2d0bf75cdd257ec5146226775 Mon Sep 17 00:00:00 2001 From: fbraza Date: Sat, 19 Jul 2025 13:05:11 +0200 Subject: [PATCH 1/4] test: expand SCORE2 test coverage with diverse patient profiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add test data for non-smokers (male and female patients) - Add test data for different age ranges (40, 45, 49, 50, 55, 60, 65, 69) - Include tests for all risk categories (Low to moderate, High, Very high) - Update risk value rounding to 2 decimal places for consistency - Fixes #7 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode --- tests/inputs/test__input__patient_27.json | 35 +++++++++++++++++++++ tests/inputs/test__input__patient_28.json | 35 +++++++++++++++++++++ tests/inputs/test__input__patient_29.json | 35 +++++++++++++++++++++ tests/inputs/test__input__patient_30.json | 35 +++++++++++++++++++++ tests/inputs/test__input__patient_31.json | 35 +++++++++++++++++++++ tests/inputs/test__input__patient_32.json | 35 +++++++++++++++++++++ tests/inputs/test__input__patient_33.json | 35 +++++++++++++++++++++ tests/inputs/test__input__patient_34.json | 35 +++++++++++++++++++++ tests/inputs/test__input__patient_35.json | 35 +++++++++++++++++++++ tests/inputs/test__input__patient_36.json | 35 +++++++++++++++++++++ tests/outputs/test__output__patient_27.json | 35 +++++++++++++++++++++ tests/outputs/test__output__patient_28.json | 35 +++++++++++++++++++++ tests/outputs/test__output__patient_29.json | 35 +++++++++++++++++++++ tests/outputs/test__output__patient_30.json | 35 +++++++++++++++++++++ tests/outputs/test__output__patient_31.json | 35 +++++++++++++++++++++ tests/outputs/test__output__patient_32.json | 35 +++++++++++++++++++++ tests/outputs/test__output__patient_33.json | 35 +++++++++++++++++++++ tests/outputs/test__output__patient_34.json | 35 +++++++++++++++++++++ tests/outputs/test__output__patient_35.json | 35 +++++++++++++++++++++ tests/outputs/test__output__patient_36.json | 35 +++++++++++++++++++++ tests/test_score2.py | 10 ++++++ vitals/score2/compute.py | 2 +- 22 files changed, 711 insertions(+), 1 deletion(-) create mode 100644 tests/inputs/test__input__patient_27.json create mode 100644 tests/inputs/test__input__patient_28.json create mode 100644 tests/inputs/test__input__patient_29.json create mode 100644 tests/inputs/test__input__patient_30.json create mode 100644 tests/inputs/test__input__patient_31.json create mode 100644 tests/inputs/test__input__patient_32.json create mode 100644 tests/inputs/test__input__patient_33.json create mode 100644 tests/inputs/test__input__patient_34.json create mode 100644 tests/inputs/test__input__patient_35.json create mode 100644 tests/inputs/test__input__patient_36.json create mode 100644 tests/outputs/test__output__patient_27.json create mode 100644 tests/outputs/test__output__patient_28.json create mode 100644 tests/outputs/test__output__patient_29.json create mode 100644 tests/outputs/test__output__patient_30.json create mode 100644 tests/outputs/test__output__patient_31.json create mode 100644 tests/outputs/test__output__patient_32.json create mode 100644 tests/outputs/test__output__patient_33.json create mode 100644 tests/outputs/test__output__patient_34.json create mode 100644 tests/outputs/test__output__patient_35.json create mode 100644 tests/outputs/test__output__patient_36.json diff --git a/tests/inputs/test__input__patient_27.json b/tests/inputs/test__input__patient_27.json new file mode 100644 index 0000000..8c2f500 --- /dev/null +++ b/tests/inputs/test__input__patient_27.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P027-2024-027", + "sex": "female", + "timestamp": "2024-07-04T14:00:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age": { + "value": 55, + "unit": "years" + }, + "smoking": { + "value": false, + "unit": "yes/no" + }, + "systolic_blood_pressure": { + "value": 125, + "unit": "mmHg" + }, + "total_cholesterol": { + "value": 5.2, + "unit": "mmol/L" + }, + "hdl_cholesterol": { + "value": 1.6, + "unit": "mmol/L" + }, + "is_male": { + "value": false, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/inputs/test__input__patient_28.json b/tests/inputs/test__input__patient_28.json new file mode 100644 index 0000000..837f9c3 --- /dev/null +++ b/tests/inputs/test__input__patient_28.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P028-2024-028", + "sex": "male", + "timestamp": "2024-07-04T14:15:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age": { + "value": 45, + "unit": "years" + }, + "smoking": { + "value": false, + "unit": "yes/no" + }, + "systolic_blood_pressure": { + "value": 130, + "unit": "mmHg" + }, + "total_cholesterol": { + "value": 5.8, + "unit": "mmol/L" + }, + "hdl_cholesterol": { + "value": 1.3, + "unit": "mmol/L" + }, + "is_male": { + "value": true, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/inputs/test__input__patient_29.json b/tests/inputs/test__input__patient_29.json new file mode 100644 index 0000000..c9ded57 --- /dev/null +++ b/tests/inputs/test__input__patient_29.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P029-2024-029", + "sex": "male", + "timestamp": "2024-07-04T14:30:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age": { + "value": 40, + "unit": "years" + }, + "smoking": { + "value": true, + "unit": "yes/no" + }, + "systolic_blood_pressure": { + "value": 135, + "unit": "mmHg" + }, + "total_cholesterol": { + "value": 6.0, + "unit": "mmol/L" + }, + "hdl_cholesterol": { + "value": 1.2, + "unit": "mmol/L" + }, + "is_male": { + "value": true, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/inputs/test__input__patient_30.json b/tests/inputs/test__input__patient_30.json new file mode 100644 index 0000000..b43b9a0 --- /dev/null +++ b/tests/inputs/test__input__patient_30.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P030-2024-030", + "sex": "female", + "timestamp": "2024-07-04T14:45:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age": { + "value": 60, + "unit": "years" + }, + "smoking": { + "value": false, + "unit": "yes/no" + }, + "systolic_blood_pressure": { + "value": 145, + "unit": "mmHg" + }, + "total_cholesterol": { + "value": 6.5, + "unit": "mmol/L" + }, + "hdl_cholesterol": { + "value": 1.5, + "unit": "mmol/L" + }, + "is_male": { + "value": false, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/inputs/test__input__patient_31.json b/tests/inputs/test__input__patient_31.json new file mode 100644 index 0000000..0910c92 --- /dev/null +++ b/tests/inputs/test__input__patient_31.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P031-2024-031", + "sex": "male", + "timestamp": "2024-07-04T15:00:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age": { + "value": 65, + "unit": "years" + }, + "smoking": { + "value": true, + "unit": "yes/no" + }, + "systolic_blood_pressure": { + "value": 150, + "unit": "mmHg" + }, + "total_cholesterol": { + "value": 7.0, + "unit": "mmol/L" + }, + "hdl_cholesterol": { + "value": 1.1, + "unit": "mmol/L" + }, + "is_male": { + "value": true, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/inputs/test__input__patient_32.json b/tests/inputs/test__input__patient_32.json new file mode 100644 index 0000000..255d858 --- /dev/null +++ b/tests/inputs/test__input__patient_32.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P032-2024-032", + "sex": "female", + "timestamp": "2024-07-04T15:15:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age": { + "value": 69, + "unit": "years" + }, + "smoking": { + "value": false, + "unit": "yes/no" + }, + "systolic_blood_pressure": { + "value": 155, + "unit": "mmHg" + }, + "total_cholesterol": { + "value": 7.2, + "unit": "mmol/L" + }, + "hdl_cholesterol": { + "value": 1.3, + "unit": "mmol/L" + }, + "is_male": { + "value": false, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/inputs/test__input__patient_33.json b/tests/inputs/test__input__patient_33.json new file mode 100644 index 0000000..26cc61d --- /dev/null +++ b/tests/inputs/test__input__patient_33.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P033-2024-033", + "sex": "male", + "timestamp": "2024-07-04T15:30:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age": { + "value": 49, + "unit": "years" + }, + "smoking": { + "value": true, + "unit": "yes/no" + }, + "systolic_blood_pressure": { + "value": 138, + "unit": "mmHg" + }, + "total_cholesterol": { + "value": 6.1, + "unit": "mmol/L" + }, + "hdl_cholesterol": { + "value": 1.4, + "unit": "mmol/L" + }, + "is_male": { + "value": true, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/inputs/test__input__patient_34.json b/tests/inputs/test__input__patient_34.json new file mode 100644 index 0000000..f471469 --- /dev/null +++ b/tests/inputs/test__input__patient_34.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P034-2024-034", + "sex": "female", + "timestamp": "2024-07-04T15:45:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age": { + "value": 50, + "unit": "years" + }, + "smoking": { + "value": false, + "unit": "yes/no" + }, + "systolic_blood_pressure": { + "value": 120, + "unit": "mmHg" + }, + "total_cholesterol": { + "value": 4.8, + "unit": "mmol/L" + }, + "hdl_cholesterol": { + "value": 1.8, + "unit": "mmol/L" + }, + "is_male": { + "value": false, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/inputs/test__input__patient_35.json b/tests/inputs/test__input__patient_35.json new file mode 100644 index 0000000..3c06bf3 --- /dev/null +++ b/tests/inputs/test__input__patient_35.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P035-2024-035", + "sex": "male", + "timestamp": "2024-07-04T16:00:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age": { + "value": 55, + "unit": "years" + }, + "smoking": { + "value": true, + "unit": "yes/no" + }, + "systolic_blood_pressure": { + "value": 142, + "unit": "mmHg" + }, + "total_cholesterol": { + "value": 6.4, + "unit": "mmol/L" + }, + "hdl_cholesterol": { + "value": 1.2, + "unit": "mmol/L" + }, + "is_male": { + "value": true, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/inputs/test__input__patient_36.json b/tests/inputs/test__input__patient_36.json new file mode 100644 index 0000000..d432a84 --- /dev/null +++ b/tests/inputs/test__input__patient_36.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P036-2024-036", + "sex": "female", + "timestamp": "2024-07-04T16:15:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age": { + "value": 45, + "unit": "years" + }, + "smoking": { + "value": true, + "unit": "yes/no" + }, + "systolic_blood_pressure": { + "value": 132, + "unit": "mmHg" + }, + "total_cholesterol": { + "value": 5.5, + "unit": "mmol/L" + }, + "hdl_cholesterol": { + "value": 1.5, + "unit": "mmol/L" + }, + "is_male": { + "value": false, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/outputs/test__output__patient_27.json b/tests/outputs/test__output__patient_27.json new file mode 100644 index 0000000..96b5a37 --- /dev/null +++ b/tests/outputs/test__output__patient_27.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P027-2024-027", + "sex": "female", + "timestamp": "2024-07-04T14:00:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age_years": { + "value": 55, + "unit": "years" + }, + "smoking_yes_no": { + "value": false, + "unit": "yes/no" + }, + "systolic_blood_pressure_mmhg": { + "value": 125, + "unit": "mmHg" + }, + "total_cholesterol_mmol_l": { + "value": 5.2, + "unit": "mmol/L" + }, + "hdl_cholesterol_mmol_l": { + "value": 1.6, + "unit": "mmol/L" + }, + "is_male_yes_no": { + "value": false, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/outputs/test__output__patient_28.json b/tests/outputs/test__output__patient_28.json new file mode 100644 index 0000000..62b9906 --- /dev/null +++ b/tests/outputs/test__output__patient_28.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P028-2024-028", + "sex": "male", + "timestamp": "2024-07-04T14:15:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age_years": { + "value": 45, + "unit": "years" + }, + "smoking_yes_no": { + "value": false, + "unit": "yes/no" + }, + "systolic_blood_pressure_mmhg": { + "value": 130, + "unit": "mmHg" + }, + "total_cholesterol_mmol_l": { + "value": 5.8, + "unit": "mmol/L" + }, + "hdl_cholesterol_mmol_l": { + "value": 1.3, + "unit": "mmol/L" + }, + "is_male_yes_no": { + "value": true, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/outputs/test__output__patient_29.json b/tests/outputs/test__output__patient_29.json new file mode 100644 index 0000000..d439a63 --- /dev/null +++ b/tests/outputs/test__output__patient_29.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P029-2024-029", + "sex": "male", + "timestamp": "2024-07-04T14:30:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age_years": { + "value": 40, + "unit": "years" + }, + "smoking_yes_no": { + "value": true, + "unit": "yes/no" + }, + "systolic_blood_pressure_mmhg": { + "value": 135, + "unit": "mmHg" + }, + "total_cholesterol_mmol_l": { + "value": 6.0, + "unit": "mmol/L" + }, + "hdl_cholesterol_mmol_l": { + "value": 1.2, + "unit": "mmol/L" + }, + "is_male_yes_no": { + "value": true, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/outputs/test__output__patient_30.json b/tests/outputs/test__output__patient_30.json new file mode 100644 index 0000000..77bfb0b --- /dev/null +++ b/tests/outputs/test__output__patient_30.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P030-2024-030", + "sex": "female", + "timestamp": "2024-07-04T14:45:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age_years": { + "value": 60, + "unit": "years" + }, + "smoking_yes_no": { + "value": false, + "unit": "yes/no" + }, + "systolic_blood_pressure_mmhg": { + "value": 145, + "unit": "mmHg" + }, + "total_cholesterol_mmol_l": { + "value": 6.5, + "unit": "mmol/L" + }, + "hdl_cholesterol_mmol_l": { + "value": 1.5, + "unit": "mmol/L" + }, + "is_male_yes_no": { + "value": false, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/outputs/test__output__patient_31.json b/tests/outputs/test__output__patient_31.json new file mode 100644 index 0000000..66d115b --- /dev/null +++ b/tests/outputs/test__output__patient_31.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P031-2024-031", + "sex": "male", + "timestamp": "2024-07-04T15:00:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age_years": { + "value": 65, + "unit": "years" + }, + "smoking_yes_no": { + "value": true, + "unit": "yes/no" + }, + "systolic_blood_pressure_mmhg": { + "value": 150, + "unit": "mmHg" + }, + "total_cholesterol_mmol_l": { + "value": 7.0, + "unit": "mmol/L" + }, + "hdl_cholesterol_mmol_l": { + "value": 1.1, + "unit": "mmol/L" + }, + "is_male_yes_no": { + "value": true, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/outputs/test__output__patient_32.json b/tests/outputs/test__output__patient_32.json new file mode 100644 index 0000000..83cc013 --- /dev/null +++ b/tests/outputs/test__output__patient_32.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P032-2024-032", + "sex": "female", + "timestamp": "2024-07-04T15:15:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age_years": { + "value": 69, + "unit": "years" + }, + "smoking_yes_no": { + "value": false, + "unit": "yes/no" + }, + "systolic_blood_pressure_mmhg": { + "value": 155, + "unit": "mmHg" + }, + "total_cholesterol_mmol_l": { + "value": 7.2, + "unit": "mmol/L" + }, + "hdl_cholesterol_mmol_l": { + "value": 1.3, + "unit": "mmol/L" + }, + "is_male_yes_no": { + "value": false, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/outputs/test__output__patient_33.json b/tests/outputs/test__output__patient_33.json new file mode 100644 index 0000000..4220ee1 --- /dev/null +++ b/tests/outputs/test__output__patient_33.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P033-2024-033", + "sex": "male", + "timestamp": "2024-07-04T15:30:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age_years": { + "value": 49, + "unit": "years" + }, + "smoking_yes_no": { + "value": true, + "unit": "yes/no" + }, + "systolic_blood_pressure_mmhg": { + "value": 138, + "unit": "mmHg" + }, + "total_cholesterol_mmol_l": { + "value": 6.1, + "unit": "mmol/L" + }, + "hdl_cholesterol_mmol_l": { + "value": 1.4, + "unit": "mmol/L" + }, + "is_male_yes_no": { + "value": true, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/outputs/test__output__patient_34.json b/tests/outputs/test__output__patient_34.json new file mode 100644 index 0000000..f2bdf7e --- /dev/null +++ b/tests/outputs/test__output__patient_34.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P034-2024-034", + "sex": "female", + "timestamp": "2024-07-04T15:45:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age_years": { + "value": 50, + "unit": "years" + }, + "smoking_yes_no": { + "value": false, + "unit": "yes/no" + }, + "systolic_blood_pressure_mmhg": { + "value": 120, + "unit": "mmHg" + }, + "total_cholesterol_mmol_l": { + "value": 4.8, + "unit": "mmol/L" + }, + "hdl_cholesterol_mmol_l": { + "value": 1.8, + "unit": "mmol/L" + }, + "is_male_yes_no": { + "value": false, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/outputs/test__output__patient_35.json b/tests/outputs/test__output__patient_35.json new file mode 100644 index 0000000..5fc3658 --- /dev/null +++ b/tests/outputs/test__output__patient_35.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P035-2024-035", + "sex": "male", + "timestamp": "2024-07-04T16:00:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age_years": { + "value": 55, + "unit": "years" + }, + "smoking_yes_no": { + "value": true, + "unit": "yes/no" + }, + "systolic_blood_pressure_mmhg": { + "value": 142, + "unit": "mmHg" + }, + "total_cholesterol_mmol_l": { + "value": 6.4, + "unit": "mmol/L" + }, + "hdl_cholesterol_mmol_l": { + "value": 1.2, + "unit": "mmol/L" + }, + "is_male_yes_no": { + "value": true, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/outputs/test__output__patient_36.json b/tests/outputs/test__output__patient_36.json new file mode 100644 index 0000000..b71ddb2 --- /dev/null +++ b/tests/outputs/test__output__patient_36.json @@ -0,0 +1,35 @@ +{ + "metadata": { + "patient_id": "P036-2024-036", + "sex": "female", + "timestamp": "2024-07-04T16:15:00Z", + "test_date": "2024-07-04", + "laboratory": "NHANES Reference Labs" + }, + "raw_biomarkers": { + "age_years": { + "value": 45, + "unit": "years" + }, + "smoking_yes_no": { + "value": true, + "unit": "yes/no" + }, + "systolic_blood_pressure_mmhg": { + "value": 132, + "unit": "mmHg" + }, + "total_cholesterol_mmol_l": { + "value": 5.5, + "unit": "mmol/L" + }, + "hdl_cholesterol_mmol_l": { + "value": 1.5, + "unit": "mmol/L" + }, + "is_male_yes_no": { + "value": false, + "unit": "yes/no" + } + } +} \ No newline at end of file diff --git a/tests/test_score2.py b/tests/test_score2.py index 0d19492..f597d59 100644 --- a/tests/test_score2.py +++ b/tests/test_score2.py @@ -12,6 +12,16 @@ [ ("test__output__patient_25.json", (50.00, 4.34, "Low to moderate")), ("test__output__patient_26.json", (50.00, 6.31, "High")), + ("test__output__patient_27.json", (55.00, 2.10, "Low to moderate")), + ("test__output__patient_28.json", (45.00, 2.40, "Low to moderate")), + ("test__output__patient_29.json", (40.00, 4.30, "High")), + ("test__output__patient_30.json", (60.00, 4.20, "Low to moderate")), + ("test__output__patient_31.json", (65.00, 14.40, "Very high")), + ("test__output__patient_32.json", (69.00, 8.40, "High")), + ("test__output__patient_33.json", (49.00, 5.70, "High")), + ("test__output__patient_34.json", (50.00, 1.20, "Low to moderate")), + ("test__output__patient_35.json", (55.00, 8.70, "High")), + ("test__output__patient_36.json", (45.00, 2.60, "High")), ], ) def test_score2(filename, expected): diff --git a/vitals/score2/compute.py b/vitals/score2/compute.py index 107d227..bc963aa 100644 --- a/vitals/score2/compute.py +++ b/vitals/score2/compute.py @@ -180,4 +180,4 @@ def cardiovascular_risk(filepath: str) -> tuple[float, float, str]: else: risk_category = "Very high" - return (age, round(calibrated_risk, 4), risk_category) + return (age, round(calibrated_risk, 2), risk_category) From d5aad2726940c1cb451624afb933902020c72253 Mon Sep 17 00:00:00 2001 From: fbraza Date: Sat, 19 Jul 2025 13:12:49 +0200 Subject: [PATCH 2/4] refactor: rename test directories and files for clarity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename inputs/ folder to raw/ (contains raw patient data) - Rename outputs/ folder to inputs/ (contains processed model inputs) - Rename test__input__patient_XX.json to test__raw__patient_XX.json - Rename test__output__patient_XX.json to test__input__patient_XX.json - Update all code references to use new folder and file names This change better reflects the data flow: raw data → processed inputs for models 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode --- tests/inputs/test__input__patient_01.json | 36 +++++++++++++------ tests/inputs/test__input__patient_02.json | 36 +++++++++++++------ tests/inputs/test__input__patient_03.json | 36 +++++++++++++------ tests/inputs/test__input__patient_04.json | 36 +++++++++++++------ tests/inputs/test__input__patient_05.json | 36 +++++++++++++------ tests/inputs/test__input__patient_06.json | 36 +++++++++++++------ tests/inputs/test__input__patient_07.json | 36 +++++++++++++------ tests/inputs/test__input__patient_08.json | 36 +++++++++++++------ tests/inputs/test__input__patient_09.json | 36 +++++++++++++------ tests/inputs/test__input__patient_10.json | 36 +++++++++++++------ tests/inputs/test__input__patient_11.json | 36 +++++++++++++------ tests/inputs/test__input__patient_12.json | 36 +++++++++++++------ tests/inputs/test__input__patient_13.json | 36 +++++++++++++------ tests/inputs/test__input__patient_14.json | 36 +++++++++++++------ tests/inputs/test__input__patient_15.json | 36 +++++++++++++------ tests/inputs/test__input__patient_16.json | 36 +++++++++++++------ tests/inputs/test__input__patient_17.json | 36 +++++++++++++------ tests/inputs/test__input__patient_18.json | 36 +++++++++++++------ tests/inputs/test__input__patient_19.json | 36 +++++++++++++------ tests/inputs/test__input__patient_20.json | 36 +++++++++++++------ tests/inputs/test__input__patient_21.json | 36 +++++++++++++------ tests/inputs/test__input__patient_22.json | 36 +++++++++++++------ tests/inputs/test__input__patient_23.json | 36 +++++++++++++------ tests/inputs/test__input__patient_24.json | 36 +++++++++++++------ tests/inputs/test__input__patient_25.json | 12 +++---- tests/inputs/test__input__patient_26.json | 12 +++---- tests/inputs/test__input__patient_27.json | 12 +++---- tests/inputs/test__input__patient_28.json | 12 +++---- tests/inputs/test__input__patient_29.json | 12 +++---- tests/inputs/test__input__patient_30.json | 12 +++---- tests/inputs/test__input__patient_31.json | 12 +++---- tests/inputs/test__input__patient_32.json | 12 +++---- tests/inputs/test__input__patient_33.json | 12 +++---- tests/inputs/test__input__patient_34.json | 12 +++---- tests/inputs/test__input__patient_35.json | 12 +++---- tests/inputs/test__input__patient_36.json | 12 +++---- .../test__input__NHANES3__bioage.csv | 0 .../test__raw__patient_01.json} | 36 ++++++------------- .../test__raw__patient_02.json} | 36 ++++++------------- .../test__raw__patient_03.json} | 36 ++++++------------- .../test__raw__patient_04.json} | 36 ++++++------------- .../test__raw__patient_05.json} | 36 ++++++------------- .../test__raw__patient_06.json} | 36 ++++++------------- .../test__raw__patient_07.json} | 36 ++++++------------- .../test__raw__patient_08.json} | 36 ++++++------------- .../test__raw__patient_09.json} | 36 ++++++------------- .../test__raw__patient_10.json} | 36 ++++++------------- .../test__raw__patient_11.json} | 36 ++++++------------- .../test__raw__patient_12.json} | 36 ++++++------------- .../test__raw__patient_13.json} | 36 ++++++------------- .../test__raw__patient_14.json} | 36 ++++++------------- .../test__raw__patient_15.json} | 36 ++++++------------- .../test__raw__patient_16.json} | 36 ++++++------------- .../test__raw__patient_17.json} | 36 ++++++------------- .../test__raw__patient_18.json} | 36 ++++++------------- .../test__raw__patient_19.json} | 36 ++++++------------- .../test__raw__patient_20.json} | 36 ++++++------------- .../test__raw__patient_21.json} | 36 ++++++------------- .../test__raw__patient_22.json} | 36 ++++++------------- .../test__raw__patient_23.json} | 36 ++++++------------- .../test__raw__patient_24.json} | 36 ++++++------------- .../test__raw__patient_25.json} | 12 +++---- .../test__raw__patient_26.json} | 12 +++---- .../test__raw__patient_27.json} | 12 +++---- .../test__raw__patient_28.json} | 12 +++---- .../test__raw__patient_29.json} | 12 +++---- .../test__raw__patient_30.json} | 12 +++---- .../test__raw__patient_31.json} | 12 +++---- .../test__raw__patient_32.json} | 12 +++---- .../test__raw__patient_33.json} | 12 +++---- .../test__raw__patient_34.json} | 12 +++---- .../test__raw__patient_35.json} | 12 +++---- .../test__raw__patient_36.json} | 12 +++---- tests/test_io.py | 6 ++-- tests/test_phenoage.py | 24 ++++++------- tests/test_score2.py | 26 +++++++------- vitals/biomarkers/io.py | 6 ++-- 77 files changed, 1039 insertions(+), 1039 deletions(-) rename tests/{inputs => raw}/test__input__NHANES3__bioage.csv (100%) rename tests/{outputs/test__output__patient_01.json => raw/test__raw__patient_01.json} (56%) rename tests/{outputs/test__output__patient_02.json => raw/test__raw__patient_02.json} (55%) rename tests/{outputs/test__output__patient_03.json => raw/test__raw__patient_03.json} (56%) rename tests/{outputs/test__output__patient_04.json => raw/test__raw__patient_04.json} (56%) rename tests/{outputs/test__output__patient_05.json => raw/test__raw__patient_05.json} (56%) rename tests/{outputs/test__output__patient_06.json => raw/test__raw__patient_06.json} (56%) rename tests/{outputs/test__output__patient_07.json => raw/test__raw__patient_07.json} (56%) rename tests/{outputs/test__output__patient_08.json => raw/test__raw__patient_08.json} (56%) rename tests/{outputs/test__output__patient_09.json => raw/test__raw__patient_09.json} (56%) rename tests/{outputs/test__output__patient_10.json => raw/test__raw__patient_10.json} (56%) rename tests/{outputs/test__output__patient_11.json => raw/test__raw__patient_11.json} (56%) rename tests/{outputs/test__output__patient_12.json => raw/test__raw__patient_12.json} (56%) rename tests/{outputs/test__output__patient_13.json => raw/test__raw__patient_13.json} (56%) rename tests/{outputs/test__output__patient_14.json => raw/test__raw__patient_14.json} (56%) rename tests/{outputs/test__output__patient_15.json => raw/test__raw__patient_15.json} (56%) rename tests/{outputs/test__output__patient_16.json => raw/test__raw__patient_16.json} (56%) rename tests/{outputs/test__output__patient_17.json => raw/test__raw__patient_17.json} (56%) rename tests/{outputs/test__output__patient_18.json => raw/test__raw__patient_18.json} (56%) rename tests/{outputs/test__output__patient_19.json => raw/test__raw__patient_19.json} (56%) rename tests/{outputs/test__output__patient_20.json => raw/test__raw__patient_20.json} (56%) rename tests/{outputs/test__output__patient_21.json => raw/test__raw__patient_21.json} (56%) rename tests/{outputs/test__output__patient_22.json => raw/test__raw__patient_22.json} (56%) rename tests/{outputs/test__output__patient_23.json => raw/test__raw__patient_23.json} (56%) rename tests/{outputs/test__output__patient_24.json => raw/test__raw__patient_24.json} (56%) rename tests/{outputs/test__output__patient_25.json => raw/test__raw__patient_25.json} (75%) rename tests/{outputs/test__output__patient_26.json => raw/test__raw__patient_26.json} (75%) rename tests/{outputs/test__output__patient_27.json => raw/test__raw__patient_27.json} (75%) rename tests/{outputs/test__output__patient_28.json => raw/test__raw__patient_28.json} (75%) rename tests/{outputs/test__output__patient_29.json => raw/test__raw__patient_29.json} (75%) rename tests/{outputs/test__output__patient_30.json => raw/test__raw__patient_30.json} (75%) rename tests/{outputs/test__output__patient_31.json => raw/test__raw__patient_31.json} (75%) rename tests/{outputs/test__output__patient_32.json => raw/test__raw__patient_32.json} (75%) rename tests/{outputs/test__output__patient_33.json => raw/test__raw__patient_33.json} (75%) rename tests/{outputs/test__output__patient_34.json => raw/test__raw__patient_34.json} (75%) rename tests/{outputs/test__output__patient_35.json => raw/test__raw__patient_35.json} (75%) rename tests/{outputs/test__output__patient_36.json => raw/test__raw__patient_36.json} (75%) diff --git a/tests/inputs/test__input__patient_01.json b/tests/inputs/test__input__patient_01.json index 5253431..3ca6264 100755 --- a/tests/inputs/test__input__patient_01.json +++ b/tests/inputs/test__input__patient_01.json @@ -7,45 +7,61 @@ "laboratory": "Quest Diagnostics" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.05, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 1.17, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 70.5, "unit": "mg/dL" }, - "crp": { + "crp_mg_dl": { "value": 0.5, "unit": "mg/dL" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 40.3, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 89.1, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 11.9, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 63.5, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 6.05, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 39, "unit": "years" + }, + "glucose_mmol_l": { + "value": 3.9167, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 103.428, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 40.5, + "unit": "g/L" + }, + "crp_mg_l": { + "value": 5.0, + "unit": "mg/L" } } } diff --git a/tests/inputs/test__input__patient_02.json b/tests/inputs/test__input__patient_02.json index 5e6a9b4..2590587 100755 --- a/tests/inputs/test__input__patient_02.json +++ b/tests/inputs/test__input__patient_02.json @@ -7,45 +7,61 @@ "laboratory": "LabCorp" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.0, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.584, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 109.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_dl": { "value": 0.21, "unit": "mg/dL" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 32.35, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 92.4, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.05, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 59, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 4.95, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 40, "unit": "years" + }, + "glucose_mmol_l": { + "value": 6.0556, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 51.6256, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 40.0, + "unit": "g/L" + }, + "crp_mg_l": { + "value": 2.1, + "unit": "mg/L" } } } diff --git a/tests/inputs/test__input__patient_03.json b/tests/inputs/test__input__patient_03.json index 27fe722..ec7d846 100755 --- a/tests/inputs/test__input__patient_03.json +++ b/tests/inputs/test__input__patient_03.json @@ -7,45 +7,61 @@ "laboratory": "Mayo Clinic Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.1, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.584, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 89.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_dl": { "value": 0.21, "unit": "mg/dL" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 43.85, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 91.9, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.7, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 96, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 4.7, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 80, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.9444, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 51.6256, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 41.0, + "unit": "g/L" + }, + "crp_mg_l": { + "value": 2.1, + "unit": "mg/L" } } } diff --git a/tests/inputs/test__input__patient_04.json b/tests/inputs/test__input__patient_04.json index dc27e44..37af92e 100755 --- a/tests/inputs/test__input__patient_04.json +++ b/tests/inputs/test__input__patient_04.json @@ -7,45 +7,61 @@ "laboratory": "Northwell Health Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.4, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.776, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 89.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_dl": { "value": 0.21, "unit": "mg/dL" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 29.0, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 78.4, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.05, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 35, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 5.55, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 36, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.9444, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 68.5984, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 44.0, + "unit": "g/L" + }, + "crp_mg_l": { + "value": 2.1, + "unit": "mg/L" } } } diff --git a/tests/inputs/test__input__patient_05.json b/tests/inputs/test__input__patient_05.json index c5530ff..bde1c9c 100755 --- a/tests/inputs/test__input__patient_05.json +++ b/tests/inputs/test__input__patient_05.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.5, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.968, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 85.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 27.2, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 90.4, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 13.0, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 74.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 5.9, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 35, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.7222, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 85.5712, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 45.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_06.json b/tests/inputs/test__input__patient_06.json index 128bd7c..8cfe820 100755 --- a/tests/inputs/test__input__patient_06.json +++ b/tests/inputs/test__input__patient_06.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 3.9, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.584, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 88.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 43.7, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 66.3, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 18.1, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 84.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 5.05, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 42, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.8889, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 51.6256, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 39.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_07.json b/tests/inputs/test__input__patient_07.json index 145101e..dc8cd07 100755 --- a/tests/inputs/test__input__patient_07.json +++ b/tests/inputs/test__input__patient_07.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.4, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.776, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 89.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 29.0, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 78.4, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.05, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 35.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 5.55, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 36, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.9444, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 68.5984, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 44.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_08.json b/tests/inputs/test__input__patient_08.json index 5636060..da026d9 100755 --- a/tests/inputs/test__input__patient_08.json +++ b/tests/inputs/test__input__patient_08.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.4, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.776, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 84.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 43.15, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 93.9, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.95, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 67.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 3.85, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 31, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.6667, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 68.5984, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 44.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_09.json b/tests/inputs/test__input__patient_09.json index 805d1d7..5cb7b59 100755 --- a/tests/inputs/test__input__patient_09.json +++ b/tests/inputs/test__input__patient_09.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.3, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.872, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 89.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 26.9, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 87.95, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 13.15, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 90.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 8.15, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 32, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.9444, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 77.0848, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 43.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_10.json b/tests/inputs/test__input__patient_10.json index d03f12f..2088750 100755 --- a/tests/inputs/test__input__patient_10.json +++ b/tests/inputs/test__input__patient_10.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.5, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.584, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 76.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 36.5, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 92.05, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 13.3, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 36.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 5.9, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 31, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.2222, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 51.6256, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 45.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_11.json b/tests/inputs/test__input__patient_11.json index 401c427..b4da578 100755 --- a/tests/inputs/test__input__patient_11.json +++ b/tests/inputs/test__input__patient_11.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.8, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 1.064, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 77.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 34.2, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 96.6, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.2, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 69.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 5.05, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 32, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.2778, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 94.0576, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 48.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_12.json b/tests/inputs/test__input__patient_12.json index 5213c0f..0d44ef6 100755 --- a/tests/inputs/test__input__patient_12.json +++ b/tests/inputs/test__input__patient_12.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.3, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.776, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 79.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 40.75, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 90.95, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 13.15, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 39.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 4.7, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 33, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.3889, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 68.5984, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 43.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_13.json b/tests/inputs/test__input__patient_13.json index 5b66b68..3029523 100755 --- a/tests/inputs/test__input__patient_13.json +++ b/tests/inputs/test__input__patient_13.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.7, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.776, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 84.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 23.7, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 89.35, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 11.95, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 66.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 10.0, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 35, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.6667, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 68.5984, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 47.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_14.json b/tests/inputs/test__input__patient_14.json index e491d79..bfbf334 100755 --- a/tests/inputs/test__input__patient_14.json +++ b/tests/inputs/test__input__patient_14.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 3.9, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.776, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 94.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 9.9, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 36.5, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 91.5, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 13.6, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 68.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 5.55, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 43, "unit": "years" + }, + "glucose_mmol_l": { + "value": 5.2222, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 68.5984, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 39.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.99, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_15.json b/tests/inputs/test__input__patient_15.json index 27e96ea..0dd09f4 100755 --- a/tests/inputs/test__input__patient_15.json +++ b/tests/inputs/test__input__patient_15.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 3.9, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.776, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 95.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 5.5, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 27.75, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 96.35, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 13.3, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 95.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 7.45, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 47, "unit": "years" + }, + "glucose_mmol_l": { + "value": 5.2778, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 68.5984, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 39.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.55, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_16.json b/tests/inputs/test__input__patient_16.json index 6b79cc7..5228ff4 100755 --- a/tests/inputs/test__input__patient_16.json +++ b/tests/inputs/test__input__patient_16.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.1, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.68, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 88.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 31.5, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 89.75, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.85, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 73.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 6.85, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 30, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.8889, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 60.112, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 41.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_17.json b/tests/inputs/test__input__patient_17.json index 6102f91..1a5cd20 100755 --- a/tests/inputs/test__input__patient_17.json +++ b/tests/inputs/test__input__patient_17.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.5, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.968, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 101.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 40.9, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 90.7, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.45, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 85.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 4.25, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 53, "unit": "years" + }, + "glucose_mmol_l": { + "value": 5.6111, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 85.5712, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 45.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_18.json b/tests/inputs/test__input__patient_18.json index be3035e..9fd8ff5 100755 --- a/tests/inputs/test__input__patient_18.json +++ b/tests/inputs/test__input__patient_18.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.6, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.584, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 83.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 37.55, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 87.95, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.45, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 52.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 5.85, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 32, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.6111, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 51.6256, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 46.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_19.json b/tests/inputs/test__input__patient_19.json index 1f43989..9e6eb0e 100755 --- a/tests/inputs/test__input__patient_19.json +++ b/tests/inputs/test__input__patient_19.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 3.9, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.872, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 105.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 38.65, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 84.4, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 15.35, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 59.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 5.05, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 70, "unit": "years" + }, + "glucose_mmol_l": { + "value": 5.8333, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 77.0848, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 39.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_20.json b/tests/inputs/test__input__patient_20.json index 2344aed..1df0bcb 100755 --- a/tests/inputs/test__input__patient_20.json +++ b/tests/inputs/test__input__patient_20.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 5.0, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.68, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 71.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 29.25, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 88.75, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.7, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 91.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 4.45, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 32, "unit": "years" + }, + "glucose_mmol_l": { + "value": 3.9444, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 60.112, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 50.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_21.json b/tests/inputs/test__input__patient_21.json index e9c149d..8b4b15c 100755 --- a/tests/inputs/test__input__patient_21.json +++ b/tests/inputs/test__input__patient_21.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.5, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.872, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 86.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 31.0, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 90.1, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.3, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 55.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 6.55, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 42, "unit": "years" + }, + "glucose_mmol_l": { + "value": 4.7778, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 77.0848, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 45.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_22.json b/tests/inputs/test__input__patient_22.json index fd18929..9fd549f 100755 --- a/tests/inputs/test__input__patient_22.json +++ b/tests/inputs/test__input__patient_22.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.3, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 1.16, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 106.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 35.45, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 85.15, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 14.15, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 86.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 10.55, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 39, "unit": "years" + }, + "glucose_mmol_l": { + "value": 5.8889, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 102.544, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 43.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_23.json b/tests/inputs/test__input__patient_23.json index c0d1ebc..9d36cdf 100755 --- a/tests/inputs/test__input__patient_23.json +++ b/tests/inputs/test__input__patient_23.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.1, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.68, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 100.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 52.5, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 93.1, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 13.65, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 49.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 3.2, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 62, "unit": "years" + }, + "glucose_mmol_l": { + "value": 5.5556, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 60.112, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 41.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_24.json b/tests/inputs/test__input__patient_24.json index 329caad..41ba5bd 100755 --- a/tests/inputs/test__input__patient_24.json +++ b/tests/inputs/test__input__patient_24.json @@ -7,45 +7,61 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin": { + "albumin_g_dl": { "value": 4.4, "unit": "g/dL" }, - "creatinine": { + "creatinine_mg_dl": { "value": 0.584, "unit": "mg/dL" }, - "glucose": { + "glucose_mg_dl": { "value": 90.0, "unit": "mg/dL" }, - "crp": { + "crp_mg_l": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent": { + "lymphocyte_percent_%": { "value": 34.75, "unit": "%" }, - "mean_cell_volume": { + "mean_cell_volume_fl": { "value": 93.0, "unit": "fL" }, - "red_cell_distribution_width": { + "red_cell_distribution_width_%": { "value": 12.65, "unit": "%" }, - "alkaline_phosphatase": { + "alkaline_phosphatase_u_l": { "value": 73.0, "unit": "U/L" }, - "white_blood_cell_count": { + "white_blood_cell_count_1000_cells_ul": { "value": 7.75, "unit": "1000 cells/uL" }, - "age": { + "age_years": { "value": 41, "unit": "years" + }, + "glucose_mmol_l": { + "value": 5.0, + "unit": "mmol/L" + }, + "creatinine_umol_l": { + "value": 51.6256, + "unit": "umol/L" + }, + "albumin_g_l": { + "value": 44.0, + "unit": "g/L" + }, + "crp_mg_dl": { + "value": 0.21, + "unit": "mg/dL" } } } diff --git a/tests/inputs/test__input__patient_25.json b/tests/inputs/test__input__patient_25.json index df7575a..3c9c3e9 100755 --- a/tests/inputs/test__input__patient_25.json +++ b/tests/inputs/test__input__patient_25.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 50, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmHg": { "value": 140, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_L": { "value": 6.3, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_L": { "value": 1.4, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": false, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_26.json b/tests/inputs/test__input__patient_26.json index 6eb6449..0d105ac 100755 --- a/tests/inputs/test__input__patient_26.json +++ b/tests/inputs/test__input__patient_26.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 50, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmHg": { "value": 140, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_L": { "value": 6.3, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_L": { "value": 1.4, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": true, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_27.json b/tests/inputs/test__input__patient_27.json index 8c2f500..96b5a37 100644 --- a/tests/inputs/test__input__patient_27.json +++ b/tests/inputs/test__input__patient_27.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 55, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": false, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmhg": { "value": 125, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_l": { "value": 5.2, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_l": { "value": 1.6, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": false, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_28.json b/tests/inputs/test__input__patient_28.json index 837f9c3..62b9906 100644 --- a/tests/inputs/test__input__patient_28.json +++ b/tests/inputs/test__input__patient_28.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 45, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": false, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmhg": { "value": 130, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_l": { "value": 5.8, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_l": { "value": 1.3, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": true, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_29.json b/tests/inputs/test__input__patient_29.json index c9ded57..d439a63 100644 --- a/tests/inputs/test__input__patient_29.json +++ b/tests/inputs/test__input__patient_29.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 40, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmhg": { "value": 135, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_l": { "value": 6.0, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_l": { "value": 1.2, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": true, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_30.json b/tests/inputs/test__input__patient_30.json index b43b9a0..77bfb0b 100644 --- a/tests/inputs/test__input__patient_30.json +++ b/tests/inputs/test__input__patient_30.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 60, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": false, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmhg": { "value": 145, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_l": { "value": 6.5, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_l": { "value": 1.5, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": false, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_31.json b/tests/inputs/test__input__patient_31.json index 0910c92..66d115b 100644 --- a/tests/inputs/test__input__patient_31.json +++ b/tests/inputs/test__input__patient_31.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 65, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmhg": { "value": 150, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_l": { "value": 7.0, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_l": { "value": 1.1, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": true, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_32.json b/tests/inputs/test__input__patient_32.json index 255d858..83cc013 100644 --- a/tests/inputs/test__input__patient_32.json +++ b/tests/inputs/test__input__patient_32.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 69, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": false, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmhg": { "value": 155, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_l": { "value": 7.2, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_l": { "value": 1.3, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": false, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_33.json b/tests/inputs/test__input__patient_33.json index 26cc61d..4220ee1 100644 --- a/tests/inputs/test__input__patient_33.json +++ b/tests/inputs/test__input__patient_33.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 49, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmhg": { "value": 138, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_l": { "value": 6.1, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_l": { "value": 1.4, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": true, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_34.json b/tests/inputs/test__input__patient_34.json index f471469..f2bdf7e 100644 --- a/tests/inputs/test__input__patient_34.json +++ b/tests/inputs/test__input__patient_34.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 50, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": false, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmhg": { "value": 120, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_l": { "value": 4.8, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_l": { "value": 1.8, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": false, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_35.json b/tests/inputs/test__input__patient_35.json index 3c06bf3..5fc3658 100644 --- a/tests/inputs/test__input__patient_35.json +++ b/tests/inputs/test__input__patient_35.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 55, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmhg": { "value": 142, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_l": { "value": 6.4, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_l": { "value": 1.2, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": true, "unit": "yes/no" } diff --git a/tests/inputs/test__input__patient_36.json b/tests/inputs/test__input__patient_36.json index d432a84..b71ddb2 100644 --- a/tests/inputs/test__input__patient_36.json +++ b/tests/inputs/test__input__patient_36.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age": { + "age_years": { "value": 45, "unit": "years" }, - "smoking": { + "smoking_yes_no": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure": { + "systolic_blood_pressure_mmhg": { "value": 132, "unit": "mmHg" }, - "total_cholesterol": { + "total_cholesterol_mmol_l": { "value": 5.5, "unit": "mmol/L" }, - "hdl_cholesterol": { + "hdl_cholesterol_mmol_l": { "value": 1.5, "unit": "mmol/L" }, - "is_male": { + "is_male_yes_no": { "value": false, "unit": "yes/no" } diff --git a/tests/inputs/test__input__NHANES3__bioage.csv b/tests/raw/test__input__NHANES3__bioage.csv similarity index 100% rename from tests/inputs/test__input__NHANES3__bioage.csv rename to tests/raw/test__input__NHANES3__bioage.csv diff --git a/tests/outputs/test__output__patient_01.json b/tests/raw/test__raw__patient_01.json similarity index 56% rename from tests/outputs/test__output__patient_01.json rename to tests/raw/test__raw__patient_01.json index 3ca6264..5253431 100755 --- a/tests/outputs/test__output__patient_01.json +++ b/tests/raw/test__raw__patient_01.json @@ -7,61 +7,45 @@ "laboratory": "Quest Diagnostics" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.05, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 1.17, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 70.5, "unit": "mg/dL" }, - "crp_mg_dl": { + "crp": { "value": 0.5, "unit": "mg/dL" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 40.3, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 89.1, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 11.9, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 63.5, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 6.05, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 39, "unit": "years" - }, - "glucose_mmol_l": { - "value": 3.9167, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 103.428, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 40.5, - "unit": "g/L" - }, - "crp_mg_l": { - "value": 5.0, - "unit": "mg/L" } } } diff --git a/tests/outputs/test__output__patient_02.json b/tests/raw/test__raw__patient_02.json similarity index 55% rename from tests/outputs/test__output__patient_02.json rename to tests/raw/test__raw__patient_02.json index 2590587..5e6a9b4 100755 --- a/tests/outputs/test__output__patient_02.json +++ b/tests/raw/test__raw__patient_02.json @@ -7,61 +7,45 @@ "laboratory": "LabCorp" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.0, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.584, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 109.0, "unit": "mg/dL" }, - "crp_mg_dl": { + "crp": { "value": 0.21, "unit": "mg/dL" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 32.35, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 92.4, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.05, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 59, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 4.95, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 40, "unit": "years" - }, - "glucose_mmol_l": { - "value": 6.0556, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 51.6256, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 40.0, - "unit": "g/L" - }, - "crp_mg_l": { - "value": 2.1, - "unit": "mg/L" } } } diff --git a/tests/outputs/test__output__patient_03.json b/tests/raw/test__raw__patient_03.json similarity index 56% rename from tests/outputs/test__output__patient_03.json rename to tests/raw/test__raw__patient_03.json index ec7d846..27fe722 100755 --- a/tests/outputs/test__output__patient_03.json +++ b/tests/raw/test__raw__patient_03.json @@ -7,61 +7,45 @@ "laboratory": "Mayo Clinic Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.1, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.584, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 89.0, "unit": "mg/dL" }, - "crp_mg_dl": { + "crp": { "value": 0.21, "unit": "mg/dL" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 43.85, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 91.9, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.7, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 96, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 4.7, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 80, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.9444, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 51.6256, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 41.0, - "unit": "g/L" - }, - "crp_mg_l": { - "value": 2.1, - "unit": "mg/L" } } } diff --git a/tests/outputs/test__output__patient_04.json b/tests/raw/test__raw__patient_04.json similarity index 56% rename from tests/outputs/test__output__patient_04.json rename to tests/raw/test__raw__patient_04.json index 37af92e..dc27e44 100755 --- a/tests/outputs/test__output__patient_04.json +++ b/tests/raw/test__raw__patient_04.json @@ -7,61 +7,45 @@ "laboratory": "Northwell Health Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.4, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.776, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 89.0, "unit": "mg/dL" }, - "crp_mg_dl": { + "crp": { "value": 0.21, "unit": "mg/dL" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 29.0, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 78.4, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.05, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 35, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 5.55, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 36, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.9444, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 68.5984, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 44.0, - "unit": "g/L" - }, - "crp_mg_l": { - "value": 2.1, - "unit": "mg/L" } } } diff --git a/tests/outputs/test__output__patient_05.json b/tests/raw/test__raw__patient_05.json similarity index 56% rename from tests/outputs/test__output__patient_05.json rename to tests/raw/test__raw__patient_05.json index bde1c9c..c5530ff 100755 --- a/tests/outputs/test__output__patient_05.json +++ b/tests/raw/test__raw__patient_05.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.5, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.968, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 85.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 27.2, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 90.4, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 13.0, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 74.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 5.9, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 35, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.7222, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 85.5712, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 45.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_06.json b/tests/raw/test__raw__patient_06.json similarity index 56% rename from tests/outputs/test__output__patient_06.json rename to tests/raw/test__raw__patient_06.json index 8cfe820..128bd7c 100755 --- a/tests/outputs/test__output__patient_06.json +++ b/tests/raw/test__raw__patient_06.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 3.9, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.584, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 88.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 43.7, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 66.3, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 18.1, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 84.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 5.05, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 42, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.8889, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 51.6256, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 39.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_07.json b/tests/raw/test__raw__patient_07.json similarity index 56% rename from tests/outputs/test__output__patient_07.json rename to tests/raw/test__raw__patient_07.json index dc8cd07..145101e 100755 --- a/tests/outputs/test__output__patient_07.json +++ b/tests/raw/test__raw__patient_07.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.4, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.776, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 89.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 29.0, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 78.4, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.05, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 35.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 5.55, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 36, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.9444, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 68.5984, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 44.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_08.json b/tests/raw/test__raw__patient_08.json similarity index 56% rename from tests/outputs/test__output__patient_08.json rename to tests/raw/test__raw__patient_08.json index da026d9..5636060 100755 --- a/tests/outputs/test__output__patient_08.json +++ b/tests/raw/test__raw__patient_08.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.4, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.776, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 84.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 43.15, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 93.9, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.95, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 67.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 3.85, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 31, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.6667, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 68.5984, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 44.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_09.json b/tests/raw/test__raw__patient_09.json similarity index 56% rename from tests/outputs/test__output__patient_09.json rename to tests/raw/test__raw__patient_09.json index 5cb7b59..805d1d7 100755 --- a/tests/outputs/test__output__patient_09.json +++ b/tests/raw/test__raw__patient_09.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.3, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.872, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 89.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 26.9, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 87.95, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 13.15, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 90.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 8.15, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 32, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.9444, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 77.0848, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 43.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_10.json b/tests/raw/test__raw__patient_10.json similarity index 56% rename from tests/outputs/test__output__patient_10.json rename to tests/raw/test__raw__patient_10.json index 2088750..d03f12f 100755 --- a/tests/outputs/test__output__patient_10.json +++ b/tests/raw/test__raw__patient_10.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.5, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.584, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 76.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 36.5, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 92.05, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 13.3, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 36.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 5.9, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 31, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.2222, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 51.6256, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 45.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_11.json b/tests/raw/test__raw__patient_11.json similarity index 56% rename from tests/outputs/test__output__patient_11.json rename to tests/raw/test__raw__patient_11.json index b4da578..401c427 100755 --- a/tests/outputs/test__output__patient_11.json +++ b/tests/raw/test__raw__patient_11.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.8, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 1.064, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 77.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 34.2, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 96.6, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.2, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 69.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 5.05, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 32, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.2778, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 94.0576, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 48.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_12.json b/tests/raw/test__raw__patient_12.json similarity index 56% rename from tests/outputs/test__output__patient_12.json rename to tests/raw/test__raw__patient_12.json index 0d44ef6..5213c0f 100755 --- a/tests/outputs/test__output__patient_12.json +++ b/tests/raw/test__raw__patient_12.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.3, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.776, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 79.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 40.75, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 90.95, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 13.15, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 39.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 4.7, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 33, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.3889, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 68.5984, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 43.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_13.json b/tests/raw/test__raw__patient_13.json similarity index 56% rename from tests/outputs/test__output__patient_13.json rename to tests/raw/test__raw__patient_13.json index 3029523..5b66b68 100755 --- a/tests/outputs/test__output__patient_13.json +++ b/tests/raw/test__raw__patient_13.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.7, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.776, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 84.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 23.7, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 89.35, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 11.95, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 66.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 10.0, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 35, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.6667, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 68.5984, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 47.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_14.json b/tests/raw/test__raw__patient_14.json similarity index 56% rename from tests/outputs/test__output__patient_14.json rename to tests/raw/test__raw__patient_14.json index bfbf334..e491d79 100755 --- a/tests/outputs/test__output__patient_14.json +++ b/tests/raw/test__raw__patient_14.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 3.9, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.776, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 94.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 9.9, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 36.5, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 91.5, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 13.6, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 68.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 5.55, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 43, "unit": "years" - }, - "glucose_mmol_l": { - "value": 5.2222, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 68.5984, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 39.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.99, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_15.json b/tests/raw/test__raw__patient_15.json similarity index 56% rename from tests/outputs/test__output__patient_15.json rename to tests/raw/test__raw__patient_15.json index 0dd09f4..27e96ea 100755 --- a/tests/outputs/test__output__patient_15.json +++ b/tests/raw/test__raw__patient_15.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 3.9, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.776, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 95.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 5.5, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 27.75, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 96.35, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 13.3, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 95.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 7.45, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 47, "unit": "years" - }, - "glucose_mmol_l": { - "value": 5.2778, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 68.5984, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 39.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.55, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_16.json b/tests/raw/test__raw__patient_16.json similarity index 56% rename from tests/outputs/test__output__patient_16.json rename to tests/raw/test__raw__patient_16.json index 5228ff4..6b79cc7 100755 --- a/tests/outputs/test__output__patient_16.json +++ b/tests/raw/test__raw__patient_16.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.1, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.68, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 88.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 31.5, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 89.75, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.85, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 73.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 6.85, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 30, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.8889, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 60.112, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 41.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_17.json b/tests/raw/test__raw__patient_17.json similarity index 56% rename from tests/outputs/test__output__patient_17.json rename to tests/raw/test__raw__patient_17.json index 1a5cd20..6102f91 100755 --- a/tests/outputs/test__output__patient_17.json +++ b/tests/raw/test__raw__patient_17.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.5, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.968, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 101.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 40.9, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 90.7, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.45, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 85.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 4.25, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 53, "unit": "years" - }, - "glucose_mmol_l": { - "value": 5.6111, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 85.5712, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 45.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_18.json b/tests/raw/test__raw__patient_18.json similarity index 56% rename from tests/outputs/test__output__patient_18.json rename to tests/raw/test__raw__patient_18.json index 9fd8ff5..be3035e 100755 --- a/tests/outputs/test__output__patient_18.json +++ b/tests/raw/test__raw__patient_18.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.6, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.584, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 83.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 37.55, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 87.95, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.45, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 52.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 5.85, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 32, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.6111, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 51.6256, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 46.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_19.json b/tests/raw/test__raw__patient_19.json similarity index 56% rename from tests/outputs/test__output__patient_19.json rename to tests/raw/test__raw__patient_19.json index 9e6eb0e..1f43989 100755 --- a/tests/outputs/test__output__patient_19.json +++ b/tests/raw/test__raw__patient_19.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 3.9, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.872, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 105.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 38.65, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 84.4, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 15.35, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 59.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 5.05, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 70, "unit": "years" - }, - "glucose_mmol_l": { - "value": 5.8333, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 77.0848, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 39.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_20.json b/tests/raw/test__raw__patient_20.json similarity index 56% rename from tests/outputs/test__output__patient_20.json rename to tests/raw/test__raw__patient_20.json index 1df0bcb..2344aed 100755 --- a/tests/outputs/test__output__patient_20.json +++ b/tests/raw/test__raw__patient_20.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 5.0, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.68, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 71.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 29.25, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 88.75, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.7, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 91.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 4.45, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 32, "unit": "years" - }, - "glucose_mmol_l": { - "value": 3.9444, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 60.112, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 50.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_21.json b/tests/raw/test__raw__patient_21.json similarity index 56% rename from tests/outputs/test__output__patient_21.json rename to tests/raw/test__raw__patient_21.json index 8b4b15c..e9c149d 100755 --- a/tests/outputs/test__output__patient_21.json +++ b/tests/raw/test__raw__patient_21.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.5, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.872, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 86.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 31.0, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 90.1, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.3, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 55.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 6.55, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 42, "unit": "years" - }, - "glucose_mmol_l": { - "value": 4.7778, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 77.0848, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 45.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_22.json b/tests/raw/test__raw__patient_22.json similarity index 56% rename from tests/outputs/test__output__patient_22.json rename to tests/raw/test__raw__patient_22.json index 9fd549f..fd18929 100755 --- a/tests/outputs/test__output__patient_22.json +++ b/tests/raw/test__raw__patient_22.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.3, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 1.16, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 106.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 35.45, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 85.15, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 14.15, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 86.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 10.55, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 39, "unit": "years" - }, - "glucose_mmol_l": { - "value": 5.8889, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 102.544, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 43.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_23.json b/tests/raw/test__raw__patient_23.json similarity index 56% rename from tests/outputs/test__output__patient_23.json rename to tests/raw/test__raw__patient_23.json index 9d36cdf..c0d1ebc 100755 --- a/tests/outputs/test__output__patient_23.json +++ b/tests/raw/test__raw__patient_23.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.1, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.68, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 100.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 52.5, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 93.1, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 13.65, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 49.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 3.2, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 62, "unit": "years" - }, - "glucose_mmol_l": { - "value": 5.5556, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 60.112, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 41.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_24.json b/tests/raw/test__raw__patient_24.json similarity index 56% rename from tests/outputs/test__output__patient_24.json rename to tests/raw/test__raw__patient_24.json index 41ba5bd..329caad 100755 --- a/tests/outputs/test__output__patient_24.json +++ b/tests/raw/test__raw__patient_24.json @@ -7,61 +7,45 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "albumin_g_dl": { + "albumin": { "value": 4.4, "unit": "g/dL" }, - "creatinine_mg_dl": { + "creatinine": { "value": 0.584, "unit": "mg/dL" }, - "glucose_mg_dl": { + "glucose": { "value": 90.0, "unit": "mg/dL" }, - "crp_mg_l": { + "crp": { "value": 2.1, "unit": "mg/L" }, - "lymphocyte_percent_%": { + "lymphocyte_percent": { "value": 34.75, "unit": "%" }, - "mean_cell_volume_fl": { + "mean_cell_volume": { "value": 93.0, "unit": "fL" }, - "red_cell_distribution_width_%": { + "red_cell_distribution_width": { "value": 12.65, "unit": "%" }, - "alkaline_phosphatase_u_l": { + "alkaline_phosphatase": { "value": 73.0, "unit": "U/L" }, - "white_blood_cell_count_1000_cells_ul": { + "white_blood_cell_count": { "value": 7.75, "unit": "1000 cells/uL" }, - "age_years": { + "age": { "value": 41, "unit": "years" - }, - "glucose_mmol_l": { - "value": 5.0, - "unit": "mmol/L" - }, - "creatinine_umol_l": { - "value": 51.6256, - "unit": "umol/L" - }, - "albumin_g_l": { - "value": 44.0, - "unit": "g/L" - }, - "crp_mg_dl": { - "value": 0.21, - "unit": "mg/dL" } } } diff --git a/tests/outputs/test__output__patient_25.json b/tests/raw/test__raw__patient_25.json similarity index 75% rename from tests/outputs/test__output__patient_25.json rename to tests/raw/test__raw__patient_25.json index 3c9c3e9..df7575a 100755 --- a/tests/outputs/test__output__patient_25.json +++ b/tests/raw/test__raw__patient_25.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 50, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure_mmHg": { + "systolic_blood_pressure": { "value": 140, "unit": "mmHg" }, - "total_cholesterol_mmol_L": { + "total_cholesterol": { "value": 6.3, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_L": { + "hdl_cholesterol": { "value": 1.4, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": false, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_26.json b/tests/raw/test__raw__patient_26.json similarity index 75% rename from tests/outputs/test__output__patient_26.json rename to tests/raw/test__raw__patient_26.json index 0d105ac..6eb6449 100755 --- a/tests/outputs/test__output__patient_26.json +++ b/tests/raw/test__raw__patient_26.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 50, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure_mmHg": { + "systolic_blood_pressure": { "value": 140, "unit": "mmHg" }, - "total_cholesterol_mmol_L": { + "total_cholesterol": { "value": 6.3, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_L": { + "hdl_cholesterol": { "value": 1.4, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": true, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_27.json b/tests/raw/test__raw__patient_27.json similarity index 75% rename from tests/outputs/test__output__patient_27.json rename to tests/raw/test__raw__patient_27.json index 96b5a37..8c2f500 100644 --- a/tests/outputs/test__output__patient_27.json +++ b/tests/raw/test__raw__patient_27.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 55, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": false, "unit": "yes/no" }, - "systolic_blood_pressure_mmhg": { + "systolic_blood_pressure": { "value": 125, "unit": "mmHg" }, - "total_cholesterol_mmol_l": { + "total_cholesterol": { "value": 5.2, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_l": { + "hdl_cholesterol": { "value": 1.6, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": false, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_28.json b/tests/raw/test__raw__patient_28.json similarity index 75% rename from tests/outputs/test__output__patient_28.json rename to tests/raw/test__raw__patient_28.json index 62b9906..837f9c3 100644 --- a/tests/outputs/test__output__patient_28.json +++ b/tests/raw/test__raw__patient_28.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 45, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": false, "unit": "yes/no" }, - "systolic_blood_pressure_mmhg": { + "systolic_blood_pressure": { "value": 130, "unit": "mmHg" }, - "total_cholesterol_mmol_l": { + "total_cholesterol": { "value": 5.8, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_l": { + "hdl_cholesterol": { "value": 1.3, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": true, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_29.json b/tests/raw/test__raw__patient_29.json similarity index 75% rename from tests/outputs/test__output__patient_29.json rename to tests/raw/test__raw__patient_29.json index d439a63..c9ded57 100644 --- a/tests/outputs/test__output__patient_29.json +++ b/tests/raw/test__raw__patient_29.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 40, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure_mmhg": { + "systolic_blood_pressure": { "value": 135, "unit": "mmHg" }, - "total_cholesterol_mmol_l": { + "total_cholesterol": { "value": 6.0, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_l": { + "hdl_cholesterol": { "value": 1.2, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": true, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_30.json b/tests/raw/test__raw__patient_30.json similarity index 75% rename from tests/outputs/test__output__patient_30.json rename to tests/raw/test__raw__patient_30.json index 77bfb0b..b43b9a0 100644 --- a/tests/outputs/test__output__patient_30.json +++ b/tests/raw/test__raw__patient_30.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 60, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": false, "unit": "yes/no" }, - "systolic_blood_pressure_mmhg": { + "systolic_blood_pressure": { "value": 145, "unit": "mmHg" }, - "total_cholesterol_mmol_l": { + "total_cholesterol": { "value": 6.5, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_l": { + "hdl_cholesterol": { "value": 1.5, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": false, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_31.json b/tests/raw/test__raw__patient_31.json similarity index 75% rename from tests/outputs/test__output__patient_31.json rename to tests/raw/test__raw__patient_31.json index 66d115b..0910c92 100644 --- a/tests/outputs/test__output__patient_31.json +++ b/tests/raw/test__raw__patient_31.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 65, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure_mmhg": { + "systolic_blood_pressure": { "value": 150, "unit": "mmHg" }, - "total_cholesterol_mmol_l": { + "total_cholesterol": { "value": 7.0, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_l": { + "hdl_cholesterol": { "value": 1.1, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": true, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_32.json b/tests/raw/test__raw__patient_32.json similarity index 75% rename from tests/outputs/test__output__patient_32.json rename to tests/raw/test__raw__patient_32.json index 83cc013..255d858 100644 --- a/tests/outputs/test__output__patient_32.json +++ b/tests/raw/test__raw__patient_32.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 69, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": false, "unit": "yes/no" }, - "systolic_blood_pressure_mmhg": { + "systolic_blood_pressure": { "value": 155, "unit": "mmHg" }, - "total_cholesterol_mmol_l": { + "total_cholesterol": { "value": 7.2, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_l": { + "hdl_cholesterol": { "value": 1.3, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": false, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_33.json b/tests/raw/test__raw__patient_33.json similarity index 75% rename from tests/outputs/test__output__patient_33.json rename to tests/raw/test__raw__patient_33.json index 4220ee1..26cc61d 100644 --- a/tests/outputs/test__output__patient_33.json +++ b/tests/raw/test__raw__patient_33.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 49, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure_mmhg": { + "systolic_blood_pressure": { "value": 138, "unit": "mmHg" }, - "total_cholesterol_mmol_l": { + "total_cholesterol": { "value": 6.1, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_l": { + "hdl_cholesterol": { "value": 1.4, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": true, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_34.json b/tests/raw/test__raw__patient_34.json similarity index 75% rename from tests/outputs/test__output__patient_34.json rename to tests/raw/test__raw__patient_34.json index f2bdf7e..f471469 100644 --- a/tests/outputs/test__output__patient_34.json +++ b/tests/raw/test__raw__patient_34.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 50, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": false, "unit": "yes/no" }, - "systolic_blood_pressure_mmhg": { + "systolic_blood_pressure": { "value": 120, "unit": "mmHg" }, - "total_cholesterol_mmol_l": { + "total_cholesterol": { "value": 4.8, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_l": { + "hdl_cholesterol": { "value": 1.8, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": false, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_35.json b/tests/raw/test__raw__patient_35.json similarity index 75% rename from tests/outputs/test__output__patient_35.json rename to tests/raw/test__raw__patient_35.json index 5fc3658..3c06bf3 100644 --- a/tests/outputs/test__output__patient_35.json +++ b/tests/raw/test__raw__patient_35.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 55, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure_mmhg": { + "systolic_blood_pressure": { "value": 142, "unit": "mmHg" }, - "total_cholesterol_mmol_l": { + "total_cholesterol": { "value": 6.4, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_l": { + "hdl_cholesterol": { "value": 1.2, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": true, "unit": "yes/no" } diff --git a/tests/outputs/test__output__patient_36.json b/tests/raw/test__raw__patient_36.json similarity index 75% rename from tests/outputs/test__output__patient_36.json rename to tests/raw/test__raw__patient_36.json index b71ddb2..d432a84 100644 --- a/tests/outputs/test__output__patient_36.json +++ b/tests/raw/test__raw__patient_36.json @@ -7,27 +7,27 @@ "laboratory": "NHANES Reference Labs" }, "raw_biomarkers": { - "age_years": { + "age": { "value": 45, "unit": "years" }, - "smoking_yes_no": { + "smoking": { "value": true, "unit": "yes/no" }, - "systolic_blood_pressure_mmhg": { + "systolic_blood_pressure": { "value": 132, "unit": "mmHg" }, - "total_cholesterol_mmol_l": { + "total_cholesterol": { "value": 5.5, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_l": { + "hdl_cholesterol": { "value": 1.5, "unit": "mmol/L" }, - "is_male_yes_no": { + "is_male": { "value": false, "unit": "yes/no" } diff --git a/tests/test_io.py b/tests/test_io.py index ba1b2ad..d22e5f0 100755 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -5,13 +5,13 @@ from vitals.biomarkers import io -INP_FILEPATH = Path(__file__).parent / "inputs" -OUT_FILEPATH = Path(__file__).parent / "outputs" +INP_FILEPATH = Path(__file__).parent / "raw" +OUT_FILEPATH = Path(__file__).parent / "inputs" @pytest.mark.parametrize( "input_filename,output_filename", - [("test__input__patient_01.json", "test__output__patient_01.json")], + [("test__raw__patient_01.json", "test__input__patient_01.json")], ) def test_process_json_files(input_filename, output_filename): # Process files in the tests directory diff --git a/tests/test_phenoage.py b/tests/test_phenoage.py index cf062f3..d23d8ba 100755 --- a/tests/test_phenoage.py +++ b/tests/test_phenoage.py @@ -4,23 +4,23 @@ from vitals.phenoage import compute -OUT_FILEPATH = Path(__file__).parent / "outputs" +OUT_FILEPATH = Path(__file__).parent / "inputs" @pytest.mark.parametrize( "filename,expected", [ - ("test__output__patient_01.json", (39.00, 39.43, 0.43)), - ("test__output__patient_02.json", (40.00, 40.57, 0.57)), - ("test__output__patient_03.json", (80.00, 74.78, -5.22)), - ("test__output__patient_04.json", (36.00, 31.05, -4.95)), - ("test__output__patient_05.json", (35.00, 39.42, 4.42)), - ("test__output__patient_06.json", (42.00, 53.71, 11.71)), - ("test__output__patient_07.json", (36.00, 31.06, -4.94)), - ("test__output__patient_08.json", (31.00, 31.64, 0.65)), - ("test__output__patient_17.json", (53.00, 52.86, -0.14)), - ("test__output__patient_19.json", (70.00, 78.85, 8.85)), - ("test__output__patient_23.json", (62.00, 61.75, -0.25)), + ("test__input__patient_01.json", (39.00, 39.43, 0.43)), + ("test__input__patient_02.json", (40.00, 40.57, 0.57)), + ("test__input__patient_03.json", (80.00, 74.78, -5.22)), + ("test__input__patient_04.json", (36.00, 31.05, -4.95)), + ("test__input__patient_05.json", (35.00, 39.42, 4.42)), + ("test__input__patient_06.json", (42.00, 53.71, 11.71)), + ("test__input__patient_07.json", (36.00, 31.06, -4.94)), + ("test__input__patient_08.json", (31.00, 31.64, 0.65)), + ("test__input__patient_17.json", (53.00, 52.86, -0.14)), + ("test__input__patient_19.json", (70.00, 78.85, 8.85)), + ("test__input__patient_23.json", (62.00, 61.75, -0.25)), ], ) def test_phenoage(filename, expected): diff --git a/tests/test_score2.py b/tests/test_score2.py index f597d59..c1e3968 100644 --- a/tests/test_score2.py +++ b/tests/test_score2.py @@ -4,24 +4,24 @@ from vitals.score2 import compute -OUT_FILEPATH = Path(__file__).parent / "outputs" +OUT_FILEPATH = Path(__file__).parent / "inputs" @pytest.mark.parametrize( "filename,expected", [ - ("test__output__patient_25.json", (50.00, 4.34, "Low to moderate")), - ("test__output__patient_26.json", (50.00, 6.31, "High")), - ("test__output__patient_27.json", (55.00, 2.10, "Low to moderate")), - ("test__output__patient_28.json", (45.00, 2.40, "Low to moderate")), - ("test__output__patient_29.json", (40.00, 4.30, "High")), - ("test__output__patient_30.json", (60.00, 4.20, "Low to moderate")), - ("test__output__patient_31.json", (65.00, 14.40, "Very high")), - ("test__output__patient_32.json", (69.00, 8.40, "High")), - ("test__output__patient_33.json", (49.00, 5.70, "High")), - ("test__output__patient_34.json", (50.00, 1.20, "Low to moderate")), - ("test__output__patient_35.json", (55.00, 8.70, "High")), - ("test__output__patient_36.json", (45.00, 2.60, "High")), + ("test__input__patient_25.json", (50.00, 4.34, "Low to moderate")), + ("test__input__patient_26.json", (50.00, 6.31, "High")), + ("test__input__patient_27.json", (55.00, 2.10, "Low to moderate")), + ("test__input__patient_28.json", (45.00, 2.40, "Low to moderate")), + ("test__input__patient_29.json", (40.00, 4.30, "High")), + ("test__input__patient_30.json", (60.00, 4.20, "Low to moderate")), + ("test__input__patient_31.json", (65.00, 14.40, "Very high")), + ("test__input__patient_32.json", (69.00, 8.40, "High")), + ("test__input__patient_33.json", (49.00, 5.70, "High")), + ("test__input__patient_34.json", (50.00, 1.20, "Low to moderate")), + ("test__input__patient_35.json", (55.00, 8.70, "High")), + ("test__input__patient_36.json", (45.00, 2.60, "High")), ], ) def test_score2(filename, expected): diff --git a/vitals/biomarkers/io.py b/vitals/biomarkers/io.py index 8858e1b..e0d4946 100755 --- a/vitals/biomarkers/io.py +++ b/vitals/biomarkers/io.py @@ -42,11 +42,11 @@ def write(data: dict, output_file: Path) -> None: if __name__ == "__main__": # Process all JSON files in the input directory - input_dir = Path("tests/inputs") - output_dir = Path("tests/outputs") + input_dir = Path("tests/raw") + output_dir = Path("tests/inputs") for input_file in input_dir.glob("*.json"): - output_file = output_dir / input_file.name.replace("input", "output") + output_file = output_dir / input_file.name.replace("raw", "input") # Update biomarker data data = update(input_file) From aefafecb936596008b4483f7ae4e666c2ff044f1 Mon Sep 17 00:00:00 2001 From: fbraza Date: Sat, 19 Jul 2025 13:16:19 +0200 Subject: [PATCH 3/4] fix: standardize unit suffix casing to lowercase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change systolic_blood_pressure_mmHg to systolic_blood_pressure_mmhg - Change total_cholesterol_mmol_L to total_cholesterol_mmol_l - Change hdl_cholesterol_mmol_L to hdl_cholesterol_mmol_l Ensures consistency across all test input files by using lowercase unit suffixes 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode --- tests/inputs/test__input__patient_25.json | 6 +++--- tests/inputs/test__input__patient_26.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/inputs/test__input__patient_25.json b/tests/inputs/test__input__patient_25.json index 3c9c3e9..83f68ad 100755 --- a/tests/inputs/test__input__patient_25.json +++ b/tests/inputs/test__input__patient_25.json @@ -15,15 +15,15 @@ "value": true, "unit": "yes/no" }, - "systolic_blood_pressure_mmHg": { + "systolic_blood_pressure_mmhg": { "value": 140, "unit": "mmHg" }, - "total_cholesterol_mmol_L": { + "total_cholesterol_mmol_l": { "value": 6.3, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_L": { + "hdl_cholesterol_mmol_l": { "value": 1.4, "unit": "mmol/L" }, diff --git a/tests/inputs/test__input__patient_26.json b/tests/inputs/test__input__patient_26.json index 0d105ac..ba11b32 100755 --- a/tests/inputs/test__input__patient_26.json +++ b/tests/inputs/test__input__patient_26.json @@ -15,15 +15,15 @@ "value": true, "unit": "yes/no" }, - "systolic_blood_pressure_mmHg": { + "systolic_blood_pressure_mmhg": { "value": 140, "unit": "mmHg" }, - "total_cholesterol_mmol_L": { + "total_cholesterol_mmol_l": { "value": 6.3, "unit": "mmol/L" }, - "hdl_cholesterol_mmol_L": { + "hdl_cholesterol_mmol_l": { "value": 1.4, "unit": "mmol/L" }, From eac24b4ccf2b0161c7fc6fa8b3164ee761ed5005 Mon Sep 17 00:00:00 2001 From: fbraza Date: Sat, 19 Jul 2025 13:28:06 +0200 Subject: [PATCH 4/4] refactor: reorganize fodlers and test files --- .../test__input__patient_01.json | 0 .../test__input__patient_02.json | 0 .../test__input__patient_03.json | 0 .../test__input__patient_04.json | 0 .../test__input__patient_05.json | 0 .../test__input__patient_06.json | 0 .../test__input__patient_07.json | 0 .../test__input__patient_08.json | 0 .../test__input__patient_09.json | 0 .../test__input__patient_10.json | 0 .../test__input__patient_11.json | 0 .../test__input__patient_12.json | 0 .../test__input__patient_13.json | 0 .../test__input__patient_14.json | 0 .../test__input__patient_15.json | 0 .../test__input__patient_16.json | 0 .../test__input__patient_17.json | 0 .../test__input__patient_18.json | 0 .../test__input__patient_19.json | 0 .../test__input__patient_20.json | 0 .../test__input__patient_21.json | 0 .../test__input__patient_22.json | 0 .../test__input__patient_23.json | 0 .../test__input__patient_24.json | 0 .../{ => score2}/test__input__patient_25.json | 0 .../{ => score2}/test__input__patient_26.json | 0 .../{ => score2}/test__input__patient_27.json | 0 .../{ => score2}/test__input__patient_28.json | 0 .../{ => score2}/test__input__patient_29.json | 0 .../{ => score2}/test__input__patient_30.json | 0 .../{ => score2}/test__input__patient_31.json | 0 .../{ => score2}/test__input__patient_32.json | 0 .../{ => score2}/test__input__patient_33.json | 0 .../{ => score2}/test__input__patient_34.json | 0 .../{ => score2}/test__input__patient_35.json | 0 .../{ => score2}/test__input__patient_36.json | 0 .../{ => phenoage}/test__raw__patient_01.json | 0 .../{ => phenoage}/test__raw__patient_02.json | 0 .../{ => phenoage}/test__raw__patient_03.json | 0 .../{ => phenoage}/test__raw__patient_04.json | 0 .../{ => phenoage}/test__raw__patient_05.json | 0 .../{ => phenoage}/test__raw__patient_06.json | 0 .../{ => phenoage}/test__raw__patient_07.json | 0 .../{ => phenoage}/test__raw__patient_08.json | 0 .../{ => phenoage}/test__raw__patient_09.json | 0 .../{ => phenoage}/test__raw__patient_10.json | 0 .../{ => phenoage}/test__raw__patient_11.json | 0 .../{ => phenoage}/test__raw__patient_12.json | 0 .../{ => phenoage}/test__raw__patient_13.json | 0 .../{ => phenoage}/test__raw__patient_14.json | 0 .../{ => phenoage}/test__raw__patient_15.json | 0 .../{ => phenoage}/test__raw__patient_16.json | 0 .../{ => phenoage}/test__raw__patient_17.json | 0 .../{ => phenoage}/test__raw__patient_18.json | 0 .../{ => phenoage}/test__raw__patient_19.json | 0 .../{ => phenoage}/test__raw__patient_20.json | 0 .../{ => phenoage}/test__raw__patient_21.json | 0 .../{ => phenoage}/test__raw__patient_22.json | 0 .../{ => phenoage}/test__raw__patient_23.json | 0 .../{ => phenoage}/test__raw__patient_24.json | 0 .../{ => score2}/test__raw__patient_25.json | 0 .../{ => score2}/test__raw__patient_26.json | 0 .../{ => score2}/test__raw__patient_27.json | 0 .../{ => score2}/test__raw__patient_28.json | 0 .../{ => score2}/test__raw__patient_29.json | 0 .../{ => score2}/test__raw__patient_30.json | 0 .../{ => score2}/test__raw__patient_31.json | 0 .../{ => score2}/test__raw__patient_32.json | 0 .../{ => score2}/test__raw__patient_33.json | 0 .../{ => score2}/test__raw__patient_34.json | 0 .../{ => score2}/test__raw__patient_35.json | 0 .../{ => score2}/test__raw__patient_36.json | 0 tests/test_io.py | 4 ++-- tests/test_phenoage.py | 2 +- tests/test_score2.py | 2 +- vitals/biomarkers/io.py | 20 +++++++++---------- 76 files changed, 14 insertions(+), 14 deletions(-) rename tests/inputs/{ => phenoage}/test__input__patient_01.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_02.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_03.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_04.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_05.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_06.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_07.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_08.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_09.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_10.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_11.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_12.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_13.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_14.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_15.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_16.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_17.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_18.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_19.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_20.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_21.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_22.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_23.json (100%) rename tests/inputs/{ => phenoage}/test__input__patient_24.json (100%) rename tests/inputs/{ => score2}/test__input__patient_25.json (100%) rename tests/inputs/{ => score2}/test__input__patient_26.json (100%) rename tests/inputs/{ => score2}/test__input__patient_27.json (100%) rename tests/inputs/{ => score2}/test__input__patient_28.json (100%) rename tests/inputs/{ => score2}/test__input__patient_29.json (100%) rename tests/inputs/{ => score2}/test__input__patient_30.json (100%) rename tests/inputs/{ => score2}/test__input__patient_31.json (100%) rename tests/inputs/{ => score2}/test__input__patient_32.json (100%) rename tests/inputs/{ => score2}/test__input__patient_33.json (100%) rename tests/inputs/{ => score2}/test__input__patient_34.json (100%) rename tests/inputs/{ => score2}/test__input__patient_35.json (100%) rename tests/inputs/{ => score2}/test__input__patient_36.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_01.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_02.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_03.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_04.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_05.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_06.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_07.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_08.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_09.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_10.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_11.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_12.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_13.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_14.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_15.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_16.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_17.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_18.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_19.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_20.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_21.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_22.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_23.json (100%) rename tests/raw/{ => phenoage}/test__raw__patient_24.json (100%) rename tests/raw/{ => score2}/test__raw__patient_25.json (100%) rename tests/raw/{ => score2}/test__raw__patient_26.json (100%) rename tests/raw/{ => score2}/test__raw__patient_27.json (100%) rename tests/raw/{ => score2}/test__raw__patient_28.json (100%) rename tests/raw/{ => score2}/test__raw__patient_29.json (100%) rename tests/raw/{ => score2}/test__raw__patient_30.json (100%) rename tests/raw/{ => score2}/test__raw__patient_31.json (100%) rename tests/raw/{ => score2}/test__raw__patient_32.json (100%) rename tests/raw/{ => score2}/test__raw__patient_33.json (100%) rename tests/raw/{ => score2}/test__raw__patient_34.json (100%) rename tests/raw/{ => score2}/test__raw__patient_35.json (100%) rename tests/raw/{ => score2}/test__raw__patient_36.json (100%) diff --git a/tests/inputs/test__input__patient_01.json b/tests/inputs/phenoage/test__input__patient_01.json similarity index 100% rename from tests/inputs/test__input__patient_01.json rename to tests/inputs/phenoage/test__input__patient_01.json diff --git a/tests/inputs/test__input__patient_02.json b/tests/inputs/phenoage/test__input__patient_02.json similarity index 100% rename from tests/inputs/test__input__patient_02.json rename to tests/inputs/phenoage/test__input__patient_02.json diff --git a/tests/inputs/test__input__patient_03.json b/tests/inputs/phenoage/test__input__patient_03.json similarity index 100% rename from tests/inputs/test__input__patient_03.json rename to tests/inputs/phenoage/test__input__patient_03.json diff --git a/tests/inputs/test__input__patient_04.json b/tests/inputs/phenoage/test__input__patient_04.json similarity index 100% rename from tests/inputs/test__input__patient_04.json rename to tests/inputs/phenoage/test__input__patient_04.json diff --git a/tests/inputs/test__input__patient_05.json b/tests/inputs/phenoage/test__input__patient_05.json similarity index 100% rename from tests/inputs/test__input__patient_05.json rename to tests/inputs/phenoage/test__input__patient_05.json diff --git a/tests/inputs/test__input__patient_06.json b/tests/inputs/phenoage/test__input__patient_06.json similarity index 100% rename from tests/inputs/test__input__patient_06.json rename to tests/inputs/phenoage/test__input__patient_06.json diff --git a/tests/inputs/test__input__patient_07.json b/tests/inputs/phenoage/test__input__patient_07.json similarity index 100% rename from tests/inputs/test__input__patient_07.json rename to tests/inputs/phenoage/test__input__patient_07.json diff --git a/tests/inputs/test__input__patient_08.json b/tests/inputs/phenoage/test__input__patient_08.json similarity index 100% rename from tests/inputs/test__input__patient_08.json rename to tests/inputs/phenoage/test__input__patient_08.json diff --git a/tests/inputs/test__input__patient_09.json b/tests/inputs/phenoage/test__input__patient_09.json similarity index 100% rename from tests/inputs/test__input__patient_09.json rename to tests/inputs/phenoage/test__input__patient_09.json diff --git a/tests/inputs/test__input__patient_10.json b/tests/inputs/phenoage/test__input__patient_10.json similarity index 100% rename from tests/inputs/test__input__patient_10.json rename to tests/inputs/phenoage/test__input__patient_10.json diff --git a/tests/inputs/test__input__patient_11.json b/tests/inputs/phenoage/test__input__patient_11.json similarity index 100% rename from tests/inputs/test__input__patient_11.json rename to tests/inputs/phenoage/test__input__patient_11.json diff --git a/tests/inputs/test__input__patient_12.json b/tests/inputs/phenoage/test__input__patient_12.json similarity index 100% rename from tests/inputs/test__input__patient_12.json rename to tests/inputs/phenoage/test__input__patient_12.json diff --git a/tests/inputs/test__input__patient_13.json b/tests/inputs/phenoage/test__input__patient_13.json similarity index 100% rename from tests/inputs/test__input__patient_13.json rename to tests/inputs/phenoage/test__input__patient_13.json diff --git a/tests/inputs/test__input__patient_14.json b/tests/inputs/phenoage/test__input__patient_14.json similarity index 100% rename from tests/inputs/test__input__patient_14.json rename to tests/inputs/phenoage/test__input__patient_14.json diff --git a/tests/inputs/test__input__patient_15.json b/tests/inputs/phenoage/test__input__patient_15.json similarity index 100% rename from tests/inputs/test__input__patient_15.json rename to tests/inputs/phenoage/test__input__patient_15.json diff --git a/tests/inputs/test__input__patient_16.json b/tests/inputs/phenoage/test__input__patient_16.json similarity index 100% rename from tests/inputs/test__input__patient_16.json rename to tests/inputs/phenoage/test__input__patient_16.json diff --git a/tests/inputs/test__input__patient_17.json b/tests/inputs/phenoage/test__input__patient_17.json similarity index 100% rename from tests/inputs/test__input__patient_17.json rename to tests/inputs/phenoage/test__input__patient_17.json diff --git a/tests/inputs/test__input__patient_18.json b/tests/inputs/phenoage/test__input__patient_18.json similarity index 100% rename from tests/inputs/test__input__patient_18.json rename to tests/inputs/phenoage/test__input__patient_18.json diff --git a/tests/inputs/test__input__patient_19.json b/tests/inputs/phenoage/test__input__patient_19.json similarity index 100% rename from tests/inputs/test__input__patient_19.json rename to tests/inputs/phenoage/test__input__patient_19.json diff --git a/tests/inputs/test__input__patient_20.json b/tests/inputs/phenoage/test__input__patient_20.json similarity index 100% rename from tests/inputs/test__input__patient_20.json rename to tests/inputs/phenoage/test__input__patient_20.json diff --git a/tests/inputs/test__input__patient_21.json b/tests/inputs/phenoage/test__input__patient_21.json similarity index 100% rename from tests/inputs/test__input__patient_21.json rename to tests/inputs/phenoage/test__input__patient_21.json diff --git a/tests/inputs/test__input__patient_22.json b/tests/inputs/phenoage/test__input__patient_22.json similarity index 100% rename from tests/inputs/test__input__patient_22.json rename to tests/inputs/phenoage/test__input__patient_22.json diff --git a/tests/inputs/test__input__patient_23.json b/tests/inputs/phenoage/test__input__patient_23.json similarity index 100% rename from tests/inputs/test__input__patient_23.json rename to tests/inputs/phenoage/test__input__patient_23.json diff --git a/tests/inputs/test__input__patient_24.json b/tests/inputs/phenoage/test__input__patient_24.json similarity index 100% rename from tests/inputs/test__input__patient_24.json rename to tests/inputs/phenoage/test__input__patient_24.json diff --git a/tests/inputs/test__input__patient_25.json b/tests/inputs/score2/test__input__patient_25.json similarity index 100% rename from tests/inputs/test__input__patient_25.json rename to tests/inputs/score2/test__input__patient_25.json diff --git a/tests/inputs/test__input__patient_26.json b/tests/inputs/score2/test__input__patient_26.json similarity index 100% rename from tests/inputs/test__input__patient_26.json rename to tests/inputs/score2/test__input__patient_26.json diff --git a/tests/inputs/test__input__patient_27.json b/tests/inputs/score2/test__input__patient_27.json similarity index 100% rename from tests/inputs/test__input__patient_27.json rename to tests/inputs/score2/test__input__patient_27.json diff --git a/tests/inputs/test__input__patient_28.json b/tests/inputs/score2/test__input__patient_28.json similarity index 100% rename from tests/inputs/test__input__patient_28.json rename to tests/inputs/score2/test__input__patient_28.json diff --git a/tests/inputs/test__input__patient_29.json b/tests/inputs/score2/test__input__patient_29.json similarity index 100% rename from tests/inputs/test__input__patient_29.json rename to tests/inputs/score2/test__input__patient_29.json diff --git a/tests/inputs/test__input__patient_30.json b/tests/inputs/score2/test__input__patient_30.json similarity index 100% rename from tests/inputs/test__input__patient_30.json rename to tests/inputs/score2/test__input__patient_30.json diff --git a/tests/inputs/test__input__patient_31.json b/tests/inputs/score2/test__input__patient_31.json similarity index 100% rename from tests/inputs/test__input__patient_31.json rename to tests/inputs/score2/test__input__patient_31.json diff --git a/tests/inputs/test__input__patient_32.json b/tests/inputs/score2/test__input__patient_32.json similarity index 100% rename from tests/inputs/test__input__patient_32.json rename to tests/inputs/score2/test__input__patient_32.json diff --git a/tests/inputs/test__input__patient_33.json b/tests/inputs/score2/test__input__patient_33.json similarity index 100% rename from tests/inputs/test__input__patient_33.json rename to tests/inputs/score2/test__input__patient_33.json diff --git a/tests/inputs/test__input__patient_34.json b/tests/inputs/score2/test__input__patient_34.json similarity index 100% rename from tests/inputs/test__input__patient_34.json rename to tests/inputs/score2/test__input__patient_34.json diff --git a/tests/inputs/test__input__patient_35.json b/tests/inputs/score2/test__input__patient_35.json similarity index 100% rename from tests/inputs/test__input__patient_35.json rename to tests/inputs/score2/test__input__patient_35.json diff --git a/tests/inputs/test__input__patient_36.json b/tests/inputs/score2/test__input__patient_36.json similarity index 100% rename from tests/inputs/test__input__patient_36.json rename to tests/inputs/score2/test__input__patient_36.json diff --git a/tests/raw/test__raw__patient_01.json b/tests/raw/phenoage/test__raw__patient_01.json similarity index 100% rename from tests/raw/test__raw__patient_01.json rename to tests/raw/phenoage/test__raw__patient_01.json diff --git a/tests/raw/test__raw__patient_02.json b/tests/raw/phenoage/test__raw__patient_02.json similarity index 100% rename from tests/raw/test__raw__patient_02.json rename to tests/raw/phenoage/test__raw__patient_02.json diff --git a/tests/raw/test__raw__patient_03.json b/tests/raw/phenoage/test__raw__patient_03.json similarity index 100% rename from tests/raw/test__raw__patient_03.json rename to tests/raw/phenoage/test__raw__patient_03.json diff --git a/tests/raw/test__raw__patient_04.json b/tests/raw/phenoage/test__raw__patient_04.json similarity index 100% rename from tests/raw/test__raw__patient_04.json rename to tests/raw/phenoage/test__raw__patient_04.json diff --git a/tests/raw/test__raw__patient_05.json b/tests/raw/phenoage/test__raw__patient_05.json similarity index 100% rename from tests/raw/test__raw__patient_05.json rename to tests/raw/phenoage/test__raw__patient_05.json diff --git a/tests/raw/test__raw__patient_06.json b/tests/raw/phenoage/test__raw__patient_06.json similarity index 100% rename from tests/raw/test__raw__patient_06.json rename to tests/raw/phenoage/test__raw__patient_06.json diff --git a/tests/raw/test__raw__patient_07.json b/tests/raw/phenoage/test__raw__patient_07.json similarity index 100% rename from tests/raw/test__raw__patient_07.json rename to tests/raw/phenoage/test__raw__patient_07.json diff --git a/tests/raw/test__raw__patient_08.json b/tests/raw/phenoage/test__raw__patient_08.json similarity index 100% rename from tests/raw/test__raw__patient_08.json rename to tests/raw/phenoage/test__raw__patient_08.json diff --git a/tests/raw/test__raw__patient_09.json b/tests/raw/phenoage/test__raw__patient_09.json similarity index 100% rename from tests/raw/test__raw__patient_09.json rename to tests/raw/phenoage/test__raw__patient_09.json diff --git a/tests/raw/test__raw__patient_10.json b/tests/raw/phenoage/test__raw__patient_10.json similarity index 100% rename from tests/raw/test__raw__patient_10.json rename to tests/raw/phenoage/test__raw__patient_10.json diff --git a/tests/raw/test__raw__patient_11.json b/tests/raw/phenoage/test__raw__patient_11.json similarity index 100% rename from tests/raw/test__raw__patient_11.json rename to tests/raw/phenoage/test__raw__patient_11.json diff --git a/tests/raw/test__raw__patient_12.json b/tests/raw/phenoage/test__raw__patient_12.json similarity index 100% rename from tests/raw/test__raw__patient_12.json rename to tests/raw/phenoage/test__raw__patient_12.json diff --git a/tests/raw/test__raw__patient_13.json b/tests/raw/phenoage/test__raw__patient_13.json similarity index 100% rename from tests/raw/test__raw__patient_13.json rename to tests/raw/phenoage/test__raw__patient_13.json diff --git a/tests/raw/test__raw__patient_14.json b/tests/raw/phenoage/test__raw__patient_14.json similarity index 100% rename from tests/raw/test__raw__patient_14.json rename to tests/raw/phenoage/test__raw__patient_14.json diff --git a/tests/raw/test__raw__patient_15.json b/tests/raw/phenoage/test__raw__patient_15.json similarity index 100% rename from tests/raw/test__raw__patient_15.json rename to tests/raw/phenoage/test__raw__patient_15.json diff --git a/tests/raw/test__raw__patient_16.json b/tests/raw/phenoage/test__raw__patient_16.json similarity index 100% rename from tests/raw/test__raw__patient_16.json rename to tests/raw/phenoage/test__raw__patient_16.json diff --git a/tests/raw/test__raw__patient_17.json b/tests/raw/phenoage/test__raw__patient_17.json similarity index 100% rename from tests/raw/test__raw__patient_17.json rename to tests/raw/phenoage/test__raw__patient_17.json diff --git a/tests/raw/test__raw__patient_18.json b/tests/raw/phenoage/test__raw__patient_18.json similarity index 100% rename from tests/raw/test__raw__patient_18.json rename to tests/raw/phenoage/test__raw__patient_18.json diff --git a/tests/raw/test__raw__patient_19.json b/tests/raw/phenoage/test__raw__patient_19.json similarity index 100% rename from tests/raw/test__raw__patient_19.json rename to tests/raw/phenoage/test__raw__patient_19.json diff --git a/tests/raw/test__raw__patient_20.json b/tests/raw/phenoage/test__raw__patient_20.json similarity index 100% rename from tests/raw/test__raw__patient_20.json rename to tests/raw/phenoage/test__raw__patient_20.json diff --git a/tests/raw/test__raw__patient_21.json b/tests/raw/phenoage/test__raw__patient_21.json similarity index 100% rename from tests/raw/test__raw__patient_21.json rename to tests/raw/phenoage/test__raw__patient_21.json diff --git a/tests/raw/test__raw__patient_22.json b/tests/raw/phenoage/test__raw__patient_22.json similarity index 100% rename from tests/raw/test__raw__patient_22.json rename to tests/raw/phenoage/test__raw__patient_22.json diff --git a/tests/raw/test__raw__patient_23.json b/tests/raw/phenoage/test__raw__patient_23.json similarity index 100% rename from tests/raw/test__raw__patient_23.json rename to tests/raw/phenoage/test__raw__patient_23.json diff --git a/tests/raw/test__raw__patient_24.json b/tests/raw/phenoage/test__raw__patient_24.json similarity index 100% rename from tests/raw/test__raw__patient_24.json rename to tests/raw/phenoage/test__raw__patient_24.json diff --git a/tests/raw/test__raw__patient_25.json b/tests/raw/score2/test__raw__patient_25.json similarity index 100% rename from tests/raw/test__raw__patient_25.json rename to tests/raw/score2/test__raw__patient_25.json diff --git a/tests/raw/test__raw__patient_26.json b/tests/raw/score2/test__raw__patient_26.json similarity index 100% rename from tests/raw/test__raw__patient_26.json rename to tests/raw/score2/test__raw__patient_26.json diff --git a/tests/raw/test__raw__patient_27.json b/tests/raw/score2/test__raw__patient_27.json similarity index 100% rename from tests/raw/test__raw__patient_27.json rename to tests/raw/score2/test__raw__patient_27.json diff --git a/tests/raw/test__raw__patient_28.json b/tests/raw/score2/test__raw__patient_28.json similarity index 100% rename from tests/raw/test__raw__patient_28.json rename to tests/raw/score2/test__raw__patient_28.json diff --git a/tests/raw/test__raw__patient_29.json b/tests/raw/score2/test__raw__patient_29.json similarity index 100% rename from tests/raw/test__raw__patient_29.json rename to tests/raw/score2/test__raw__patient_29.json diff --git a/tests/raw/test__raw__patient_30.json b/tests/raw/score2/test__raw__patient_30.json similarity index 100% rename from tests/raw/test__raw__patient_30.json rename to tests/raw/score2/test__raw__patient_30.json diff --git a/tests/raw/test__raw__patient_31.json b/tests/raw/score2/test__raw__patient_31.json similarity index 100% rename from tests/raw/test__raw__patient_31.json rename to tests/raw/score2/test__raw__patient_31.json diff --git a/tests/raw/test__raw__patient_32.json b/tests/raw/score2/test__raw__patient_32.json similarity index 100% rename from tests/raw/test__raw__patient_32.json rename to tests/raw/score2/test__raw__patient_32.json diff --git a/tests/raw/test__raw__patient_33.json b/tests/raw/score2/test__raw__patient_33.json similarity index 100% rename from tests/raw/test__raw__patient_33.json rename to tests/raw/score2/test__raw__patient_33.json diff --git a/tests/raw/test__raw__patient_34.json b/tests/raw/score2/test__raw__patient_34.json similarity index 100% rename from tests/raw/test__raw__patient_34.json rename to tests/raw/score2/test__raw__patient_34.json diff --git a/tests/raw/test__raw__patient_35.json b/tests/raw/score2/test__raw__patient_35.json similarity index 100% rename from tests/raw/test__raw__patient_35.json rename to tests/raw/score2/test__raw__patient_35.json diff --git a/tests/raw/test__raw__patient_36.json b/tests/raw/score2/test__raw__patient_36.json similarity index 100% rename from tests/raw/test__raw__patient_36.json rename to tests/raw/score2/test__raw__patient_36.json diff --git a/tests/test_io.py b/tests/test_io.py index d22e5f0..6f42c92 100755 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -5,8 +5,8 @@ from vitals.biomarkers import io -INP_FILEPATH = Path(__file__).parent / "raw" -OUT_FILEPATH = Path(__file__).parent / "inputs" +INP_FILEPATH = Path(__file__).parent / "raw" / "phenoage" +OUT_FILEPATH = Path(__file__).parent / "inputs" / "phenoage" @pytest.mark.parametrize( diff --git a/tests/test_phenoage.py b/tests/test_phenoage.py index d23d8ba..3da32da 100755 --- a/tests/test_phenoage.py +++ b/tests/test_phenoage.py @@ -4,7 +4,7 @@ from vitals.phenoage import compute -OUT_FILEPATH = Path(__file__).parent / "inputs" +OUT_FILEPATH = Path(__file__).parent / "inputs" / "phenoage" @pytest.mark.parametrize( diff --git a/tests/test_score2.py b/tests/test_score2.py index c1e3968..1f651c1 100644 --- a/tests/test_score2.py +++ b/tests/test_score2.py @@ -4,7 +4,7 @@ from vitals.score2 import compute -OUT_FILEPATH = Path(__file__).parent / "inputs" +OUT_FILEPATH = Path(__file__).parent / "inputs" / "score2" @pytest.mark.parametrize( diff --git a/vitals/biomarkers/io.py b/vitals/biomarkers/io.py index e0d4946..f1b3ff2 100755 --- a/vitals/biomarkers/io.py +++ b/vitals/biomarkers/io.py @@ -40,16 +40,16 @@ def write(data: dict, output_file: Path) -> None: print(f"Processed: file written at {output_file.name}") -if __name__ == "__main__": - # Process all JSON files in the input directory - input_dir = Path("tests/raw") - output_dir = Path("tests/inputs") +# if __name__ == "__main__": +# # Process all JSON files in the input directory +# input_dir = Path("tests/raw") +# output_dir = Path("tests/inputs") - for input_file in input_dir.glob("*.json"): - output_file = output_dir / input_file.name.replace("raw", "input") +# for input_file in input_dir.glob("*.json"): +# output_file = output_dir / input_file.name.replace("raw", "input") - # Update biomarker data - data = update(input_file) +# # Update biomarker data +# data = update(input_file) - # Write output file - write(data, output_file) +# # Write output file +# write(data, output_file)