diff --git a/HISTORY.md b/HISTORY.md
index eff1139..5ba12a4 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,3 +1,15 @@
+Version 2.4.2 (2017-09-29)
+------------------------------------------------------------------------
+
+- Geändert: Wenn das Laborsystem Zeitstempel ausgibt, die in derselben Zeile auch noch einen Laborwert enthalten, wird das jetzt korrekt erkannt.
+- Repariert: Stile konnten nicht importiert werden.
+- Verbessert: Benutzer-Interface der Stile-Verwaltung.
+- Verbessert: Der Standard-Ambulanzstil gibt jetzt auch den MSU-Befund mit aus (sofern vorhanden).
+- 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").
+
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+
Version 2.4.1 (2017-09-21)
------------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 180cf48..f2a89b3 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ versioninfo:
mv www/versioninfo.tmp www/versioninfo.txt
upload:
- rsync -ruvz --progress deploy/releases/* bovender.de:/var/www/html/zaareloaded/downloads/
+ rsync -ruvzL --progress deploy/releases/* bovender.de:/var/www/html/zaareloaded/downloads/
website:
rsync -ruvz www/ bovender.de:/var/www/html/zaareloaded/
diff --git a/Tests/Thesaurus/ParametersTest.cs b/Tests/Thesaurus/ParametersTest.cs
index 10a823f..1788da2 100755
--- a/Tests/Thesaurus/ParametersTest.cs
+++ b/Tests/Thesaurus/ParametersTest.cs
@@ -52,5 +52,11 @@ namespace Tests.Thesaurus
{
Assert.IsTrue(Parameters.Default.GetIsBlacklisted("glomerul. Filtrationsr. (MDRD)"));
}
+
+ [Test]
+ public void GetSuppressLabel()
+ {
+ Assert.IsTrue(Parameters.Default.GetSuppressLabel("- Multiresistenz"));
+ }
}
}
diff --git a/www/versioninfo.txt b/www/versioninfo.txt
index bca10f4..84827ef 100644
--- a/www/versioninfo.txt
+++ b/www/versioninfo.txt
@@ -1,4 +1,4 @@
-2.4.1
+2.4.2
https://doktorkraus.de/zaareloaded/downloads/zaaReloaded-$VERSION.exe
-b98ec2c5ad39dc4d54c97599f32634f8a41636eb0b0d8bf10c6d1c520e260e8b deploy/releases/zaaReloaded-2.4.1.exe
+2df8d1cd62b2a6b422099e6d59c8f2022ddd2177a649784a7cab8f7c23e734e2 deploy/releases/zaaReloaded-2.4.2.exe
diff --git a/zaaReloaded2/Controller/Settings.cs b/zaaReloaded2/Controller/Settings.cs
index c3b27c0..937935b 100755
--- a/zaaReloaded2/Controller/Settings.cs
+++ b/zaaReloaded2/Controller/Settings.cs
@@ -66,7 +66,9 @@ namespace zaaReloaded2.Controller
{
throw new InvalidDataException("Datei enthält keine Stil-Daten oder ist beschädigt.");
}
+ Logger.Info("LoadFromFile: Successfully loaded '{0}", settings.Name);
settings.Uid = Guid.NewGuid();
+ Logger.Debug("LoadFromFile: new GUID is '{0}", settings.Uid);
return settings;
}
@@ -76,14 +78,15 @@ namespace zaaReloaded2.Controller
/// File to write to.
public void SaveToFile(string fileName)
{
- Logger.Info("SaveToFile: {0}", fileName);
+ Logger.Info("SaveToFile: Settings name: {0}", Name);
using (StreamWriter writer = new StreamWriter(fileName))
{
Serializer serializer = new SerializerBuilder()
- //.EnsureRoundtrip()
+ .EnsureRoundtrip()
.Build();
serializer.Serialize(writer, this);
}
+ Logger.Info("SaveToFile: Successfully saved to file '{0}'", fileName);
// SoapFormatter formatter = new SoapFormatter();
// formatter.Serialize(writer.BaseStream, this);
}
diff --git a/zaaReloaded2/Defaults/clinic.zaaReloaded2 b/zaaReloaded2/Defaults/clinic.zaaReloaded2
index 69cdcc1..2ceb29d 100755
--- a/zaaReloaded2/Defaults/clinic.zaaReloaded2
+++ b/zaaReloaded2/Defaults/clinic.zaaReloaded2
@@ -48,4 +48,6 @@ Elements: !System.Collections.Generic.List%601[[zaaReloaded2.Controller.Elements
Content: 'Virologie (EDTA-Blut): CMV-PCR, BKV-PCR'
- !zaaReloaded2.Controller.Elements.CustomText,%20zaaReloaded2,%20Version=1.0.0.0,%20Culture=neutral,%20PublicKeyToken=6ec8d075a1ab1383
Content: 'Autoantikörper: ANCA (IF) 1: (Ref. < 1:40), MPO-ANCA (ELISA) IU/ml (Ref. < 9), PR3-ANCA (ELISA) IU/ml (Ref. < 3,5), ANA (IF), AnDNA (ELISA), AnDNA (RIA)'
-Uid: 99b44ee9-2858-4651-84ad-eb7980832352
+ - !zaaReloaded2.Controller.Elements.Items,%20zaaReloaded2,%20Version=1.0.0.0,%20Culture=neutral,%20PublicKeyToken=6ec8d075a1ab1383
+ Content: 'MSU: MSU-Keim, MSU-Multiresistenz'
+Uid: 581d378c-8f7a-4a1c-8490-36e257770a09
diff --git a/zaaReloaded2/Defaults/parameters.txt b/zaaReloaded2/Defaults/parameters.txt
index 06bec8c..da6388d 100755
--- a/zaaReloaded2/Defaults/parameters.txt
+++ b/zaaReloaded2/Defaults/parameters.txt
@@ -1,9 +1,9 @@
-# LAURIS-NAME "KANONISCHER NAME" MATERIAL DEZIMALSTELLEN "IMMER REFERENZBEREICH" "BLACKLIST"
-# =========== ================== ======== ============== ======================= ===========
-"- Multiresistenz" Multiresistenz MSU
+# LAURIS-NAME "KANONISCHER NAME" MATERIAL DEZIMALSTELLEN "IMMER REFERENZBEREICH" "BLACKLIST" "NO-LABEL"
+# =========== ================== ======== ============== ======================= =========== ==========
+"- Multiresistenz" Multiresistenz MSU --- --- --- X
"a1-Microglobulin (SU)" 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
"aktuelles Bicarbonat" Bic BGA
Albumin Alb S
diff --git a/zaaReloaded2/Formatter/ItemFormatter.cs b/zaaReloaded2/Formatter/ItemFormatter.cs
index baa76a9..4e992e9 100755
--- a/zaaReloaded2/Formatter/ItemFormatter.cs
+++ b/zaaReloaded2/Formatter/ItemFormatter.cs
@@ -76,6 +76,11 @@ namespace zaaReloaded2.Formatter
///
public bool IsBlacklisted { get { return LabItem.IsBlacklisted; } }
+ ///
+ /// Gets whether the Item is marked to suppress its label in the thesaurus.
+ ///
+ public bool SuppressLabel { get { return LabItem.SuppressLabel; } }
+
///
/// Gets or sets the item's comment.
///
@@ -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,
diff --git a/zaaReloaded2/Importer/AutoDetector.cs b/zaaReloaded2/Importer/AutoDetector.cs
index 17fafac..b8bc168 100755
--- a/zaaReloaded2/Importer/AutoDetector.cs
+++ b/zaaReloaded2/Importer/AutoDetector.cs
@@ -175,15 +175,15 @@ namespace zaaReloaded2.Importer
string text = paragraph.Range.Text;
bool isCinicTimePoint = ClinicTimePoint.IsTimeStampLine(text);
bool isZaaTimePoint = LaurisTimePoint.IsTimeStampLine(text);
- // If the line is a ZAA time point, but not a clinic timepoint, we can deduct that
- // the lab mode *must* be ZAA, because it will be a line in the form
- // "(17.09.2015-201710:44:00) Cyclosporin-A vor Gabe: 130 µg/l;" which does not
- // occur in the clinic format.
- if ((ImportMode == ImportMode.Undefined) && isZaaTimePoint && !isCinicTimePoint)
- {
- Logger.Info("IsTimeStampParagraph: Found ZAA time stamp, setting mode to ZAA");
- ImportMode = ImportMode.Zaa;
- }
+ // // If the line is a ZAA time point, but not a clinic timepoint, we can deduct that
+ // // the lab mode *must* be ZAA, because it will be a line in the form
+ // // "(17.09.2015-201710:44:00) Cyclosporin-A vor Gabe: 130 µg/l;" which does not
+ // // occur in the clinic format.
+ // if ((ImportMode == ImportMode.Undefined) && isZaaTimePoint && !isCinicTimePoint)
+ // {
+ // Logger.Info("IsTimeStampParagraph: Found ZAA time stamp, setting mode to ZAA");
+ // ImportMode = ImportMode.Zaa;
+ // }
return isCinicTimePoint || isZaaTimePoint;
}
diff --git a/zaaReloaded2/Importer/ClinicImporter/ClinicTimePoint.cs b/zaaReloaded2/Importer/ClinicImporter/ClinicTimePoint.cs
index 8ca5aeb..c508f71 100755
--- a/zaaReloaded2/Importer/ClinicImporter/ClinicTimePoint.cs
+++ b/zaaReloaded2/Importer/ClinicImporter/ClinicTimePoint.cs
@@ -240,7 +240,7 @@ namespace zaaReloaded2.Importer.ClinicImporter
/// paragraph of a LaurisText.
///
static readonly Regex _timeStampRegex = new Regex(
- @"^(Labor:?)?\s*\(?\s*(?\d\d\.\d\d\.\d\d\d\d\s+\d\d:\d\d)(:00)?\)\s*$");
+ @"^(Labor:?)?\s*\(?\s*(?\d\d\.\d\d\.\d\d\d\d\s+\d\d:\d\d)(:00)?\)");
IList _lines;
Parameters _parameterDictionary;
Units _unitDictionary;
diff --git a/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs b/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs
index 15b9d50..8abbfe2 100755
--- a/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs
+++ b/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs
@@ -76,6 +76,7 @@ namespace zaaReloaded2.Importer.ZaaImporter
Name = parameterDictionary.GetCanonicalName(OriginalName);
AlwaysPrintLimits = parameterDictionary.GetForceReferenceDisplay(OriginalName);
IsBlacklisted = parameterDictionary.GetIsBlacklisted(OriginalName);
+ SuppressLabel = parameterDictionary.GetSuppressLabel(OriginalName);
Material = parameterDictionary.GetMaterial(OriginalName, Material);
PreferredPrecision = parameterDictionary.GetPrecision(OriginalName);
}
diff --git a/zaaReloaded2/LabModel/LabItem.cs b/zaaReloaded2/LabModel/LabItem.cs
index b8f8b67..fe80660 100755
--- a/zaaReloaded2/LabModel/LabItem.cs
+++ b/zaaReloaded2/LabModel/LabItem.cs
@@ -230,6 +230,11 @@ namespace zaaReloaded2.LabModel
///
public bool IsBlacklisted { get; protected set; }
+ ///
+ /// Gets whether the item's label should be suppressed.
+ ///
+ public bool SuppressLabel { get; protected set; }
+
#endregion
#region Constructors
diff --git a/zaaReloaded2/Ribbon.xml b/zaaReloaded2/Ribbon.xml
index 1021a52..eb0425a 100755
--- a/zaaReloaded2/Ribbon.xml
+++ b/zaaReloaded2/Ribbon.xml
@@ -27,7 +27,7 @@
-
diff --git a/zaaReloaded2/Thesaurus/Parameters.cs b/zaaReloaded2/Thesaurus/Parameters.cs
index f83b57e..65cf23d 100755
--- a/zaaReloaded2/Thesaurus/Parameters.cs
+++ b/zaaReloaded2/Thesaurus/Parameters.cs
@@ -126,6 +126,19 @@ namespace zaaReloaded2.Thesaurus
{
return LookUpValue(laurisName, 5, false);
}
+
+ ///
+ /// Checks whether an item's label should be suppressed or not.
+ ///
+ /// Laboratory item to lok up;
+ /// this must be an original Lauris string.
+ /// True if the item should *not* be labelled,
+ /// false if not. Default is false (i.e., labels are .
+ public bool GetSuppressLabel(string laurisName)
+ {
+ return LookUpValue(laurisName, 6, false);
+ }
+
#endregion
#region Overrides
diff --git a/zaaReloaded2/VERSION b/zaaReloaded2/VERSION
index dea618d..e221776 100755
--- a/zaaReloaded2/VERSION
+++ b/zaaReloaded2/VERSION
@@ -1,2 +1,2 @@
-2.4.1
-2.4.1.0
+2.4.2
+2.4.2.0
diff --git a/zaaReloaded2/ViewModels/SettingsRepositoryViewModel.cs b/zaaReloaded2/ViewModels/SettingsRepositoryViewModel.cs
index ac59a97..6e953d6 100755
--- a/zaaReloaded2/ViewModels/SettingsRepositoryViewModel.cs
+++ b/zaaReloaded2/ViewModels/SettingsRepositoryViewModel.cs
@@ -350,11 +350,17 @@ namespace zaaReloaded2.ViewModels
void ConfirmDeleteSettings(ViewModelMessageContent content)
{
SettingsViewModel vm = content.ViewModel as SettingsViewModel;
+ int oldIndex = SettingsList.IndexOf(vm);
if (CanDeleteSettings() && content.Confirmed)
{
_repository.SettingsList.Remove(vm.RevealModelObject() as Settings);
SettingsList.Remove(vm);
}
+ int newIndex = (oldIndex < SettingsList.Count) ? oldIndex : SettingsList.Count - 1;
+ if (newIndex >= 0)
+ {
+ SettingsList[newIndex].IsSelected = true;
+ }
}
void DoResetSettings()
@@ -424,6 +430,7 @@ namespace zaaReloaded2.ViewModels
{
settingsViewModel.PropertyChanged += SettingsViewModel_PropertyChanged;
SettingsList.Add(settingsViewModel);
+ settingsViewModel.IsSelected = true;
}
void DoExportSettings()
@@ -431,7 +438,7 @@ namespace zaaReloaded2.ViewModels
if (CanExportSettings())
{
ChooseExportFileNameMessage.Send(
- new FileNameMessageContent(SuggestImportExportPath(), FILE_FILTER),
+ new FileNameMessageContent(SuggestExportPath(), FILE_FILTER),
msg => ConfirmExportSettings(msg));
}
}
@@ -445,11 +452,11 @@ namespace zaaReloaded2.ViewModels
{
if (message.Confirmed)
{
- UserSettings.Default.ImportExportPath = message.Value;
+ SaveImportExportDir(message.Value);
Settings settings = LastSelected.RevealModelObject() as Settings;
try
{
- settings.SaveToFile(message.Value);
+ settings.SaveToFile(message.Value);
}
catch (Exception e)
{
@@ -463,7 +470,7 @@ namespace zaaReloaded2.ViewModels
void DoImportSettings()
{
ChooseImportFileNameMessage.Send(
- new FileNameMessageContent(SuggestImportExportPath(), FILE_FILTER),
+ new FileNameMessageContent(SuggestImportPath(), FILE_FILTER),
msg => ConfirmImportSettings(msg));
}
@@ -476,10 +483,19 @@ namespace zaaReloaded2.ViewModels
{
if (message.Confirmed)
{
- UserSettings.Default.ImportExportPath = message.Value;
+ SaveImportExportDir(message.Value);
try
{
Settings settings = Settings.LoadFromFile(message.Value);
+ // Attempt to find a unique name by adding a suffix, if necessary
+ string suffixedName = settings.Name;
+ while (_repository.SettingsList.FirstOrDefault(s => s.Name == suffixedName) != null)
+ {
+ string suffix = System.DateTime.Now.ToString();
+ suffixedName = String.Format("{0} ({1})", settings.Name, suffix);
+ }
+ settings.Name = suffixedName;
+ _repository.SettingsList.Add(settings);
AddSettingsViewModel(new SettingsViewModel(settings));
}
catch (Exception e)
@@ -491,9 +507,9 @@ namespace zaaReloaded2.ViewModels
}
}
- string SuggestImportExportPath()
+ string SuggestImportPath()
{
- string path = UserSettings.Default.ImportExportPath;
+ string path = Bovender.PathHelpers.GetDirectoryPart(UserSettings.Default.ImportExportPath);
if (String.IsNullOrEmpty(path))
{
return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
@@ -504,6 +520,18 @@ namespace zaaReloaded2.ViewModels
}
}
+ string SuggestExportPath()
+ {
+ Settings settings = LastSelected.RevealModelObject() as Settings;
+ string fileName = settings.Name;
+ return System.IO.Path.Combine(SuggestImportPath(), fileName);
+ }
+
+ void SaveImportExportDir(string path)
+ {
+ UserSettings.Default.ImportExportPath = Bovender.PathHelpers.GetDirectoryPart(path);
+ }
+
#endregion
#region Implementation of ViewModelBase
diff --git a/zaaReloaded2/Views/SettingsRepositoryView.xaml b/zaaReloaded2/Views/SettingsRepositoryView.xaml
index dfbef78..7075d1e 100755
--- a/zaaReloaded2/Views/SettingsRepositoryView.xaml
+++ b/zaaReloaded2/Views/SettingsRepositoryView.xaml
@@ -66,7 +66,7 @@
ToolTip="Stil auswählen und Textblock damit formatieren (Enter)">
- Auswählen
+ Auswählen & formatieren