45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using Dakota.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Dakota
|
|
{
|
|
public class DakotaFileGenerator
|
|
{
|
|
internal SozioTherapieDatei SozioTherapieDatei { get; set; }
|
|
|
|
public DakotaFileGenerator()
|
|
{
|
|
SozioTherapieDatei = new SozioTherapieDatei();
|
|
}
|
|
|
|
public void Generate()
|
|
{
|
|
var now = DateTime.Now;
|
|
|
|
GenerateUNB(now);
|
|
}
|
|
|
|
public void GenerateUNB(DateTime created)
|
|
{
|
|
SozioTherapieDatei.UNB.SyntaxKennung.SetValue("UNOC");
|
|
SozioTherapieDatei.UNB.SyntaxVersionsnummer.SetValue("3");
|
|
//SozioTherapieDatei.UNB.Absenderdatei
|
|
// - IK
|
|
//SozioTherapieDatei.UNB.Empfangdatei
|
|
// - IK
|
|
SozioTherapieDatei.UNB.Datum.SetValue(created.ToString("yyyyMMdd"));
|
|
SozioTherapieDatei.UNB.Uhrzeit.SetValue(created.ToString("HHmm"));
|
|
//SozioTherapieDatei.UNB.Datenaustauschreferenz
|
|
// - Fortlaufende Nummer
|
|
SozioTherapieDatei.UNB.Leistungsbereich.SetValue("O");
|
|
//SozioTherapieDatei.UNB.Anwengundsreferenz
|
|
// - Logischer Dateiname
|
|
SozioTherapieDatei.UNB.Testindikator.SetValue("0");
|
|
}
|
|
}
|
|
}
|