Manual differential calculations

This commit is contained in:
Jiang Yio 2023-05-03 23:20:35 -04:00
parent 666c917472
commit a64edff176

View File

@ -101,6 +101,42 @@ function lab_parse1default(data) {
flag: (x < 1.4 ? 'L' : x > 6.5 ? 'H' : undefined)
});
}
if(results.hasOwnProperty('EOSINO')) {
results.push(results['EOSINOPHIL%'] = {
name: 'EOSINOPHIL%', unit: '%', range: '0.0 - 10.0',
value: x = +results.EOSINO.value,
flag: (x < 0 ? 'L' : x > 10 ? 'H' : undefined)
});
results.push(results['EOSINOPHIL#'] = {
name: 'EOSINOPHIL#', unit: 'K/cmm', range: '0.0 - 0.7',
value: +(x = 0.01*x*results.WBC.value).toFixed(3),
flag: (x < 0 ? 'L' : x > 0.7 ? 'H' : undefined)
});
}
if(results.hasOwnProperty('BASO')) {
results.push(results['BASOPHIL%'] = {
name: 'BASOPHIL%', unit: '%', range: '0.0 - 2.0',
value: x = +results.BASO.value,
flag: (x < 0 ? 'L' : x > 2 ? 'H' : undefined)
});
results.push(results['BASOPHIL#'] = {
name: 'BASOPHIL#', unit: 'K/cmm', range: '0.0 - 0.2',
value: +(x = 0.01*x*results.WBC.value).toFixed(3),
flag: (x < 0 ? 'L' : x > 0.2 ? 'H' : undefined)
});
}
if(results.hasOwnProperty('MONOS')) {
results.push(results['MONOCYTE%'] = {
name: 'MONOCYTE%', unit: '%', range: '1.7 - 9.3',
value: x = +results.MONOS.value,
flag: (x < 1.7 ? 'L' : x > 9.3 ? 'H' : undefined)
});
results.push(results['MONOCYTE#'] = {
name: 'MONOCYTE#', unit: 'K/cmm', range: '0.11 - 0.59',
value: +(x = 0.01*x*results.WBC.value).toFixed(3),
flag: (x < 0.11 ? 'L' : x > 0.59 ? 'H' : undefined)
});
}
if((results.hasOwnProperty('LYMPHS')) || (results.hasOwnProperty('ATYPICAL LYMPHOCYTES'))) {
results.push(results['LYMPHOCYTE%'] = {
name: 'LYMPHOCYTE%', unit: '%', range: '15.0 - 41.0',