From 508e98372a6c082b2341d97823a119e58bd9cfa3 Mon Sep 17 00:00:00 2001 From: Simon Chapman Date: Thu, 16 Sep 2021 17:01:32 +0100 Subject: [PATCH] change chart object to be an array, even for trisomy 21 and turners --- rcpchgrowth/chart_functions.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rcpchgrowth/chart_functions.py b/rcpchgrowth/chart_functions.py index c829045..956d508 100644 --- a/rcpchgrowth/chart_functions.py +++ b/rcpchgrowth/chart_functions.py @@ -480,13 +480,13 @@ def create_turner_chart(centile_format: Union[str, list]): sex_list.update({sex: measurements}) # all data can now be tagged by reference_name and added to reference_data - reference_data = {TURNERS: sex_list} + reference_data = [{TURNERS: sex_list}] return reference_data """ Return object structure - trisomy_21: { - male: { + [turners-syndrome: [{ + female: { height: [ { sds: -2.667, @@ -497,7 +497,7 @@ def create_turner_chart(centile_format: Union[str, list]): weight: [...] }, female {...} - } + }] """ @@ -570,12 +570,12 @@ def create_trisomy_21_chart(measurement_method: str, sex: str, centile_format: U sex_list.update({sex: measurements}) # all data can now be tagged by reference_name and added to reference_data - reference_data = {TRISOMY_21: sex_list} + reference_data = [{TRISOMY_21: sex_list}] return reference_data """ # return object structure - trisomy_21: { + [trisomy_21: { male: { height: [ { @@ -587,5 +587,5 @@ def create_trisomy_21_chart(measurement_method: str, sex: str, centile_format: U weight: [...] }, female {...} - } + }] """