diff --git a/zaaReloaded2/Controller/Elements/Items.cs b/zaaReloaded2/Controller/Elements/Items.cs index b1d258b..77fc34d 100755 --- a/zaaReloaded2/Controller/Elements/Items.cs +++ b/zaaReloaded2/Controller/Elements/Items.cs @@ -148,7 +148,7 @@ namespace zaaReloaded2.Controller.Elements foreach (TimePointFormatter tpf in formatter.WorkingTimePoints.Values) { List newItems = tpf.ItemFormatters.Values - .Where(i => !i.HasBeenUsed && i.LabItem.QualifiedName.StartsWith(material)) + .Where(i => !i.HasBeenUsed && !i.IsBlacklisted && i.LabItem.QualifiedName.StartsWith(material)) .ToList(); newItems.ForEach(i => i.HasBeenUsed = true); items.AddRange(newItems); diff --git a/zaaReloaded2/Formatter/ItemFormatter.cs b/zaaReloaded2/Formatter/ItemFormatter.cs index df8796c..17d0bf3 100755 --- a/zaaReloaded2/Formatter/ItemFormatter.cs +++ b/zaaReloaded2/Formatter/ItemFormatter.cs @@ -48,6 +48,23 @@ namespace zaaReloaded2.Formatter /// public bool HasBeenUsed { get; set; } + /// + /// Gets or sets a flag that tells the formatter to include or + /// not include the material indicator in the formatted output. + /// Default is true. + /// + /// + /// For example, items that are selected with a wildcard may + /// contain the material info, while expressly chosen items + /// may not. + /// + public bool IncludeMaterial { get; set; } + + /// + /// Gets whether the Item is marked as blacklisted in the thesaurus. + /// + public bool IsBlacklisted { get { return LabItem.IsBlacklisted; } } + #endregion #region Constructor @@ -58,6 +75,7 @@ namespace zaaReloaded2.Formatter /// LabItem to wrap in this ItemFormatter. public ItemFormatter(LabItem labItem, ReferenceStyle referenceStyle) { + IncludeMaterial = true; LabItem = labItem; ReferenceStyle = referenceStyle; } @@ -133,11 +151,13 @@ namespace zaaReloaded2.Formatter value = LabItem.Value; } + string name = IncludeMaterial ? LabItem.QualifiedName : LabItem.Name; + // Insert the formatted text into the document. formatter.Write( String.Format( "{0} {1}{2}{3}", - LabItem.QualifiedName, + name, value, unit, reference diff --git a/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs b/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs index 244c73f..ccff09a 100755 --- a/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs +++ b/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs @@ -74,7 +74,8 @@ namespace zaaReloaded2.Importer.ZaaImporter if (parameterDictionary != null) { Name = parameterDictionary.GetCanonicalName(OriginalName); - AlwaysPrintLimits = parameterDictionary.GetForceReferenceDisplay(Name); + AlwaysPrintLimits = parameterDictionary.GetForceReferenceDisplay(OriginalName); + IsBlacklisted = parameterDictionary.GetIsBlacklisted(OriginalName); } if (unitDictionary != null) { diff --git a/zaaReloaded2/LabModel/LabItem.cs b/zaaReloaded2/LabModel/LabItem.cs index 7600fa2..3fc6c7e 100755 --- a/zaaReloaded2/LabModel/LabItem.cs +++ b/zaaReloaded2/LabModel/LabItem.cs @@ -205,6 +205,12 @@ namespace zaaReloaded2.LabModel public Material Material { get; protected set; } + /// + /// Gets whether the LabItem is marked as blacklisted + /// in the thesaurus. + /// + public bool IsBlacklisted { get; protected set; } + #endregion #region Constructors diff --git a/zaaReloaded2/Thesaurus/Defaults/parameters.txt b/zaaReloaded2/Thesaurus/Defaults/parameters.txt index 6b5c777..a2b837f 100755 --- a/zaaReloaded2/Thesaurus/Defaults/parameters.txt +++ b/zaaReloaded2/Thesaurus/Defaults/parameters.txt @@ -1,5 +1,5 @@ -# LAURIS-NAME "KANONISCHER NAME" MATERIAL "IMMER REFERENZBEREICH" -# =========== ================== ======== ======================= +# LAURIS-NAME "KANONISCHER NAME" MATERIAL "IMMER REFERENZBEREICH" "BLACKLIST" +# =========== ================== ======== ======================= =========== "Übergangsepithelien (U)" Übergangsep. U "a1-Microglobulin (SU)" a1-Microglobulin SU "a1-Microglobulin (SU)/die" a1-Microglobulin SU @@ -28,8 +28,8 @@ CK gesamt" CK S "Creatinin (SU)" Krea SU Creatinin Krea S "Creatinin-Clearance (SU)/min" CrCl SU -"Cyclosporin-A vor Gabe" "CsA (C0)" S X -"Cystatin C (N Latex)" "Cystatin C" S X +"Cyclosporin-A vor Gabe" "CsA (C0)" S X +"Cystatin C (N Latex)" "Cystatin C" S X Eisen Fe S Eosinophile Eos E "Erythrozyten (U)" Ery U @@ -43,7 +43,7 @@ Gesamt-Eiweiss Protein S "Gesamt-Eiweiss/Creatinin (PU)" TPCR U GGT GGT S "glomeruläre Filtrationsrate" GFR SU -"glomerul. Filtrationsr. (MDRD)" "eGFR (MDRD)" S +"glomerul. Filtrationsr. (MDRD)" "eGFR (MDRD)" S --- X "glomerul. Filtrationsr. CKD-EP" "eGFR (CKD-EPI)" S "Glucose (U)" Glukose U Glucose Glukose S @@ -51,7 +51,7 @@ Glucose Glukose S "GPT (ALAT)" GPT S Hämatokrit Hkt E Hämoglobin Hb E -Haptoglobin Haptoglobin S X +Haptoglobin Haptoglobin S X Harnsäure Harnsäure S "Harnstoff (SU)" Hst SU "Harnstoff (SU)/die" Hst/Tag SU @@ -104,8 +104,8 @@ Unreife Granulozyten" Gran E "Thromboplastinzeit n. Quick" Quick Z PTT aPTT Z "Ratio int. norm." INR Z -"Komplementfaktor C3c" C3c S X -"Komplementfaktor C4" C4 S X +"Komplementfaktor C3c" C3c S X +"Komplementfaktor C4" C4 S X "Anti-DNAse B" "Anti-DNAse B" S Anti-Streptolysin ASL S "PTH intakt" iPTH S diff --git a/zaaReloaded2/Thesaurus/Parameters.cs b/zaaReloaded2/Thesaurus/Parameters.cs index 18ebfbc..e6444f2 100755 --- a/zaaReloaded2/Thesaurus/Parameters.cs +++ b/zaaReloaded2/Thesaurus/Parameters.cs @@ -95,6 +95,18 @@ namespace zaaReloaded2.Thesaurus return LookUpValue(laurisName, 3, false); } + /// + /// Checks whether an item is marked as blacklisted in the + /// thesaurus. + /// + /// Laboratory item to lok up; + /// this must be an original Lauris string. + /// True if the item is marked as blacklisted, + /// false if not. Default is false. + public bool GetIsBlacklisted(string laurisName) + { + return LookUpValue(laurisName, 4, false); + } #endregion #region Overrides