From 96c6c2b81ca9804c862cf9c37f2eed5d861248ed Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Fri, 21 Jun 2024 14:31:10 +0200 Subject: [PATCH] Mandator um das Feld "Leistungserbringergruppe" erweitert -> Changes_2024_06_21 Mandator Leistungserbringergruppe.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Zusätzliches GroupBox Feld bei Einstellungen - Ohne AllowGkvAbrechnung Flag -> Visibility Collapsed --- BeWo/View/Detail/MandatorView.xaml | 261 ++++++++++-------- BeWo/View/Detail/MandatorView.xaml.cs | 5 + BeWo/ViewModel/MandatorVM.cs | 19 ++ Dakota/DakotaConfig.cs | 10 - Dakota/DakotaValidator.cs | 16 +- Dakota/Logic/DakotaInfoCreator.cs | 25 +- .../Models/Infos/InfoAbrechnungsposition.cs | 8 +- Data/Entities/Mandator.cs | 19 ++ Data/Mappings/Mandator.hbm.xml | 1 + ...6_21 Mandator Leistungserbringergruppe.txt | 2 + Service/DCEntityMapper/MandatorDC_Mandator.cs | 2 + Shared/DataContracts/MandatorDC.cs | 3 + 12 files changed, 222 insertions(+), 149 deletions(-) create mode 100644 Model/Changes_2024_06_21 Mandator Leistungserbringergruppe.txt diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml index 575442f3f..fb12e35e0 100644 --- a/BeWo/View/Detail/MandatorView.xaml +++ b/BeWo/View/Detail/MandatorView.xaml @@ -7,73 +7,75 @@ xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True"> - - + + + + + + + - - - - - - - - - - - + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - + + - - - + + + - - + + - - - - - - - - - - + + + - - - - - + + + + + + + + + + + + - - + + Zeit in Minuten bis der BeWoPlaner nach Inaktivität gesperrt wird - - + @@ -84,55 +86,55 @@ Grid.Column="1" Grid.Row="4" Margin="3,5,3,5" Height="23" EditValue="{Binding Path=MoKSessionTimeout, Converter={StaticResource Int2DecimalConverter}, Mode=TwoWay}" /> - - + - + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - + - - - - - + + + + + + + - - - + + - + @@ -148,49 +150,64 @@ - - - - - - - - - - - + + + + + + + + + + + - - + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + @@ -206,9 +223,9 @@ - + - + \ No newline at end of file diff --git a/BeWo/View/Detail/MandatorView.xaml.cs b/BeWo/View/Detail/MandatorView.xaml.cs index fc8a4d925..269040ba9 100644 --- a/BeWo/View/Detail/MandatorView.xaml.cs +++ b/BeWo/View/Detail/MandatorView.xaml.cs @@ -39,6 +39,11 @@ namespace BeWo.View.Detail SpinEditShowWarning.Visibility = Visibility.Collapsed; } + if (!BeWoApp.AppSettings.AllowGkvAbrechnung) + { + groupBoxSozio.Visibility = Visibility.Collapsed; + } + ComboZeiteinheit.ItemsSource = new List { "Minuten", "Stunden", "Stunden und Minuten" }; if (viewModel.EinheitZeiterfassung.Equals("1")) diff --git a/BeWo/ViewModel/MandatorVM.cs b/BeWo/ViewModel/MandatorVM.cs index 3a2bd849a..70effcb54 100644 --- a/BeWo/ViewModel/MandatorVM.cs +++ b/BeWo/ViewModel/MandatorVM.cs @@ -75,6 +75,8 @@ namespace BeWo.ViewModel private string _IKLeistungserbringer; + private string _Leistungserbringergruppe; + public MandatorVM(IList invoiceNumberList, MandatorDC pDC) : base(pDC, true) { _InvoiceNumberList = new BindingList(invoiceNumberList); @@ -526,6 +528,21 @@ namespace BeWo.ViewModel } } + public string Leistungserbringergruppe + { + get { return this._Leistungserbringergruppe; } + + set + { + if (this.AreDifferent(this._Leistungserbringergruppe, value)) + { + this._Leistungserbringergruppe = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Leistungserbringergruppe, value), nameof(Leistungserbringergruppe)); + this.FirePropertyChanged(nameof(Leistungserbringergruppe)); + } + } + } + protected override void InitByDataContract(MandatorDC pDataContract) { this._Name = pDataContract.Name; @@ -539,6 +556,7 @@ namespace BeWo.ViewModel this._Settings = pDataContract.Settings; this._Apikey = pDataContract.Apikey; this._IKLeistungserbringer = pDataContract.IKLeistungserbringer; + _Leistungserbringergruppe = pDataContract.Leistungserbringergruppe; if (_Settings == null) { @@ -593,6 +611,7 @@ namespace BeWo.ViewModel pDataContract.Settings = this._Settings; pDataContract.Apikey = this._Apikey; pDataContract.IKLeistungserbringer = this._IKLeistungserbringer; + pDataContract.Leistungserbringergruppe = _Leistungserbringergruppe; return pDataContract; } diff --git a/Dakota/DakotaConfig.cs b/Dakota/DakotaConfig.cs index ae7b64268..99693d1ce 100644 --- a/Dakota/DakotaConfig.cs +++ b/Dakota/DakotaConfig.cs @@ -22,15 +22,5 @@ namespace Dakota public static string Absenderklassifikation => "SL"; public static string Dateiidentifizierer => "S"; public static string GetLogischerDateiname(int _month) => $"{Absenderklassifikation}{IKAbsender.Substring(2, 6)}{Dateiidentifizierer}{_month:00}"; - - - public static SchlüsselAbrechnungscodes Abrechnungscode => SchlüsselAbrechnungscodes.SoziotherapeutischerLeistungserbringer; - - public static SchlüsselTarifkennzeichenBereich TarifkennzeichenBereich => SchlüsselTarifkennzeichenBereich.Bundeseinheitlich; - public static SchlüsselTarifkennzeichenSondertarif TarifkennzeichenSondertarif => SchlüsselTarifkennzeichenSondertarif.OhneBesonderheiten; - - public static SchlüsselPosArtDerEinrichtung AbrechnungspositionArtDerEinrichtung => SchlüsselPosArtDerEinrichtung.SoziotherapeutischerLeistungserbringer; - public static SchlüsselPosBehandlungsart AbrechnungspositionBehandlungsart => SchlüsselPosBehandlungsart.Einzelbehandlung; - public static SchlüsselPosVergütungsart AbrechnungspositionVergütungsart => SchlüsselPosVergütungsart.Pauschale1; } } diff --git a/Dakota/DakotaValidator.cs b/Dakota/DakotaValidator.cs index 3108c1328..9a0703ddd 100644 --- a/Dakota/DakotaValidator.cs +++ b/Dakota/DakotaValidator.cs @@ -28,7 +28,10 @@ namespace Dakota throw new DakotaException("Mandator ist null"); if (!ValidateIKNumber(mandatordc.IKLeistungserbringer)) - throw new DakotaException("Die IK Nummer des Leistungserbringers ist ungültig."); + throw new DakotaException($"Die IK Nummer des Leistungserbringers \"{mandatordc.IKLeistungserbringer}\" ist ungültig."); + + if (!ValidateLeistungserbringergruppe(mandatordc.Leistungserbringergruppe)) + throw new DakotaException($"Die Leistungserbringergruppe \"{mandatordc.Leistungserbringergruppe}\" ist ungültig. Erwarten werden 5 Stellen für das Tarifkennzeichen alleine oder 7 Stellen für den Abrechnungscode und für das Tarifkennzeichen zusammen."); } /// @@ -76,5 +79,16 @@ namespace Dakota return true; } + + private static bool ValidateLeistungserbringergruppe(string code) + { + if (code == null) + return false; + + if (code.Length != 5 && code.Length != 7) + return false; + + return true; + } } } diff --git a/Dakota/Logic/DakotaInfoCreator.cs b/Dakota/Logic/DakotaInfoCreator.cs index f9ebb9469..4f9cb935b 100644 --- a/Dakota/Logic/DakotaInfoCreator.cs +++ b/Dakota/Logic/DakotaInfoCreator.cs @@ -250,19 +250,24 @@ namespace Dakota.Logic { var info = new InfoAbrechnungsposition(); - // info.Identifikationsnummer = para.SozioInvoiceItem.Identifikationsnummer; - - info.Abrechnungscode = DakotaConfig.Abrechnungscode; - - info.TarifkennzeichenBereich = DakotaConfig.TarifkennzeichenBereich; - info.TarifkennzeichenSondertarif = DakotaConfig.TarifkennzeichenSondertarif; + var lesitungserbringergruppe = infoParameter.Mandator.Leistungserbringergruppe; + if(lesitungserbringergruppe.Length == 5) + { + info.Abrechnungscode = "69"; + info.Tarifkennzeichen = lesitungserbringergruppe; + } + else if (lesitungserbringergruppe.Length == 7) + { + info.Abrechnungscode = lesitungserbringergruppe.Substring(0, 2); + info.Tarifkennzeichen = lesitungserbringergruppe.Substring(2, 5); + } + else + { + throw new ArgumentOutOfRangeException(nameof(infoParameter.Mandator.Leistungserbringergruppe), infoParameter.Mandator.Leistungserbringergruppe.Length, "Leistungserbringergruppe 7 Stellen oder 5 Stelle ohne Abrechnungscode"); + } info.AbrechnungspositionString = infoParameter.InvoiceItem.UnitDescription.Substring(6); - //info.AbrechnungspositionArtDerEinrichtung = DakotaConfig.AbrechnungspositionArtDerEinrichtung; - //info.AbrechnungspositionBehandlungsart = DakotaConfig.AbrechnungspositionBehandlungsart; - //info.AbrechnungspositionVergütungsart = DakotaConfig.AbrechnungspositionVergütungsart; - info.AnzahlMenge = infoParameter.InvoiceItem.UnitCount.Value; info.EinzelbetragAbrechnungsposition = infoParameter.InvoiceItem.AmountPerUnit.Value; info.DatumDerLeistungserbringung = infoParameter.InvoiceItem.ItemPeriodStart.Value; diff --git a/Dakota/Models/Infos/InfoAbrechnungsposition.cs b/Dakota/Models/Infos/InfoAbrechnungsposition.cs index bac1b7bf7..5d7d0f0ba 100644 --- a/Dakota/Models/Infos/InfoAbrechnungsposition.cs +++ b/Dakota/Models/Infos/InfoAbrechnungsposition.cs @@ -9,12 +9,8 @@ namespace Dakota.Models.Infos { internal class InfoAbrechnungsposition { - // public string Identifikationsnummer { get; set; } - public SchlüsselAbrechnungscodes Abrechnungscode { get; set; } - - public SchlüsselTarifkennzeichen Tarifkennzeichen => new SchlüsselTarifkennzeichen(TarifkennzeichenBereich, TarifkennzeichenSondertarif); - public SchlüsselTarifkennzeichenBereich TarifkennzeichenBereich { get; set; } - public SchlüsselTarifkennzeichenSondertarif TarifkennzeichenSondertarif { get; set; } + public string Abrechnungscode { get; set; } + public string Tarifkennzeichen { get; set; } public string AbrechnungspositionString { get; set; } diff --git a/Data/Entities/Mandator.cs b/Data/Entities/Mandator.cs index ec6df76f0..a6c590108 100644 --- a/Data/Entities/Mandator.cs +++ b/Data/Entities/Mandator.cs @@ -48,6 +48,8 @@ namespace BeWo.Data.Entities public static string Setting_IKLeistungserbringer = "IKLeistungserbringer"; + public static string Setting_Leistungserbringergruppe = nameof(Leistungserbringergruppe); + private long _BeWoClientType; private string _ClientId; @@ -72,6 +74,8 @@ namespace BeWo.Data.Entities private string _IKLeistungserbringer; + private string _Leistungserbringergruppe; + public Mandator() { @@ -453,5 +457,20 @@ namespace BeWo.Data.Entities } } + public virtual string Leistungserbringergruppe + { + get + { + return this._Leistungserbringergruppe; + } + + set + { + if (this.AreDifferent(this._Leistungserbringergruppe, value)) + { + this._Leistungserbringergruppe = value; + } + } + } } } \ No newline at end of file diff --git a/Data/Mappings/Mandator.hbm.xml b/Data/Mappings/Mandator.hbm.xml index b21c5295c..84d739de1 100644 --- a/Data/Mappings/Mandator.hbm.xml +++ b/Data/Mappings/Mandator.hbm.xml @@ -28,5 +28,6 @@ + \ No newline at end of file diff --git a/Model/Changes_2024_06_21 Mandator Leistungserbringergruppe.txt b/Model/Changes_2024_06_21 Mandator Leistungserbringergruppe.txt new file mode 100644 index 000000000..c019e9211 --- /dev/null +++ b/Model/Changes_2024_06_21 Mandator Leistungserbringergruppe.txt @@ -0,0 +1,2 @@ +ALTER TABLE `mandator` +ADD COLUMN `Leistungserbringergruppe` VARCHAR(16) NULL DEFAULT NULL AFTER `IKLeistungserbringer`; diff --git a/Service/DCEntityMapper/MandatorDC_Mandator.cs b/Service/DCEntityMapper/MandatorDC_Mandator.cs index 9929c3a4b..1e011b69c 100644 --- a/Service/DCEntityMapper/MandatorDC_Mandator.cs +++ b/Service/DCEntityMapper/MandatorDC_Mandator.cs @@ -30,6 +30,7 @@ namespace BeWo.Service.DCEntityMapper #endif pDataContract.Apikey = pEntity.Apikey; pDataContract.IKLeistungserbringer = pEntity.IKLeistungserbringer; + pDataContract.Leistungserbringergruppe = pEntity.Leistungserbringergruppe; return pDataContract; } @@ -52,6 +53,7 @@ namespace BeWo.Service.DCEntityMapper pEntity.IsMedicationAllowed = pDataContract.IsMedicationAllowed; pEntity.Apikey = pDataContract.Apikey; pEntity.IKLeistungserbringer = pDataContract.IKLeistungserbringer; + pEntity.Leistungserbringergruppe = pDataContract.Leistungserbringergruppe; return pEntity; } diff --git a/Shared/DataContracts/MandatorDC.cs b/Shared/DataContracts/MandatorDC.cs index 02b09bd88..418775f27 100644 --- a/Shared/DataContracts/MandatorDC.cs +++ b/Shared/DataContracts/MandatorDC.cs @@ -58,5 +58,8 @@ namespace BS.Shared.DataContracts [DataMember] public string IKLeistungserbringer { get; set; } + + [DataMember] + public string Leistungserbringergruppe { get; set; } } } \ No newline at end of file