diff --git a/HISTORY.md b/HISTORY.md index 8a8ba76..2cc7422 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,15 @@ +Version 2.0.0-beta.3 (2015-08-20) +======================================================================== + +- VERBESSERT: Bei Updates werden neue eingebaute Stile jetzt immer berücksichtigt. +- VERBESSERT: Formatierung erscheint nur noch als 1 Undo-Schritt. +- VERBESSERUNG: Alias ACR für Albumin-Krea-Quotient; mg/g statt mg/g Crea. +- VERBESSERUNG: Datumseilen, die mit "Labor:" beginnen, werden nicht länger ignoriert. +- VERBESSERUNG: Keine Fehlermeldung mehr, falls Referenzbereiche negative Werte enthalten (wie z.B. Base Excess) [#650db4d2] + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + Version 2.0.0-beta.2 (2015-08-16) ======================================================================== diff --git a/Tests/Importer/ZaaImporter/LaurisItemTest.cs b/Tests/Importer/ZaaImporter/LaurisItemTest.cs index 458d203..173cd5e 100755 --- a/Tests/Importer/ZaaImporter/LaurisItemTest.cs +++ b/Tests/Importer/ZaaImporter/LaurisItemTest.cs @@ -29,6 +29,7 @@ namespace Tests.Importer.ZaaImporter class LaurisItemTest { [Test] + [TestCase("BE: 5.2 [-2 - 2] mmol/l", "BE", 5.2, "mmol/l", -2, 2, false)] [TestCase("Natrium: 139 [135 - 145] mmol/l", "Natrium", 139, "mmol/l", 135, 145, true)] [TestCase("Kalium: 5.2 [3.5 - 5] mmol/l", "Kalium", 5.2, "mmol/l", 3.5, 5, false)] public void ParseLaurisWithBothLimits( diff --git a/publish/setup-files/installbanner-small.bmp b/publish/setup-files/installbanner-small.bmp old mode 100644 new mode 100755 index 2a8c4f8..fb01b4a Binary files a/publish/setup-files/installbanner-small.bmp and b/publish/setup-files/installbanner-small.bmp differ diff --git a/publish/setup-files/installbanner.bmp b/publish/setup-files/installbanner.bmp old mode 100644 new mode 100755 index 57054f2..f6b2fcd Binary files a/publish/setup-files/installbanner.bmp and b/publish/setup-files/installbanner.bmp differ diff --git a/www/versioninfo.txt b/www/versioninfo.txt index 59e6f00..2312283 100644 --- a/www/versioninfo.txt +++ b/www/versioninfo.txt @@ -1,4 +1,4 @@ -2.0.0-beta.2 -http://zaa.nephrowiki.de/downloads/zaaReloaded-2.0.0-beta.2.exe -437bda34980828ab85f2dd3abb1991eef3cf17f3 publish/release/zaaReloaded-2.0.0-beta.2.exe +2.0.0-beta.3 +http://zaa.nephrowiki.de/downloads/zaaReloaded-2.0.0-beta.3.exe +7453cdb91221fe4d9dabd8259be2dc7703274706 publish/release/zaaReloaded-2.0.0-beta.3.exe diff --git a/zaaReloaded2/Controller/SettingsRepository.cs b/zaaReloaded2/Controller/SettingsRepository.cs index 7b009b3..5e57cc4 100755 --- a/zaaReloaded2/Controller/SettingsRepository.cs +++ b/zaaReloaded2/Controller/SettingsRepository.cs @@ -72,7 +72,9 @@ namespace zaaReloaded2.Controller stream.Write(bytes, 0, bytes.Length); stream.Position = 0; SoapFormatter serializer = new SoapFormatter(); - return serializer.Deserialize(stream) as SettingsRepository; + SettingsRepository repo = serializer.Deserialize(stream) as SettingsRepository; + repo.LoadDefaults(); + return repo; } } @@ -113,7 +115,7 @@ namespace zaaReloaded2.Controller public SettingsRepository() { SettingsList = new List(); - CreateDefault(); + Reset(); } #endregion @@ -181,23 +183,46 @@ namespace zaaReloaded2.Controller /// Resets the Settings contained in this SettingsRepository /// to the default set of settings. /// - private void CreateDefault() + private void Reset() { SettingsList.Clear(); + LoadDefaults(); + } + /// + /// Loads default, built-in settings, replacing existing default + /// settings that might have been persisted. + /// + private void LoadDefaults() + { Assembly myAssembly = this.GetType().Assembly; SoapFormatter deserializer = new SoapFormatter(); Stream stream = myAssembly.GetManifestResourceStream("zaaReloaded2.Defaults.ward.zaaReloaded"); Settings settings = deserializer.Deserialize(stream) as Settings; settings.Name = Properties.Settings.Default.SettingsNameWard + BUILTIN_LABEL; settings.Uid = Guid.Parse(DEFAULT_SETTINGS_1_UID); - SettingsList.Add(settings); + ReplaceOrAdd(settings); stream = myAssembly.GetManifestResourceStream("zaaReloaded2.Defaults.clinic.zaaReloaded"); settings = deserializer.Deserialize(stream) as Settings; settings.Name = Properties.Settings.Default.SettingsNameClinic + BUILTIN_LABEL; settings.Uid = Guid.Parse(DEFAULT_SETTINGS_2_UID); - SettingsList.Add(settings); + ReplaceOrAdd(settings); + } + + private void ReplaceOrAdd(Settings settings) + { + Settings existing = SettingsList.FirstOrDefault(s => s.Uid == settings.Uid); + if (existing == null) + { + SettingsList.Add(settings); + } + else + { + int index = SettingsList.IndexOf(existing); + SettingsList.RemoveAt(index); + SettingsList.Insert(index, settings); + } } #endregion diff --git a/zaaReloaded2/Defaults/clinic.zaaReloaded b/zaaReloaded2/Defaults/clinic.zaaReloaded index 97fc7d3..1cce2e9 100755 --- a/zaaReloaded2/Defaults/clinic.zaaReloaded +++ b/zaaReloaded2/Defaults/clinic.zaaReloaded @@ -3,20 +3,20 @@ 1 -<_a>-97947944 -<_b>-28017 -<_c>17434 -<_d>191 -<_e>72 -<_f>82 -<_g>56 -<_h>48 -<_i>158 -<_j>105 -<_k>95 +<_a>82184435 +<_b>11851 +<_c>19443 +<_d>139 +<_e>251 +<_f>157 +<_g>33 +<_h>11 +<_i>13 +<_j>118 +<_k>225 -NepA neu -IfSpecialItem +Kopie von Standard für NepA +IfSpecialOrAbnormal 1 @@ -59,13 +59,13 @@ - - - + + + - + - + @@ -95,7 +95,7 @@ 1 -Spot-Urin: U-* +Spot-Urin: TPCR, ACR, U-Ery, U-Leu, U-Bakt 1 @@ -115,7 +115,7 @@ 1 -Diff.-BB: Ery, Neu, Lym, Mon, Baso, Eos +Diff.-BB: Neu, Lym, Mon, Baso, Eos 1 @@ -123,36 +123,36 @@ 1 -Medikamente: TAC, CSA, SIR, Vancomycin, Gentamicin, Tobramicin +Eisenhaushalt: Eisen, Ferritin, Transferrin, Tf.-Sätt. 1 -Eisenhaushalt: Eisen, Ferritin, Transferrin, Tf.-Sätt. +BGA: pH, Std.-Bic., BE 1 -BGA: pH, Std.-Bic., BE +Hepatitis-Serologie: Anti-HBs, Anti-HBc - -zaaReloaded2.Controller.Elements.CustomText + +1 +Medikamente: TAC, CSA, SIR, Vancomycin, Gentamicin, Tobramicin + + +zaaReloaded2.Controller.Elements.CustomText 4 - -1 -Virologie (EDTA-Blut): CMV-PCR, BKV-PCR - 1 -Nephrolog. Sediment: pH, Proteinurie, Ery /µl, Leu /µl, Plattenep. /µl, Bakt., Schleimfäden +Virologie (EDTA-Blut): CMV-PCR, BKV-PCR 1 -Autoantikörper: ANCA (IF), MPO-ANCA (ELISA), PR3-ANCA (ELISA), ANA (IF), AnDNA (ELISA), AnDNA (RIA) +Nephrolog. Sediment: pH, Proteinurie, Ery /µl, Leu /µl, Plattenep. /µl, Bakt., Schleimfäden - + 1 -Hepatitis-Serologie: Anti-HBs, Anti-HBc - +Autoantikörper: ANCA (IF), MPO-ANCA (ELISA), PR3-ANCA (ELISA), ANA (IF), AnDNA (ELISA), AnDNA (RIA) + diff --git a/zaaReloaded2/Defaults/parameters.txt b/zaaReloaded2/Defaults/parameters.txt index f20ee6b..cb5e91a 100755 --- a/zaaReloaded2/Defaults/parameters.txt +++ b/zaaReloaded2/Defaults/parameters.txt @@ -8,7 +8,7 @@ "Albumin (SU)" Alb SU "Albumin (SU)/die" Alb SU Albumin Alb S -Albumin/Creatinin (PU)" ACR U +"Albumin/Creatinin (PU)" ACR U "Alk. Phosphatase" AP S Amylase Amylase S "anorg. Phosphat" P S diff --git a/zaaReloaded2/Defaults/units.txt b/zaaReloaded2/Defaults/units.txt index 1e8a350..1382c20 100755 --- a/zaaReloaded2/Defaults/units.txt +++ b/zaaReloaded2/Defaults/units.txt @@ -8,3 +8,4 @@ mmol/l mM n*1000/µl /nl n*10E6/µl /fl Bak/µl /µl +"mg/g Crea" mg/g diff --git a/zaaReloaded2/Formatter/Formatter.cs b/zaaReloaded2/Formatter/Formatter.cs index ebedc68..2d3e55d 100755 --- a/zaaReloaded2/Formatter/Formatter.cs +++ b/zaaReloaded2/Formatter/Formatter.cs @@ -121,7 +121,6 @@ namespace zaaReloaded2.Formatter { if (!CanRun) throw new NoLaboratoryDataException("No laboratory data to format."); - CreateStyles(); int current = 0; while (current < Settings.Elements.Count) { @@ -146,7 +145,14 @@ namespace zaaReloaded2.Formatter current++; } } + + // Write everything to the Word document + Globals.ThisAddIn.Application.UndoRecord.StartCustomRecord( + String.Format("Laborformatierung ({0})", Properties.Settings.Default.AddinName) + ); + CreateStyles(); _secondaryBuffer.Flush(); + Globals.ThisAddIn.Application.UndoRecord.EndCustomRecord(); } /// diff --git a/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs b/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs index 71d7e19..1b26a08 100755 --- a/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs +++ b/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs @@ -134,7 +134,7 @@ namespace zaaReloaded2.Importer.ZaaImporter { if (match.Groups["limits"].Success) { - Regex limitRegex = new Regex(@"\[(?[\d.]+)?\s*(?\S+)\s*(?[\d.]+)?]"); + Regex limitRegex = new Regex(@"\[(?[-\d.]+)?\s*(?\S+)\s*(?[-\d.]+)?]"); Match limitMatch = limitRegex.Match(match.Groups["limits"].Value); if (limitMatch.Groups["limit1"].Success && limitMatch.Groups["limit2"].Success) { diff --git a/zaaReloaded2/Importer/ZaaImporter/LaurisTimePoint.cs b/zaaReloaded2/Importer/ZaaImporter/LaurisTimePoint.cs index 18c751d..dddad16 100755 --- a/zaaReloaded2/Importer/ZaaImporter/LaurisTimePoint.cs +++ b/zaaReloaded2/Importer/ZaaImporter/LaurisTimePoint.cs @@ -236,7 +236,7 @@ namespace zaaReloaded2.Importer.ZaaImporter /// paragraph of a LaurisText. /// static readonly Regex _timeStampRegex = new Regex( - @"^\s*\(?\s*(?\d\d\.\d\d\.\d\d\d\d\s+\d\d:\d\d)"); + @"^(Labor:)?\s*\(?\s*(?\d\d\.\d\d\.\d\d\d\d\s+\d\d:\d\d)"); IList _paragraphs; Parameters _parameterDictionary; Units _unitDictionary; diff --git a/zaaReloaded2/ThisAddIn.cs b/zaaReloaded2/ThisAddIn.cs index f3899c2..5838ea0 100755 --- a/zaaReloaded2/ThisAddIn.cs +++ b/zaaReloaded2/ThisAddIn.cs @@ -49,6 +49,14 @@ namespace zaaReloaded2 { Bovender.ExceptionHandler.CentralHandler.ManageExceptionCallback += CentralHandler_ManageExceptionCallback; CheckForUpdates(); + _oldCaption = Globals.ThisAddIn.Application.Caption; + Globals.ThisAddIn.Application.Caption = + String.Format( + "{0} ({1} {2})", + _oldCaption, + Properties.Settings.Default.AddinName, + Updater.Version.CurrentVersion().ToString() + ); } private void ThisAddIn_Shutdown(object sender, System.EventArgs e) @@ -58,6 +66,11 @@ namespace zaaReloaded2 if (_updaterVM.InstallUpdateCommand.CanExecute(null)) _updaterVM.InstallUpdateCommand.Execute(null); } + try + { + Globals.ThisAddIn.Application.Caption = _oldCaption; + } + catch { } } #region Properties @@ -126,6 +139,7 @@ namespace zaaReloaded2 Ribbon _ribbon; UpdaterViewModel _updaterVM; + string _oldCaption; #endregion diff --git a/zaaReloaded2/Updater/Updater.cs b/zaaReloaded2/Updater/Updater.cs index da7c822..fcb4cab 100755 --- a/zaaReloaded2/Updater/Updater.cs +++ b/zaaReloaded2/Updater/Updater.cs @@ -33,5 +33,14 @@ namespace zaaReloaded2.Updater { return new Uri(Properties.Settings.Default.VersionInfoFile); } + + protected override string BuildDestinationFileName() + { + return System.IO.Path.Combine( + DestinationFolder, + DownloadUri.ToString().Split('/').Last() + ); + } + } } diff --git a/zaaReloaded2/VERSION b/zaaReloaded2/VERSION index 3a965ff..4f00d6c 100755 --- a/zaaReloaded2/VERSION +++ b/zaaReloaded2/VERSION @@ -1,2 +1,2 @@ -2.0.0-beta.2 -2.0.0.7 +2.0.0-beta.3 +2.0.0.8