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:
daniel 2017-09-22 11:48:40 +02:00
parent 13832fa833
commit 4c3198afce
6 changed files with 45 additions and 7 deletions

View File

@ -52,5 +52,11 @@ namespace Tests.Thesaurus
{ {
Assert.IsTrue(Parameters.Default.GetIsBlacklisted("glomerul. Filtrationsr. (MDRD)")); Assert.IsTrue(Parameters.Default.GetIsBlacklisted("glomerul. Filtrationsr. (MDRD)"));
} }
[Test]
public void GetSuppressLabel()
{
Assert.IsTrue(Parameters.Default.GetSuppressLabel("- Multiresistenz"));
}
} }
} }

View File

@ -1,9 +1,9 @@
# LAURIS-NAME "KANONISCHER NAME" MATERIAL DEZIMALSTELLEN "IMMER REFERENZBEREICH" "BLACKLIST" # LAURIS-NAME "KANONISCHER NAME" MATERIAL DEZIMALSTELLEN "IMMER REFERENZBEREICH" "BLACKLIST" "NO-LABEL"
# =========== ================== ======== ============== ======================= =========== # =========== ================== ======== ============== ======================= =========== ==========
"- Multiresistenz" Multiresistenz MSU "- Multiresistenz" Multiresistenz MSU --- --- --- X
"a1-Microglobulin (SU)" a1-Microglobulin SU "a1-Microglobulin (SU)" a1-Microglobulin SU
"a1-Microglobulin (SU)/die" a1-Microglobulin SU "a1-Microglobulin (SU)/die" a1-Microglobulin SU
"Aerobe Kultur" Keim MSU "Aerobe Kultur" Keim MSU --- --- --- X
"AFP (ECL, Elecsys, Roche)" AFP S --- X "AFP (ECL, Elecsys, Roche)" AFP S --- X
"aktuelles Bicarbonat" Bic BGA "aktuelles Bicarbonat" Bic BGA
Albumin Alb S Albumin Alb S

View File

@ -76,6 +76,11 @@ namespace zaaReloaded2.Formatter
/// </summary> /// </summary>
public bool IsBlacklisted { get { return LabItem.IsBlacklisted; } } 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> /// <summary>
/// Gets or sets the item's comment. /// Gets or sets the item's comment.
/// </summary> /// </summary>
@ -194,7 +199,15 @@ namespace zaaReloaded2.Formatter
if (comment != String.Empty) comment = " " + comment; 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 =

View File

@ -76,6 +76,7 @@ namespace zaaReloaded2.Importer.ZaaImporter
Name = parameterDictionary.GetCanonicalName(OriginalName); Name = parameterDictionary.GetCanonicalName(OriginalName);
AlwaysPrintLimits = parameterDictionary.GetForceReferenceDisplay(OriginalName); AlwaysPrintLimits = parameterDictionary.GetForceReferenceDisplay(OriginalName);
IsBlacklisted = parameterDictionary.GetIsBlacklisted(OriginalName); IsBlacklisted = parameterDictionary.GetIsBlacklisted(OriginalName);
SuppressLabel = parameterDictionary.GetSuppressLabel(OriginalName);
Material = parameterDictionary.GetMaterial(OriginalName, Material); Material = parameterDictionary.GetMaterial(OriginalName, Material);
PreferredPrecision = parameterDictionary.GetPrecision(OriginalName); PreferredPrecision = parameterDictionary.GetPrecision(OriginalName);
} }

View File

@ -230,6 +230,11 @@ namespace zaaReloaded2.LabModel
/// </summary> /// </summary>
public bool IsBlacklisted { get; protected set; } public bool IsBlacklisted { get; protected set; }
/// <summary>
/// Gets whether the item's label should be suppressed.
/// </summary>
public bool SuppressLabel { get; protected set; }
#endregion #endregion
#region Constructors #region Constructors

View File

@ -126,6 +126,19 @@ namespace zaaReloaded2.Thesaurus
{ {
return LookUpValue(laurisName, 5, false); return LookUpValue(laurisName, 5, false);
} }
/// <summary>
/// Checks whether an item's label should be suppressed or not.
/// </summary>
/// <param name="laurisName">Laboratory item to lok up;
/// this must be an original Lauris string.</param>
/// <returns>True if the item should *not* be labelled,
/// false if not. Default is false (i.e., labels are .</returns>
public bool GetSuppressLabel(string laurisName)
{
return LookUpValue(laurisName, 6, false);
}
#endregion #endregion
#region Overrides #region Overrides