Skip to content

Commit 3687eb2

Browse files
committed
functioning WHO, single story girl height - centile data not defaulting to youngest reference
1 parent ff0a50e commit 3687eb2

File tree

7 files changed

+17080
-45
lines changed

7 files changed

+17080
-45
lines changed

src/RCPCHChart/RCPCHChart.stories.tsx

+22
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { cdcOFCGirl } from '../testParameters/measurements/cdcOFCGirls.ts';
1616
import { maleCDCBMIExcess } from '../testParameters/measurements/maleCDCBMIExcess.ts';
1717
import { childTrisomyAAPData } from '../testParameters/measurements/childTrisomyAAPData.ts';
1818
import { maleWeightT21AAPData } from '../testParameters/measurements/maleWeightT21AAP.ts';
19+
import { whoToNineteenGirlHeight } from '../testParameters/measurements/whoHeightToNineteenGirl.ts';
1920
// import { cdcFentonGirlLength } from '../testParameters/measurements/fenton/cdcFentonGirlLength';
2021
// import { cdcFentonGirlWeight } from '../testParameters/measurements/fenton/cdcFentonGirlWeight.ts';
2122

@@ -721,6 +722,27 @@ export const CentileChartTrisomy21AAPBoysHeadCircumference: Story = {
721722
},
722723
};
723724

725+
export const CentileChartWHOGirlsHeight: Story = {
726+
args: {
727+
title: 'Patient Name - Hospital Number',
728+
measurementMethod: 'height',
729+
reference: 'who',
730+
sex: 'female',
731+
measurements: {
732+
height: whoToNineteenGirlHeight,
733+
},
734+
midParentalHeightData: {},
735+
enableZoom: true,
736+
chartType: 'centile',
737+
enableExport: false,
738+
exportChartCallback: () => {},
739+
theme: 'tanner1',
740+
customThemeStyles: {},
741+
clinicianFocus: true,
742+
logoVariant: 'bottom',
743+
},
744+
};
745+
724746
export const TomatoCentileChart: Story = {
725747
args: {
726748
title: 'Patient Name - Hospital Number',

src/RCPCHChart/RCPCHChart.tsx

+19-19
Original file line numberDiff line numberDiff line change
@@ -143,25 +143,25 @@ const RCPCHChart: React.FC<RCPCHChartProps> = ({
143143
return (
144144
<ErrorBoundary styles={styles}>
145145
<GlobalStyle>
146-
<CentileChart
147-
chartsVersion={VERSION}
148-
reference={reference}
149-
title={title}
150-
subtitle={subtitle}
151-
childMeasurements={ measurements[measurementMethod] }
152-
midParentalHeightData={midParentalHeightData || {}}
153-
measurementMethod={measurementMethod}
154-
sex={sex}
155-
enableZoom={enableZoom}
156-
styles={styles}
157-
height={height ?? 800}
158-
width={width ?? 1000}
159-
textScaleFactor={textScaleFactor}
160-
enableExport={enableExport}
161-
exportChartCallback={exportChartCallback}
162-
clinicianFocus={clinicianFocus}
163-
logoVariant={logoVariant}
164-
/>
146+
<CentileChart
147+
chartsVersion={VERSION}
148+
reference={reference}
149+
title={title}
150+
subtitle={subtitle}
151+
childMeasurements={measurements[measurementMethod]}
152+
midParentalHeightData={midParentalHeightData || {}}
153+
measurementMethod={measurementMethod}
154+
sex={sex}
155+
enableZoom={enableZoom}
156+
styles={styles}
157+
height={height ?? 800}
158+
width={width ?? 1000}
159+
textScaleFactor={textScaleFactor}
160+
enableExport={enableExport}
161+
exportChartCallback={exportChartCallback}
162+
clinicianFocus={clinicianFocus}
163+
logoVariant={logoVariant}
164+
/>
165165
</GlobalStyle>
166166
</ErrorBoundary>
167167
);

src/chartdata/who_height_female_centile_data.ts

+22-22
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
199199
{
200200
l: 1.0,
201201
x: 2.0,
202-
y: 78.2099,
202+
y: 78.9089,
203203
},
204204
],
205205
},
@@ -395,7 +395,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
395395
{
396396
l: 3.0,
397397
x: 2.0,
398-
y: 79.6472,
398+
y: 80.3464,
399399
},
400400
],
401401
},
@@ -591,7 +591,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
591591
{
592592
l: 5.0,
593593
x: 2.0,
594-
y: 80.4083,
594+
y: 81.1076,
595595
},
596596
],
597597
},
@@ -787,7 +787,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
787787
{
788788
l: 10.0,
789789
x: 2.0,
790-
y: 81.5804,
790+
y: 82.2799,
791791
},
792792
],
793793
},
@@ -983,7 +983,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
983983
{
984984
l: 15.0,
985985
x: 2.0,
986-
y: 82.3715,
986+
y: 83.0711,
987987
},
988988
],
989989
},
@@ -1179,7 +1179,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
11791179
{
11801180
l: 50.0,
11811181
x: 2.0,
1182-
y: 85.7153,
1182+
y: 86.4153,
11831183
},
11841184
],
11851185
},
@@ -1375,7 +1375,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
13751375
{
13761376
l: 85.0,
13771377
x: 2.0,
1378-
y: 89.0591,
1378+
y: 89.7595,
13791379
},
13801380
],
13811381
},
@@ -1571,7 +1571,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
15711571
{
15721572
l: 90.0,
15731573
x: 2.0,
1574-
y: 89.8502,
1574+
y: 90.5507,
15751575
},
15761576
],
15771577
},
@@ -1767,7 +1767,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
17671767
{
17681768
l: 95.0,
17691769
x: 2.0,
1770-
y: 91.0223,
1770+
y: 91.723,
17711771
},
17721772
],
17731773
},
@@ -1963,7 +1963,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
19631963
{
19641964
l: 97.0,
19651965
x: 2.0,
1966-
y: 91.7834,
1966+
y: 92.4842,
19671967
},
19681968
],
19691969
},
@@ -2159,7 +2159,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
21592159
{
21602160
l: 99.0,
21612161
x: 2.0,
2162-
y: 93.2207,
2162+
y: 93.9217,
21632163
},
21642164
],
21652165
},
@@ -2182,7 +2182,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
21822182
{
21832183
l: 1.0,
21842184
x: 2.0,
2185-
y: 78.9089,
2185+
y: 78.2099,
21862186
},
21872187
{
21882188
l: 1.0,
@@ -2373,7 +2373,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
23732373
{
23742374
l: 3.0,
23752375
x: 2.0,
2376-
y: 80.3464,
2376+
y: 79.6472,
23772377
},
23782378
{
23792379
l: 3.0,
@@ -2564,7 +2564,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
25642564
{
25652565
l: 5.0,
25662566
x: 2.0,
2567-
y: 81.1076,
2567+
y: 80.4083,
25682568
},
25692569
{
25702570
l: 5.0,
@@ -2755,7 +2755,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
27552755
{
27562756
l: 10.0,
27572757
x: 2.0,
2758-
y: 82.2799,
2758+
y: 81.5804,
27592759
},
27602760
{
27612761
l: 10.0,
@@ -2946,7 +2946,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
29462946
{
29472947
l: 15.0,
29482948
x: 2.0,
2949-
y: 83.0711,
2949+
y: 82.3715,
29502950
},
29512951
{
29522952
l: 15.0,
@@ -3137,7 +3137,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
31373137
{
31383138
l: 50.0,
31393139
x: 2.0,
3140-
y: 86.4153,
3140+
y: 85.7153,
31413141
},
31423142
{
31433143
l: 50.0,
@@ -3328,7 +3328,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
33283328
{
33293329
l: 85.0,
33303330
x: 2.0,
3331-
y: 89.7595,
3331+
y: 89.0591,
33323332
},
33333333
{
33343334
l: 85.0,
@@ -3519,7 +3519,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
35193519
{
35203520
l: 90.0,
35213521
x: 2.0,
3522-
y: 90.5507,
3522+
y: 89.8502,
35233523
},
35243524
{
35253525
l: 90.0,
@@ -3710,7 +3710,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
37103710
{
37113711
l: 95.0,
37123712
x: 2.0,
3713-
y: 91.723,
3713+
y: 91.0223,
37143714
},
37153715
{
37163716
l: 95.0,
@@ -3901,7 +3901,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
39013901
{
39023902
l: 97.0,
39033903
x: 2.0,
3904-
y: 92.4842,
3904+
y: 91.7834,
39053905
},
39063906
{
39073907
l: 97.0,
@@ -4092,7 +4092,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
40924092
{
40934093
l: 99.0,
40944094
x: 2.0,
4095-
y: 93.9217,
4095+
y: 93.2207,
40964096
},
40974097
{
40984098
l: 99.0,

0 commit comments

Comments
 (0)