Add ability to suppress an item's label.

- Verbessert: Für bestimmte Parameter kann die Beschriftung unterdrückt werden (derzeit implementiert im Urin-Hygienebefund, wo "Keim" und "Multiresistenz" nicht mit ausgegeben werden, sondern nur z.B. "E. coli, 3MRGN" bei entsprechender Vorlage "MSU-Keim, MSU-Multiresistenz").
This commit is contained in:
2017-09-22 11:48:40 +02:00
parent 13832fa833
commit 4c3198afce
6 changed files with 45 additions and 7 deletions

View File

@ -76,6 +76,11 @@ namespace zaaReloaded2.Formatter
/// </summary>
public bool IsBlacklisted { get { return LabItem.IsBlacklisted; } }
/// <summary>
/// Gets whether the Item is marked to suppress its label in the thesaurus.
/// </summary>
public bool SuppressLabel { get { return LabItem.SuppressLabel; } }
/// <summary>
/// Gets or sets the item's comment.
/// </summary>
@ -194,12 +199,20 @@ namespace zaaReloaded2.Formatter
if (comment != String.Empty) comment = " " + comment;
}
string name = IncludeMaterial ? LabItem.QualifiedName : LabItem.Name;
string name;
if (LabItem.SuppressLabel)
{
name = String.Empty;
}
else
{
name = (IncludeMaterial ? LabItem.QualifiedName : LabItem.Name) + " ";
}
string output =
string output =
String.Format(
"{0} {1}{2}{3}{4}",
"{0}{1}{2}{3}{4}",
name,
value,
unit,