From c83b8726cc714e48d73e3e3c538d6641b58e5530 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 21 Sep 2015 06:05:43 +0200 Subject: [PATCH 1/3] Update Bovender to 0.3.3. --- Tests/Tests.csproj | 4 ++-- Tests/packages.config | 2 +- zaaReloaded2/packages.config | 2 +- zaaReloaded2/zaaReloaded2.csproj | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 3d79c04..2fcf0fe 100755 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -41,8 +41,8 @@ zaaReloaded2.pfx - - ..\packages\Bovender.0.3.1.0\lib\net40\Bovender.dll + + ..\packages\Bovender.0.3.3.0\lib\net40\Bovender.dll True diff --git a/Tests/packages.config b/Tests/packages.config index f7121cb..d903c94 100755 --- a/Tests/packages.config +++ b/Tests/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/zaaReloaded2/packages.config b/zaaReloaded2/packages.config index 5c131d6..9920963 100755 --- a/zaaReloaded2/packages.config +++ b/zaaReloaded2/packages.config @@ -19,6 +19,6 @@ limitations under the License. --> - + \ No newline at end of file diff --git a/zaaReloaded2/zaaReloaded2.csproj b/zaaReloaded2/zaaReloaded2.csproj index 1bd5d8d..dfa371f 100755 --- a/zaaReloaded2/zaaReloaded2.csproj +++ b/zaaReloaded2/zaaReloaded2.csproj @@ -134,8 +134,8 @@ --> - - ..\packages\Bovender.0.3.1.0\lib\net40\Bovender.dll + + ..\packages\Bovender.0.3.3.0\lib\net40\Bovender.dll True From a29ee5500390ffd7abadc36d0ef1af2280694a34 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Wed, 23 Sep 2015 20:55:26 +0200 Subject: [PATCH 2/3] Fix parsing joint lines with time point and lab items. - VERBESSERT: Unkonventionell ausgegebene Laborwerte (v.a. Cyclosporin-A vor Gabe) wurden nicht richtig erkannt. --- Tests/Formatter/FormatterTest.cs | 17 +++++++++++++ .../Importer/ZaaImporter/LaurisTimePoint.cs | 25 ++++++++++++++++--- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/Tests/Formatter/FormatterTest.cs b/Tests/Formatter/FormatterTest.cs index 871dab9..0df3924 100755 --- a/Tests/Formatter/FormatterTest.cs +++ b/Tests/Formatter/FormatterTest.cs @@ -118,6 +118,23 @@ namespace Tests.Formatter document.Range().Text); } + [Test] + public void FormatCyclosporine() + { + ZaaImporter importer = new ZaaImporter(); + importer.Import( + "(17.09.2015 10:44:00) Cyclosporin-A vor Gabe: 130 µg/l; CK gesamt: 123 [<= 170] U/l; Cholesterin: 211"); + Document document = new Document(); + f.Formatter formatter = new f.Formatter(document); + formatter.Laboratory = importer.Laboratory; + formatter.Settings = new zaaReloaded2.Controller.Settings( + new List() { new Items("CsA (C0) \"(Ziel-Talspiegel: <> µg/l)\"") }); + formatter.Run(); + Assert.AreEqual( + "Laborwerte vom 17.09.2015 10:44:00:\rCsA (C0) 130 µg/l\r\r", + document.Range().Text); + } + string GetResourceText(string resource) { try diff --git a/zaaReloaded2/Importer/ZaaImporter/LaurisTimePoint.cs b/zaaReloaded2/Importer/ZaaImporter/LaurisTimePoint.cs index 906010b..06b9c6d 100755 --- a/zaaReloaded2/Importer/ZaaImporter/LaurisTimePoint.cs +++ b/zaaReloaded2/Importer/ZaaImporter/LaurisTimePoint.cs @@ -196,11 +196,12 @@ namespace zaaReloaded2.Importer.ZaaImporter void ParseParagraph(string paragraph) { - if (_timeStampRegex.IsMatch(paragraph)) + Match m = _timeStampRegex.Match(paragraph); + if (m.Success) { DateTime dt; if (DateTime.TryParseExact( - _timeStampRegex.Match(paragraph).Groups["datetime"].Value, + m.Groups["datetime"].Value, "dd.MM.yyyy HH:mm", CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces, @@ -208,8 +209,24 @@ namespace zaaReloaded2.Importer.ZaaImporter { TimeStamp = dt; } + + // Put the remainder of the line back to the + // 'paragraph' parameter to deal with exceptional + // lines such as + // "(17.09.2015 10:44:00) Cyclosporin-A vor Gabe: 130 µg/l;" + // We need to add a dummy caption because this is + // the normal format of a paragraph generated from Lauris. + if (m.Groups["tail"].Success) + { + paragraph = "DUMMY CAPTION: " + m.Groups["tail"].Value; + } + else + { + paragraph = String.Empty; + } } - else + + if (!String.IsNullOrEmpty(paragraph)) { LaurisParagraph lp = new LaurisParagraph( paragraph, @@ -236,7 +253,7 @@ namespace zaaReloaded2.Importer.ZaaImporter /// 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)"); + @"^(Labor:?)?\s*\(?\s*(?\d\d\.\d\d\.\d\d\d\d\s+\d\d:\d\d)(:00\)\s*(?.+)?)?$"); IList _paragraphs; Parameters _parameterDictionary; Units _unitDictionary; From e54f107c39094e32e4aa3fd97d5e73d69f39fca9 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Wed, 23 Sep 2015 21:15:30 +0200 Subject: [PATCH 3/3] Prepare release 2.1.4. --- HISTORY.md | 10 +++++++++- www/versioninfo.txt | 6 +++--- zaaReloaded2/VERSION | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index a0cae6f..96fb3bc 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,4 +1,12 @@ -Version 2.1.3 (2015-09-18) +Version 2.1.4 (2015-09-23) +======================================================================== + +- VERBESSERT: Unkonventionell ausgegebene Laborwerte (v.a. Cyclosporin-A vor Gabe) wurden nicht richtig erkannt. + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Version 2.1.3. (2015-09-18) ======================================================================== - VERBESSERT: CsA-Talspiegel tauchte nicht in der Ausgabe auf. diff --git a/www/versioninfo.txt b/www/versioninfo.txt index 2b20c66..7e3ca7f 100644 --- a/www/versioninfo.txt +++ b/www/versioninfo.txt @@ -1,4 +1,4 @@ -2.1.3 -http://zaa.nephrowiki.de/downloads/zaaReloaded-2.1.3.exe -38971b670eb061ada475c7ab2f98a57299f25ff7 publish/release/zaaReloaded-2.1.3.exe +2.1.4 +http://zaa.nephrowiki.de/downloads/zaaReloaded-$VERSION.exe +53d134785f407c8ddebfdba0f3815fe147ad9d19 publish/release/zaaReloaded-2.1.4.exe diff --git a/zaaReloaded2/VERSION b/zaaReloaded2/VERSION index 232359a..b2ca932 100755 --- a/zaaReloaded2/VERSION +++ b/zaaReloaded2/VERSION @@ -1,2 +1,2 @@ -2.1.3 -2.1.3.0 +2.1.4 +2.1.4.0