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) Version 2.4.1 (2017-09-21)
------------------------------------------------------------------------ ------------------------------------------------------------------------

View File

@ -23,7 +23,7 @@ versioninfo:
mv www/versioninfo.tmp www/versioninfo.txt mv www/versioninfo.tmp www/versioninfo.txt
upload: 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: website:
rsync -ruvz www/ bovender.de:/var/www/html/zaareloaded/ 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)")); 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 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."); 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(); settings.Uid = Guid.NewGuid();
Logger.Debug("LoadFromFile: new GUID is '{0}", settings.Uid);
return settings; return settings;
} }
@ -76,14 +78,15 @@ namespace zaaReloaded2.Controller
/// <param name="fileName">File to write to.</param> /// <param name="fileName">File to write to.</param>
public void SaveToFile(string fileName) public void SaveToFile(string fileName)
{ {
Logger.Info("SaveToFile: {0}", fileName); Logger.Info("SaveToFile: Settings name: {0}", Name);
using (StreamWriter writer = new StreamWriter(fileName)) using (StreamWriter writer = new StreamWriter(fileName))
{ {
Serializer serializer = new SerializerBuilder() Serializer serializer = new SerializerBuilder()
//.EnsureRoundtrip() .EnsureRoundtrip()
.Build(); .Build();
serializer.Serialize(writer, this); serializer.Serialize(writer, this);
} }
Logger.Info("SaveToFile: Successfully saved to file '{0}'", fileName);
// SoapFormatter formatter = new SoapFormatter(); // SoapFormatter formatter = new SoapFormatter();
// formatter.Serialize(writer.BaseStream, this); // 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' Content: 'Virologie (EDTA-Blut): CMV-PCR, BKV-PCR'
- !zaaReloaded2.Controller.Elements.CustomText,%20zaaReloaded2,%20Version=1.0.0.0,%20Culture=neutral,%20PublicKeyToken=6ec8d075a1ab1383 - !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)' 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" # LAURIS-NAME "KANONISCHER NAME" MATERIAL DEZIMALSTELLEN "IMMER REFERENZBEREICH" "BLACKLIST" "NO-LABEL"
# =========== ================== ======== ============== ======================= =========== # =========== ================== ======== ============== ======================= =========== ==========
"- Multiresistenz" Multiresistenz MSU "- Multiresistenz" Multiresistenz MSU --- --- --- X
"a1-Microglobulin (SU)" a1-Microglobulin SU "a1-Microglobulin (SU)" a1-Microglobulin SU
"a1-Microglobulin (SU)/die" 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 "AFP (ECL, Elecsys, Roche)" AFP S --- X
"aktuelles Bicarbonat" Bic BGA "aktuelles Bicarbonat" Bic BGA
Albumin Alb S Albumin Alb S

View File

@ -76,6 +76,11 @@ namespace zaaReloaded2.Formatter
/// </summary> /// </summary>
public bool IsBlacklisted { get { return LabItem.IsBlacklisted; } } 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> /// <summary>
/// Gets or sets the item's comment. /// Gets or sets the item's comment.
/// </summary> /// </summary>
@ -194,12 +199,20 @@ namespace zaaReloaded2.Formatter
if (comment != String.Empty) comment = " " + comment; 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( String.Format(
"{0} {1}{2}{3}{4}", "{0}{1}{2}{3}{4}",
name, name,
value, value,
unit, unit,

View File

@ -175,15 +175,15 @@ namespace zaaReloaded2.Importer
string text = paragraph.Range.Text; string text = paragraph.Range.Text;
bool isCinicTimePoint = ClinicTimePoint.IsTimeStampLine(text); bool isCinicTimePoint = ClinicTimePoint.IsTimeStampLine(text);
bool isZaaTimePoint = LaurisTimePoint.IsTimeStampLine(text); bool isZaaTimePoint = LaurisTimePoint.IsTimeStampLine(text);
// If the line is a ZAA time point, but not a clinic timepoint, we can deduct that // // 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 // // 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 // // "(17.09.2015-201710:44:00) Cyclosporin-A vor Gabe: 130 µg/l;" which does not
// occur in the clinic format. // // occur in the clinic format.
if ((ImportMode == ImportMode.Undefined) && isZaaTimePoint && !isCinicTimePoint) // if ((ImportMode == ImportMode.Undefined) && isZaaTimePoint && !isCinicTimePoint)
{ // {
Logger.Info("IsTimeStampParagraph: Found ZAA time stamp, setting mode to ZAA"); // Logger.Info("IsTimeStampParagraph: Found ZAA time stamp, setting mode to ZAA");
ImportMode = ImportMode.Zaa; // ImportMode = ImportMode.Zaa;
} // }
return isCinicTimePoint || isZaaTimePoint; return isCinicTimePoint || isZaaTimePoint;
} }

View File

@ -240,7 +240,7 @@ namespace zaaReloaded2.Importer.ClinicImporter
/// paragraph of a LaurisText. /// paragraph of a LaurisText.
/// </summary> /// </summary>
static readonly Regex _timeStampRegex = new Regex( 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; IList<String> _lines;
Parameters _parameterDictionary; Parameters _parameterDictionary;
Units _unitDictionary; Units _unitDictionary;

View File

@ -76,6 +76,7 @@ namespace zaaReloaded2.Importer.ZaaImporter
Name = parameterDictionary.GetCanonicalName(OriginalName); Name = parameterDictionary.GetCanonicalName(OriginalName);
AlwaysPrintLimits = parameterDictionary.GetForceReferenceDisplay(OriginalName); AlwaysPrintLimits = parameterDictionary.GetForceReferenceDisplay(OriginalName);
IsBlacklisted = parameterDictionary.GetIsBlacklisted(OriginalName); IsBlacklisted = parameterDictionary.GetIsBlacklisted(OriginalName);
SuppressLabel = parameterDictionary.GetSuppressLabel(OriginalName);
Material = parameterDictionary.GetMaterial(OriginalName, Material); Material = parameterDictionary.GetMaterial(OriginalName, Material);
PreferredPrecision = parameterDictionary.GetPrecision(OriginalName); PreferredPrecision = parameterDictionary.GetPrecision(OriginalName);
} }

View File

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

View File

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

View File

@ -126,6 +126,19 @@ namespace zaaReloaded2.Thesaurus
{ {
return LookUpValue(laurisName, 5, false); 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 #endregion
#region Overrides #region Overrides

View File

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

View File

@ -350,11 +350,17 @@ namespace zaaReloaded2.ViewModels
void ConfirmDeleteSettings(ViewModelMessageContent content) void ConfirmDeleteSettings(ViewModelMessageContent content)
{ {
SettingsViewModel vm = content.ViewModel as SettingsViewModel; SettingsViewModel vm = content.ViewModel as SettingsViewModel;
int oldIndex = SettingsList.IndexOf(vm);
if (CanDeleteSettings() && content.Confirmed) if (CanDeleteSettings() && content.Confirmed)
{ {
_repository.SettingsList.Remove(vm.RevealModelObject() as Settings); _repository.SettingsList.Remove(vm.RevealModelObject() as Settings);
SettingsList.Remove(vm); SettingsList.Remove(vm);
} }
int newIndex = (oldIndex < SettingsList.Count) ? oldIndex : SettingsList.Count - 1;
if (newIndex >= 0)
{
SettingsList[newIndex].IsSelected = true;
}
} }
void DoResetSettings() void DoResetSettings()
@ -424,6 +430,7 @@ namespace zaaReloaded2.ViewModels
{ {
settingsViewModel.PropertyChanged += SettingsViewModel_PropertyChanged; settingsViewModel.PropertyChanged += SettingsViewModel_PropertyChanged;
SettingsList.Add(settingsViewModel); SettingsList.Add(settingsViewModel);
settingsViewModel.IsSelected = true;
} }
void DoExportSettings() void DoExportSettings()
@ -431,7 +438,7 @@ namespace zaaReloaded2.ViewModels
if (CanExportSettings()) if (CanExportSettings())
{ {
ChooseExportFileNameMessage.Send( ChooseExportFileNameMessage.Send(
new FileNameMessageContent(SuggestImportExportPath(), FILE_FILTER), new FileNameMessageContent(SuggestExportPath(), FILE_FILTER),
msg => ConfirmExportSettings(msg)); msg => ConfirmExportSettings(msg));
} }
} }
@ -445,7 +452,7 @@ namespace zaaReloaded2.ViewModels
{ {
if (message.Confirmed) if (message.Confirmed)
{ {
UserSettings.Default.ImportExportPath = message.Value; SaveImportExportDir(message.Value);
Settings settings = LastSelected.RevealModelObject() as Settings; Settings settings = LastSelected.RevealModelObject() as Settings;
try try
{ {
@ -463,7 +470,7 @@ namespace zaaReloaded2.ViewModels
void DoImportSettings() void DoImportSettings()
{ {
ChooseImportFileNameMessage.Send( ChooseImportFileNameMessage.Send(
new FileNameMessageContent(SuggestImportExportPath(), FILE_FILTER), new FileNameMessageContent(SuggestImportPath(), FILE_FILTER),
msg => ConfirmImportSettings(msg)); msg => ConfirmImportSettings(msg));
} }
@ -476,10 +483,19 @@ namespace zaaReloaded2.ViewModels
{ {
if (message.Confirmed) if (message.Confirmed)
{ {
UserSettings.Default.ImportExportPath = message.Value; SaveImportExportDir(message.Value);
try try
{ {
Settings settings = Settings.LoadFromFile(message.Value); 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)); AddSettingsViewModel(new SettingsViewModel(settings));
} }
catch (Exception e) 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)) if (String.IsNullOrEmpty(path))
{ {
return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); 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 #endregion
#region Implementation of ViewModelBase #region Implementation of ViewModelBase

View File

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