diff --git a/HISTORY.md b/HISTORY.md
index 8fa1fd6..8238b31 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,3 +1,12 @@
+Version 2.0.0 (2015-08-30)
+========================================================================
+
+- FEHLERBEHEBUNG: Kein Absturz mehr, wenn zwei Spalten formatiert werden.
+- VERBESSERT: Kein Crash mehr, falls sich ein Komma in den Lauris-Block einschleicht.
+
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+
Version 2.0.0-beta.5 (2015-08-25)
========================================================================
diff --git a/Tests/Importer/ZaaImporter/LaurisItemTest.cs b/Tests/Importer/ZaaImporter/LaurisItemTest.cs
index 173cd5e..5dd19ca 100755
--- a/Tests/Importer/ZaaImporter/LaurisItemTest.cs
+++ b/Tests/Importer/ZaaImporter/LaurisItemTest.cs
@@ -30,6 +30,7 @@ namespace Tests.Importer.ZaaImporter
{
[Test]
[TestCase("BE: 5.2 [-2 - 2] mmol/l", "BE", 5.2, "mmol/l", -2, 2, false)]
+ [TestCase("Comma: 5,2 [-2,1 - 2,3] mmol/l", "Comma", 5.2, "mmol/l", -2.1, 2.3, 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/www/favicon.png b/www/favicon.png
deleted file mode 100644
index 9b9024e..0000000
Binary files a/www/favicon.png and /dev/null differ
diff --git a/www/index.html b/www/index.html
index 97d5ec5..a0d402b 100644
--- a/www/index.html
+++ b/www/index.html
@@ -1,26 +1,27 @@
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
zaaReloaded2
+
diff --git a/www/versioninfo.txt b/www/versioninfo.txt
index 7fbd87b..9af600f 100644
--- a/www/versioninfo.txt
+++ b/www/versioninfo.txt
@@ -1,4 +1,4 @@
-2.0.0-beta.5
-http://zaa.nephrowiki.de/downloads/zaaReloaded-2.0.0-beta.5.exe
-df50175424dfbd651f6799a8561a11d02c66aa78 publish/release/zaaReloaded-2.0.0-beta.5.exe
+2.0.0
+http://zaa.nephrowiki.de/downloads/zaaReloaded-2.0.0.exe
+6aef8b27f82c864acde1139fea2313486c3b22c1 publish/release/zaaReloaded-2.0.0.exe
diff --git a/zaaReloaded2/Defaults/clinic.zaaReloaded b/zaaReloaded2/Defaults/clinic.zaaReloaded
index bbe63c1..15d9bbc 100755
--- a/zaaReloaded2/Defaults/clinic.zaaReloaded
+++ b/zaaReloaded2/Defaults/clinic.zaaReloaded
@@ -3,17 +3,17 @@
2
-<_a>-1778735783
-<_b>3723
-<_c>18224
-<_d>191
-<_e>50
-<_f>238
-<_g>43
-<_h>44
-<_i>3
-<_j>227
-<_k>42
+<_a>233768554
+<_b>-10539
+<_c>19865
+<_d>131
+<_e>252
+<_f>97
+<_g>190
+<_h>116
+<_i>107
+<_j>28
+<_k>144
Kopie von Standard für NepA
IfSpecialItem
@@ -29,7 +29,7 @@
2
-19
+21
@@ -62,98 +62,110 @@
-
-
-
+
+
+
-
+
+
+
+
+
-zaaReloaded2.Controller.Elements.Items
+zaaReloaded2.Controller.Elements.Items
4
2
-Klinische Chemie: Na, K, Cl, Mg, Ca, P, CaxP, Alb, Prot, Haptoglobin, LDH, Glukose, Harnsäure
+Klinische Chemie: Na, K, Cl, Mg, Ca, P, CaxP, Alb, Prot, Haptoglobin, LDH, Glukose, Harnsäure
2
-Entzündung/Immunsystem: CRP, Pct, C3c, C4, Anti-DNAse B, ASL
+Entzündung/Immunsystem: CRP, Pct, C3c, C4, Anti-DNAse B, ASL
2
-Kardiale Marker: CK, CKMB, Trop, NTproBNP
+Kardiale Marker: CK, CKMB, Trop, NTproBNP
2
-Niere: Krea, Hst, eGFR (CKD-EPI), Cystatin C
+Niere: Krea, Hst, eGFR (CKD-EPI)
2
-Sammelurin: SU-Proteinurie, SU-Alb, SU-CrCl, SU-HstCl, SU-GFR, SU-Natrium, SU-Zeit, SU-Volumen
+Sammelurin: SU-Proteinurie, SU-Alb, SU-CrCl, SU-HstCl, SU-GFR, SU-Natrium, SU-Zeit, SU-Volumen
2
-Spot-Urin: TPCR, ACR, U-Ery, U-Leu, U-Bakt
+Spot-Urin: U-TPCR, U-ACR, U-Ery, U-Leu, U-Bakt
2
-Leber: GOT, GGT, GPT, AP, Bilirubin, CHE
+Leber: GOT, GGT, GPT, AP, Bilirubin, CHE
2
-Blutfette: TG, Chol, LDL, HDL, Lp(a)
+Blutfette: TG, Chol, LDL, HDL, Lp(a)
2
-Hämatologie: Hb, Hkt, Reti, Leu, Thr, MCV, HbA1c, Retikulozyten, Fragmentozyten
+Hämatologie: Hb, Hkt, Reti, Leu, Thr, MCV, HbA1c, Retikulozyten, Fragmentozyten
2
-Gerinnung: Quick, INR, PTT, Fibrinogen, ATIII, Anti-Xa
+Diff.-BB: Neu, Lym, Mon, Baso, Eos
2
-Diff.-BB: Neu, Lym, Mon, Baso, Eos
+Gerinnung: Quick, INR, PTT, Fibrinogen, ATIII, Anti-Xa
2
-Hormone: iPTH, TSH, fT3, fT4
+Serum-Elektrophorese: Albumin-Fraktion, a1-Globulin, a2-Globulin, b-Globulin, g-Globulin
2
-Eisenhaushalt: Eisen, Ferritin, Transferrin, Tf.-Sätt.
+Hormone: iPTH, TSH, fT3, fT4
2
-BGA: pH, Std.-Bic., BE
+Eisenhaushalt: Eisen, Ferritin, Transferrin, Tf.-Sätt.
2
-Hepatitis-Serologie: Anti-HBs, Anti-HBc
+BGA: pH, Std.-Bic., BE
2
-Medikamente: TAC, CSA (C0), SIR, Vancomycin, Gentamicin, Tobramicin
+Hepatitis-Serologie: Anti-HBs, Anti-HBc
-
-zaaReloaded2.Controller.Elements.CustomText
+
+2
+Medikamente: TAC, CSA (C0), SIR, Vancomycin, Gentamicin, Tobramicin
+
+
+zaaReloaded2.Controller.Elements.CustomText
4
-
-2
-Virologie (EDTA-Blut): CMV-PCR, BKV-PCR
-
2
-Autoantikörper: ANCA (IF), MPO-ANCA (ELISA), PR3-ANCA (ELISA), ANA (IF), AnDNA (ELISA), AnDNA (RIA)
+Virologie (EDTA-Blut): CMV-PCR, BKV-PCR
2
-Nephrolog. Sediment: pH, Proteinurie, Ery /µl, Leu /µl, Plattenep. /µl, Bakt., Schleimfäden
+Nephrolog. Sediment: pH, Proteinurie, Ery /µl, Leu /µl, Plattenep. /µl, Bakt., Schleimfäden
+
+2
+Autoantikörper: ANCA (IF), MPO-ANCA (ELISA), PR3-ANCA (ELISA), ANA (IF), AnDNA (ELISA), AnDNA (RIA)
+
+
+2
+Tumormarker: PSA
+
diff --git a/zaaReloaded2/Defaults/parameters.txt b/zaaReloaded2/Defaults/parameters.txt
index f30528e..61b64f1 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 0
"Alk. Phosphatase" AP S 0
Amylase Amylase S
"anorg. Phosphat" P S
@@ -22,7 +22,7 @@ Basophile Baso E
Calcium Ca S
Calcium-Phosphat-Produkt CaxP S
Cholesterin Chol S
-CK gesamt" CK S
+CK gesamt" CK S X
"CK MB" CK-MB S
"Creatinin (PU)" Krea U 0
"Creatinin (SU)" Krea SU 0
@@ -43,7 +43,7 @@ Gesamt-Bilirubin Bilirubin S
"Gesamt-Eiweiss (SU)" Protein SU
"Gesamt-Eiweiss (SU)/die" Proteinurie SU
Gesamt-Eiweiss Protein S
-"Gesamt-Eiweiss/Creatinin (PU)" TPCR U
+"Gesamt-Eiweiss/Creatinin (PU)" TPCR U 0
GGT GGT S 0
"glomeruläre Filtrationsrate" GFR SU
"glomerul. Filtrationsr. (MDRD)" "eGFR (MDRD)" S --- X
@@ -73,10 +73,10 @@ Kalium K S
Leukozyten Leu E
Lymphozyten Lym E
Magnesium Mg S X
-"MCH (HbE)" MCH E
-MCHC MCHC E
-MCV MCV E
-"Mittleres Plättchenvolumen" MPV E
+"MCH (HbE)" MCH E 0
+MCHC MCHC E 0
+MCV MCV E 0
+"Mittleres Plättchenvolumen" MPV E 0
Monozyten Mon E
"Natrium (SU)" Na SU
"Natrium (SU)/die" Na SU
@@ -90,6 +90,7 @@ pH pH BGA
"Plattenepithelien (U)" Plattenep U
"PO2 (art.)" pO2 BGA
"Protein (U)" Protein U
+"PSA ges. (ECL,Elecsys,Roche)" PSA S X
"Sammelmenge (U)" Volumen SU
"Sammelzeit (U)" Zeit SU
"Sauerstoffsättigung (art.)" SO2 BGA
@@ -110,11 +111,18 @@ PTT PTT Z
"Ratio int. norm." INR Z
"Komplementfaktor C3c" C3c S X
"Komplementfaktor C4" C4 S X
-"Anti-DNAse B" "Anti-DNAse B" S
-Anti-Streptolysin ASL S
+"Anti-DNAse B" "Anti-DNAse B" S X
+Anti-Streptolysin ASL S X
"PTH intakt" iPTH S
TSH TSH S
-HAPTOGLOBIN Haptoglobin S
+HAPTOGLOBIN Haptoglobin S X
FRAGMENTOZYTEN Fragmentozyten E
+Retikulozyten Retikulozyten E X
"HBc-Antikörper (gesamt)" Anti-HBc S
-HBs-Antikörper Anti-HBs S
\ No newline at end of file
+HBs-Antikörper Anti-HBs S
+"Albumin - Fraktion" Albumin-Fraktion S X
+"Alpha1-Globulin - Fraktion" a1-Globulin S X
+"Alpha2-Globulin - Fraktion" a2-Globulin S X
+"Beta-Globulin - Fraktion" b-Globulin S X
+"Gammaglobulin - Fraktion" g-Globulin S X
+# vim: tw=160 et nowrap fo-=t
diff --git a/zaaReloaded2/Formatter/Formatter.cs b/zaaReloaded2/Formatter/Formatter.cs
index 6639198..185e1cd 100755
--- a/zaaReloaded2/Formatter/Formatter.cs
+++ b/zaaReloaded2/Formatter/Formatter.cs
@@ -121,6 +121,14 @@ namespace zaaReloaded2.Formatter
{
if (!CanRun) throw new NoLaboratoryDataException("No laboratory data to format.");
+ // Create undo record and styles prior to iterating over the elements
+ // because a column switching element might trigger output to the
+ // document.
+ Globals.ThisAddIn.Application.UndoRecord.StartCustomRecord(
+ String.Format("Laborformatierung ({0})", Properties.Settings.Default.AddinName)
+ );
+ CreateStyles();
+
int current = 0;
while (current < Settings.Elements.Count)
{
@@ -146,11 +154,6 @@ namespace zaaReloaded2.Formatter
}
}
- // 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 2aec4db..2996795 100755
--- a/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs
+++ b/zaaReloaded2/Importer/ZaaImporter/LaurisItem.cs
@@ -103,25 +103,22 @@ namespace zaaReloaded2.Importer.ZaaImporter
// "HBs-Antigen: neg. ;"
// "Erythrozyten (U): + [negativ]"
Match match;
- Regex numericalRegex = new Regex(
- @"(?[^:]+):\s*(?[\d.]+)\s*(?\[[^\]]+])?\s*(?[^;]+)?");
- Regex categoricalRegex = new Regex(
- @"(?[^:]+):\s*(?[^[;]+)\s*(\[(?[^\]]+)])?");
- if (numericalRegex.IsMatch(LaurisText))
+ if (_numericalRegex.IsMatch(LaurisText))
{
- match = numericalRegex.Match(LaurisText);
+ match = _numericalRegex.Match(LaurisText);
ParseLimits(match);
+ Value = match.Groups["value"].Value.Trim().Replace(',', '.');
}
else
{
- match = categoricalRegex.Match(LaurisText);
+ match = _categoricalRegex.Match(LaurisText);
Normal = match.Groups["normal"].Value.Trim();
+ Value = match.Groups["value"].Value.Trim();
}
if (match != null)
{
OriginalName = match.Groups["name"].Value.Trim();
Name = OriginalName;
- Value = match.Groups["value"].Value.Trim();
Unit = match.Groups["unit"].Value.Trim();
}
}
@@ -135,14 +132,14 @@ namespace zaaReloaded2.Importer.ZaaImporter
{
if (match.Groups["limits"].Success)
{
- Regex limitRegex = new Regex(@"\[(?[-\d.]+)?\s*(?\S+)\s*(?[-\d.]+)?]");
- Match limitMatch = limitRegex.Match(match.Groups["limits"].Value);
+ Match limitMatch = _limitRegex.Match(match.Groups["limits"].Value);
if (limitMatch.Groups["limit1"].Success && limitMatch.Groups["limit2"].Success)
{
// Use InvariantCulture because Lauris always outputs dots as decimal separator
- LowerLimit = Double.Parse(limitMatch.Groups["limit1"].Value,
+ // Only in rare cases, a comma sneaks in...
+ LowerLimit = Double.Parse(limitMatch.Groups["limit1"].Value.Replace(',', '.'),
CultureInfo.InvariantCulture);
- UpperLimit = Double.Parse(limitMatch.Groups["limit2"].Value,
+ UpperLimit = Double.Parse(limitMatch.Groups["limit2"].Value.Replace(',', '.'),
CultureInfo.InvariantCulture);
}
else
@@ -150,11 +147,11 @@ namespace zaaReloaded2.Importer.ZaaImporter
switch (limitMatch.Groups["operator"].Value.Trim())
{
case "<=":
- UpperLimit = Double.Parse(limitMatch.Groups["limit2"].Value,
+ UpperLimit = Double.Parse(limitMatch.Groups["limit2"].Value.Replace(',', '.'),
CultureInfo.InvariantCulture);
break;
case ">=":
- LowerLimit = Double.Parse(limitMatch.Groups["limit2"].Value,
+ LowerLimit = Double.Parse(limitMatch.Groups["limit2"].Value.Replace(',', '.'),
CultureInfo.InvariantCulture);
break;
default:
@@ -201,6 +198,11 @@ namespace zaaReloaded2.Importer.ZaaImporter
#region Fields
+ static readonly Regex _numericalRegex = new Regex(
+ @"(?[^:]+):\s*(?[\d,.]+)\s*(?\[[^\]]+])?\s*(?[^;]+)?");
+ static readonly Regex _categoricalRegex = new Regex(
+ @"(?[^:]+):\s*(?[^[;]+)\s*(\[(?[^\]]+)])?");
+ static readonly Regex _limitRegex = new Regex(@"\[(?[-\d,.]+)?\s*(?\S+)\s*(?[-\d,.]+)?]");
static readonly Regex _materialRegex = new Regex(@"\((?(SU|PU))\)");
#endregion
diff --git a/zaaReloaded2/VERSION b/zaaReloaded2/VERSION
index fee2c1d..71ce9f8 100755
--- a/zaaReloaded2/VERSION
+++ b/zaaReloaded2/VERSION
@@ -1,2 +1,2 @@
-2.0.0-beta.5
-2.0.0.10
+2.0.0
+2.0.0.11
diff --git a/zaaReloaded2/ViewModels/SettingsRepositoryViewModel.cs b/zaaReloaded2/ViewModels/SettingsRepositoryViewModel.cs
index f96350c..aa2a5f9 100755
--- a/zaaReloaded2/ViewModels/SettingsRepositoryViewModel.cs
+++ b/zaaReloaded2/ViewModels/SettingsRepositoryViewModel.cs
@@ -273,6 +273,10 @@ namespace zaaReloaded2.ViewModels
{
_repository = repository;
BuildSettingsList();
+ if (SettingsList.Count > 0)
+ {
+ SettingsList.First().IsSelected = true;
+ }
RequestCloseView += (sender, args) =>
{
_repository.Store();
diff --git a/zaaReloaded2/ViewModels/SettingsViewModel.cs b/zaaReloaded2/ViewModels/SettingsViewModel.cs
index f97f969..3b92d07 100755
--- a/zaaReloaded2/ViewModels/SettingsViewModel.cs
+++ b/zaaReloaded2/ViewModels/SettingsViewModel.cs
@@ -222,6 +222,10 @@ namespace zaaReloaded2.ViewModels
vm.PropertyChanged += ElementViewModel_PropertyChanged;
Elements.Add(vm);
}
+ if (Elements.Count > 0)
+ {
+ Elements.First().IsSelected = true;
+ }
}
#endregion
diff --git a/zaaReloaded2/Views/ElementPickerView.xaml b/zaaReloaded2/Views/ElementPickerView.xaml
index 947a719..3a42d03 100755
--- a/zaaReloaded2/Views/ElementPickerView.xaml
+++ b/zaaReloaded2/Views/ElementPickerView.xaml
@@ -25,6 +25,7 @@
WindowStyle="ToolWindow" Topmost="True"
b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Neues Element auswählen"
+ FocusManager.FocusedElement="{Binding ElementName=treeview}"
>
@@ -35,7 +36,7 @@
-
+