Disambiguate lab specimen sources

This commit is contained in:
Jiang Yio 2022-09-26 18:06:45 -04:00
parent 01644ef384
commit 0712eccf15

View File

@ -61,9 +61,10 @@
function labs_normalize(rs) {
return rs.map(function(x) {
var specimen = x.specimen;
return {
time: x.time_collected,
name: x.name,
name: (specimen == 'BLOOD') || (specimen == 'SERUM') || (specimen == 'PLASMA') ? x.name : (specimen == 'RANDOM URINE') ? x.name + ':UR' : specimen ? x.name + ':' + specimen.charAt(0) : x.name,
unit: x.unit,
range: x.range,
value: x.value,