Merge branch 'release-2.4.2'

This commit is contained in:
daniel 2017-09-29 06:13:39 +02:00
commit cc28229c74
17 changed files with 117 additions and 34 deletions

View File

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

View File

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

View File

@ -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"));
}
}
}

View File

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

View File

@ -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
/// <param name="fileName">File to write to.</param>
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);
}

View File

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

View File

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

View File

@ -76,6 +76,11 @@ namespace zaaReloaded2.Formatter
/// </summary>
public bool IsBlacklisted { get { return LabItem.IsBlacklisted; } }
/// <summary>
/// Gets whether the Item is marked to suppress its label in the thesaurus.
/// </summary>
public bool SuppressLabel { get { return LabItem.SuppressLabel; } }
/// <summary>
/// Gets or sets the item's comment.
/// </summary>
@ -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,

View File

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

View File

@ -240,7 +240,7 @@ namespace zaaReloaded2.Importer.ClinicImporter
/// 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)(:00)?\)\s*$");
@"^(Labor:?)?\s*\(?\s*(?<datetime>\d\d\.\d\d\.\d\d\d\d\s+\d\d:\d\d)(:00)?\)");
IList<String> _lines;
Parameters _parameterDictionary;
Units _unitDictionary;

View File

@ -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);
}

View File

@ -230,6 +230,11 @@ namespace zaaReloaded2.LabModel
/// </summary>
public bool IsBlacklisted { get; protected set; }
/// <summary>
/// Gets whether the item's label should be suppressed.
/// </summary>
public bool SuppressLabel { get; protected set; }
#endregion
#region Constructors

View File

@ -27,7 +27,7 @@
<button id="zrlFormatLab" label="Formatieren" image="f.png" onAction="Ribbon_Click" size="large"
supertip="Formatiert den ausgewählten Bereich mit dem zuletzt verwendeten Stil."
getEnabled="CanFormat" />
<button id="zrlSettings" label="Stilauswahl" image="fff.png" onAction="Ribbon_Click" size="large"
<button id="zrlSettings" label="Stile verwalten" image="fff.png" onAction="Ribbon_Click" size="large"
supertip="Zeigt eine Liste vorhandener Stile an. Stile können bearbeitet, hinzugefügt, gelöscht werden." />
</group>
<group id="zrlGroupDrugs" label="Medikamente">

View File

@ -126,6 +126,19 @@ namespace zaaReloaded2.Thesaurus
{
return LookUpValue(laurisName, 5, false);
}
/// <summary>
/// Checks whether an item's label should be suppressed or not.
/// </summary>
/// <param name="laurisName">Laboratory item to lok up;
/// this must be an original Lauris string.</param>
/// <returns>True if the item should *not* be labelled,
/// false if not. Default is false (i.e., labels are .</returns>
public bool GetSuppressLabel(string laurisName)
{
return LookUpValue(laurisName, 6, false);
}
#endregion
#region Overrides

View File

@ -1,2 +1,2 @@
2.4.1
2.4.1.0
2.4.2
2.4.2.0

View File

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

View File

@ -66,7 +66,7 @@
ToolTip="Stil auswählen und Textblock damit formatieren (Enter)">
<StackPanel Orientation="Horizontal">
<Image Source="/zaaReloaded2;component/Icons/f.png" Width="32" />
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Auswählen</TextBlock>
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Auswählen &amp; formatieren</TextBlock>
</StackPanel>
</Button>
<UniformGrid Columns="2" Margin="0 10 0 0" x:Name="buttonsPanel">