Erzeugt Files, welche mit dakota le gesendet werden können
This commit is contained in:
@@ -22,7 +22,6 @@ using BS.Shared.Extensions;
|
|||||||
using DevExpress.Xpf.Editors;
|
using DevExpress.Xpf.Editors;
|
||||||
using DevExpress.Xpf.Grid;
|
using DevExpress.Xpf.Grid;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using Shared.Extensions;
|
|
||||||
|
|
||||||
namespace BeWo.View.Detail.Accounting
|
namespace BeWo.View.Detail.Accounting
|
||||||
{
|
{
|
||||||
@@ -66,7 +65,7 @@ namespace BeWo.View.Detail.Accounting
|
|||||||
DispatcherPriority.Normal,
|
DispatcherPriority.Normal,
|
||||||
(Action)delegate
|
(Action)delegate
|
||||||
{
|
{
|
||||||
ViewModel.UpdateList(dcList.Where(DakotaExtensions.IsSozioTherapie).ToList());
|
ViewModel.UpdateList(dcList.Where(x => true).ToList());
|
||||||
this.gridView.BestFitColumns();
|
this.gridView.BestFitColumns();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,26 +42,35 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="DakotaConfig.cs" />
|
<Compile Include="DakotaConfig.cs" />
|
||||||
<Compile Include="DakotaEnums.cs" />
|
<Compile Include="Logic\DakotaUtils.cs" />
|
||||||
<Compile Include="DakotaFile.cs" />
|
<Compile Include="Models\Auftragsdatei\Auftragsdatei.cs" />
|
||||||
<Compile Include="DakotaFileCreator.cs" />
|
<Compile Include="Models\Auftragsdatei\AuftragssatzPart2.cs" />
|
||||||
|
<Compile Include="Models\Auftragsdatei\AuftragssatzPart3.cs" />
|
||||||
|
<Compile Include="Models\Auftragsdatei\AuftragssatzPart4.cs" />
|
||||||
|
<Compile Include="Models\DakotaEnums.cs" />
|
||||||
|
<Compile Include="DakotaExtensions.cs" />
|
||||||
|
<Compile Include="Models\DakotaFile.cs" />
|
||||||
|
<Compile Include="Logic\DakotaFileCreator.cs" />
|
||||||
<Compile Include="DakotaValidator.cs" />
|
<Compile Include="DakotaValidator.cs" />
|
||||||
|
<Compile Include="Models\Auftragsdatei\AuftragssatzPart1.cs" />
|
||||||
<Compile Include="Models\Blocke\Block.cs" />
|
<Compile Include="Models\Blocke\Block.cs" />
|
||||||
<Compile Include="Models\Blocke\BlockAbrechnungsposition.cs" />
|
<Compile Include="Models\Blocke\BlockAbrechnungsposition.cs" />
|
||||||
<Compile Include="Models\Blocke\BlockDiagnose.cs" />
|
<Compile Include="Models\Blocke\BlockDiagnose.cs" />
|
||||||
|
<Compile Include="Models\Daten\DatenelementAuftragsdatei.cs" />
|
||||||
<Compile Include="Models\Daten\DatenelementDateTime.cs" />
|
<Compile Include="Models\Daten\DatenelementDateTime.cs" />
|
||||||
<Compile Include="Models\Daten\DatenelementDecimal.cs" />
|
<Compile Include="Models\Daten\DatenelementDecimal.cs" />
|
||||||
<Compile Include="Models\Infos\InfoBlockKostentrager.cs" />
|
<Compile Include="Models\Infos\InfoBlockKostentrager.cs" />
|
||||||
<Compile Include="Models\Infos\InfoBlockKvKarte.cs" />
|
<Compile Include="Models\Infos\InfoBlockKvKarte.cs" />
|
||||||
<Compile Include="Models\Infos\InfoCreator.cs" />
|
<Compile Include="Logic\DakotaInfoCreator.cs" />
|
||||||
<Compile Include="Models\Daten\DatenelementFiller.cs" />
|
<Compile Include="Models\Daten\DatenelementFiller.cs" />
|
||||||
<Compile Include="Models\Infos\InfoFile.cs" />
|
<Compile Include="Models\Infos\InfoDateiAuftrags.cs" />
|
||||||
|
<Compile Include="Models\Infos\InfoDateiNutzdaten.cs" />
|
||||||
<Compile Include="Models\Blocke\BlockAbrechnungsfall.cs" />
|
<Compile Include="Models\Blocke\BlockAbrechnungsfall.cs" />
|
||||||
<Compile Include="Models\Blocke\BlockKostenträger.cs" />
|
<Compile Include="Models\Blocke\BlockKostenträger.cs" />
|
||||||
<Compile Include="Models\Blocke\BlockKrankenkarteVerordnung.cs" />
|
<Compile Include="Models\Blocke\BlockKrankenkarteVerordnung.cs" />
|
||||||
<Compile Include="Models\Infos\InfoAbrechnungsfall.cs" />
|
<Compile Include="Models\Infos\InfoAbrechnungsfall.cs" />
|
||||||
<Compile Include="Models\Infos\InfoAbrechnungsposition.cs" />
|
<Compile Include="Models\Infos\InfoAbrechnungsposition.cs" />
|
||||||
<Compile Include="Models\Infos\InfoDiagnosen.cs" />
|
<Compile Include="Models\Infos\InfoBlockDiagnosen.cs" />
|
||||||
<Compile Include="Models\Infos\InfoNachricht.cs" />
|
<Compile Include="Models\Infos\InfoNachricht.cs" />
|
||||||
<Compile Include="Models\Infos\InfoNachrichtSLLA.cs" />
|
<Compile Include="Models\Infos\InfoNachrichtSLLA.cs" />
|
||||||
<Compile Include="Models\Infos\InfoNachrichtSLGA.cs" />
|
<Compile Include="Models\Infos\InfoNachrichtSLGA.cs" />
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
using BS.Shared.DataContracts;
|
using BeWo.Data.Entities;
|
||||||
|
using BS.Shared.DataContracts;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Shared.Extensions
|
namespace Dakota
|
||||||
{
|
{
|
||||||
public static class DakotaExtensions
|
public static class DakotaExtensions
|
||||||
{
|
{
|
||||||
@@ -30,5 +31,24 @@ namespace Shared.Extensions
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsSozioTherapie(this InvoiceBase invoiceBase)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (invoiceBase.InvoiceTitle?.ToLower().Contains("soziotherapie") ?? false)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (invoiceBase.InvoiceId?.ToLower().Contains("soziotherapie") ?? false)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,291 +0,0 @@
|
|||||||
using BeWo.Data.Entities;
|
|
||||||
using BS.Shared.DataContracts;
|
|
||||||
using Dakota.Models;
|
|
||||||
using Dakota.Models.Blocke;
|
|
||||||
using Dakota.Models.Infos;
|
|
||||||
using Dakota.Models.Nachrichten;
|
|
||||||
using Dakota.Models.Segmente;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace Dakota
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Nutzdatendatei mit Logik
|
|
||||||
/// </summary>
|
|
||||||
internal class DakotaFile : Nachricht
|
|
||||||
{
|
|
||||||
internal BlockFile Nutzdatendatei { get; private set; }
|
|
||||||
|
|
||||||
// Rene26 Comment
|
|
||||||
//// UNB
|
|
||||||
//internal SegmentUNB SegmentUNB => SozioTherapieEinzelnachweis.UNB;
|
|
||||||
//// Block
|
|
||||||
//internal
|
|
||||||
//internal BlockKrankenkarteVerordnung BlockKrankenkarteVerordnung => SozioTherapieEinzelnachweis.BlockKrankenkarteVerordnung;
|
|
||||||
//// SLGA
|
|
||||||
//internal SegmentUNH BlockSLGAUNH => BlockKrankenkarteVerordnung.SLGAUNH;
|
|
||||||
//internal NachrichtSLGA2 BlockSLGANachricht => BlockKrankenkarteVerordnung.SLGANachricht2;
|
|
||||||
//internal SegmentUNT BlockSLGAUNT => BlockKrankenkarteVerordnung.SLGAUNT;
|
|
||||||
//// SLLA
|
|
||||||
//internal SegmentUNH BlockSLLAUNH => BlockKrankenkarteVerordnung.SLLAUNH;
|
|
||||||
//internal NachrichtSLLA2 BlockSLLANachricht => BlockKrankenkarteVerordnung.SLLANachricht2;
|
|
||||||
//internal SegmentUNT BlockSLLAUNT => BlockKrankenkarteVerordnung.SLLAUNT;
|
|
||||||
//// UNZ
|
|
||||||
//internal SegmentUNZ SegmentUNZ => SozioTherapieEinzelnachweis.UNZ;
|
|
||||||
|
|
||||||
internal DakotaFile()
|
|
||||||
{
|
|
||||||
Nutzdatendatei = new BlockFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void Apply(InfoFile info)
|
|
||||||
{
|
|
||||||
Nutzdatendatei.Apply(info);
|
|
||||||
}
|
|
||||||
|
|
||||||
//internal void AddInvoiceItem(DakotaInvoiceItemInfo invoiceInfo)
|
|
||||||
//{
|
|
||||||
// var kostentrager = "123456789";
|
|
||||||
// var kostentragerblock = GetBlockKostenträger(kostentrager, invoiceInfo);
|
|
||||||
|
|
||||||
// var krankenversichten = "987654321";
|
|
||||||
// var krankenversichtenblock = GetBlockKrankenkarte(kostentragerblock, krankenversichten, invoiceInfo);
|
|
||||||
|
|
||||||
// AddInvoiceItemIntoBlock(krankenversichtenblock, invoiceInfo);
|
|
||||||
//}
|
|
||||||
//internal void AddInvoiceItemIntoBlock(BlockKrankenkarteVerordnung block, DakotaInvoiceItemInfo invoiceInfo)
|
|
||||||
//{
|
|
||||||
|
|
||||||
//}
|
|
||||||
//private BlockKostenträger GetBlockKostenträger(string kostentrager, DakotaInvoiceItemInfo invoiceInfo)
|
|
||||||
//{
|
|
||||||
// var kostentragerblock = Nutzdatendatei.BlockKostenträger.FirstOrDefault(block => block.IKKostenträger == kostentrager);
|
|
||||||
|
|
||||||
// if (kostentragerblock is null)
|
|
||||||
// {
|
|
||||||
// kostentragerblock = GenerateBlockKostentrager(invoiceInfo);
|
|
||||||
|
|
||||||
// Nutzdatendatei.BlockKostenträger.Add(kostentragerblock);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return kostentragerblock;
|
|
||||||
//}
|
|
||||||
//private BlockKrankenkarteVerordnung GetBlockKrankenkarte(BlockKostenträger blockkt, string kvkarte, DakotaInvoiceItemInfo invoiceInfo)
|
|
||||||
//{
|
|
||||||
// var krankenkartenBlock = blockkt.BlockKrankenkarteVerordnung.FirstOrDefault(block => block.IKKrankenkasseKVKarte == kvkarte);
|
|
||||||
|
|
||||||
// if (krankenkartenBlock is null)
|
|
||||||
// {
|
|
||||||
// krankenkartenBlock = GenerateBlockKrankenkarte(invoiceInfo);
|
|
||||||
|
|
||||||
// blockkt.BlockKrankenkarteVerordnung.Add(krankenkartenBlock);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return krankenkartenBlock;
|
|
||||||
//}
|
|
||||||
//private BlockKostenträger GenerateBlockKostentrager(DakotaInvoiceItemInfo invoiceinfo)
|
|
||||||
//{
|
|
||||||
// var block = new BlockKostenträger();
|
|
||||||
|
|
||||||
// var nachrefnum = ++AnzahlUNHCounter;
|
|
||||||
|
|
||||||
// block.SegmentUNH.Nachrichtenreferenznummer.SetValue(nachrefnum);
|
|
||||||
// block.SegmentUNH.NachrichtenTypKennung.SetValue("SLGA");
|
|
||||||
// block.SegmentUNH.Nachrichtenverionsnummer.SetValue("18");
|
|
||||||
// block.SegmentUNH.NachrichtenFreigabeNrDesTypes.SetValue("0");
|
|
||||||
// block.SegmentUNH.NachrichtenVerwaltendeOrganisation.SetValue("0");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// block.SegmentUNT.Nachrichtenreferenznummer.SetValue(nachrefnum);
|
|
||||||
|
|
||||||
// return block;
|
|
||||||
//}
|
|
||||||
//private BlockKrankenkarteVerordnung GenerateBlockKrankenkarte()
|
|
||||||
//{
|
|
||||||
// var block = new BlockKrankenkarteVerordnung();
|
|
||||||
|
|
||||||
|
|
||||||
// // Abrechnungsfalle
|
|
||||||
|
|
||||||
// AddBlockAbrechnungsfall(block, invoiceInfo);
|
|
||||||
|
|
||||||
// block.SegmentSLLAUNT.Nachrichtenreferenznummer.SetValue(nachrefnum2);
|
|
||||||
|
|
||||||
// return block;
|
|
||||||
//}
|
|
||||||
//private BlockAbrechnungsfall AddBlockAbrechnungsfall(BlockKrankenkarteVerordnung blockkvkarte, DakotaInvoiceItemInfo info)
|
|
||||||
//{
|
|
||||||
// var block = new BlockAbrechnungsfall();
|
|
||||||
|
|
||||||
// blockkvkarte.NachrichtSLLA.Abrechnungsfalle.Add(block);
|
|
||||||
|
|
||||||
// return block;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//private void GenerateBlockSLGA(DakotaInfoFile info)
|
|
||||||
//{
|
|
||||||
// var nachrefnum = ++AnzahlUNHCounter;
|
|
||||||
//}
|
|
||||||
//private void GenerateBlockSLLA(DakotaInfoFile info)
|
|
||||||
//{
|
|
||||||
// AnzahlUNHCounter++;
|
|
||||||
|
|
||||||
// var nachrefnum = ++AnzahlUNHCounter;
|
|
||||||
|
|
||||||
// // Head
|
|
||||||
// //BlockSLLAUNH.Nachrichtenreferenznummer.SetFilledIntValue(nachrefnum, 5);
|
|
||||||
// //BlockSLLAUNH.NachrichtenTypKennung.SetValue("SLLA");
|
|
||||||
// //BlockSLLAUNH.Verionsnummer.SetValue("18");
|
|
||||||
// //BlockSLLAUNH.FreigabeNrDesTypes.SetValue("0");
|
|
||||||
// //BlockSLLAUNH.VerwaltendeOrganisation.SetValue("0");
|
|
||||||
|
|
||||||
// //// Body
|
|
||||||
// //// FKT Funktion
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAFKT.Verarbeitungskennzeichen.SetValue(info.Verarbeitungskennzeichen.Value);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAFKT.IKLeistungserbringers.SetValue(info.IKLeistungserbringers);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAFKT.IKKostenträgers.SetValue(info.IKKostenträger);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAFKT.IKKrankenkasse.SetValue(info.IKKrankenkasse);
|
|
||||||
// ////BlockSLLANachricht.SegmentSLLAFKT.IKRechnungsstellers.SetValue(string.Empty);
|
|
||||||
// //// REC
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAREC.SammelRechnungsnummer.SetValue(info.Rechnungsnummer);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAREC.EinzelRechnungsnummer.SetValue("0");
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAREC.Datum.SetValue(info.Rechnungsdatum.ToString("yyyyMMdd"));
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAREC.Rechnungsart.SetValue(info.Rechnungsart.Value);
|
|
||||||
// //// INV
|
|
||||||
// //// Information Versicherte
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAINV.VersichertenNummer.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAINV.Versichertenstatus.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAINV.Beleginformation.SetValue("0");
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAINV.Belegnummer.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAINV.KennzeichenBesondereVersorgungsform.SetValue(string.Empty);
|
|
||||||
// //// URI
|
|
||||||
// //// Wird erst bei Korrekturen verwendet
|
|
||||||
// //// NAD
|
|
||||||
// //BlockSLLANachricht.SegmentSLLANAD.Nachname.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLANAD.Vorname.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLANAD.Geburtsdatum.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLANAD.StraßeNr.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLANAD.PLZ.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLANAD.Wohnort.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLANAD.Länderkennzeichen.SetValue(string.Empty);
|
|
||||||
// //// IMG
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAIMG.Abrechnungsjahr.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAIMG.Abrechnungsmonat.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLAIMG.Identifikationsmerkmal.SetValue(string.Empty);
|
|
||||||
|
|
||||||
// //var test = new List<object>();
|
|
||||||
// //var abrechnungspositionen = new List<InvoiceItemDC>();
|
|
||||||
// //foreach (var position in abrechnungspositionen)
|
|
||||||
// //{
|
|
||||||
// // var pos = new Abrechnungsposition();
|
|
||||||
// // // ENF
|
|
||||||
// // pos.SegmentSLLAENF.Identifikationsnummer.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLAENF.Abrechnungscode.SetValue("69");
|
|
||||||
// // pos.SegmentSLLAENF.Tarifkennzeichen.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLAENF.ArtLeistung.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLAENF.AnzahlMenge.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLAENF.EinzelbetragAbrechnungsposition.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLAENF.DatumLeistungserbringung.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLAENF.BetragZuzahlung.SetValue(string.Empty);
|
|
||||||
// // // SUT
|
|
||||||
// // pos.SegmentSLLASUT.GefahreneKilometer.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLASUT.Uhrzeit.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLASUT.UhrzeitBis.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLASUT.Dauer.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLASUT.VersorgungszeitraumVon.SetValue(string.Empty);
|
|
||||||
// // pos.SegmentSLLASUT.VersorgungszeitraumBis.SetValue(string.Empty);
|
|
||||||
// // // TXT
|
|
||||||
// // pos.SegmentSLLATXT.Text.SetValue(string.Empty);
|
|
||||||
// // // MWS
|
|
||||||
// // //pos.SegmentSLLAMWS.Mehrwertsteuersatz.SetValue(string.Empty);
|
|
||||||
// // //pos.SegmentSLLAMWS.BetragMehrwertsteuer.SetValue(string.Empty);
|
|
||||||
|
|
||||||
// // BlockSLLANachricht.AddPosition(pos);
|
|
||||||
// //}
|
|
||||||
|
|
||||||
// //// ZUV
|
|
||||||
// ////BlockSLLANachricht.SegmentSLLAZUV.Betriebsstättennummer.SetValue(string.Empty);
|
|
||||||
// ////BlockSLLANachricht.SegmentSLLAZUV.LebenslangeArztnummer.SetValue(string.Empty);
|
|
||||||
// ////BlockSLLANachricht.SegmentSLLAZUV.VerordnungsAusstellEinsatzdatum.SetValue(string.Empty);
|
|
||||||
// ////BlockSLLANachricht.SegmentSLLAZUV.Zuzahlungskennzeichen.SetValue(string.Empty);
|
|
||||||
// ////BlockSLLANachricht.SegmentSLLAZUV.Unfallkennzeichen.SetValue(string.Empty);
|
|
||||||
// ////BlockSLLANachricht.SegmentSLLAZUV.KennzeichenBVGSonstiges.SetValue(string.Empty);
|
|
||||||
// ////BlockSLLANachricht.SegmentSLLAZUV.KennzeichenVerordnungsbesonderheiten.SetValue(string.Empty);
|
|
||||||
|
|
||||||
// //// BES
|
|
||||||
// //BlockSLLANachricht.SegmentSLLABES.GesamtbetragBrutto.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLABES.GesamtbetragGesetzlicheZuzahlung.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLABES.GesamtbetragProzentualeZuzahlung.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLABES.PauschalerZuzahlungsbetrag.SetValue(string.Empty);
|
|
||||||
// //BlockSLLANachricht.SegmentSLLABES.GesamtbetragEigenanteil.SetValue(string.Empty);
|
|
||||||
|
|
||||||
// //// End
|
|
||||||
// //BlockSLLAUNT.AnzahlEinheiten.SetFilledIntValue(SegmentSLLACounter, 6);
|
|
||||||
// //BlockSLLAUNT.Nachrichtenreferenznummer.SetFilledIntValue(nachrefnum, 5);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//public void foo(long? invoiceBaseOid)
|
|
||||||
//{
|
|
||||||
// //var serviceInvoice = DAOFactory.SearchDAO.GetServiceInvoiceByInvoiceBaseOid(invoiceBaseOid.Value);
|
|
||||||
|
|
||||||
// //if (!serviceInvoice.Oid.HasValue)
|
|
||||||
// // return;
|
|
||||||
|
|
||||||
// //if (serviceInvostring.IsNullOrEmpty(serviceInvoiceOid))
|
|
||||||
// // return;
|
|
||||||
|
|
||||||
// //var serviceInvoiceOid = serviceInvoice.Oid.Value;
|
|
||||||
// //var serviceInvoiceOid2CostbearerId = new Dictionary<long, string>();
|
|
||||||
// //var dcList = new List<ServiceInvoiceDC>();
|
|
||||||
|
|
||||||
|
|
||||||
// // var oid = long.Parse(oidStr);
|
|
||||||
// // // Lade ServiceInvoice
|
|
||||||
// // var invoice = DAOFactory.GenericDAO.LoadByID<ServiceInvoice>(oid);
|
|
||||||
// // var dc = MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(invoice);
|
|
||||||
// // // Füge dcListe hinzu
|
|
||||||
// // dcList.Add(dc);
|
|
||||||
|
|
||||||
// // // Falls ServiceInvoice Oid bereits in serviceInvoiceOid2CostbearerOid List (S2C List) ist, überspringe
|
|
||||||
// // if (serviceInvoiceOid2CostbearerId.ContainsKey(oid))
|
|
||||||
// // continue;
|
|
||||||
|
|
||||||
// // // ServiceInvoice Oid ist noch nicht in S2C List
|
|
||||||
|
|
||||||
// // // Frage, ob InvoiceId existiert
|
|
||||||
// // if (!String.IsNullOrEmpty(invoice.InvoiceBase.InvoiceId))
|
|
||||||
// // // Falls InvoiceId existiert
|
|
||||||
// // serviceInvoiceOid2CostbearerId.Add(oid, invoice.InvoiceBase.InvoiceId);
|
|
||||||
// //}
|
|
||||||
|
|
||||||
// //IBeWoReport<ServiceInvoiceRO> allReports = null;
|
|
||||||
|
|
||||||
// //foreach (var iDC in dcList)
|
|
||||||
// //{
|
|
||||||
// // String reportId = null;
|
|
||||||
// // if (serviceInvoiceOid2CostbearerId.ContainsKey(iDC.ServiceInvoiceOid.Value))
|
|
||||||
// // reportId = serviceInvoiceOid2CostbearerId[iDC.ServiceInvoiceOid.Value];
|
|
||||||
|
|
||||||
// // IBeWoReport<ServiceInvoiceRO> singleReport = FindReportImp<ServiceInvoiceRO>(reportId);
|
|
||||||
|
|
||||||
// // singleReport.SetReportDataSource(ServiceInvoiceRO.Create(iDC));
|
|
||||||
// // ((XtraReport)singleReport).CreateDocument();
|
|
||||||
// // if (allReports == null)
|
|
||||||
// // allReports = singleReport;
|
|
||||||
// // else
|
|
||||||
// // ((XtraReport)allReports).Pages.AddRange(((XtraReport)singleReport).Pages);
|
|
||||||
// //}
|
|
||||||
|
|
||||||
// //return allReports as XtraReport;
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
public override List<Segment> GetSegments()
|
|
||||||
{
|
|
||||||
return Nutzdatendatei.GetSegments();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,206 +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 BeWo.Service.ServiceUtils.Generell
|
|
||||||
{
|
|
||||||
public static class DakotaFileCreator
|
|
||||||
{
|
|
||||||
internal struct DakotaKeyDictionary
|
|
||||||
{
|
|
||||||
public DateTime DateTime { get; set; }
|
|
||||||
public Kassenart Kassenart { get; set; }
|
|
||||||
public string Kostenträger { get; set; }
|
|
||||||
|
|
||||||
public override bool Equals(object obj)
|
|
||||||
{
|
|
||||||
if (obj == null || GetType() != obj.GetType())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var objectToCompareWith = (DakotaKeyDictionary)obj;
|
|
||||||
|
|
||||||
return objectToCompareWith.DateTime == DateTime && objectToCompareWith.Kassenart == Kassenart &&
|
|
||||||
objectToCompareWith.Kostenträger == Kostenträger;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int GetHashCode()
|
|
||||||
{
|
|
||||||
return base.GetHashCode();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return base.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<string> GenerateDakotaFilesByMonth(int year, int month)
|
|
||||||
{
|
|
||||||
var dict = GenerateDakotaFiles(year, month);
|
|
||||||
|
|
||||||
foreach (var keypair in dict)
|
|
||||||
{
|
|
||||||
var lines = keypair.Value;
|
|
||||||
|
|
||||||
//lines.GetRows()
|
|
||||||
}
|
|
||||||
|
|
||||||
var strings = dict.Values.Select(x => x.GetRows()).ToList();
|
|
||||||
return strings;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static Dictionary<DakotaKeyDictionary, DakotaFile> GenerateDakotaFiles(int year, int month)
|
|
||||||
{
|
|
||||||
// Datum, Kassenart, Kostenträger
|
|
||||||
var res = new Dictionary<DakotaKeyDictionary, DakotaFile>();
|
|
||||||
|
|
||||||
var invoiceitems = DAOFactory.GenericDAO.GetAllActive<InvoiceItem>();
|
|
||||||
|
|
||||||
var first = new DateTime(year, month, 1);
|
|
||||||
var last = new DateTime(year, month, 1).AddMonths(1).AddDays(-1);
|
|
||||||
|
|
||||||
var filtered = invoiceitems.Where(x => x.ItemPeriodStart == first && x.ItemPeriodEnd == last);
|
|
||||||
|
|
||||||
foreach (var invoice in filtered)
|
|
||||||
{
|
|
||||||
// Aufteilen
|
|
||||||
// 1. Monat/Jahr - erstmal gleich
|
|
||||||
// 2. Kassenart - aok, bkk, lkk
|
|
||||||
// Kostenträger - kt1, kt2, kt3
|
|
||||||
// Leistungsbereich - immer soziotherapie
|
|
||||||
|
|
||||||
|
|
||||||
DakotaKeyDictionary currentkey = new DakotaKeyDictionary
|
|
||||||
{
|
|
||||||
DateTime = first,
|
|
||||||
Kassenart = Kassenart.BKK,
|
|
||||||
Kostenträger = ""
|
|
||||||
};
|
|
||||||
|
|
||||||
var dakota = GetDakotaFile(res, currentkey);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get Dakota File. Creates if doesn't exist
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="dict">current Dict</param>
|
|
||||||
/// <param name="key"></param>
|
|
||||||
/// <param name="invoice"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
internal static DakotaFile GetDakotaFile(Dictionary<DakotaKeyDictionary, DakotaFile> dict, DakotaKeyDictionary key)
|
|
||||||
{
|
|
||||||
var dakota = dict.FirstOrDefault(keypair => keypair.Key.Equals(key)).Value;
|
|
||||||
|
|
||||||
if (dakota is null)
|
|
||||||
{
|
|
||||||
dakota = GenerateDakotaFile();
|
|
||||||
|
|
||||||
dict.Add(key, dakota);
|
|
||||||
}
|
|
||||||
|
|
||||||
return dakota;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static DakotaFile GenerateDakotaFile()
|
|
||||||
{
|
|
||||||
var creator = new InfoCreator();
|
|
||||||
var infofile = creator.GetDakotaInfoFile();
|
|
||||||
|
|
||||||
var dakota = new DakotaFile();
|
|
||||||
|
|
||||||
dakota.Apply(infofile);
|
|
||||||
|
|
||||||
return dakota;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//internal static DakotaInvoiceItemInfo GetDakotaFileInvoiceItem(DakotaInfoFile fileinfo, InvoiceItem invoice)
|
|
||||||
//{
|
|
||||||
// var invoiceinfo = new DakotaInvoiceItemInfo();
|
|
||||||
|
|
||||||
// invoiceinfo.IKLeistungserbringer = fileinfo.IKLeistungserbringers;
|
|
||||||
// invoiceinfo.IKAbsender = fileinfo.Absenderbezeichnung;
|
|
||||||
// invoiceinfo.IKEmpfänger = fileinfo.Empfangerbezeichnung;
|
|
||||||
// invoiceinfo.IKKostentrager = fileinfo.Empfangerbezeichnung;
|
|
||||||
// invoiceinfo.IKKrankenkasse = "112233445";
|
|
||||||
// invoiceinfo.IKKVKarte = "566778899";
|
|
||||||
|
|
||||||
// invoiceinfo.Verarbeitungskennzeichen = SchlüsselVerarbeitungskennzeichen.AbrechnungOhneBesonderheit;
|
|
||||||
// // invoiceinfo.
|
|
||||||
|
|
||||||
// return invoiceinfo;
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//public static DakotaFileInfo LoadInfos(List<InvoiceItemDC> invoiceItems)
|
|
||||||
//{
|
|
||||||
// var res = new DakotaFileInfo();
|
|
||||||
|
|
||||||
// res.Absenderbezeichnung = "123456789";
|
|
||||||
// res.Empfangerbezeichnung = "987654321";
|
|
||||||
// res.Datenaustauschreferenz = 1;
|
|
||||||
// res.Leistungsbereich = SchlüsselLeistungserbringerSammelgruppenschlussel.SoziotherapeutischerLeistungserbringer;
|
|
||||||
// res.Anwendungsreferenz = "abovollkra.txt";
|
|
||||||
// res.Testindikator = SchlüsselTestindikator.Testdatei;
|
|
||||||
|
|
||||||
// res.IKLeistungserbringers = "abovollkrass.txt";
|
|
||||||
// // res.Rechnungsnummer = dc.InvoiceBase.InvoiceNumber;
|
|
||||||
// // Einheitlich monatlich
|
|
||||||
// // res.Rechnungsdatum = dc.InvoiceBase.InvoiceDate.Value;
|
|
||||||
|
|
||||||
// res.Summenstatus = SchlüsselSummenstatus.Mitglieder;
|
|
||||||
// res.Gesamtrechnungsbetrag = 3.5m;
|
|
||||||
// res.Gesamtbruttobetrag = 3.5m;
|
|
||||||
// res.GesamtbetragZuzahlung = 3.5m;
|
|
||||||
// res.Rechnungsart = SchlüsselRechnungsart.AbrechnungVonLeistungserbringer;
|
|
||||||
// res.Name1 = "nam7";
|
|
||||||
// res.Name2 = "nam4";
|
|
||||||
// res.Name3 = "nam3";
|
|
||||||
// res.Name4 = "nam1";
|
|
||||||
|
|
||||||
// res.Verarbeitungskennzeichen = SchlüsselVerarbeitungskennzeichen.AbrechnungOhneBesonderheit;
|
|
||||||
|
|
||||||
// return res;
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
39
Dakota/Logic/DakotaFileCreator.cs
Normal file
39
Dakota/Logic/DakotaFileCreator.cs
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
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;
|
||||||
|
using static Dakota.Logic.DakotaInfoCreator;
|
||||||
|
|
||||||
|
namespace Dakota.Logic
|
||||||
|
{
|
||||||
|
public static class DakotaFileCreator
|
||||||
|
{
|
||||||
|
public static DakotaFile GenerateDakotaFile(List<InfoCreatorParameter> paras, InfoCreatorParameter2 para2)
|
||||||
|
{
|
||||||
|
Reset();
|
||||||
|
|
||||||
|
var info_nutzdaten = GetEmptyInfoNutzdatendatei(para2);
|
||||||
|
var info_auftrags = 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
349
Dakota/Logic/DakotaInfoCreator.cs
Normal file
349
Dakota/Logic/DakotaInfoCreator.cs
Normal file
@@ -0,0 +1,349 @@
|
|||||||
|
using BeWo.Data.Entities;
|
||||||
|
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 DakotaInfoCreator
|
||||||
|
{
|
||||||
|
public struct InfoCreatorParameter
|
||||||
|
{
|
||||||
|
public InvoiceItem InvoiceItem { get; set; }
|
||||||
|
public ServiceInvoicePeriod ServiceInvoicePeriod { get; set; }
|
||||||
|
public ServiceInvoice ServiceInvoice { get; set; }
|
||||||
|
public InvoiceBase InvoiceBase { get; set; }
|
||||||
|
public Customer Customer { get; set; }
|
||||||
|
|
||||||
|
public string IKKostentrager => "111222333";
|
||||||
|
public string IKKvkarte => "333444555";
|
||||||
|
public string Versichertenstatus => "55555";
|
||||||
|
public string Belegnummer => "444444test";
|
||||||
|
public string Identifikationsnummer => "111";
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct InfoCreatorParameter2
|
||||||
|
{
|
||||||
|
private string _month;
|
||||||
|
private string Absenderklassifikation => "SL";
|
||||||
|
private string Dateiidentifizierer => "S";
|
||||||
|
|
||||||
|
public string IKAbsender => "109500969";
|
||||||
|
public string IKEmpfang => "108018007";
|
||||||
|
|
||||||
|
public DateTime Created { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
// SL
|
||||||
|
// Stellen 3 bis 8 von AbsenderIK
|
||||||
|
//
|
||||||
|
public string LogischerDateiname => $"{Absenderklassifikation}{IKAbsender.Substring(2, 6)}{Dateiidentifizierer}{_month}";
|
||||||
|
public string PhysikalischerDateiname => "idkidkid.txt";
|
||||||
|
|
||||||
|
public InfoCreatorParameter2(int month)
|
||||||
|
{
|
||||||
|
_month = month.ToString("D2");
|
||||||
|
Created = DateTime.Now;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int NachrichtenRefenrenz { get; set; }
|
||||||
|
|
||||||
|
static DakotaInfoCreator()
|
||||||
|
{
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void Reset()
|
||||||
|
{
|
||||||
|
NachrichtenRefenrenz = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static int GetNextRefNumber()
|
||||||
|
{
|
||||||
|
return ++NachrichtenRefenrenz;
|
||||||
|
}
|
||||||
|
|
||||||
|
//internal static InfoFile GetDakotaInfoFile(InfoCreatorParameter para)
|
||||||
|
//{
|
||||||
|
// var info = new InfoFile();
|
||||||
|
|
||||||
|
// info.SyntaxKennung = "UNOC";
|
||||||
|
// info.SyntaxVersion = "3";
|
||||||
|
// info.Absenderbezeichnung = para.Absender;
|
||||||
|
// info.Empfangerbezeichnung = para.Empfang;
|
||||||
|
// info.Created = DateTime.Now;
|
||||||
|
// info.Datenaustauschreferenz = 1;
|
||||||
|
// info.Leistungsbereich = SchlüsselLeistungserbringerSammelgruppenschlussel.SoziotherapeutischerLeistungserbringer;
|
||||||
|
// info.Anwendungsreferenz = "testdateiaa";
|
||||||
|
// info.Testindikator = SchlüsselTestindikator.Testdatei;
|
||||||
|
|
||||||
|
// info.BlockKostentragers.Add(GetDakotaInfoBlockKostentrager(para));
|
||||||
|
|
||||||
|
// return info;
|
||||||
|
//}
|
||||||
|
|
||||||
|
internal static InfoDateiNutzdaten GetEmptyInfoNutzdatendatei(InfoCreatorParameter2 para)
|
||||||
|
{
|
||||||
|
var info = new InfoDateiNutzdaten();
|
||||||
|
|
||||||
|
info.SyntaxKennung = "UNOC";
|
||||||
|
info.SyntaxVersion = "3";
|
||||||
|
info.Absenderbezeichnung = para.IKAbsender;
|
||||||
|
info.Empfangerbezeichnung = para.IKEmpfang;
|
||||||
|
info.Created = para.Created;
|
||||||
|
info.Datenaustauschreferenz = 1;
|
||||||
|
info.Leistungsbereich = SchlüsselLeistungserbringerSammelgruppenschlussel.SoziotherapeutischerLeistungserbringer;
|
||||||
|
info.Anwendungsreferenz = para.LogischerDateiname;
|
||||||
|
info.Testindikator = SchlüsselTestindikator.Testdatei;
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static InfoDateiAuftrags GetEmptyInfoAuftragsdatei(InfoCreatorParameter2 para)
|
||||||
|
{
|
||||||
|
var info = new InfoDateiAuftrags();
|
||||||
|
|
||||||
|
info.Identifikator = 500000;
|
||||||
|
info.Version = 1;
|
||||||
|
info.LangeAuftrag = 348;
|
||||||
|
info.SequenzNummer = 000;
|
||||||
|
info.VerfahrenKennung = "TSOL0";
|
||||||
|
info.TransferNummer = 000;
|
||||||
|
info.VerfahrenKennungSpezifikation = "SGB1K";
|
||||||
|
info.AbsenderEigner = para.IKAbsender;
|
||||||
|
info.AbsenderPhysikalisch = para.IKAbsender;
|
||||||
|
info.EmpfangerNutzer = para.IKEmpfang;
|
||||||
|
info.EmpfangerPhysikalisch = para.IKEmpfang;
|
||||||
|
info.FehlerNummer = 0;
|
||||||
|
info.FehlerMassnahme = 0;
|
||||||
|
info.Dateiname = "aok31052023";
|
||||||
|
info.DatumErstellung = para.Created.ToString("yyyyMMddhhmmss");
|
||||||
|
info.DatumUbertragungGesendet = para.Created.ToString("yyyyMMddhhmmss");
|
||||||
|
info.DatumUbertragungEmpfangenStart = "00000000000000";
|
||||||
|
info.DatumUbertragungEmpfangenEnde = "00000000000000";
|
||||||
|
info.DateiVersion = 0;
|
||||||
|
info.Korrektur = 0;
|
||||||
|
// info.DateigrosseNutzdaten = 0;
|
||||||
|
// info.DateigrosseUbertragung = 0;
|
||||||
|
info.Zeichensatz = "l1";
|
||||||
|
info.Komprimierung = 0;
|
||||||
|
info.Verschlusselungsart = 0;
|
||||||
|
info.ElektronischeUnterschrift = 0;
|
||||||
|
|
||||||
|
// info.Satzformat = "";
|
||||||
|
// info.Satzlange = 0;
|
||||||
|
// info.Blocklange = 0;
|
||||||
|
|
||||||
|
// Part 3 nicht vom Absender
|
||||||
|
|
||||||
|
info.EMailAdresseAbsender = "evertz@ownsoft.de";
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void AddDakotaInfoFile(this InfoDateiNutzdaten file, InfoCreatorParameter para, InfoCreatorParameter2 para2)
|
||||||
|
{
|
||||||
|
var blockkostentrager = file.GetDakotaInfoBlockKostentrager(para, para2);
|
||||||
|
var blockkvkarte = blockkostentrager.GetDakotaInfoBlockKvKarte(para, para2);
|
||||||
|
var abrechnungsfall = blockkvkarte.GetDakotaInfoAbrechnungsfall(para, para2);
|
||||||
|
var abrechnungsposition = abrechnungsfall.GetDakotaInfoAbrechnungsposition(para, para2);
|
||||||
|
|
||||||
|
abrechnungsfall.InfosAbrechnungsposition.Add(abrechnungsposition);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static InfoBlockKostentrager GetDakotaInfoBlockKostentrager(this InfoDateiNutzdaten file, InfoCreatorParameter para, InfoCreatorParameter2 para2)
|
||||||
|
{
|
||||||
|
var ikkostentrager = para.IKKostentrager;
|
||||||
|
var block = file.BlockKostentragers.FirstOrDefault(x => x.IKKostentrager == ikkostentrager);
|
||||||
|
|
||||||
|
if (block is null)
|
||||||
|
{
|
||||||
|
block = new InfoBlockKostentrager(ikkostentrager)
|
||||||
|
{
|
||||||
|
DakotaInfoSLGA = CreateDakotaInfoNachricht(true),
|
||||||
|
DakotaInfoNachrichtSLGA = CreateDakotaInfoNachrichtSLGA(para, para2)
|
||||||
|
};
|
||||||
|
file.BlockKostentragers.Add(block);
|
||||||
|
}
|
||||||
|
|
||||||
|
return block;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static InfoBlockKvKarte GetDakotaInfoBlockKvKarte(this InfoBlockKostentrager blockkostentrager, InfoCreatorParameter para, InfoCreatorParameter2 para2)
|
||||||
|
{
|
||||||
|
var ikkvkarte = para.IKKvkarte;
|
||||||
|
var block = blockkostentrager.BlockKvKarte.FirstOrDefault(x => x.IKKrankenkasseKVKarte == ikkvkarte);
|
||||||
|
|
||||||
|
if (block is null)
|
||||||
|
{
|
||||||
|
block = new InfoBlockKvKarte(ikkvkarte)
|
||||||
|
{
|
||||||
|
DakotaInfoSLGA = CreateDakotaInfoNachricht(true),
|
||||||
|
DakotaInfoNachrichtSLGA = CreateDakotaInfoNachrichtSLGA(para, para2),
|
||||||
|
DakotaInfoSLLA = CreateDakotaInfoNachricht(false),
|
||||||
|
DakotaInfoNachrichtSLLA = CreateDakotaInfoNachrichtSLLA(para, para2)
|
||||||
|
};
|
||||||
|
blockkostentrager.BlockKvKarte.Add(block);
|
||||||
|
}
|
||||||
|
|
||||||
|
return block;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static InfoAbrechnungsfall GetDakotaInfoAbrechnungsfall(this InfoBlockKvKarte block, InfoCreatorParameter para, InfoCreatorParameter2 para2)
|
||||||
|
{
|
||||||
|
var belegnummer = para.Belegnummer;
|
||||||
|
var fall = block.DakotaInfoNachrichtSLLA.Abrechnungsfalle.FirstOrDefault(x => x.Belegnummer == belegnummer);
|
||||||
|
|
||||||
|
if(fall is null)
|
||||||
|
{
|
||||||
|
fall = CreateDakotaInfoAbrechnungsfall(para);
|
||||||
|
block.DakotaInfoNachrichtSLLA.Abrechnungsfalle.Add(fall);
|
||||||
|
}
|
||||||
|
|
||||||
|
return fall;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static InfoAbrechnungsposition GetDakotaInfoAbrechnungsposition(this InfoAbrechnungsfall fall, InfoCreatorParameter para, InfoCreatorParameter2 para2)
|
||||||
|
{
|
||||||
|
var id = para.Identifikationsnummer;
|
||||||
|
var pos = CreateDakotaInfoAbrechnungsposition(para);
|
||||||
|
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
private static InfoNachricht CreateDakotaInfoNachricht(bool isSLGA)
|
||||||
|
{
|
||||||
|
var info = new InfoNachricht();
|
||||||
|
var typ = isSLGA ? "SLGA" : "SLLA";
|
||||||
|
|
||||||
|
info.Nachrichtenreferenznummer = GetNextRefNumber();
|
||||||
|
info.NachrichtenTypKennung = typ;
|
||||||
|
info.NachrichtenVersionsnummer = "18";
|
||||||
|
info.NachrichtenFreigabeNrTages = "0";
|
||||||
|
info.NachrichtenVerwaltendeOrganisation = "0";
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static InfoNachrichtSLGA CreateDakotaInfoNachrichtSLGA(InfoCreatorParameter para, InfoCreatorParameter2 para2)
|
||||||
|
{
|
||||||
|
var info = new InfoNachrichtSLGA();
|
||||||
|
|
||||||
|
info.Verarbeitungskennzeichen = SchlüsselVerarbeitungskennzeichen.AbrechnungOhneBesonderheit;
|
||||||
|
info.IKAbsender = para2.IKAbsender;
|
||||||
|
info.IKKostentrager = para.IKKostentrager;
|
||||||
|
info.IKKvKarte = para.IKKvkarte;
|
||||||
|
info.IKLeistungserbringer = para2.IKAbsender;
|
||||||
|
|
||||||
|
info.Rechnungsnummer = para.InvoiceBase.InvoiceNumber;
|
||||||
|
info.Rechnungsdatum = para.InvoiceBase.InvoiceDate.Value;
|
||||||
|
info.Rechnungsart = SchlüsselRechnungsart.AbrechnungVonLeistungserbringer;
|
||||||
|
|
||||||
|
info.Summenstatus00 = SchlüsselSummenstatus.Gesamtsumme;
|
||||||
|
info.Gesamtbruttobetrag00 = para.InvoiceItem.AmountTotal.Value;
|
||||||
|
info.GesamtbetragZuzahlung00 = 5;
|
||||||
|
info.Gesamtrechnungsbetrag00 = info.Gesamtbruttobetrag00 - info.GesamtbetragZuzahlung00;
|
||||||
|
|
||||||
|
info.Summenstatus = SchlüsselSummenstatus.Mitglieder;
|
||||||
|
info.Gesamtbruttobetrag = para.InvoiceItem.AmountTotal.Value;
|
||||||
|
info.GesamtbetragZuzahlung = 5;
|
||||||
|
info.Gesamtrechnungsbetrag = info.Gesamtbruttobetrag00 - info.GesamtbetragZuzahlung00;
|
||||||
|
|
||||||
|
info.Name1 = "Name";
|
||||||
|
info.Name2 = "Ansprechpartner";
|
||||||
|
info.Name3 = "Nummer";
|
||||||
|
info.Name4 = "EMail";
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static InfoNachrichtSLLA CreateDakotaInfoNachrichtSLLA(InfoCreatorParameter para, InfoCreatorParameter2 para2)
|
||||||
|
{
|
||||||
|
var info = new InfoNachrichtSLLA();
|
||||||
|
|
||||||
|
info.Verarbeitungskennzeichen = SchlüsselVerarbeitungskennzeichen.AbrechnungOhneBesonderheit;
|
||||||
|
info.IKAbsender = para2.IKAbsender;
|
||||||
|
info.IKKostentrager = para.IKKostentrager;
|
||||||
|
info.IKKvKarte = para.IKKvkarte;
|
||||||
|
info.IKLeistungserbringer = para2.IKAbsender;
|
||||||
|
|
||||||
|
info.Rechnungsnummer = para.InvoiceBase.InvoiceNumber;
|
||||||
|
info.Rechnungsdatum = para.InvoiceBase.InvoiceDate.Value;
|
||||||
|
info.Rechnungsart = SchlüsselRechnungsart.AbrechnungVonLeistungserbringer;
|
||||||
|
|
||||||
|
info.Abrechnungsfalle = new List<InfoAbrechnungsfall>();
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static InfoAbrechnungsfall CreateDakotaInfoAbrechnungsfall(InfoCreatorParameter para)
|
||||||
|
{
|
||||||
|
var info = new InfoAbrechnungsfall();
|
||||||
|
|
||||||
|
info.VersichtertenNummer = para.IKKvkarte;
|
||||||
|
info.Versichertenstatus = para.Versichertenstatus;
|
||||||
|
info.Beleginformation = SchlüsselBeleginformation.KeineBeleguebermittlung;
|
||||||
|
info.Belegnummer = para.Belegnummer;
|
||||||
|
|
||||||
|
info.VersichtertenVorname = para.Customer.Person.FirstName;
|
||||||
|
info.VersichtertenNachname = para.Customer.Person.LastName;
|
||||||
|
info.VersichtertenGeburtstag = para.Customer.Person.DateOfBirth.Value;
|
||||||
|
info.VersichtertenStraßeNr = para.Customer.Person.Address.Street;
|
||||||
|
info.VersichtertenPLZ = para.Customer.Person.Address.PostalCode;
|
||||||
|
info.VersichtertenWohnort = para.Customer.Person.Address.Town;
|
||||||
|
info.VersichtertenLanderkennung = null;
|
||||||
|
|
||||||
|
// info.DakotaInfosAbrechnungsposition.Add(GetDakotaInfoAbrechnungsposition(para));
|
||||||
|
|
||||||
|
// Kann
|
||||||
|
|
||||||
|
// info.DakotaInfoDiagnosen.Add(GetDakotaInfoDiagnosen());
|
||||||
|
|
||||||
|
info.GesamtbetragGesetzlicheZuzahlung = 0;
|
||||||
|
info.GesamtbetragProzentualeZuzahlung = 0;
|
||||||
|
info.PauschalerZuzahlungsbetrag = 0;
|
||||||
|
info.GesamtbetragEigenanteil = 0;
|
||||||
|
info.GesamtbetragBrutto = 0;
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static InfoAbrechnungsposition CreateDakotaInfoAbrechnungsposition(InfoCreatorParameter para)
|
||||||
|
{
|
||||||
|
var info = new InfoAbrechnungsposition();
|
||||||
|
|
||||||
|
info.Identifikationsnummer = para.Identifikationsnummer;
|
||||||
|
info.Abrechnungscode = SchlüsselAbrechnungscodes.SoziotherapeutischerLeistungserbringer;
|
||||||
|
|
||||||
|
info.TarifkennzeichenBereich = SchlüsselTarifkennzeichenBereich.NordRheinWestfalen;
|
||||||
|
info.TarifkennzeichenSondertarif = SchlüsselTarifkennzeichenSondertarif.OhneBesonderheiten;
|
||||||
|
|
||||||
|
info.AbrechnungspositionArtDerEinrichtung = SchlüsselPosArtDerEinrichtung.SoziotherapeutischerLeistungserbringer;
|
||||||
|
info.AbrechnungspositionBehandlungsart = SchlüsselPosBehandlungsart.Einzelbehandlung;
|
||||||
|
info.AbrechnungspositionVergütungsart = SchlüsselPosVergütungsart.Gruppenbehandlung90Minuten9Teilnehmer;
|
||||||
|
|
||||||
|
info.AnzahlMenge = para.InvoiceItem.UnitCount.Value;
|
||||||
|
info.EinzelbetragAbrechnungsposition = para.InvoiceItem.AmountTotal.Value;
|
||||||
|
info.DatumDerLeistungserbringung = para.InvoiceBase.InvoiceDate.Value;
|
||||||
|
info.BetragZuzahlung = 0;
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static InfoBlockDiagnosen CreateDakotaInfoDiagnosen()
|
||||||
|
{
|
||||||
|
var info = new InfoBlockDiagnosen();
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
53
Dakota/Logic/DakotaUtils.cs
Normal file
53
Dakota/Logic/DakotaUtils.cs
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Dakota.Logic
|
||||||
|
{
|
||||||
|
public static class DakotaUtils
|
||||||
|
{
|
||||||
|
public static string FillFromLeft(string input, int length, char filler)
|
||||||
|
{
|
||||||
|
if (input.Length > length)
|
||||||
|
return input;
|
||||||
|
|
||||||
|
if (input.Length == length)
|
||||||
|
return input;
|
||||||
|
|
||||||
|
// inp.len < len
|
||||||
|
// <=> 0 < len - inp.len
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
for (int i = 0; i < length - input.Length; i++)
|
||||||
|
{
|
||||||
|
sb.Append(filler);
|
||||||
|
}
|
||||||
|
sb.Append(input);
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string FillFromRight(string input, int length, char filler)
|
||||||
|
{
|
||||||
|
if (input.Length > length)
|
||||||
|
return input;
|
||||||
|
|
||||||
|
if (input.Length == length)
|
||||||
|
return input;
|
||||||
|
|
||||||
|
// inp.len < len
|
||||||
|
// <=> 0 < len - inp.len
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.Append(input);
|
||||||
|
for (int i = 0; i < length - input.Length; i++)
|
||||||
|
{
|
||||||
|
sb.Append(filler);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
38
Dakota/Models/Auftragsdatei/Auftragsdatei.cs
Normal file
38
Dakota/Models/Auftragsdatei/Auftragsdatei.cs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
using Dakota.Models.Infos;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Dakota.Models.Auftragsdatei
|
||||||
|
{
|
||||||
|
internal class Auftragsdatei : IRow
|
||||||
|
{
|
||||||
|
public AuftragssatzPart1 AuftragssatzPart1 { get; private set; }
|
||||||
|
public AuftragssatzPart2 AuftragssatzPart2 { get; private set; }
|
||||||
|
public AuftragssatzPart3 AuftragssatzPart3 { get; private set; }
|
||||||
|
public AuftragssatzPart4 AuftragssatzPart4 { get; private set; }
|
||||||
|
|
||||||
|
public Auftragsdatei()
|
||||||
|
{
|
||||||
|
AuftragssatzPart1 = new AuftragssatzPart1();
|
||||||
|
AuftragssatzPart2 = new AuftragssatzPart2();
|
||||||
|
AuftragssatzPart3 = new AuftragssatzPart3();
|
||||||
|
AuftragssatzPart4 = new AuftragssatzPart4();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetRows()
|
||||||
|
{
|
||||||
|
return AuftragssatzPart1.GetRows() + AuftragssatzPart2.GetRows() + AuftragssatzPart3.GetRows() + AuftragssatzPart4.GetRows();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Apply(InfoDateiAuftrags info)
|
||||||
|
{
|
||||||
|
AuftragssatzPart1.Apply(info);
|
||||||
|
AuftragssatzPart2.Apply(info);
|
||||||
|
AuftragssatzPart3.Apply(info);
|
||||||
|
AuftragssatzPart4.Apply(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
138
Dakota/Models/Auftragsdatei/AuftragssatzPart1.cs
Normal file
138
Dakota/Models/Auftragsdatei/AuftragssatzPart1.cs
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
using Dakota.Models.Daten;
|
||||||
|
using Dakota.Models.Infos;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Dakota.Models.Auftragsdatei
|
||||||
|
{
|
||||||
|
internal class AuftragssatzPart1 : IRow
|
||||||
|
{
|
||||||
|
public DatenelementAuftragsdatei Identifikator { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei Version { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei LangeAuftrag { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei SequenzNummer { get; private set; }
|
||||||
|
|
||||||
|
public DatenelementAuftragsdatei VerfahrenKennung { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei TransferNummer { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei VerfahrenKennungSpezifikation { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei AbsenderEigner { get; private set; }
|
||||||
|
|
||||||
|
public DatenelementAuftragsdatei AbsenderPhysikalisch { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei EmpfangerNutzer { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei EmpfangerPhysikalisch { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei FehlerNummer { get; private set; }
|
||||||
|
|
||||||
|
public DatenelementAuftragsdatei FehlerMassnahme { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei Dateiname { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei DatumErstellung { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei DatumUbertragungGesendet { get; private set; }
|
||||||
|
|
||||||
|
public DatenelementAuftragsdatei DatumUbertragungEmpfangenStart { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei DatumUbertragungEmpfangenEnde { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei DateiVersion { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei Korrektur { get; private set; }
|
||||||
|
|
||||||
|
public DatenelementAuftragsdatei DateigrosseNutzdaten { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei DateigrosseUbertragung { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei Zeichensatz { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei Komprimierung { get; private set; }
|
||||||
|
|
||||||
|
public DatenelementAuftragsdatei Verschlusselungsart { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei ElektronischeUnterschrift { get; private set; }
|
||||||
|
|
||||||
|
public AuftragssatzPart1()
|
||||||
|
{
|
||||||
|
Identifikator = new DatenelementAuftragsdatei("Identifikator", 6, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
Version = new DatenelementAuftragsdatei("Version", 2, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
LangeAuftrag = new DatenelementAuftragsdatei("LangeAuftrag", 8, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
SequenzNummer = new DatenelementAuftragsdatei("SequenzNummer", 3, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
|
||||||
|
VerfahrenKennung = new DatenelementAuftragsdatei("VerfahrenKennung", 5, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
TransferNummer = new DatenelementAuftragsdatei("TransferNummer", 3, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
VerfahrenKennungSpezifikation = new DatenelementAuftragsdatei("VerfahrenKennungSpezifikation", 5, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
AbsenderEigner = new DatenelementAuftragsdatei("AbsenderEigner", 15, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
|
||||||
|
AbsenderPhysikalisch = new DatenelementAuftragsdatei("AbsenderPhysikalisch", 15, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
EmpfangerNutzer = new DatenelementAuftragsdatei("EmpfangerNutzer", 15, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
EmpfangerPhysikalisch = new DatenelementAuftragsdatei("EmpfangerPhysikalisch", 15, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
FehlerNummer = new DatenelementAuftragsdatei("FehlerNummer", 6, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
|
||||||
|
FehlerMassnahme = new DatenelementAuftragsdatei("FehlerMassnahme", 6, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
Dateiname = new DatenelementAuftragsdatei("Dateiname", 11, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
DatumErstellung = new DatenelementAuftragsdatei("DatumErstellung", 14, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
DatumUbertragungGesendet = new DatenelementAuftragsdatei("DatumUbertragungGesendet", 14, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
|
||||||
|
DatumUbertragungEmpfangenStart = new DatenelementAuftragsdatei("DatumUbertragungEmpfangenStart", 14, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Kann);
|
||||||
|
DatumUbertragungEmpfangenEnde = new DatenelementAuftragsdatei("DatumUbertragungEmpfangenEnde", 14, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Kann);
|
||||||
|
DateiVersion = new DatenelementAuftragsdatei("DateiVersion", 6, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
Korrektur = new DatenelementAuftragsdatei("Korrektur", 1, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
|
||||||
|
DateigrosseNutzdaten = new DatenelementAuftragsdatei("DateigrosseNutzdaten", 12, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
DateigrosseUbertragung = new DatenelementAuftragsdatei("DateigrosseUbertragung", 12, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
Zeichensatz = new DatenelementAuftragsdatei("Zeichensatz", 2, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
Komprimierung = new DatenelementAuftragsdatei("Komprimierung", 2, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
|
||||||
|
Verschlusselungsart = new DatenelementAuftragsdatei("Verschlusselungsart", 2, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
ElektronischeUnterschrift = new DatenelementAuftragsdatei("ElektronischeUnterschrift", 2, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.Muss);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetRows()
|
||||||
|
{
|
||||||
|
var list = new List<DatenelementAuftragsdatei>() {
|
||||||
|
Identifikator,Version,LangeAuftrag,SequenzNummer,
|
||||||
|
VerfahrenKennung,TransferNummer,VerfahrenKennungSpezifikation,AbsenderEigner,
|
||||||
|
AbsenderPhysikalisch,EmpfangerNutzer,EmpfangerPhysikalisch,FehlerNummer,
|
||||||
|
FehlerMassnahme,Dateiname,DatumErstellung,DatumUbertragungGesendet,
|
||||||
|
DatumUbertragungEmpfangenStart,DatumUbertragungEmpfangenEnde,DateiVersion,Korrektur,
|
||||||
|
DateigrosseNutzdaten,DateigrosseUbertragung,Zeichensatz,Komprimierung,
|
||||||
|
Verschlusselungsart, ElektronischeUnterschrift
|
||||||
|
};
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
sb.Append(item.GetValue());
|
||||||
|
}
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void Apply(InfoDateiAuftrags info)
|
||||||
|
{
|
||||||
|
Identifikator.SetValue(info.Identifikator);
|
||||||
|
Version.SetValue(info.Version);
|
||||||
|
LangeAuftrag.SetValue(info.LangeAuftrag);
|
||||||
|
SequenzNummer.SetValue(info.SequenzNummer);
|
||||||
|
|
||||||
|
VerfahrenKennung.SetValue(info.VerfahrenKennung);
|
||||||
|
TransferNummer.SetValue(info.TransferNummer);
|
||||||
|
VerfahrenKennungSpezifikation.SetValue(info.VerfahrenKennungSpezifikation);
|
||||||
|
AbsenderEigner.SetValue(info.AbsenderEigner);
|
||||||
|
|
||||||
|
AbsenderPhysikalisch.SetValue(info.AbsenderPhysikalisch);
|
||||||
|
EmpfangerNutzer.SetValue(info.EmpfangerNutzer);
|
||||||
|
EmpfangerPhysikalisch.SetValue(info.EmpfangerPhysikalisch);
|
||||||
|
FehlerNummer.SetValue(info.FehlerNummer);
|
||||||
|
|
||||||
|
FehlerMassnahme.SetValue(info.FehlerMassnahme);
|
||||||
|
Dateiname.SetValue(info.Dateiname);
|
||||||
|
DatumErstellung.SetValue(info.DatumErstellung);
|
||||||
|
DatumUbertragungGesendet.SetValue(info.DatumUbertragungGesendet);
|
||||||
|
|
||||||
|
DatumUbertragungEmpfangenStart.SetValue(info.DatumUbertragungEmpfangenStart);
|
||||||
|
DatumUbertragungEmpfangenEnde.SetValue(info.DatumUbertragungEmpfangenEnde);
|
||||||
|
DateiVersion.SetValue(info.DateiVersion);
|
||||||
|
Korrektur.SetValue(info.Korrektur);
|
||||||
|
|
||||||
|
DateigrosseNutzdaten.SetValue(info.DateigrosseNutzdaten);
|
||||||
|
DateigrosseUbertragung.SetValue(info.DateigrosseUbertragung);
|
||||||
|
Zeichensatz.SetValue(info.Zeichensatz);
|
||||||
|
Komprimierung.SetValue(info.Komprimierung);
|
||||||
|
|
||||||
|
Verschlusselungsart.SetValue(info.Verschlusselungsart);
|
||||||
|
ElektronischeUnterschrift.SetValue(info.ElektronischeUnterschrift);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
45
Dakota/Models/Auftragsdatei/AuftragssatzPart2.cs
Normal file
45
Dakota/Models/Auftragsdatei/AuftragssatzPart2.cs
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
using Dakota.Models.Daten;
|
||||||
|
using Dakota.Models.Infos;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Dakota.Models.Auftragsdatei
|
||||||
|
{
|
||||||
|
public class AuftragssatzPart2 : IRow
|
||||||
|
{
|
||||||
|
public DatenelementAuftragsdatei Satzformat { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei Satzlange { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei Blocklange { get; private set; }
|
||||||
|
|
||||||
|
public AuftragssatzPart2()
|
||||||
|
{
|
||||||
|
Satzformat = new DatenelementAuftragsdatei("Satzformat", 3, FeldtypAuftragsdatei.Alpha, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
Satzlange = new DatenelementAuftragsdatei("Satzlange", 5, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
Blocklange = new DatenelementAuftragsdatei("Blocklange", 8, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetRows()
|
||||||
|
{
|
||||||
|
var list = new List<DatenelementAuftragsdatei>() {
|
||||||
|
Satzformat,Satzlange,Blocklange
|
||||||
|
};
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
sb.Append(item.GetValue());
|
||||||
|
}
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void Apply(InfoDateiAuftrags info)
|
||||||
|
{
|
||||||
|
Satzformat.SetValue(info.Satzformat);
|
||||||
|
Satzlange.SetValue(info.Satzlange);
|
||||||
|
Blocklange.SetValue(info.Blocklange);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
58
Dakota/Models/Auftragsdatei/AuftragssatzPart3.cs
Normal file
58
Dakota/Models/Auftragsdatei/AuftragssatzPart3.cs
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
using Dakota.Models.Daten;
|
||||||
|
using Dakota.Models.Infos;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Dakota.Models.Auftragsdatei
|
||||||
|
{
|
||||||
|
public class AuftragssatzPart3 : IRow
|
||||||
|
{
|
||||||
|
public DatenelementAuftragsdatei Status { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei Wiederholung { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei Übertragungsweg { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei VerzögerterVersand { get; private set; }
|
||||||
|
|
||||||
|
public DatenelementAuftragsdatei InfoUndFehlerFelder { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei VariablesInfoFeld { get; private set; }
|
||||||
|
|
||||||
|
public AuftragssatzPart3()
|
||||||
|
{
|
||||||
|
Status = new DatenelementAuftragsdatei("Status", 1, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
Wiederholung = new DatenelementAuftragsdatei("Wiederholung", 2, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
Übertragungsweg = new DatenelementAuftragsdatei("Übertragungsweg", 1, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
VerzögerterVersand = new DatenelementAuftragsdatei("VerzögerterVersand", 10, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
|
||||||
|
InfoUndFehlerFelder = new DatenelementAuftragsdatei("InfoUndFehlerFelder", 6, FeldtypAuftragsdatei.Numerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
VariablesInfoFeld = new DatenelementAuftragsdatei("VariablesInfoFeld", 28, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetRows()
|
||||||
|
{
|
||||||
|
var list = new List<DatenelementAuftragsdatei>() {
|
||||||
|
Status,Wiederholung,Übertragungsweg,VerzögerterVersand,
|
||||||
|
InfoUndFehlerFelder,VariablesInfoFeld
|
||||||
|
};
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
sb.Append(item.GetValue());
|
||||||
|
}
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void Apply(InfoDateiAuftrags info)
|
||||||
|
{
|
||||||
|
Status.SetValue(info.Status);
|
||||||
|
Wiederholung.SetValue(info.Wiederholung);
|
||||||
|
Übertragungsweg.SetValue(info.Übertragungsweg);
|
||||||
|
VerzögerterVersand.SetValue(info.VerzögerterVersand);
|
||||||
|
|
||||||
|
InfoUndFehlerFelder.SetValue(info.InfoUndFehlerFelder);
|
||||||
|
VariablesInfoFeld.SetValue(info.VariablesInfoFeld);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
42
Dakota/Models/Auftragsdatei/AuftragssatzPart4.cs
Normal file
42
Dakota/Models/Auftragsdatei/AuftragssatzPart4.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
using Dakota.Models.Daten;
|
||||||
|
using Dakota.Models.Infos;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Dakota.Models.Auftragsdatei
|
||||||
|
{
|
||||||
|
public class AuftragssatzPart4 : IRow
|
||||||
|
{
|
||||||
|
public DatenelementAuftragsdatei EMailAdresseAbsender { get; private set; }
|
||||||
|
public DatenelementAuftragsdatei DateiBezeichnung { get; private set; }
|
||||||
|
|
||||||
|
public AuftragssatzPart4()
|
||||||
|
{
|
||||||
|
EMailAdresseAbsender = new DatenelementAuftragsdatei("EMailAdresseAbsender", 44, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
DateiBezeichnung = new DatenelementAuftragsdatei("DateiBezeichnung", 30, FeldtypAuftragsdatei.Alphanumerisch, FeldartAuftragsdatei.MussBedingt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetRows()
|
||||||
|
{
|
||||||
|
var list = new List<DatenelementAuftragsdatei>() {
|
||||||
|
EMailAdresseAbsender,DateiBezeichnung
|
||||||
|
};
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
sb.Append(item.GetValue());
|
||||||
|
}
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void Apply(InfoDateiAuftrags info)
|
||||||
|
{
|
||||||
|
EMailAdresseAbsender.SetValue(info.EMailAdresseAbsender);
|
||||||
|
DateiBezeichnung.SetValue(info.DateiBezeichnung);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -95,7 +95,7 @@ namespace Dakota.Models.Blocke
|
|||||||
SegmentSLLABES = new SegmentSLLABES();
|
SegmentSLLABES = new SegmentSLLABES();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<Segment> GetSegments()
|
public override List<Segment> GetAllSegments()
|
||||||
{
|
{
|
||||||
var res = new List<Segment>();
|
var res = new List<Segment>();
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ namespace Dakota.Models.Blocke
|
|||||||
SegmentSLLANAD.Wohnort.SetValue(info.VersichtertenWohnort);
|
SegmentSLLANAD.Wohnort.SetValue(info.VersichtertenWohnort);
|
||||||
SegmentSLLANAD.Länderkennzeichen.SetValue(info.VersichtertenLanderkennung);
|
SegmentSLLANAD.Länderkennzeichen.SetValue(info.VersichtertenLanderkennung);
|
||||||
|
|
||||||
foreach (var posinfo in info.DakotaInfosAbrechnungsposition)
|
foreach (var posinfo in info.InfosAbrechnungsposition)
|
||||||
{
|
{
|
||||||
var block = new BlockAbrechnungsposition();
|
var block = new BlockAbrechnungsposition();
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace Dakota.Models.Blocke
|
|||||||
SegmentSLLAMWS = new SegmentSLLAMWS();
|
SegmentSLLAMWS = new SegmentSLLAMWS();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<Segment> GetSegments()
|
public override List<Segment> GetAllSegments()
|
||||||
{
|
{
|
||||||
return new List<Segment>() { SegmentSLLAENF , SegmentSLLASUT, SegmentSLLATXT, SegmentSLLAMWS};
|
return new List<Segment>() { SegmentSLLAENF , SegmentSLLASUT, SegmentSLLATXT, SegmentSLLAMWS};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace Dakota.Models.Blocke
|
|||||||
SegmentSLLADIA = new SegmentSLLADIA();
|
SegmentSLLADIA = new SegmentSLLADIA();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<Segment> GetSegments()
|
public override List<Segment> GetAllSegments()
|
||||||
{
|
{
|
||||||
var res = new List<Segment>();
|
var res = new List<Segment>();
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ namespace Dakota.Models.Blocke
|
|||||||
|
|
||||||
public override int GetUNHCount() => 0;
|
public override int GetUNHCount() => 0;
|
||||||
|
|
||||||
public void Apply(InfoDiagnosen info)
|
public void Apply(InfoBlockDiagnosen info)
|
||||||
{
|
{
|
||||||
SegmentSLLADIA.Diagnoseschlüssel.SetValue(info.Diagnoseschlüssel);
|
SegmentSLLADIA.Diagnoseschlüssel.SetValue(info.Diagnoseschlüssel);
|
||||||
SegmentSLLADIA.Diagnosetext.SetValue(info.Diagnosetext);
|
SegmentSLLADIA.Diagnosetext.SetValue(info.Diagnosetext);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace Dakota.Models.Blocke
|
|||||||
SegmentUNZ = new SegmentUNZ(GetUNHCount);
|
SegmentUNZ = new SegmentUNZ(GetUNHCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<Segment> GetSegments()
|
public override List<Segment> GetAllSegments()
|
||||||
{
|
{
|
||||||
var list = new List<Segment>();
|
var list = new List<Segment>();
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ namespace Dakota.Models.Blocke
|
|||||||
{
|
{
|
||||||
BlockKostenträger.Add(blockkosten);
|
BlockKostenträger.Add(blockkosten);
|
||||||
}
|
}
|
||||||
public void Apply(InfoFile info)
|
public void Apply(InfoDateiNutzdaten info)
|
||||||
{
|
{
|
||||||
SegmentUNB.SyntaxKennung.SetValue(info.SyntaxKennung);
|
SegmentUNB.SyntaxKennung.SetValue(info.SyntaxKennung);
|
||||||
SegmentUNB.SyntaxVersionsnummer.SetValue(info.SyntaxVersion);
|
SegmentUNB.SyntaxVersionsnummer.SetValue(info.SyntaxVersion);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace Dakota.Models.Blocke
|
|||||||
{
|
{
|
||||||
SegmentUNH = new SegmentUNH();
|
SegmentUNH = new SegmentUNH();
|
||||||
NachrichtSLGA = new NachrichtSLGA3();
|
NachrichtSLGA = new NachrichtSLGA3();
|
||||||
SegmentUNT = new SegmentUNT(GetSegmentLength);
|
SegmentUNT = new SegmentUNT(NachrichtSLGA.GetSegmentLength);
|
||||||
BlockKrankenkarteVerordnung = new List<BlockKrankenkarteVerordnung>();
|
BlockKrankenkarteVerordnung = new List<BlockKrankenkarteVerordnung>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ namespace Dakota.Models.Blocke
|
|||||||
set { NachrichtSLGA.SegmentFKT.IKKostenträger.SetValue(value); }
|
set { NachrichtSLGA.SegmentFKT.IKKostenträger.SetValue(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<Segment> GetSegments()
|
public override List<Segment> GetAllSegments()
|
||||||
{
|
{
|
||||||
var list = new List<Segment>();
|
var list = new List<Segment>();
|
||||||
|
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ namespace Dakota.Models.Blocke
|
|||||||
set { NachrichtSLGA.SegmentFKT.IKKrankenkasseKVKarte.SetValue(value); }
|
set { NachrichtSLGA.SegmentFKT.IKKrankenkasseKVKarte.SetValue(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public int SLGASegmentLength() => NachrichtSLGA.GetSegmentLength() + 2;
|
public int SLGASegmentLength() => NachrichtSLGA.GetSegmentLength();
|
||||||
public int SLLASegmentLength() => NachrichtSLLA.GetSegmentLength() + 2;
|
public int SLLASegmentLength() => NachrichtSLLA.GetSegmentLength();
|
||||||
|
|
||||||
public override List<Segment> GetSegments()
|
public override List<Segment> GetAllSegments()
|
||||||
{
|
{
|
||||||
var list = new List<Segment>() { SegmentSLGAUNH };
|
var list = new List<Segment>() { SegmentSLGAUNH };
|
||||||
list.AddRange(NachrichtSLGA.GetSegments());
|
list.AddRange(NachrichtSLGA.GetSegments());
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Dakota
|
namespace Dakota.Models
|
||||||
{
|
{
|
||||||
public enum Feldart
|
public enum Feldart
|
||||||
{
|
{
|
||||||
@@ -18,6 +18,20 @@ namespace Dakota
|
|||||||
Numerisch
|
Numerisch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum FeldartAuftragsdatei
|
||||||
|
{
|
||||||
|
Kann,
|
||||||
|
Muss,
|
||||||
|
MussBedingt
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum FeldtypAuftragsdatei
|
||||||
|
{
|
||||||
|
Numerisch,
|
||||||
|
Alpha,
|
||||||
|
Alphanumerisch
|
||||||
|
}
|
||||||
|
|
||||||
public enum Kassenart
|
public enum Kassenart
|
||||||
{
|
{
|
||||||
HKK,
|
HKK,
|
||||||
52
Dakota/Models/DakotaFile.cs
Normal file
52
Dakota/Models/DakotaFile.cs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
using BeWo.Data.Entities;
|
||||||
|
using BS.Shared.DataContracts;
|
||||||
|
using Dakota.Models;
|
||||||
|
using Dakota.Models.Auftragsdatei;
|
||||||
|
using Dakota.Models.Blocke;
|
||||||
|
using Dakota.Models.Infos;
|
||||||
|
using Dakota.Models.Nachrichten;
|
||||||
|
using Dakota.Models.Segmente;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace Dakota
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Nutzdatendatei mit Logik
|
||||||
|
/// </summary>
|
||||||
|
public class DakotaFile
|
||||||
|
{
|
||||||
|
internal BlockFile Nutzdatendatei { get; private set; }
|
||||||
|
internal Auftragsdatei Auftragsdatei { get; private set; }
|
||||||
|
|
||||||
|
internal string Verfahrenskennung => Auftragsdatei.AuftragssatzPart1.VerfahrenKennung.GetValue();
|
||||||
|
internal string Transfernummer => Auftragsdatei.AuftragssatzPart1.TransferNummer.GetValue();
|
||||||
|
|
||||||
|
internal DakotaFile()
|
||||||
|
{
|
||||||
|
Nutzdatendatei = new BlockFile();
|
||||||
|
Auftragsdatei = new Auftragsdatei();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetTransferName()
|
||||||
|
{
|
||||||
|
return Verfahrenskennung + Transfernummer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetNutzdatendatei()
|
||||||
|
{
|
||||||
|
return Nutzdatendatei.GetRows();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetAuftragsdatei()
|
||||||
|
{
|
||||||
|
return Auftragsdatei.GetRows();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return Nutzdatendatei.GetRows();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -34,7 +34,7 @@ namespace Dakota.Models.Daten
|
|||||||
if (!HasValue())
|
if (!HasValue())
|
||||||
{
|
{
|
||||||
if (Feldart == Feldart.Muss)
|
if (Feldart == Feldart.Muss)
|
||||||
{
|
{
|
||||||
// Auffüllen
|
// Auffüllen
|
||||||
throw new ArgumentOutOfRangeException(Title, _Value, "muss gefühlt sein");
|
throw new ArgumentOutOfRangeException(Title, _Value, "muss gefühlt sein");
|
||||||
// throw new NotImplementedException("Error Code: 3483091097896");
|
// throw new NotImplementedException("Error Code: 3483091097896");
|
||||||
@@ -65,6 +65,9 @@ namespace Dakota.Models.Daten
|
|||||||
}
|
}
|
||||||
public void SetValue(int value)
|
public void SetValue(int value)
|
||||||
{
|
{
|
||||||
|
if (Feldart == Feldart.Kann && value == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
SetValue(value.ToString());
|
SetValue(value.ToString());
|
||||||
}
|
}
|
||||||
public void SetValue(Schlüssel schlussel)
|
public void SetValue(Schlüssel schlussel)
|
||||||
|
|||||||
81
Dakota/Models/Daten/DatenelementAuftragsdatei.cs
Normal file
81
Dakota/Models/Daten/DatenelementAuftragsdatei.cs
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
using Dakota.Logic;
|
||||||
|
using Dakota.Models.Schlüssels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Dakota.Models.Daten
|
||||||
|
{
|
||||||
|
public class DatenelementAuftragsdatei : Dateneinheit
|
||||||
|
{
|
||||||
|
private protected string _Value;
|
||||||
|
|
||||||
|
public int Stellen { get; private set; }
|
||||||
|
public FeldartAuftragsdatei Feldart { get; private set; }
|
||||||
|
public FeldtypAuftragsdatei Feldtyp { get; private set; }
|
||||||
|
|
||||||
|
public DatenelementAuftragsdatei(string title, int count, FeldtypAuftragsdatei typ, FeldartAuftragsdatei art)
|
||||||
|
{
|
||||||
|
Title = title;
|
||||||
|
Stellen = count;
|
||||||
|
Feldart = art;
|
||||||
|
Feldtyp = typ;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string GetValue()
|
||||||
|
{
|
||||||
|
if (_Value.Length < Stellen || _Value.Length > Stellen)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException("Error Code: 3483091097897.2");
|
||||||
|
}
|
||||||
|
|
||||||
|
return _Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool HasValue()
|
||||||
|
{
|
||||||
|
return !string.IsNullOrEmpty(_Value);
|
||||||
|
}
|
||||||
|
public void SetValue(int value)
|
||||||
|
{
|
||||||
|
SetValue(value.ToString());
|
||||||
|
}
|
||||||
|
public void SetValue(Schlüssel schlussel)
|
||||||
|
{
|
||||||
|
if (schlussel is null)
|
||||||
|
return;
|
||||||
|
SetValue(schlussel.Value);
|
||||||
|
}
|
||||||
|
public void SetValue(string value)
|
||||||
|
{
|
||||||
|
// Berücksichtige jedes Update
|
||||||
|
if (value is null)
|
||||||
|
value = string.Empty;
|
||||||
|
|
||||||
|
if (value.Length > Stellen)
|
||||||
|
throw new NotImplementedException("#43442353313451");
|
||||||
|
|
||||||
|
switch (Feldtyp)
|
||||||
|
{
|
||||||
|
case FeldtypAuftragsdatei.Numerisch:
|
||||||
|
value = DakotaUtils.FillFromLeft(value, Stellen, '0');
|
||||||
|
break;
|
||||||
|
case FeldtypAuftragsdatei.Alpha:
|
||||||
|
value = DakotaUtils.FillFromRight(value, Stellen, ' ');
|
||||||
|
break;
|
||||||
|
case FeldtypAuftragsdatei.Alphanumerisch:
|
||||||
|
value = DakotaUtils.FillFromRight(value, Stellen, ' ');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new NotImplementedException("#434423533131324");
|
||||||
|
}
|
||||||
|
|
||||||
|
//DakotaValidator.ClearTextString(value);
|
||||||
|
|
||||||
|
_Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,7 +22,7 @@ namespace Dakota.Models.Infos
|
|||||||
public string VersichtertenWohnort { get; set; }
|
public string VersichtertenWohnort { get; set; }
|
||||||
public string VersichtertenLanderkennung { get; set; }
|
public string VersichtertenLanderkennung { get; set; }
|
||||||
|
|
||||||
public List<InfoAbrechnungsposition> DakotaInfosAbrechnungsposition { get; set; }
|
public List<InfoAbrechnungsposition> InfosAbrechnungsposition { get; set; }
|
||||||
|
|
||||||
public string Betriebsstättennummer { get; set; }
|
public string Betriebsstättennummer { get; set; }
|
||||||
public string LebenslangeArztnummer { get; set; }
|
public string LebenslangeArztnummer { get; set; }
|
||||||
@@ -32,7 +32,7 @@ namespace Dakota.Models.Infos
|
|||||||
public SchlüsselBVG KennzeichenBVGSonstiges { get; set; }
|
public SchlüsselBVG KennzeichenBVGSonstiges { get; set; }
|
||||||
public SchlüsselVerordnungsbesonderheiten KennzeichenVerordnungsbesonderheiten { get; set; }
|
public SchlüsselVerordnungsbesonderheiten KennzeichenVerordnungsbesonderheiten { get; set; }
|
||||||
|
|
||||||
public List<InfoDiagnosen> DakotaInfoDiagnosen { get; set; }
|
public List<InfoBlockDiagnosen> DakotaInfoDiagnosen { get; set; }
|
||||||
|
|
||||||
public string Genehmigungskennzeichen { get; set; }
|
public string Genehmigungskennzeichen { get; set; }
|
||||||
public DateTime? DatumDerGenehmigung { get; set; }
|
public DateTime? DatumDerGenehmigung { get; set; }
|
||||||
@@ -46,8 +46,8 @@ namespace Dakota.Models.Infos
|
|||||||
|
|
||||||
public InfoAbrechnungsfall()
|
public InfoAbrechnungsfall()
|
||||||
{
|
{
|
||||||
DakotaInfosAbrechnungsposition = new List<InfoAbrechnungsposition>();
|
InfosAbrechnungsposition = new List<InfoAbrechnungsposition>();
|
||||||
DakotaInfoDiagnosen = new List<InfoDiagnosen>();
|
DakotaInfoDiagnosen = new List<InfoBlockDiagnosen>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Dakota.Models.Infos
|
namespace Dakota.Models.Infos
|
||||||
{
|
{
|
||||||
internal class InfoDiagnosen
|
internal class InfoBlockDiagnosen
|
||||||
{
|
{
|
||||||
public string Diagnoseschlüssel { get; set; }
|
public string Diagnoseschlüssel { get; set; }
|
||||||
public string Diagnosetext { get; set; }
|
public string Diagnosetext { get; set; }
|
||||||
@@ -13,9 +13,13 @@ namespace Dakota.Models.Infos
|
|||||||
|
|
||||||
public List<InfoBlockKvKarte> BlockKvKarte { get; set; }
|
public List<InfoBlockKvKarte> BlockKvKarte { get; set; }
|
||||||
|
|
||||||
public InfoBlockKostentrager()
|
public InfoBlockKostentrager(string kostentrager)
|
||||||
{
|
{
|
||||||
BlockKvKarte = new List<InfoBlockKvKarte>();
|
BlockKvKarte = new List<InfoBlockKvKarte>();
|
||||||
|
|
||||||
|
IKKostentrager = kostentrager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string IKKostentrager { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,5 +13,12 @@ namespace Dakota.Models.Infos
|
|||||||
|
|
||||||
public InfoNachricht DakotaInfoSLLA { get; set; }
|
public InfoNachricht DakotaInfoSLLA { get; set; }
|
||||||
public InfoNachrichtSLLA DakotaInfoNachrichtSLLA { get; set; }
|
public InfoNachrichtSLLA DakotaInfoNachrichtSLLA { get; set; }
|
||||||
|
|
||||||
|
public InfoBlockKvKarte(string ikkvkarte)
|
||||||
|
{
|
||||||
|
IKKrankenkasseKVKarte = ikkvkarte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string IKKrankenkasseKVKarte { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,206 +0,0 @@
|
|||||||
using BeWo.Data.Entities;
|
|
||||||
using Dakota.Models.Schlüssels;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Dakota.Models.Infos
|
|
||||||
{
|
|
||||||
public class InfoCreator
|
|
||||||
{
|
|
||||||
public static InvoiceItem InvoiceItem { get; set; }
|
|
||||||
public static ServiceInvoicePeriod ServiceInvoicePeriod { get; set; }
|
|
||||||
public static ServiceInvoice ServiceInvoice { get; set; }
|
|
||||||
public static InvoiceBase InvoiceBase { get; set; }
|
|
||||||
public static Customer Customer { get; set; }
|
|
||||||
|
|
||||||
public int NachrichtenRefenrenz { get; set; }
|
|
||||||
|
|
||||||
public string Absender => "123456789";
|
|
||||||
public string Kostentrager => "111222333";
|
|
||||||
public string Empfang => "222333444";
|
|
||||||
public string Kvkarte => "333444555";
|
|
||||||
public string Versichertenstatus => "55555";
|
|
||||||
|
|
||||||
public InfoCreator()
|
|
||||||
{
|
|
||||||
NachrichtenRefenrenz = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal int GetNextRefNumber()
|
|
||||||
{
|
|
||||||
return ++NachrichtenRefenrenz;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal InfoFile GetDakotaInfoFile()
|
|
||||||
{
|
|
||||||
var info = new InfoFile();
|
|
||||||
|
|
||||||
info.SyntaxKennung = "UNOC";
|
|
||||||
info.SyntaxVersion = "3";
|
|
||||||
info.Absenderbezeichnung = Absender;
|
|
||||||
info.Empfangerbezeichnung = Empfang;
|
|
||||||
info.Created = DateTime.Now;
|
|
||||||
info.Datenaustauschreferenz = 1;
|
|
||||||
info.Leistungsbereich = SchlüsselLeistungserbringerSammelgruppenschlussel.SoziotherapeutischerLeistungserbringer;
|
|
||||||
info.Anwendungsreferenz = "testdateiaa";
|
|
||||||
info.Testindikator = SchlüsselTestindikator.Testdatei;
|
|
||||||
|
|
||||||
info.BlockKostentragers.Add(GetDakotaInfoBlockKostentrager());
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal InfoBlockKostentrager GetDakotaInfoBlockKostentrager()
|
|
||||||
{
|
|
||||||
var info = new InfoBlockKostentrager();
|
|
||||||
|
|
||||||
info.DakotaInfoSLGA = GetDakotaInfoNachricht(true);
|
|
||||||
info.DakotaInfoNachrichtSLGA = GetDakotaInfoNachrichtSLGA();
|
|
||||||
info.BlockKvKarte.Add(GetDakotaInfoBlockKvKarte());
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal InfoBlockKvKarte GetDakotaInfoBlockKvKarte()
|
|
||||||
{
|
|
||||||
var info = new InfoBlockKvKarte();
|
|
||||||
|
|
||||||
info.DakotaInfoSLGA = GetDakotaInfoNachricht(true);
|
|
||||||
info.DakotaInfoNachrichtSLGA = GetDakotaInfoNachrichtSLGA();
|
|
||||||
info.DakotaInfoSLLA = GetDakotaInfoNachricht(false);
|
|
||||||
info.DakotaInfoNachrichtSLLA = GetDakotaInfoNachrichtSLLA();
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal InfoNachricht GetDakotaInfoNachricht(bool isSLGA)
|
|
||||||
{
|
|
||||||
var info = new InfoNachricht();
|
|
||||||
var typ = isSLGA ? "SLGA" : "SLLA";
|
|
||||||
|
|
||||||
info.Nachrichtenreferenznummer = GetNextRefNumber();
|
|
||||||
info.NachrichtenTypKennung = typ;
|
|
||||||
info.NachrichtenVersionsnummer = "18";
|
|
||||||
info.NachrichtenFreigabeNrTages = "0";
|
|
||||||
info.NachrichtenVerwaltendeOrganisation = "0";
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal InfoNachrichtSLGA GetDakotaInfoNachrichtSLGA()
|
|
||||||
{
|
|
||||||
var info = new InfoNachrichtSLGA();
|
|
||||||
|
|
||||||
info.Verarbeitungskennzeichen = SchlüsselVerarbeitungskennzeichen.AbrechnungOhneBesonderheit;
|
|
||||||
info.IKAbsender = Absender;
|
|
||||||
info.IKKostentrager = Kostentrager;
|
|
||||||
info.IKKVKarte = Kvkarte;
|
|
||||||
info.IKLeistungserbringer = Absender;
|
|
||||||
|
|
||||||
info.Rechnungsnummer = InvoiceBase.InvoiceNumber;
|
|
||||||
info.Rechnungsdatum = InvoiceBase.InvoiceDate.Value;
|
|
||||||
info.Rechnungsart = SchlüsselRechnungsart.AbrechnungVonLeistungserbringer;
|
|
||||||
|
|
||||||
info.Summenstatus00 = SchlüsselSummenstatus.Gesamtsumme;
|
|
||||||
info.Gesamtbruttobetrag00 = InvoiceItem.AmountTotal.Value;
|
|
||||||
info.GesamtbetragZuzahlung00 = 5;
|
|
||||||
info.Gesamtrechnungsbetrag00 = info.Gesamtbruttobetrag00 - info.GesamtbetragZuzahlung00;
|
|
||||||
|
|
||||||
info.Summenstatus = SchlüsselSummenstatus.Mitglieder;
|
|
||||||
info.Gesamtbruttobetrag = InvoiceItem.AmountTotal.Value;
|
|
||||||
info.GesamtbetragZuzahlung = 5;
|
|
||||||
info.Gesamtrechnungsbetrag = info.Gesamtbruttobetrag00 - info.GesamtbetragZuzahlung00;
|
|
||||||
|
|
||||||
info.Name1 = "Name";
|
|
||||||
info.Name2 = "Ansprechpartner";
|
|
||||||
info.Name3 = "Nummer";
|
|
||||||
info.Name4 = "EMail";
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal InfoNachrichtSLLA GetDakotaInfoNachrichtSLLA()
|
|
||||||
{
|
|
||||||
var info = new InfoNachrichtSLLA();
|
|
||||||
|
|
||||||
info.Verarbeitungskennzeichen = SchlüsselVerarbeitungskennzeichen.AbrechnungOhneBesonderheit;
|
|
||||||
info.IKAbsender = Absender;
|
|
||||||
info.IKKostentrager = Kostentrager;
|
|
||||||
info.IKKVKarte = Kvkarte;
|
|
||||||
info.IKLeistungserbringer = Absender;
|
|
||||||
|
|
||||||
info.Rechnungsnummer = InvoiceBase.InvoiceNumber;
|
|
||||||
info.Rechnungsdatum = InvoiceBase.InvoiceDate.Value;
|
|
||||||
info.Rechnungsart = SchlüsselRechnungsart.AbrechnungVonLeistungserbringer;
|
|
||||||
|
|
||||||
info.Abrechnungsfalle = new List<InfoAbrechnungsfall>();
|
|
||||||
info.Abrechnungsfalle.Add(GetDakotaInfoAbrechnungsfall());
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal InfoAbrechnungsfall GetDakotaInfoAbrechnungsfall()
|
|
||||||
{
|
|
||||||
var info = new InfoAbrechnungsfall();
|
|
||||||
|
|
||||||
info.VersichtertenNummer = Kvkarte;
|
|
||||||
info.Versichertenstatus = Versichertenstatus;
|
|
||||||
info.Beleginformation = SchlüsselBeleginformation.KeineBeleguebermittlung;
|
|
||||||
info.Belegnummer = "444444444";
|
|
||||||
|
|
||||||
info.VersichtertenVorname = Customer.Person.FirstName;
|
|
||||||
info.VersichtertenNachname = Customer.Person.LastName;
|
|
||||||
info.VersichtertenGeburtstag = Customer.Person.DateOfBirth.Value;
|
|
||||||
info.VersichtertenStraßeNr = Customer.Person.Address.Street;
|
|
||||||
info.VersichtertenPLZ = Customer.Person.Address.PostalCode;
|
|
||||||
info.VersichtertenWohnort = Customer.Person.Address.Town;
|
|
||||||
info.VersichtertenLanderkennung = null;
|
|
||||||
|
|
||||||
info.DakotaInfosAbrechnungsposition.Add(GetDakotaInfoAbrechnungsposition());
|
|
||||||
|
|
||||||
// Kann
|
|
||||||
|
|
||||||
info.DakotaInfoDiagnosen.Add(GetDakotaInfoDiagnosen());
|
|
||||||
|
|
||||||
info.GesamtbetragGesetzlicheZuzahlung = 0;
|
|
||||||
info.GesamtbetragProzentualeZuzahlung = 0;
|
|
||||||
info.PauschalerZuzahlungsbetrag = 0;
|
|
||||||
info.GesamtbetragEigenanteil = 0;
|
|
||||||
info.GesamtbetragBrutto = 0;
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal InfoAbrechnungsposition GetDakotaInfoAbrechnungsposition()
|
|
||||||
{
|
|
||||||
var info = new InfoAbrechnungsposition();
|
|
||||||
|
|
||||||
info.Identifikationsnummer = "111";
|
|
||||||
info.Abrechnungscode = SchlüsselAbrechnungscodes.SoziotherapeutischerLeistungserbringer;
|
|
||||||
|
|
||||||
info.TarifkennzeichenBereich = SchlüsselTarifkennzeichenBereich.NordRheinWestfalen;
|
|
||||||
info.TarifkennzeichenSondertarif = SchlüsselTarifkennzeichenSondertarif.OhneBesonderheiten;
|
|
||||||
|
|
||||||
info.AbrechnungspositionArtDerEinrichtung = SchlüsselPosArtDerEinrichtung.SoziotherapeutischerLeistungserbringer;
|
|
||||||
info.AbrechnungspositionBehandlungsart = SchlüsselPosBehandlungsart.Einzelbehandlung;
|
|
||||||
info.AbrechnungspositionVergütungsart = SchlüsselPosVergütungsart.Gruppenbehandlung90Minuten9Teilnehmer;
|
|
||||||
|
|
||||||
info.AnzahlMenge = InvoiceItem.UnitCount.Value;
|
|
||||||
info.EinzelbetragAbrechnungsposition = InvoiceItem.AmountTotal.Value;
|
|
||||||
info.DatumDerLeistungserbringung = InvoiceBase.InvoiceDate.Value;
|
|
||||||
info.BetragZuzahlung = 0;
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal InfoDiagnosen GetDakotaInfoDiagnosen()
|
|
||||||
{
|
|
||||||
var info = new InfoDiagnosen();
|
|
||||||
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
58
Dakota/Models/Infos/InfoDateiAuftrags.cs
Normal file
58
Dakota/Models/Infos/InfoDateiAuftrags.cs
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Dakota.Models.Infos
|
||||||
|
{
|
||||||
|
public class InfoDateiAuftrags
|
||||||
|
{
|
||||||
|
public int Identifikator { get; set; }
|
||||||
|
public int Version { get; set; }
|
||||||
|
public int LangeAuftrag { get; set; }
|
||||||
|
public int SequenzNummer { get; set; }
|
||||||
|
|
||||||
|
public string VerfahrenKennung { get; set; }
|
||||||
|
public int TransferNummer { get; set; }
|
||||||
|
public string VerfahrenKennungSpezifikation { get; set; }
|
||||||
|
public string AbsenderEigner { get; set; }
|
||||||
|
|
||||||
|
public string AbsenderPhysikalisch { get; set; }
|
||||||
|
public string EmpfangerNutzer { get; set; }
|
||||||
|
public string EmpfangerPhysikalisch { get; set; }
|
||||||
|
public int FehlerNummer { get; set; }
|
||||||
|
|
||||||
|
public int FehlerMassnahme { get; set; }
|
||||||
|
public string Dateiname { get; set; }
|
||||||
|
public string DatumErstellung { get; set; }
|
||||||
|
public string DatumUbertragungGesendet { get; set; }
|
||||||
|
|
||||||
|
public string DatumUbertragungEmpfangenStart { get; set; }
|
||||||
|
public string DatumUbertragungEmpfangenEnde { get; set; }
|
||||||
|
public int DateiVersion { get; set; }
|
||||||
|
public int Korrektur { get; set; }
|
||||||
|
|
||||||
|
public int DateigrosseNutzdaten { get; set; }
|
||||||
|
public int DateigrosseUbertragung { get; set; }
|
||||||
|
public string Zeichensatz { get; set; }
|
||||||
|
public int Komprimierung { get; set; }
|
||||||
|
|
||||||
|
public int Verschlusselungsart { get; set; }
|
||||||
|
public int ElektronischeUnterschrift { get; set; }
|
||||||
|
|
||||||
|
public string Satzformat { get; set; }
|
||||||
|
public int Satzlange { get; set; }
|
||||||
|
public int Blocklange { get; set; }
|
||||||
|
|
||||||
|
public string Status { get; set; }
|
||||||
|
public int Wiederholung { get; set; }
|
||||||
|
public int Übertragungsweg { get; set; }
|
||||||
|
public int VerzögerterVersand { get; set; }
|
||||||
|
public int InfoUndFehlerFelder { get; set; }
|
||||||
|
public string VariablesInfoFeld { get; set; }
|
||||||
|
|
||||||
|
public string EMailAdresseAbsender { get; set; }
|
||||||
|
public string DateiBezeichnung { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ namespace Dakota.Models.Infos
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Klasse zum Erzeugen von Dakota Files
|
/// Klasse zum Erzeugen von Dakota Files
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class InfoFile
|
public class InfoDateiNutzdaten
|
||||||
{
|
{
|
||||||
private int _Datenaustauschreferenz;
|
private int _Datenaustauschreferenz;
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ namespace Dakota.Models.Infos
|
|||||||
|
|
||||||
internal List<InfoBlockKostentrager> BlockKostentragers { get; set; }
|
internal List<InfoBlockKostentrager> BlockKostentragers { get; set; }
|
||||||
|
|
||||||
public InfoFile()
|
public InfoDateiNutzdaten()
|
||||||
{
|
{
|
||||||
BlockKostentragers = new List<InfoBlockKostentrager>();
|
BlockKostentragers = new List<InfoBlockKostentrager>();
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ namespace Dakota.Models.Infos
|
|||||||
public SchlüsselVerarbeitungskennzeichen Verarbeitungskennzeichen { get; set; }
|
public SchlüsselVerarbeitungskennzeichen Verarbeitungskennzeichen { get; set; }
|
||||||
public string IKAbsender { get; set; }
|
public string IKAbsender { get; set; }
|
||||||
public string IKLeistungserbringer { get; set; }
|
public string IKLeistungserbringer { get; set; }
|
||||||
public string IKKVKarte { get; set; }
|
public string IKKvKarte { get; set; }
|
||||||
public string IKKostentrager { get; set; }
|
public string IKKostentrager { get; set; }
|
||||||
|
|
||||||
public string Rechnungsnummer { get; set; }
|
public string Rechnungsnummer { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace Dakota.Models.Infos
|
|||||||
public SchlüsselVerarbeitungskennzeichen Verarbeitungskennzeichen { get; set; }
|
public SchlüsselVerarbeitungskennzeichen Verarbeitungskennzeichen { get; set; }
|
||||||
public string IKAbsender { get; set; }
|
public string IKAbsender { get; set; }
|
||||||
public string IKLeistungserbringer { get; set; }
|
public string IKLeistungserbringer { get; set; }
|
||||||
public string IKKVKarte { get; set; }
|
public string IKKvKarte { get; set; }
|
||||||
public string IKKostentrager { get; set; }
|
public string IKKostentrager { get; set; }
|
||||||
|
|
||||||
public string Rechnungsnummer { get; set; }
|
public string Rechnungsnummer { get; set; }
|
||||||
|
|||||||
@@ -9,11 +9,16 @@ namespace Dakota.Models.Nachrichten
|
|||||||
{
|
{
|
||||||
internal abstract class Nachricht : IRow
|
internal abstract class Nachricht : IRow
|
||||||
{
|
{
|
||||||
public abstract List<Segment> GetSegments();
|
public abstract List<Segment> GetAllSegments();
|
||||||
|
|
||||||
|
public List<Segment> GetSegments()
|
||||||
|
{
|
||||||
|
return GetAllSegments().Where(x => !x.ShouldSkip()).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public int GetSegmentLength()
|
public int GetSegmentLength()
|
||||||
{
|
{
|
||||||
return GetSegments().Count;
|
return GetSegments().Count + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetRows()
|
public string GetRows()
|
||||||
@@ -26,9 +31,6 @@ namespace Dakota.Models.Nachrichten
|
|||||||
|
|
||||||
foreach (var seg in segs)
|
foreach (var seg in segs)
|
||||||
{
|
{
|
||||||
if (seg.ShouldSkip())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
res.Add(seg.GetRow());
|
res.Add(seg.GetRow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace Dakota.Models.Nachrichten
|
|||||||
SegmentNAM = new SegmentSLGANAM();
|
SegmentNAM = new SegmentSLGANAM();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<Segment> GetSegments()
|
public override List<Segment> GetAllSegments()
|
||||||
{
|
{
|
||||||
var res = new List<Segment>();
|
var res = new List<Segment>();
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ namespace Dakota.Models.Nachrichten
|
|||||||
SegmentFKT.Verarbeitungskennzeichen.SetValue(info.Verarbeitungskennzeichen);
|
SegmentFKT.Verarbeitungskennzeichen.SetValue(info.Verarbeitungskennzeichen);
|
||||||
SegmentFKT.IKLeistungserbringers.SetValue(info.IKLeistungserbringer);
|
SegmentFKT.IKLeistungserbringers.SetValue(info.IKLeistungserbringer);
|
||||||
SegmentFKT.IKKostenträger.SetValue(info.IKKostentrager);
|
SegmentFKT.IKKostenträger.SetValue(info.IKKostentrager);
|
||||||
SegmentFKT.IKKrankenkasseKVKarte.SetValue(info.IKKVKarte);
|
SegmentFKT.IKKrankenkasseKVKarte.SetValue(info.IKKvKarte);
|
||||||
SegmentFKT.IKAbsender.SetValue(info.IKAbsender);
|
SegmentFKT.IKAbsender.SetValue(info.IKAbsender);
|
||||||
|
|
||||||
SegmentREC.SammelRechnungsnummer.SetValue(info.Rechnungsnummer);
|
SegmentREC.SammelRechnungsnummer.SetValue(info.Rechnungsnummer);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace Dakota.Models.Nachrichten
|
|||||||
Abrechnungsfalle = new List<BlockAbrechnungsfall>();
|
Abrechnungsfalle = new List<BlockAbrechnungsfall>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<Segment> GetSegments()
|
public override List<Segment> GetAllSegments()
|
||||||
{
|
{
|
||||||
var list = new List<Segment>() { SegmentSLLAFKT, SegmentSLLAREC };
|
var list = new List<Segment>() { SegmentSLLAFKT, SegmentSLLAREC };
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ namespace Dakota.Models.Nachrichten
|
|||||||
SegmentSLLAFKT.Verarbeitungskennzeichen.SetValue(info.Verarbeitungskennzeichen);
|
SegmentSLLAFKT.Verarbeitungskennzeichen.SetValue(info.Verarbeitungskennzeichen);
|
||||||
SegmentSLLAFKT.IKLeistungserbringers.SetValue(info.IKLeistungserbringer);
|
SegmentSLLAFKT.IKLeistungserbringers.SetValue(info.IKLeistungserbringer);
|
||||||
SegmentSLLAFKT.IKKostenträgers.SetValue(info.IKKostentrager);
|
SegmentSLLAFKT.IKKostenträgers.SetValue(info.IKKostentrager);
|
||||||
SegmentSLLAFKT.IKKVKarte.SetValue(info.IKKVKarte);
|
SegmentSLLAFKT.IKKVKarte.SetValue(info.IKKvKarte);
|
||||||
SegmentSLLAFKT.IKRechnungsstellers.SetValue(info.IKAbsender);
|
SegmentSLLAFKT.IKRechnungsstellers.SetValue(info.IKAbsender);
|
||||||
|
|
||||||
foreach (var infofall in info.Abrechnungsfalle)
|
foreach (var infofall in info.Abrechnungsfalle)
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ namespace Dakota.Models.Segmente.SLLA
|
|||||||
Uhrzeit = new DatenelementDateTime("Uhrzeit", 4, "HHmm", Feldart.Kann);
|
Uhrzeit = new DatenelementDateTime("Uhrzeit", 4, "HHmm", Feldart.Kann);
|
||||||
UhrzeitBis = new DatenelementDateTime("UhrzeitBis", 4, "HHmm", Feldart.Kann);
|
UhrzeitBis = new DatenelementDateTime("UhrzeitBis", 4, "HHmm", Feldart.Kann);
|
||||||
Dauer = new Datenelement("Dauer", 0, 4, Feldart.Kann);
|
Dauer = new Datenelement("Dauer", 0, 4, Feldart.Kann);
|
||||||
VersorgungszeitraumVon = new DatenelementDateTime("VersorgungszeitraumVon", 8, "yyyyMMdd", Feldart.Kann);
|
VersorgungszeitraumVon = new DatenelementDateTime("VersorgungszeitraumVon", 8, "yyyyMMdd", Feldart.Kann);
|
||||||
VersorgungszeitraumBis = new DatenelementDateTime("VersorgungszeitraumBis", 8, "yyyyMMdd", Feldart.Kann);
|
|
||||||
VersorgungszeitraumBis = new DatenelementDateTime("VersorgungszeitraumBis", 8, "yyyyMMdd", Feldart.Kann);
|
VersorgungszeitraumBis = new DatenelementDateTime("VersorgungszeitraumBis", 8, "yyyyMMdd", Feldart.Kann);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ using BeWo.Service.Plugins;
|
|||||||
using BeWo.Service.SBD;
|
using BeWo.Service.SBD;
|
||||||
using BeWo.Service.Security;
|
using BeWo.Service.Security;
|
||||||
using BeWo.Service.ServiceContracts;
|
using BeWo.Service.ServiceContracts;
|
||||||
using BeWo.Service.ServiceUtils.Generell;
|
|
||||||
using BeWo.Service.Vorlagen;
|
using BeWo.Service.Vorlagen;
|
||||||
using BS.Shared;
|
using BS.Shared;
|
||||||
using BS.Shared.Core;
|
using BS.Shared.Core;
|
||||||
@@ -24,8 +23,7 @@ using BS.Shared.DataContracts.Compact;
|
|||||||
using BS.Shared.DataContracts.Reports;
|
using BS.Shared.DataContracts.Reports;
|
||||||
using BS.Shared.Extensions;
|
using BS.Shared.Extensions;
|
||||||
using BS.Shared.Services;
|
using BS.Shared.Services;
|
||||||
using Dakota;
|
using Dakota.Logic;
|
||||||
using Dakota.Models.Infos;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using RestSharp;
|
using RestSharp;
|
||||||
using System;
|
using System;
|
||||||
@@ -7706,28 +7704,54 @@ namespace BeWo.Service.ServiceImplementations
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Hier Input Daten Aufbrechen und jeweils den Files zuordnen
|
var baseoid = Convert.ToInt64(param);
|
||||||
|
|
||||||
// Dann jeweils Info erzeugen
|
var invoicebase = DAOFactory.GenericDAO.GetByID<InvoiceBase>(baseoid);
|
||||||
|
var service = DAOFactory.SearchDAO.GetServiceInvoiceByInvoiceBaseOid(baseoid);
|
||||||
|
|
||||||
// Und final dann Datei(en)
|
var paras = new List<DakotaInfoCreator.InfoCreatorParameter>();
|
||||||
|
|
||||||
var year = 2023;
|
foreach (var period in service.ServiceInvoicePeriodList)
|
||||||
var month = 6;
|
{
|
||||||
|
foreach (var item in period.InvoiceItemList)
|
||||||
|
{
|
||||||
|
var para = new DakotaInfoCreator.InfoCreatorParameter();
|
||||||
|
|
||||||
var rechnungsnummer = "xyz";
|
para.InvoiceItem = item;
|
||||||
|
para.ServiceInvoice = service;
|
||||||
|
para.ServiceInvoicePeriod = period;
|
||||||
|
para.InvoiceBase = invoicebase;
|
||||||
|
para.Customer = period.Customer;
|
||||||
|
|
||||||
InfoCreator.InvoiceItem = DAOFactory.GenericDAO.GetByID<InvoiceItem>(24);
|
paras.Add(para);
|
||||||
InfoCreator.ServiceInvoicePeriod = DAOFactory.GenericDAO.GetByID<ServiceInvoicePeriod>(18);
|
}
|
||||||
InfoCreator.ServiceInvoice = DAOFactory.GenericDAO.GetByID<ServiceInvoice>(29);
|
}
|
||||||
InfoCreator.InvoiceBase = DAOFactory.GenericDAO.GetByID<InvoiceBase>(33);
|
|
||||||
InfoCreator.Customer = DAOFactory.GenericDAO.GetByID<Customer>(8);
|
|
||||||
|
|
||||||
var code = DakotaFileCreator.GenerateDakotaFilesByMonth(year, month);
|
var month = invoicebase.InvoiceDate.Value.Month;
|
||||||
|
var para2 = new DakotaInfoCreator.InfoCreatorParameter2(month);
|
||||||
|
|
||||||
|
var code = DakotaFileCreator.GenerateDakotaFile(paras, para2);
|
||||||
|
|
||||||
|
var transferdateiname = code.GetTransferName();
|
||||||
|
|
||||||
var path = @"C:\Projects\out";
|
var path = @"C:\Projects\out";
|
||||||
|
var pathauf = @"C:\Projects\out.auf";
|
||||||
|
var path2 = $@"C:\dakotale\TP5Daten\{para2.IKAbsender}\{transferdateiname}";
|
||||||
|
var path2auf = $@"C:\dakotale\TP5Daten\{para2.IKAbsender}\{transferdateiname}.auf";
|
||||||
|
var path3 = $@"C:\dakotale\TP5Daten\{para2.IKAbsender}";
|
||||||
|
|
||||||
File.WriteAllText(path, code.FirstOrDefault());
|
var auftragsdatei = code.GetAuftragsdatei();
|
||||||
|
var nutzdatendatei = code.GetNutzdatendatei();
|
||||||
|
|
||||||
|
var auftragsdatei2 = Encoding.GetEncoding("ISO-8859-1").GetBytes(auftragsdatei);
|
||||||
|
|
||||||
|
Directory.CreateDirectory(path3);
|
||||||
|
File.WriteAllText(path2, nutzdatendatei);
|
||||||
|
File.WriteAllBytes(path2auf, auftragsdatei2);
|
||||||
|
|
||||||
|
|
||||||
|
File.WriteAllText(path, nutzdatendatei);
|
||||||
|
File.WriteAllBytes(pathauf, auftragsdatei2);
|
||||||
|
|
||||||
|
|
||||||
//var baseoid = long.Parse((string)param);
|
//var baseoid = long.Parse((string)param);
|
||||||
@@ -7735,10 +7759,10 @@ namespace BeWo.Service.ServiceImplementations
|
|||||||
//var accounting = new AccountingServiceImp();
|
//var accounting = new AccountingServiceImp();
|
||||||
|
|
||||||
//var invoice = accounting.GetServiceInvoiceByInvoiceBaseOid(baseoid);
|
//var invoice = accounting.GetServiceInvoiceByInvoiceBaseOid(baseoid);
|
||||||
|
|
||||||
//var code = DakotaFileCreator.GenerateAsciiCode(invoice);
|
//var code = DakotaFileCreator.GenerateAsciiCode(invoice);
|
||||||
|
|
||||||
return code.FirstOrDefault();
|
return nutzdatendatei;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -292,7 +292,6 @@
|
|||||||
<Compile Include="DataContracts\Reports\AuslastungAnalysisSupportConceptDC.cs" />
|
<Compile Include="DataContracts\Reports\AuslastungAnalysisSupportConceptDC.cs" />
|
||||||
<Compile Include="DataContracts\ServiceRecordHistoryDC.cs" />
|
<Compile Include="DataContracts\ServiceRecordHistoryDC.cs" />
|
||||||
<Compile Include="DataContracts\SupportPinDC.cs" />
|
<Compile Include="DataContracts\SupportPinDC.cs" />
|
||||||
<Compile Include="Extensions\DakotaExtensions.cs" />
|
|
||||||
<Compile Include="Extensions\EnumExtensions.cs" />
|
<Compile Include="Extensions\EnumExtensions.cs" />
|
||||||
<Compile Include="Extensions\GridExtensions.cs" />
|
<Compile Include="Extensions\GridExtensions.cs" />
|
||||||
<Compile Include="Extensions\ICollectionExtensions.cs" />
|
<Compile Include="Extensions\ICollectionExtensions.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user