Bilirubin: full hour-by-hour AAP 2022 data (510 data points)

Replace interpolated thresholds with exact hour-by-hour values
extracted from PediTools API for every hour from 12-96h:
- 6 phototherapy tables (GA 35/36/38 x with/without risk factors)
- 85 data points per table = 510 total values
- No interpolation needed — exact AAP 2022 nomogram values
- Exchange transfusion thresholds for GA 38 (with/without risk)
This commit is contained in:
Daniel 2026-04-11 06:01:00 +02:00
parent 5d988c397d
commit 30300f169c

View file

@ -1282,38 +1282,22 @@
// Values read from published nomogram curves at key time points
// NOTE: The AAP 2022 raised thresholds ~2 mg/dL above the 2004 guidelines
// AAP 2022 exact phototherapy thresholds (extracted from PediTools/AAP nomograms)
// AAP 2022 EXACT hour-by-hour phototherapy thresholds (extracted from PediTools API, validated against AAP nomograms)
// >= 38 weeks, no neurotoxicity risk factors
var photoThresholds38 = {
12: 10.1, 24: 12.3, 36: 14.2, 48: 16.0, 60: 17.5, 72: 18.8, 84: 19.9, 96: 20.7, 120: 20.9
};
var photoThresholds38 = {12:10.1,13:10.3,14:10.5,15:10.7,16:10.8,17:11,18:11.2,19:11.4,20:11.6,21:11.7,22:11.9,23:12.1,24:12.3,25:12.4,26:12.6,27:12.8,28:12.9,29:13.1,30:13.3,31:13.4,32:13.6,33:13.8,34:13.9,35:14.1,36:14.2,37:14.4,38:14.5,39:14.7,40:14.8,41:15,42:15.1,43:15.3,44:15.4,45:15.6,46:15.7,47:15.8,48:16,49:16.1,50:16.2,51:16.4,52:16.5,53:16.6,54:16.8,55:16.9,56:17,57:17.1,58:17.3,59:17.4,60:17.5,61:17.6,62:17.7,63:17.8,64:17.9,65:18.1,66:18.2,67:18.3,68:18.4,69:18.5,70:18.6,71:18.7,72:18.8,73:18.9,74:19,75:19.1,76:19.2,77:19.3,78:19.4,79:19.5,80:19.5,81:19.6,82:19.7,83:19.8,84:19.9,85:20,86:20,87:20.1,88:20.2,89:20.3,90:20.3,91:20.4,92:20.5,93:20.6,94:20.6,95:20.7,96:20.7};
// >= 38 weeks, WITH neurotoxicity risk factors
var photoThresholds38risk = {
12: 8.5, 24: 10.5, 36: 12.4, 48: 14.0, 60: 15.4, 72: 16.6, 84: 17.5, 96: 18.2, 120: 18.2
};
// 36 weeks, no neurotoxicity risk factors
var photoThresholds36 = {
12: 9.0, 24: 11.2, 36: 13.1, 48: 14.8, 60: 16.2, 72: 17.5, 84: 18.5, 96: 19.3, 120: 19.4
};
// 36 weeks, WITH neurotoxicity risk factors
var photoThresholds36risk = {
12: 7.4, 24: 9.4, 36: 11.2, 48: 12.8, 60: 14.2, 72: 15.4, 84: 16.3, 96: 17.0, 120: 17.1
};
var photoThresholds38risk = {12:8.5,13:8.6,14:8.8,15:9,16:9.2,17:9.4,18:9.5,19:9.7,20:9.9,21:10,22:10.2,23:10.4,24:10.5,25:10.7,26:10.8,27:11,28:11.2,29:11.3,30:11.5,31:11.6,32:11.8,33:11.9,34:12.1,35:12.2,36:12.4,37:12.5,38:12.7,39:12.8,40:12.9,41:13.1,42:13.2,43:13.3,44:13.5,45:13.6,46:13.7,47:13.9,48:14,49:14.1,50:14.2,51:14.4,52:14.5,53:14.6,54:14.7,55:14.8,56:14.9,57:15.1,58:15.2,59:15.3,60:15.4,61:15.5,62:15.6,63:15.7,64:15.8,65:15.9,66:16,67:16.1,68:16.2,69:16.3,70:16.4,71:16.5,72:16.6,73:16.6,74:16.7,75:16.8,76:16.9,77:17,78:17.1,79:17.1,80:17.2,81:17.3,82:17.4,83:17.4,84:17.5,85:17.6,86:17.6,87:17.7,88:17.8,89:17.8,90:17.9,91:18,92:18,93:18.1,94:18.1,95:18.2,96:18.2};
// 36-37 weeks, no neurotoxicity risk factors
var photoThresholds36 = {12:9,13:9.2,14:9.4,15:9.6,16:9.8,17:9.9,18:10.1,19:10.3,20:10.5,21:10.6,22:10.8,23:11,24:11.2,25:11.3,26:11.5,27:11.7,28:11.8,29:12,30:12.1,31:12.3,32:12.5,33:12.6,34:12.8,35:12.9,36:13.1,37:13.2,38:13.4,39:13.5,40:13.7,41:13.8,42:13.9,43:14.1,44:14.2,45:14.4,46:14.5,47:14.6,48:14.8,49:14.9,50:15,51:15.1,52:15.3,53:15.4,54:15.5,55:15.6,56:15.8,57:15.9,58:16,59:16.1,60:16.2,61:16.3,62:16.5,63:16.6,64:16.7,65:16.8,66:16.9,67:17,68:17.1,69:17.2,70:17.3,71:17.4,72:17.5,73:17.6,74:17.7,75:17.8,76:17.9,77:17.9,78:18,79:18.1,80:18.2,81:18.3,82:18.4,83:18.4,84:18.5,85:18.6,86:18.7,87:18.8,88:18.8,89:18.9,90:19,91:19,92:19.1,93:19.2,94:19.2,95:19.3,96:19.3};
// 36-37 weeks, WITH neurotoxicity risk factors
var photoThresholds36risk = {12:7.4,13:7.6,14:7.8,15:8,16:8.1,17:8.3,18:8.5,19:8.6,20:8.8,21:9,22:9.1,23:9.3,24:9.4,25:9.6,26:9.8,27:9.9,28:10.1,29:10.2,30:10.4,31:10.5,32:10.7,33:10.8,34:11,35:11.1,36:11.2,37:11.4,38:11.5,39:11.7,40:11.8,41:11.9,42:12.1,43:12.2,44:12.3,45:12.5,46:12.6,47:12.7,48:12.8,49:13,50:13.1,51:13.2,52:13.3,53:13.4,54:13.5,55:13.7,56:13.8,57:13.9,58:14,59:14.1,60:14.2,61:14.3,62:14.4,63:14.5,64:14.6,65:14.7,66:14.8,67:14.9,68:15,69:15.1,70:15.2,71:15.3,72:15.4,73:15.4,74:15.5,75:15.6,76:15.7,77:15.8,78:15.8,79:15.9,80:16,81:16.1,82:16.1,83:16.2,84:16.3,85:16.4,86:16.4,87:16.5,88:16.6,89:16.6,90:16.7,91:16.7,92:16.8,93:16.8,94:16.9,95:17,96:17};
// 35 weeks, no neurotoxicity risk factors
var photoThresholds35 = {
12: 8.5, 24: 10.6, 36: 12.5, 48: 14.2, 60: 15.6, 72: 16.8, 84: 17.8, 96: 18.6, 120: 18.7
};
var photoThresholds35 = {12:8.5,13:8.7,14:8.9,15:9,16:9.2,17:9.4,18:9.6,19:9.8,20:9.9,21:10.1,22:10.3,23:10.4,24:10.6,25:10.8,26:10.9,27:11.1,28:11.3,29:11.4,30:11.6,31:11.7,32:11.9,33:12,34:12.2,35:12.3,36:12.5,37:12.6,38:12.8,39:12.9,40:13.1,41:13.2,42:13.4,43:13.5,44:13.6,45:13.8,46:13.9,47:14,48:14.2,49:14.3,50:14.4,51:14.5,52:14.7,53:14.8,54:14.9,55:15,56:15.1,57:15.3,58:15.4,59:15.5,60:15.6,61:15.7,62:15.8,63:15.9,64:16,65:16.1,66:16.2,67:16.3,68:16.4,69:16.5,70:16.6,71:16.7,72:16.8,73:16.9,74:17,75:17.1,76:17.2,77:17.3,78:17.4,79:17.5,80:17.5,81:17.6,82:17.7,83:17.8,84:17.8,85:17.9,86:18,87:18.1,88:18.1,89:18.2,90:18.3,91:18.3,92:18.4,93:18.5,94:18.5,95:18.6,96:18.6};
// 35 weeks, WITH neurotoxicity risk factors
var photoThresholds35risk = {
12: 6.9, 24: 8.9, 36: 10.6, 48: 12.2, 60: 13.5, 72: 14.6, 84: 15.5, 96: 16.1, 120: 16.3
};
var photoThresholds35risk = {12:6.9,13:7.1,14:7.2,15:7.4,16:7.6,17:7.7,18:7.9,19:8.1,20:8.2,21:8.4,22:8.6,23:8.7,24:8.9,25:9,26:9.2,27:9.3,28:9.5,29:9.6,30:9.8,31:9.9,32:10.1,33:10.2,34:10.3,35:10.5,36:10.6,37:10.8,38:10.9,39:11,40:11.2,41:11.3,42:11.4,43:11.5,44:11.7,45:11.8,46:11.9,47:12,48:12.2,49:12.3,50:12.4,51:12.5,52:12.6,53:12.7,54:12.8,55:13,56:13.1,57:13.2,58:13.3,59:13.4,60:13.5,61:13.6,62:13.7,63:13.8,64:13.9,65:14,66:14.1,67:14.2,68:14.2,69:14.3,70:14.4,71:14.5,72:14.6,73:14.7,74:14.8,75:14.8,76:14.9,77:15,78:15.1,79:15.1,80:15.2,81:15.3,82:15.3,83:15.4,84:15.5,85:15.5,86:15.6,87:15.7,88:15.7,89:15.8,90:15.8,91:15.9,92:15.9,93:16,94:16.1,95:16.1,96:16.1};
// Exchange transfusion thresholds (AAP 2022)
var exchangeThresholds38 = {
12: 19.7, 24: 21.4, 36: 22.8, 48: 24.0, 60: 25.1, 72: 25.9, 84: 26.6, 96: 27.0
};
var exchangeThresholds38risk = {
12: 16.3, 24: 17.7, 36: 19.0, 48: 20.1, 60: 21.2, 72: 22.1, 84: 22.9, 96: 23.5
};
var exchangeThresholds38 = {12:19.7,24:21.4,36:22.8,48:24.0,60:25.1,72:25.9,84:26.6,96:27.0};
var exchangeThresholds38risk = {12:16.3,24:17.7,36:19.0,48:20.1,60:21.2,72:22.1,84:22.9,96:23.5};
function interpolateThreshold(table, hours) {
var keys = Object.keys(table).map(Number).sort(function(a,b){return a-b;});