Implement preferred precisions.
- NEU: Für bestimmte Laborwerte ist die bevorzugte Nachkommastellenzahl hinterlegt (z.B. Kreatinin mit nur einer Nachkommastelle).
This commit is contained in:
@ -153,7 +153,16 @@ namespace zaaReloaded2.Formatter
|
||||
{
|
||||
// Format the numerical value; this will convert
|
||||
// decimal points to commas as needed.
|
||||
value = String.Format("{0}", LabItem.NumericalValue);
|
||||
int precision = LabItem.PreferredPrecision;
|
||||
if (precision >= 0)
|
||||
{
|
||||
value = LabItem.NumericalValue.ToString("F" + precision);
|
||||
}
|
||||
else
|
||||
{
|
||||
// PreferredPrecision is negative, i.e. use precision as-is
|
||||
value = String.Format("{0}", LabItem.NumericalValue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user