Merge branch 'release-2.1.4'

This commit is contained in:
Daniel Kraus 2015-09-23 21:17:08 +02:00
commit d71c8a02e3
9 changed files with 58 additions and 16 deletions

View File

@ -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.

View File

@ -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<ElementBase>() { 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

View File

@ -41,8 +41,8 @@
<AssemblyOriginatorKeyFile>zaaReloaded2.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Bovender, Version=0.3.1.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<HintPath>..\packages\Bovender.0.3.1.0\lib\net40\Bovender.dll</HintPath>
<Reference Include="Bovender, Version=0.3.3.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<HintPath>..\packages\Bovender.0.3.3.0\lib\net40\Bovender.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Office.Interop.Word, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Bovender" version="0.3.1.0" targetFramework="net40" />
<package id="Bovender" version="0.3.3.0" targetFramework="net40" />
<package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net40" />
<package id="NUnit" version="2.6.4" targetFramework="net40" />
</packages>

View File

@ -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

View File

@ -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.
/// </summary>
static readonly Regex _timeStampRegex = new Regex(
@"^(Labor:?)?\s*\(?\s*(?<datetime>\d\d\.\d\d\.\d\d\d\d\s+\d\d:\d\d)");
@"^(Labor:?)?\s*\(?\s*(?<datetime>\d\d\.\d\d\.\d\d\d\d\s+\d\d:\d\d)(:00\)\s*(?<tail>.+)?)?$");
IList<String> _paragraphs;
Parameters _parameterDictionary;
Units _unitDictionary;

View File

@ -1,2 +1,2 @@
2.1.3
2.1.3.0
2.1.4
2.1.4.0

View File

@ -19,6 +19,6 @@
limitations under the License.
-->
<packages>
<package id="Bovender" version="0.3.1.0" targetFramework="net40" />
<package id="Bovender" version="0.3.3.0" targetFramework="net40" />
<package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net40" />
</packages>

View File

@ -134,8 +134,8 @@
-->
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="Bovender, Version=0.3.1.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<HintPath>..\packages\Bovender.0.3.1.0\lib\net40\Bovender.dll</HintPath>
<Reference Include="Bovender, Version=0.3.3.0, Culture=neutral, PublicKeyToken=df1c15557d8b6df8, processorArchitecture=MSIL">
<HintPath>..\packages\Bovender.0.3.3.0\lib\net40\Bovender.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />