Mehrere kleine Bugs aus der GkvAbrechnung Erstellen geholt

This commit is contained in:
2024-05-08 12:26:22 +02:00
parent c817b1eacf
commit 2cb7c55303
14 changed files with 107 additions and 343 deletions

View File

@@ -45,7 +45,7 @@
<dxg:GridColumn x:Name="ColumnButtons" AllowEditing="False" Width="auto" FieldName="ReportLink" Header=" ">
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" Margin="1">
<!--<Button Margin="1" ToolTip="Formular anzeigen" x:Name="btn_report" Height="20" Width="20" VerticalAlignment="Center">
<TextBlock Padding="0">
<Hyperlink TextDecorations="None" TargetName="_NewWindow" NavigateUri="{Binding DisplayText, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" RequestNavigate="Hyperlink_OnRequestNavigate">
@@ -56,11 +56,10 @@
<Button Click="btn_edit_Click" Content="@" Padding="0" Margin="1" ToolTip="Editieren" Foreground="#FFFFFF" FontSize="13" FontFamily="Webdings" x:Name="btn_edit" Height="20" Width="20" VerticalAlignment="Center" />
<Button Click="btn_storno_Click" Content="S" Padding="0" Margin="1" ToolTip="Stornieren" Foreground="#FFFFFF" FontSize="13" x:Name="btn_storno" Height="20" Width="20" VerticalAlignment="Center" Initialized="btn_storno_Initialized"/>-->
<Button Click="btn_details_Click" Content="¥" Padding="0" Margin="1" ToolTip="Details anzeigen" Foreground="#FFFFFF" FontSize="13" FontFamily="Webdings" x:Name="btn_details" Height="17" Width="20" VerticalAlignment="Center" />
<Button Click="btn_nutz_Click" Content="¥" Padding="0" Margin="1" ToolTip="Nutzdatendatei" Foreground="#BBBBBB" FontSize="10" FontFamily="Webdings" x:Name="btn_nutz" Height="17" Width="20" VerticalAlignment="Center" />
<Button Click="btn_auf_Click" Content="¥" Padding="0" Margin="1" ToolTip="Auftragsdatei" Foreground="#BBBBBB" FontSize="10" FontFamily="Webdings" x:Name="btn_auf" Height="17" Width="20" VerticalAlignment="Center" />
<!--<Button Click="btn_nutz_Click" Content="¥" Padding="0" Margin="1" ToolTip="Nutzdatendatei" Foreground="#BBBBBB" FontSize="10" FontFamily="Webdings" x:Name="btn_nutz" Height="17" Width="20" VerticalAlignment="Center" />
<Button Click="btn_auf_Click" Content="¥" Padding="0" Margin="1" ToolTip="Auftragsdatei" Foreground="#BBBBBB" FontSize="10" FontFamily="Webdings" x:Name="btn_auf" Height="17" Width="20" VerticalAlignment="Center" />-->
<Button Click="btn_send_Click" Content="*" Padding="0" Margin="1" ToolTip="Senden" Foreground="#FFFF00" FontSize="11" FontFamily="Wingdings" x:Name="btn_send" Height="17" Width="20" VerticalAlignment="Center" />
<Button Click="btn_delete_Click" Content="r" Padding="0" Margin="1" ToolTip="Löschen" Foreground="#FF0000" FontSize="13" FontFamily="Webdings" x:Name="btn_delete" Height="17" Width="20" VerticalAlignment="Center" />
<UserControl Background="Transparent" Width="10"/>
</StackPanel>
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
@@ -159,7 +158,7 @@
</dxg:GridControl.View>
</dxg:GridControl>
<Grid Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5,2,5,0">
<!--<Grid Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5,2,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
@@ -171,7 +170,7 @@
</WrapPanel>
</Grid>
</Grid>-->
<!--<StackPanel Grid.Row="2" Orientation="Horizontal">
<Button Margin="10 3 0 0"
Name="button_checkAllLeistungen" Click="button_checkAll_Click"

View File

@@ -33,7 +33,6 @@ namespace BeWo.View.Detail.Accounting
private readonly NewGkvAbrechnungPopUpView _NewGkvAbrechnungPopUpView;
private readonly GkvAbrechnungListVM _Viewmodel;
public GkvAbrechnungOverview(GkvAbrechnungListVM vm)
{
UpdateDataGridFilterCommand = new DelegateCommand(UpdateDataGridFilter);
@@ -75,15 +74,7 @@ namespace BeWo.View.Detail.Accounting
}
private void RefreshGkvAbrechnungenList()
{
var filter = new GkvAbrechnungViewFilterDC();
//filter.FilterTime = ViewModel.DateTimeSpanFilter is object;
//filter.Start = ViewModel.DateTimeSpanFilter?.StartDate;
//filter.End = ViewModel.DateTimeSpanFilter?.EndDate;
//filter.FilterForInvoiceDate = radioFilterByInvoiceDate.IsChecked.Value;
ServiceFacade.DoAccountingServiceAsync(s => s.GetFilteredGkvAbrechnungen(filter), UpdateGkvAbrechnungList);
ServiceFacade.DoAccountingServiceAsync(s => s.GetFilteredGkvAbrechnungen(null), UpdateGkvAbrechnungList);
}
private void UpdateDataGridFilter()
{
@@ -162,18 +153,6 @@ namespace BeWo.View.Detail.Accounting
UpdateDataGridFilter();
}
private void btn_nutz_Click(object sender, RoutedEventArgs e)
{
var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
BeWoWindowBuilder.GetTextViewer("Nutzdatei", vm.Nutzdatendatei, false, 600, 600).ShowDialog();
}
private void btn_auf_Click(object sender, RoutedEventArgs e)
{
var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
BeWoWindowBuilder.GetTextViewer("Auftragsdatei", vm.Auftragsdatei, false, 150, 1000).ShowDialog();
}
private void btn_details_Click(object sender, RoutedEventArgs e)
{
var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
@@ -329,149 +308,5 @@ namespace BeWo.View.Detail.Accounting
}
}
}
//private void btn_delete_Click(object sender, RoutedEventArgs e)
//{
// mIgnoreCheckChanges = true;
// var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
// if (MessageBox.Show("Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung löschen möchten?", "GKV-Abrechnung löschen", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
// {
// this.ViewModel.VMList.Remove(vm);
// //ServiceFacade.DoAccountingServiceAsync(s => s.DeactivateInvoiceBases(new[] { vm.DataContract }.ToList()));
// }
// mIgnoreCheckChanges = false;
//}
//private void btn_storno_Click(object sender, RoutedEventArgs e)
//{
// mIgnoreCheckChanges = true;
// var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
// if (MessageBox.Show("Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung stornieren möchten?", "GKV-Abrechnung stornieren", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
// {
// /*
// ServiceFacade.DoAccountingServiceAsync(s => s.StorniereInvoiceBases(new[] { vm.DataContract }.ToList()),
// () => this.Dispatch(
// delegate
// {
// RefreshInvoiceList();
// }));
// */
// }
// mIgnoreCheckChanges = false;
//}
//private void btn_edit_Click(object sender, RoutedEventArgs e)
//{
// var vm = this.datagrid_gkvAbrechnungen.GetCurrentValue<GkvAbrechnungVM>();
//}
//private void btn_storno_Initialized(object sender, EventArgs e)
//{
// if (!BeWoApp.AppSettings.AllowStorno)
// {
// Button btn = sender as Button;
// btn.Visibility = Visibility.Collapsed;
// }
//}
//private void RefreshItemInList(GkvAbrechnungDC cb)
//{
// this.Dispatch(
// delegate
// {
// var old = this.ViewModel.VMList.Single(i => i.DataContract.GkvAbrechnungOid.Equals(cb.GkvAbrechnungOid));
// var lNew = new GkvAbrechnungVM(cb);
// this.ViewModel.VMList.Remove(old);
// this.ViewModel.VMList.Add(lNew);
// this.datagrid_gkvAbrechnungen.RefreshData();
// this.gridView.FocusedRow = lNew;
// });
//}
/*
private void SaveIsPaidChange(InvoiceBaseVM vm, bool isPaid)
{
if (!mIgnoreCheckChanges)
{
vm.IsPaid = isPaid;
ServiceFacade.DoAccountingServiceAsync(s => s.SetInvoicePaid(new[] { vm.CommitToDataContract() }.ToList(), vm.IsPaid), cb => vm.DataContract.InvoiceBaseVersion = cb[0], false);
}
}
*/
//private void button_checkAll_Click(object sender, RoutedEventArgs e)
//{
// var visible = GetVisibleVMs();
// foreach (var item in visible)
// {
// item.IsChecked = true;
// }
//}
//private void button_uncheckAll_Click(object sender, RoutedEventArgs e)
//{
// var visible = GetVisibleVMs();
// foreach (var item in visible)
// {
// item.IsChecked = false;
// }
//}
//private void button_printInvoices_Click(object sender, RoutedEventArgs e)
//{
// var list = new List<GkvAbrechnungVM>();
// var items = datagrid_gkvAbrechnungen.ItemsSource as IList<GkvAbrechnungVM>;
// if (items != null)
// {
// for (int i = 0; i < items.Count; i++)
// {
// var vm = datagrid_gkvAbrechnungen.GetRow(i) as GkvAbrechnungVM;
// /*
// if (vm != null && vm.IsChecked)
// {
// list.Add(vm);
// }
// */
// }
// }
// // PrintInvoices(list);
//}
//private void PrintInvoices(List<InvoiceBaseVM> list)
//{
// var oidList = list.Select(i => i.DataContract.InvoiceBaseOid.Value).ToList();
// ServiceFacade.DoReportServiceAsync(s => s.CreateInvoiceListReport(oidList), ms => BeWoApp.MainControl.Dispatch(() => BeWoUtils.ShowReportWindow(ms, "Rechnungen")));
//}
//private IList<GkvAbrechnungVM> GetVisibleVMs()
//{
// var list = new List<GkvAbrechnungVM>();
// var items = datagrid_gkvAbrechnungen.ItemsSource as IList<GkvAbrechnungVM>;
// if (items != null)
// {
// for (int i = 0; i < items.Count; i++)
// {
// if (datagrid_gkvAbrechnungen.IsRowVisible(i))
// {
// var vm = datagrid_gkvAbrechnungen.GetRow(i) as GkvAbrechnungVM;
// if (vm != null)
// {
// list.Add(vm);
// }
// }
// }
// }
// return list;
//}
}
}

View File

@@ -365,8 +365,6 @@ namespace BeWo.View.Detail.Accounting
e.Result = new SolidColorBrush((Color)ColorConverter.ConvertFromString(ib.BackgroundColor));
e.Handled = true;
}
}
//var data = srGridControl.rowhan

View File

@@ -52,7 +52,6 @@
<Compile Include="DakotaExtensions.cs" />
<Compile Include="Models\DakotaException.cs" />
<Compile Include="Models\DakotaFile.cs" />
<Compile Include="Logic\DakotaFileCreator.cs" />
<Compile Include="DakotaValidator.cs" />
<Compile Include="Models\Auftragsdatei\AuftragssatzPart1.cs" />
<Compile Include="Models\Blocke\Block.cs" />

View File

@@ -1,51 +0,0 @@
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BS.Shared.DataContracts;
using Dakota;
using Dakota.Models;
using Dakota.Models.Infos;
using Dakota.Models.Schlüssels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Dakota.Logic
{
public static class DakotaFileCreator
{
public static DakotaFile CreateDakotaFilePair(List<InvoiceItemDC> invoiceitems)
{
var created = DateTime.Now;
DakotaInfoCreator.Reset();
// Hole InfoDateiAuftrag + Nutz
//var info_nutzdaten = DakotaInfoCreator.GetEmptyInfoNutzdatendatei(para2);
//var info_auftrags = DakotaInfoCreator.GetEmptyInfoAuftragsdatei(para2);
return null;
}
//public static DakotaFile GenerateDakotaFile(List<DakotaInfoCreator.InfoCreatorParameter> paras, DakotaInfoCreator.InfoCreatorParameterFix para2)
//{
// DakotaInfoCreator.Reset();
// var info_nutzdaten = DakotaInfoCreator.GetEmptyInfoNutzdatendatei(para2);
// var info_auftrags = DakotaInfoCreator.GetEmptyInfoAuftragsdatei(para2);
// foreach (var para in paras)
// {
// info_nutzdaten.AddDakotaInfoFile(para, para2);
// }
// var dakota = new DakotaFile();
// dakota.Nutzdatendatei.Apply(info_nutzdaten);
// dakota.Auftragsdatei.Apply(info_auftrags);
// return dakota;
//}
}
}

View File

@@ -10,21 +10,19 @@ using System.Threading.Tasks;
namespace Dakota.Logic
{
public static class DakotaInfoCreator
public class DakotaInfoCreator
{
public static int NachrichtenRefenrenz { get; set; }
public int NachrichtenRefenrenz { get; set; }
public bool IsSammelrechnung { get; set; }
static DakotaInfoCreator()
{
Reset();
}
internal static void Reset()
public DakotaInfoCreator(bool isSammelrechnung = false)
{
NachrichtenRefenrenz = 0;
IsSammelrechnung = isSammelrechnung;
}
internal static int GetNextRefNumber()
internal int GetNextRefNumber()
{
return ++NachrichtenRefenrenz;
}
@@ -48,7 +46,7 @@ namespace Dakota.Logic
// return info;
//}
internal static InfoDateiNutzdaten GetEmptyInfoNutzdatendatei(string absender, string empfang, string logischerDateiname, int datenaustauschreferenz)
internal InfoDateiNutzdaten GetEmptyInfoNutzdatendatei(string absender, string empfang, string logischerDateiname, int datenaustauschreferenz)
{
var info = new InfoDateiNutzdaten();
@@ -63,7 +61,7 @@ namespace Dakota.Logic
return info;
}
internal static InfoDateiAuftrags GetEmptyInfoAuftragsdatei(string empfang, int datenaustauschreferenz)
internal InfoDateiAuftrags GetEmptyInfoAuftragsdatei(string empfang, string logischerDateiname, string verfahrenkennung, int datenaustauschreferenz)
{
var transfernummer = datenaustauschreferenz % 1000;
@@ -73,7 +71,7 @@ namespace Dakota.Logic
info.Version = 1;
info.LangeAuftrag = 348;
info.SequenzNummer = 000;
info.VerfahrenKennung = "TSOL0";
info.VerfahrenKennung = verfahrenkennung;
info.TransferNummer = transfernummer;
info.VerfahrenKennungSpezifikation = "SGB1K";
info.AbsenderEigner = DakotaConfig.IKAbsender;
@@ -82,7 +80,7 @@ namespace Dakota.Logic
info.EmpfangerPhysikalisch = empfang;
info.FehlerNummer = 0;
info.FehlerMassnahme = 0;
info.Dateiname = "aok31052023";
info.Dateiname = logischerDateiname;
info.DatumUbertragungEmpfangenStart = "00000000000000";
info.DatumUbertragungEmpfangenEnde = "00000000000000";
info.DateiVersion = 0;
@@ -105,34 +103,37 @@ namespace Dakota.Logic
return info;
}
internal static void AddInfoParameter(this InfoDateiNutzdaten file, InfoParameterInvoiceItem infoParameter, int version)
internal void AddInfoParameter(InfoDateiNutzdaten file, InfoParameterInvoiceItem infoParameter, int version)
{
var blockkostentrager = file.GetDakotaInfoBlockKostentrager(infoParameter, version);
var blockkvkarte = blockkostentrager.GetDakotaInfoBlockKvKarte(infoParameter, version);
var abrechnungsfall = blockkvkarte.GetDakotaInfoAbrechnungsfall(infoParameter);
var abrechnungsposition = abrechnungsfall.GetDakotaInfoAbrechnungsposition(infoParameter);
var blockkostentrager = GetDakotaInfoBlockKostentrager(file, infoParameter, version);
var blockkvkarte = GetDakotaInfoBlockKvKarte(blockkostentrager, infoParameter, version);
var abrechnungsfall = GetDakotaInfoAbrechnungsfall(blockkvkarte, infoParameter);
var abrechnungsposition = GetDakotaInfoAbrechnungsposition(abrechnungsfall, infoParameter);
abrechnungsfall.InfosAbrechnungsposition.Add(abrechnungsposition);
}
internal static InfoBlockKostentrager GetDakotaInfoBlockKostentrager(this InfoDateiNutzdaten file, InfoParameterInvoiceItem infoParameter, int version)
internal InfoBlockKostentrager GetDakotaInfoBlockKostentrager(InfoDateiNutzdaten file, InfoParameterInvoiceItem infoParameter, int version)
{
var ikkostentrager = infoParameter.IKKostentrager;
var block = file.BlockKostentragers.FirstOrDefault(x => x.IKKostentrager == ikkostentrager);
if (block is null)
{
block = new InfoBlockKostentrager(ikkostentrager)
block = new InfoBlockKostentrager(ikkostentrager);
if (IsSammelrechnung)
{
DakotaInfoSLGA = CreateDakotaInfoNachricht(true, version),
DakotaInfoNachrichtSLGA = CreateDakotaInfoNachrichtSLGA(infoParameter)
};
block.DakotaInfoSLGA = CreateDakotaInfoNachricht(true, version);
block.DakotaInfoNachrichtSLGA = CreateDakotaInfoNachrichtSLGA(infoParameter);
}
file.BlockKostentragers.Add(block);
}
return block;
}
internal static InfoBlockKrankenkasse GetDakotaInfoBlockKvKarte(this InfoBlockKostentrager blockkostentrager, InfoParameterInvoiceItem infoParameter, int version)
internal InfoBlockKrankenkasse GetDakotaInfoBlockKvKarte(InfoBlockKostentrager blockkostentrager, InfoParameterInvoiceItem infoParameter, int version)
{
var ikkrankenkasse = infoParameter.IKKrankenkasse;
var block = blockkostentrager.BlockKvKarte.FirstOrDefault(x => x.IKKrankenkasse == ikkrankenkasse);
@@ -151,7 +152,7 @@ namespace Dakota.Logic
return block;
}
internal static InfoAbrechnungsfall GetDakotaInfoAbrechnungsfall(this InfoBlockKrankenkasse block, InfoParameterInvoiceItem infoParameter)
internal InfoAbrechnungsfall GetDakotaInfoAbrechnungsfall(InfoBlockKrankenkasse block, InfoParameterInvoiceItem infoParameter)
{
var belegnummer = infoParameter.Customer.CustomerOid.ToString();
var fall = block.DakotaInfoNachrichtSLLA.Abrechnungsfalle.FirstOrDefault(x => x.Belegnummer == belegnummer);
@@ -164,7 +165,7 @@ namespace Dakota.Logic
return fall;
}
internal static InfoAbrechnungsposition GetDakotaInfoAbrechnungsposition(this InfoAbrechnungsfall fall, InfoParameterInvoiceItem infoParameter)
internal InfoAbrechnungsposition GetDakotaInfoAbrechnungsposition(InfoAbrechnungsfall fall, InfoParameterInvoiceItem infoParameter)
{
var pos = CreateDakotaInfoAbrechnungsposition(infoParameter);
@@ -173,7 +174,7 @@ namespace Dakota.Logic
// -----------------------------------------------------------------------------------------------------------------------------------
private static InfoNachricht CreateDakotaInfoNachricht(bool isSLGA, int version)
private InfoNachricht CreateDakotaInfoNachricht(bool isSLGA, int version)
{
var info = new InfoNachricht();
var typ = isSLGA ? "SLGA" : "SLLA";
@@ -186,7 +187,7 @@ namespace Dakota.Logic
return info;
}
private static InfoNachrichtSLGA CreateDakotaInfoNachrichtSLGA(InfoParameterInvoiceItem infoParameter)
private InfoNachrichtSLGA CreateDakotaInfoNachrichtSLGA(InfoParameterInvoiceItem infoParameter)
{
var info = new InfoNachrichtSLGA();
@@ -207,7 +208,7 @@ namespace Dakota.Logic
return info;
}
private static InfoNachrichtSLLA CreateDakotaInfoNachrichtSLLA(InfoParameterInvoiceItem infoParameter)
private InfoNachrichtSLLA CreateDakotaInfoNachrichtSLLA(InfoParameterInvoiceItem infoParameter)
{
var info = new InfoNachrichtSLLA();
@@ -225,7 +226,7 @@ namespace Dakota.Logic
return info;
}
private static InfoAbrechnungsfall CreateDakotaInfoAbrechnungsfall(InfoParameterInvoiceItem infoParameter)
private InfoAbrechnungsfall CreateDakotaInfoAbrechnungsfall(InfoParameterInvoiceItem infoParameter)
{
var info = new InfoAbrechnungsfall();
@@ -245,7 +246,7 @@ namespace Dakota.Logic
return info;
}
private static InfoAbrechnungsposition CreateDakotaInfoAbrechnungsposition(InfoParameterInvoiceItem infoParameter)
private InfoAbrechnungsposition CreateDakotaInfoAbrechnungsposition(InfoParameterInvoiceItem infoParameter)
{
var info = new InfoAbrechnungsposition();
@@ -270,7 +271,7 @@ namespace Dakota.Logic
return info;
}
private static InfoBlockDiagnosen CreateDakotaInfoDiagnosen()
private InfoBlockDiagnosen CreateDakotaInfoDiagnosen()
{
var info = new InfoBlockDiagnosen();

View File

@@ -14,6 +14,9 @@ namespace Dakota.Logic
public int Month { get; set; }
public int Version { get; set; }
public DakotaInfoCreator DakotaInfoCreator { get; set; }
public bool IsSammelrechnung { get; set; }
public Dictionary<string, DakotaFile> DakotaFileDict { get; set; }
public Dictionary<string, InfoDateiNutzdaten> DakotaInfoNutzDict { get; set; }
@@ -23,7 +26,7 @@ namespace Dakota.Logic
{
}
public DakotaManager(int month, DateTime dateTime)
public DakotaManager(int month, DateTime dateTime, bool isSammelrechnung = false)
{
Month = month;
Version = GetVersion(dateTime);
@@ -32,39 +35,49 @@ namespace Dakota.Logic
DakotaInfoNutzDict = new Dictionary<string, InfoDateiNutzdaten>();
DakotaInfoAufDict = new Dictionary<string, InfoDateiAuftrags>();
DakotaInfoCreator = new DakotaInfoCreator(isSammelrechnung);
IsSammelrechnung = isSammelrechnung;
}
public void Add(ServiceInvoiceDC serviceInvoice, OrganisationDC organisation, CustomerDC customer, MandatorDC mandator, int datenaustauschreferenz)
{
try
{
var ik_datenannahmestelle = organisation.IKDatenannahmestelle;
var success = DakotaInfoNutzDict.TryGetValue(ik_datenannahmestelle, out InfoDateiNutzdaten nutzdaten);
var ik_datenannahmestelle = organisation.IKDatenannahmestelle;
var success = DakotaInfoNutzDict.TryGetValue(ik_datenannahmestelle, out InfoDateiNutzdaten nutzdaten);
if (!success)
{
var info_nutz_add = DakotaInfoCreator.GetEmptyInfoNutzdatendatei(DakotaConfig.IKAbsender, organisation.IKDatenannahmestelle, DakotaConfig.GetLogischerDateiname(Month), datenaustauschreferenz);
var info_auf_add = DakotaInfoCreator.GetEmptyInfoAuftragsdatei(organisation.IKDatenannahmestelle, datenaustauschreferenz);
DakotaInfoNutzDict.Add(ik_datenannahmestelle, info_nutz_add);
DakotaInfoAufDict.Add(ik_datenannahmestelle, info_auf_add);
nutzdaten = info_nutz_add;
}
foreach (var peroid in serviceInvoice.ServiceInvoicePeriods)
{
foreach (var invoice in peroid.InvoiceItems)
if (!success)
{
var info_nutz_item = new InfoParameterInvoiceItem(serviceInvoice, invoice, organisation, customer, mandator);
// Verfahrenkennung
// Erste Stelle:
// "E" - Echtdaten
// "T" - Testdaten
nutzdaten.AddInfoParameter(info_nutz_item, Version);
var verfahrenkennung = "TSOL0";
var logischer_dateiname = DakotaConfig.GetLogischerDateiname(Month);
var info_nutz_add = DakotaInfoCreator.GetEmptyInfoNutzdatendatei(DakotaConfig.IKAbsender, organisation.IKDatenannahmestelle, logischer_dateiname, datenaustauschreferenz);
var info_auf_add = DakotaInfoCreator.GetEmptyInfoAuftragsdatei(organisation.IKDatenannahmestelle, logischer_dateiname, verfahrenkennung, datenaustauschreferenz);
DakotaInfoNutzDict.Add(ik_datenannahmestelle, info_nutz_add);
DakotaInfoAufDict.Add(ik_datenannahmestelle, info_auf_add);
nutzdaten = info_nutz_add;
}
foreach (var peroid in serviceInvoice.ServiceInvoicePeriods)
{
foreach (var invoice in peroid.InvoiceItems)
{
var info_nutz_item = new InfoParameterInvoiceItem(serviceInvoice, invoice, organisation, customer, mandator);
DakotaInfoCreator.AddInfoParameter(nutzdaten, info_nutz_item, Version);
}
}
}
}
catch(Exception e)
catch (Exception e)
{
throw e;
}
@@ -79,58 +92,16 @@ namespace Dakota.Logic
var info_nutz = DakotaInfoNutzDict[ik_datenannahmestelle];
var info_auf = DakotaInfoAufDict[ik_datenannahmestelle];
file.Nutzdatendatei.Apply(info_nutz);
file.Nutzdatendatei.Apply(info_nutz, DakotaInfoCreator.IsSammelrechnung);
file.Auftragsdatei.Apply(info_auf);
DakotaFileDict.Add(ik_datenannahmestelle, file);
}
}
public void Save(string root_path, bool debug_mode = false)
{
if (!root_path.EndsWith("\\"))
{
root_path += '\\';
}
foreach (var ik_datenannahmestelle in DakotaFileDict.Keys)
{
var code = DakotaFileDict[ik_datenannahmestelle];
var empfang = code.GetIKDatenannahmestelle();
var transferdateiname = code.GetTransferName();
string subpath;
if (debug_mode)
{
subpath = $"{empfang}-{transferdateiname}";
}
else
{
subpath = $@"{empfang}\{transferdateiname}";
}
//var pathauf = @"C:\Projects\out.auf";
//var path2 = $@"C:\dakotale\TP5Daten\{empfang}\{transferdateiname}";
//var path2auf = $@"C:\dakotale\TP5Daten\{empfang}\{transferdateiname}.auf";
//var path3 = $@"C:\dakotale\TP5Daten\{empfang}";
var auftragsdatei = code.GetAuftragsdatei();
var nutzdatendatei = code.GetNutzdatendatei();
var auftragsdatei2 = Encoding.GetEncoding("ISO-8859-1").GetBytes(auftragsdatei);
var finalpath = root_path + subpath;
Directory.CreateDirectory(root_path);
File.WriteAllText(finalpath, nutzdatendatei);
File.WriteAllBytes(finalpath + ".auf", auftragsdatei2);
}
}
private int GetVersion(DateTime create4month)
{
if(create4month < new DateTime(2023, 7, 1))
if (create4month < new DateTime(2023, 7, 1))
throw new NotImplementedException("Keine Unterstützung von Version 17 oder niedriger");
if (create4month < new DateTime(2024, 1, 1))

View File

@@ -84,14 +84,14 @@ namespace Dakota.Models.Blocke
SegmentUNH.NachrichtenFreigabeNrDesTypes.SetValue(info.DakotaInfoSLGA.NachrichtenFreigabeNrTages);
SegmentUNH.NachrichtenVerwaltendeOrganisation.SetValue(info.DakotaInfoSLGA.NachrichtenVerwaltendeOrganisation);
NachrichtSLGASammelrechnung.Apply(info.DakotaInfoNachrichtSLGA);
NachrichtSLGASammelrechnung.Apply(info.DakotaInfoNachrichtSLGA, true);
}
foreach (var infoblock in info.BlockKvKarte)
{
var blockkvkarte = new BlockKrankenkasse();
blockkvkarte.Apply(infoblock);
blockkvkarte.Apply(infoblock, IsSammelrechnung);
Add(blockkvkarte);
}

View File

@@ -61,10 +61,10 @@ namespace Dakota.Models.Blocke
return 2;
}
public void Apply(InfoBlockKrankenkasse blockinfo)
public void Apply(InfoBlockKrankenkasse blockinfo, bool isSammelrechnung)
{
ApplySLGA(blockinfo.DakotaInfoSLGA);
ApplyNachrichtSLGA(blockinfo.DakotaInfoNachrichtSLGA);
ApplyNachrichtSLGA(blockinfo.DakotaInfoNachrichtSLGA, isSammelrechnung);
ApplySLLA(blockinfo.DakotaInfoSLLA);
ApplyNachrichtSLLA(blockinfo.DakotaInfoNachrichtSLLA);
CalculateSLGA();
@@ -79,9 +79,9 @@ namespace Dakota.Models.Blocke
SegmentSLGAUNT.Nachrichtenreferenznummer.SetValue(info.Nachrichtenreferenznummer);
}
private void ApplyNachrichtSLGA(InfoNachrichtSLGA info)
private void ApplyNachrichtSLGA(InfoNachrichtSLGA info, bool isSammelrechnung)
{
NachrichtSLGA.Apply(info);
NachrichtSLGA.Apply(info, isSammelrechnung);
}
private void ApplySLLA(InfoNachricht info)

View File

@@ -59,7 +59,7 @@ namespace Dakota.Models.Blocke
{
BlockKostenträger.Add(blockkosten);
}
public void Apply(InfoDateiNutzdaten info)
public void Apply(InfoDateiNutzdaten info, bool isSammelrechnung)
{
SegmentUNB.SyntaxKennung.SetValue(info.SyntaxKennung);
SegmentUNB.SyntaxVersionsnummer.SetValue(info.SyntaxVersion);
@@ -74,7 +74,7 @@ namespace Dakota.Models.Blocke
foreach (var blockinfo in info.BlockKostentragers)
{
var block = new BlockKostenträger();
var block = new BlockKostenträger(isSammelrechnung);
block.Apply(blockinfo);

View File

@@ -22,8 +22,6 @@ namespace Dakota.Models.Infos
public string IKKrankenkasse => Organisation.IKKrankenkasse;
public string IKLeistungserbringer => Mandator.IKLeistungserbringer;
public string Belegnummer => "444444test";
public InfoParameterInvoiceItem(ServiceInvoiceDC serviceInvoice, InvoiceItemDC invoiceItem, OrganisationDC organisation, CustomerDC customer, MandatorDC mandator)
{
InvoiceItem = invoiceItem;

View File

@@ -73,10 +73,13 @@ namespace Dakota.Models.Nachrichten
return res;
}
public void Apply(InfoNachrichtSLGA info)
public void Apply(InfoNachrichtSLGA info, bool isSammelrechnung)
{
SegmentFKT.Verarbeitungskennzeichen.SetValue(info.Verarbeitungskennzeichen);
SegmentFKT.Sammelrechnung.SetValue("J");
if(isSammelrechnung)
SegmentFKT.Sammelrechnung.SetValue("J");
SegmentFKT.IKLeistungserbringers.SetValue(info.IKLeistungserbringer);
SegmentFKT.IKKostenträger.SetValue(info.IKKostentrager);
SegmentFKT.IKVersichertenKarte.SetValue(info.IKKrankenkasse);

View File

@@ -178,11 +178,11 @@ namespace Host
if (debug_mode)
{
root_path = $@"C:\GkvAbrechnung\";
file_path = $@"kundennummer-{req.GkvAbrechnung.IKDatenannahmestelle}-{req.GkvAbrechnung.Transfername}";
file_path = $@"{req.Tenant}-{req.GkvAbrechnung.IKDatenannahmestelle}-{req.GkvAbrechnung.Transfername}";
}
else
{
root_path = $@"C:\GkvAbrechnung\kundennummer\{req.GkvAbrechnung.IKDatenannahmestelle}\";
root_path = $@"C:\GkvAbrechnung\{req.Tenant}\{req.GkvAbrechnung.IKDatenannahmestelle}\";
file_path = $@"{req.GkvAbrechnung.Transfername}";
}

View File

@@ -700,7 +700,11 @@ namespace BeWo.Service.ServiceImplementations
if (gkvAbrechnungViewFilter == null || !gkvAbrechnungViewFilter.FilterTime)
return GetAllGkvAbrechnungen();
var entities = DAOFactory.SearchDAO.GetGkvAbrechnungen(gkvAbrechnungViewFilter.Start, gkvAbrechnungViewFilter.End, gkvAbrechnungViewFilter.FilterForInvoiceDate);
var start = gkvAbrechnungViewFilter.Start;
var end = gkvAbrechnungViewFilter.End;
var filter = gkvAbrechnungViewFilter.FilterForInvoiceDate;
var entities = DAOFactory.SearchDAO.GetGkvAbrechnungen(start, end, filter);
return MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDCs(entities);
}
@@ -750,8 +754,11 @@ namespace BeWo.Service.ServiceImplementations
{
var updateables_len = updateables.Count();
String url = "http://localhost:3777/Host/GkvAbrechnungView.aspx";
//String url = "https://app8.bewoplaner.de/service/GkvAbrechnungView.aspx";
var url = "https://app8.bewoplaner.de/service/GkvAbrechnungView.aspx";
#if DEBUG
url = "http://localhost:3777/Host/GkvAbrechnungView.aspx";
#endif
var request = new GkvApp8GetStatusRequest
{
@@ -776,6 +783,7 @@ namespace BeWo.Service.ServiceImplementations
if (!response_app8.Success)
{
return true;
throw new NotImplementedException("App 8 Anfrage nicht erfolgreich");
}
@@ -1013,8 +1021,11 @@ namespace BeWo.Service.ServiceImplementations
var gkv_abrechnung_dc = MapperFactory.GkvAbrechnungDC_GkvAbrechnung.MapToNewDC(entity);
String url = "http://localhost:3777/Host/GkvAbrechnungView.aspx";
//String url = "https://app8.bewoplaner.de/service/GkvAbrechnungView.aspx";
var url = "https://app8.bewoplaner.de/service/GkvAbrechnungView.aspx";
#if DEBUG
url = "http://localhost:3777/Host/GkvAbrechnungView.aspx";
#endif
var request_app8 = new GkvApp8SendNewRequest
{