@@ -36,6 +36,8 @@ export function tooltipText(
36
36
bone_age_sds,
37
37
bone_age_centile,
38
38
bone_age_type,
39
+ corrected_percentage_median_bmi,
40
+ chronological_percentage_median_bmi
39
41
} = datum ;
40
42
41
43
// flag passed in from user - if clinician, show clinician age advice strings, else show child/family advice
@@ -207,27 +209,27 @@ export function tooltipText(
207
209
} else {
208
210
// over 42 weeks
209
211
// if no errors, return the ages, measurement and calculations
210
- let percentageMedianBMI = ""
212
+ let correctedPercentageMedianBMI = ""
213
+ let chronologicalPercentageMedianBMI = ""
211
214
if ( measurementMethod === "bmi" ) {
212
- console . log ( datum ) ;
213
-
214
- percentageMedianBMI = `Percentage median BMI: ${ measurementMethod } `
215
+ correctedPercentageMedianBMI = `Percentage median BMI: ${ Math . round ( corrected_percentage_median_bmi ) } %`
216
+ chronologicalPercentageMedianBMI = `Percentage median BMI: ${ Math . round ( chronological_percentage_median_bmi ) } %`
215
217
}
216
218
217
219
// sds in square brackets
218
220
const sds_string = `[SDS: ${ sds > 0 ? '+' + Math . round ( sds * 1000 ) / 1000 : Math . round ( sds * 1000 ) / 1000 } ]` ;
219
221
220
222
if ( age_type === 'corrected_age' && x > 0.0383 ) {
221
223
const finalCorrectedString = comment . replaceAll ( ', ' , ',\n' ) . replaceAll ( '. ' , '.\n' ) ;
222
- return `Corrected age: ${ calendar_age } on ${ observation_date } \n${ finalCorrectedString } \n${ y } ${ measurementSuffix ( measurementMethod ) } ${ clinicianFocus ? sds_string : '\n' + finalCentile } ` ;
224
+ return `Corrected age: ${ calendar_age } on ${ observation_date } \n${ finalCorrectedString } \n${ y } ${ measurementSuffix ( measurementMethod ) } ${ clinicianFocus ? sds_string : '\n' + finalCentile } \n ${ correctedPercentageMedianBMI } ` ;
223
225
}
224
226
if ( age_type === 'chronological_age' ) {
225
227
226
228
let finalChronologicalString = comment
227
229
. replaceAll ( ', ' , ',\n' )
228
230
. replaceAll ( '. ' , '.\n' )
229
231
. replaceAll ( 'account ' , 'account\n' ) ;
230
- return `Chronological age: ${ calendar_age } on ${ observation_date } \n${ finalChronologicalString } \n${ y } ${ measurementSuffix ( measurementMethod ) } ${ clinicianFocus ? sds_string : '\n' + finalCentile } ` ;
232
+ return `Chronological age: ${ calendar_age } on ${ observation_date } \n${ finalChronologicalString } \n${ y } ${ measurementSuffix ( measurementMethod ) } ${ clinicianFocus ? sds_string : '\n' + finalCentile } \n ${ chronologicalPercentageMedianBMI } ` ;
231
233
}
232
234
}
233
235
}
0 commit comments