Skip to content

Commit

Permalink
functioning WHO, single story girl height - centile data not defaulti…
Browse files Browse the repository at this point in the history
…ng to youngest reference
  • Loading branch information
eatyourpeas committed Dec 29, 2024
1 parent ff0a50e commit 3687eb2
Show file tree
Hide file tree
Showing 7 changed files with 17,080 additions and 45 deletions.
22 changes: 22 additions & 0 deletions src/RCPCHChart/RCPCHChart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { cdcOFCGirl } from '../testParameters/measurements/cdcOFCGirls.ts';
import { maleCDCBMIExcess } from '../testParameters/measurements/maleCDCBMIExcess.ts';
import { childTrisomyAAPData } from '../testParameters/measurements/childTrisomyAAPData.ts';
import { maleWeightT21AAPData } from '../testParameters/measurements/maleWeightT21AAP.ts';
import { whoToNineteenGirlHeight } from '../testParameters/measurements/whoHeightToNineteenGirl.ts';
// import { cdcFentonGirlLength } from '../testParameters/measurements/fenton/cdcFentonGirlLength';
// import { cdcFentonGirlWeight } from '../testParameters/measurements/fenton/cdcFentonGirlWeight.ts';

Expand Down Expand Up @@ -721,6 +722,27 @@ export const CentileChartTrisomy21AAPBoysHeadCircumference: Story = {
},
};

export const CentileChartWHOGirlsHeight: Story = {
args: {
title: 'Patient Name - Hospital Number',
measurementMethod: 'height',
reference: 'who',
sex: 'female',
measurements: {
height: whoToNineteenGirlHeight,
},
midParentalHeightData: {},
enableZoom: true,
chartType: 'centile',
enableExport: false,
exportChartCallback: () => {},
theme: 'tanner1',
customThemeStyles: {},
clinicianFocus: true,
logoVariant: 'bottom',
},
};

export const TomatoCentileChart: Story = {
args: {
title: 'Patient Name - Hospital Number',
Expand Down
38 changes: 19 additions & 19 deletions src/RCPCHChart/RCPCHChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,25 +143,25 @@ const RCPCHChart: React.FC<RCPCHChartProps> = ({
return (
<ErrorBoundary styles={styles}>
<GlobalStyle>
<CentileChart
chartsVersion={VERSION}
reference={reference}
title={title}
subtitle={subtitle}
childMeasurements={ measurements[measurementMethod] }
midParentalHeightData={midParentalHeightData || {}}
measurementMethod={measurementMethod}
sex={sex}
enableZoom={enableZoom}
styles={styles}
height={height ?? 800}
width={width ?? 1000}
textScaleFactor={textScaleFactor}
enableExport={enableExport}
exportChartCallback={exportChartCallback}
clinicianFocus={clinicianFocus}
logoVariant={logoVariant}
/>
<CentileChart
chartsVersion={VERSION}
reference={reference}
title={title}
subtitle={subtitle}
childMeasurements={measurements[measurementMethod]}
midParentalHeightData={midParentalHeightData || {}}
measurementMethod={measurementMethod}
sex={sex}
enableZoom={enableZoom}
styles={styles}
height={height ?? 800}
width={width ?? 1000}
textScaleFactor={textScaleFactor}
enableExport={enableExport}
exportChartCallback={exportChartCallback}
clinicianFocus={clinicianFocus}
logoVariant={logoVariant}
/>
</GlobalStyle>
</ErrorBoundary>
);
Expand Down
44 changes: 22 additions & 22 deletions src/chartdata/who_height_female_centile_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 1.0,
x: 2.0,
y: 78.2099,
y: 78.9089,
},
],
},
Expand Down Expand Up @@ -395,7 +395,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 3.0,
x: 2.0,
y: 79.6472,
y: 80.3464,
},
],
},
Expand Down Expand Up @@ -591,7 +591,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 5.0,
x: 2.0,
y: 80.4083,
y: 81.1076,
},
],
},
Expand Down Expand Up @@ -787,7 +787,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 10.0,
x: 2.0,
y: 81.5804,
y: 82.2799,
},
],
},
Expand Down Expand Up @@ -983,7 +983,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 15.0,
x: 2.0,
y: 82.3715,
y: 83.0711,
},
],
},
Expand Down Expand Up @@ -1179,7 +1179,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 50.0,
x: 2.0,
y: 85.7153,
y: 86.4153,
},
],
},
Expand Down Expand Up @@ -1375,7 +1375,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 85.0,
x: 2.0,
y: 89.0591,
y: 89.7595,
},
],
},
Expand Down Expand Up @@ -1571,7 +1571,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 90.0,
x: 2.0,
y: 89.8502,
y: 90.5507,
},
],
},
Expand Down Expand Up @@ -1767,7 +1767,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 95.0,
x: 2.0,
y: 91.0223,
y: 91.723,
},
],
},
Expand Down Expand Up @@ -1963,7 +1963,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 97.0,
x: 2.0,
y: 91.7834,
y: 92.4842,
},
],
},
Expand Down Expand Up @@ -2159,7 +2159,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 99.0,
x: 2.0,
y: 93.2207,
y: 93.9217,
},
],
},
Expand All @@ -2182,7 +2182,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 1.0,
x: 2.0,
y: 78.9089,
y: 78.2099,
},
{
l: 1.0,
Expand Down Expand Up @@ -2373,7 +2373,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 3.0,
x: 2.0,
y: 80.3464,
y: 79.6472,
},
{
l: 3.0,
Expand Down Expand Up @@ -2564,7 +2564,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 5.0,
x: 2.0,
y: 81.1076,
y: 80.4083,
},
{
l: 5.0,
Expand Down Expand Up @@ -2755,7 +2755,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 10.0,
x: 2.0,
y: 82.2799,
y: 81.5804,
},
{
l: 10.0,
Expand Down Expand Up @@ -2946,7 +2946,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 15.0,
x: 2.0,
y: 83.0711,
y: 82.3715,
},
{
l: 15.0,
Expand Down Expand Up @@ -3137,7 +3137,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 50.0,
x: 2.0,
y: 86.4153,
y: 85.7153,
},
{
l: 50.0,
Expand Down Expand Up @@ -3328,7 +3328,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 85.0,
x: 2.0,
y: 89.7595,
y: 89.0591,
},
{
l: 85.0,
Expand Down Expand Up @@ -3519,7 +3519,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 90.0,
x: 2.0,
y: 90.5507,
y: 89.8502,
},
{
l: 90.0,
Expand Down Expand Up @@ -3710,7 +3710,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 95.0,
x: 2.0,
y: 91.723,
y: 91.0223,
},
{
l: 95.0,
Expand Down Expand Up @@ -3901,7 +3901,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 97.0,
x: 2.0,
y: 92.4842,
y: 91.7834,
},
{
l: 97.0,
Expand Down Expand Up @@ -4092,7 +4092,7 @@ export const whoHeightFemaleCentileData: ReferenceGroup = {
{
l: 99.0,
x: 2.0,
y: 93.9217,
y: 93.2207,
},
{
l: 99.0,
Expand Down
Loading

0 comments on commit 3687eb2

Please sign in to comment.