-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,335 additions
and
374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.24720.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DTAAuftragsdateiAnalysator", "DTAAuftragsdateiAnalysator\DTAAuftragsdateiAnalysator.csproj", "{74E1EFF9-FCB4-48BC-8B33-8945FCF68AAA}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{74E1EFF9-FCB4-48BC-8B33-8945FCF68AAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{74E1EFF9-FCB4-48BC-8B33-8945FCF68AAA}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{74E1EFF9-FCB4-48BC-8B33-8945FCF68AAA}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{74E1EFF9-FCB4-48BC-8B33-8945FCF68AAA}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Application x:Class="DTAAuftragsdateiAnalysator.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:DTAAuftragsdateiAnalysator" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
|
||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace DTAAuftragsdateiAnalysator | ||
{ | ||
/// <summary> | ||
/// Interaktionslogik für "App.xaml" | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace DTAAuftragsdateiAnalysator | ||
{ | ||
/// <summary> | ||
/// <seealso cref="https://www.gkv-datenaustausch.de/media/dokumente/leistungserbringer_1/pflege/technische_anlagen_aktuell_2/TA3_20121119_105.pdf"/> | ||
/// Abbildung der Tabelle in Anlage 2 für Pflege. Aktuellere Version ist bei Sonstigen Leistungserbringern | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)] | ||
public class AuftragAttribute : Attribute | ||
{ | ||
public int Stelle { get; set; } | ||
public int Länge { get; set; } | ||
public string Nutzungstyp { get; set; } | ||
public string Feldtyp { get; set; } | ||
public string Feldart { get; set; } | ||
public string Gruppe { get; set; } | ||
public string Beschreibung { get; set; } | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
110 changes: 110 additions & 0 deletions
110
DTAAuftragsdateiAnalysator/DTAAuftragsdateiAnalysator.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{74E1EFF9-FCB4-48BC-8B33-8945FCF68AAA}</ProjectGuid> | ||
<OutputType>WinExe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>DTAAuftragsdateiAnalysator</RootNamespace> | ||
<AssemblyName>DTAAuftragsdateiAnalysator</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<WarningLevel>4</WarningLevel> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xaml"> | ||
<RequiredTargetFramework>4.0</RequiredTargetFramework> | ||
</Reference> | ||
<Reference Include="WindowsBase" /> | ||
<Reference Include="PresentationCore" /> | ||
<Reference Include="PresentationFramework" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ApplicationDefinition Include="App.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</ApplicationDefinition> | ||
<Compile Include="AuftragAttribute.cs" /> | ||
<Compile Include="Auftragsdatei.cs" /> | ||
<Compile Include="View.cs" /> | ||
<Page Include="MainWindow.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</Page> | ||
<Compile Include="App.xaml.cs"> | ||
<DependentUpon>App.xaml</DependentUpon> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
<Compile Include="MainWindow.xaml.cs"> | ||
<DependentUpon>MainWindow.xaml</DependentUpon> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Properties\AssemblyInfo.cs"> | ||
<SubType>Code</SubType> | ||
</Compile> | ||
<Compile Include="Properties\Resources.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DesignTime>True</DesignTime> | ||
<DependentUpon>Resources.resx</DependentUpon> | ||
</Compile> | ||
<Compile Include="Properties\Settings.Designer.cs"> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>Settings.settings</DependentUpon> | ||
<DesignTimeSharedInput>True</DesignTimeSharedInput> | ||
</Compile> | ||
<EmbeddedResource Include="Properties\Resources.resx"> | ||
<Generator>ResXFileCodeGenerator</Generator> | ||
<LastGenOutput>Resources.Designer.cs</LastGenOutput> | ||
</EmbeddedResource> | ||
<None Include="Properties\Settings.settings"> | ||
<Generator>SettingsSingleFileGenerator</Generator> | ||
<LastGenOutput>Settings.Designer.cs</LastGenOutput> | ||
</None> | ||
<AppDesigner Include="Properties\" /> | ||
<None Include="Testdatei\TPFL0001.auf" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
6 changes: 6 additions & 0 deletions
6
DTAAuftragsdateiAnalysator/DTAAuftragsdateiAnalysator.csproj.user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ProjectView>ShowAllFiles</ProjectView> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<Window x:Class="DTAAuftragsdateiAnalysator.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:DTAAuftragsdateiAnalysator" | ||
mc:Ignorable="d" x:Name="Win" | ||
Title="MainWindow" Height="350" Width="525"> | ||
<Grid> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="25"/> | ||
<RowDefinition/> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition/> | ||
<ColumnDefinition Width="80"/> | ||
</Grid.ColumnDefinitions> | ||
|
||
<TextBox Grid.Row="0" Grid.Column="0" Name="OpenFile" Margin="1" IsReadOnly="True"/> | ||
<Button Grid.Row="0" Grid.Column="1" Content="Öffnen" Margin="1" Click="Button_Click"/> | ||
<DataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" ItemsSource="{Binding Path=Data, ElementName=Win}" Background="{Binding Path=Valid, ElementName=Win}" /> | ||
</Grid> | ||
|
||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
using Microsoft.Win32; | ||
using System.Collections.ObjectModel; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
using System.Windows; | ||
using System.Windows.Media; | ||
|
||
namespace DTAAuftragsdateiAnalysator | ||
{ | ||
/// <summary> | ||
/// Interaktionslogik für MainWindow.xaml | ||
/// </summary> | ||
public partial class MainWindow : Window | ||
{ | ||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
private void Button_Click(object sender, RoutedEventArgs e) | ||
{ | ||
OpenFileDialog openFileDialog = new OpenFileDialog(); | ||
if (openFileDialog.ShowDialog() == true) | ||
{ | ||
OpenFile.Text = openFileDialog.FileName; | ||
using (var fstream = File.Open(openFileDialog.FileName, FileMode.Open)) | ||
{ | ||
long fileLength = fstream.Length; | ||
//StructType extracted = this.ByteToType(fstream); | ||
this.Data.Clear(); | ||
var extracted = this.ByteToTypeExplicit(fstream); | ||
|
||
long auftragLength = long.Parse(extracted.LÄNGE_AUFTRAG); | ||
if (auftragLength != fileLength) | ||
{ | ||
this.Valid = Brushes.Red; | ||
} | ||
else | ||
{ | ||
this.Valid = Brushes.White; | ||
} | ||
} | ||
} | ||
} | ||
|
||
public Auftragsdatei ByteToTypeExplicit(FileStream fstream) | ||
{ | ||
var extracted = new Auftragsdatei(); | ||
using (var breader = new BinaryReader(fstream)) | ||
{ | ||
foreach (var field in typeof(Auftragsdatei).GetFields()) | ||
{ | ||
View view = (AuftragAttribute)field.GetCustomAttributes(typeof(AuftragAttribute), false).FirstOrDefault(); | ||
view.Name = field.Name; | ||
//field.GetValue(extracted).ToString(); | ||
|
||
fstream.Position = view.Stelle - 1; | ||
var bytes = breader.ReadBytes(view.Länge); | ||
string result = ASCIIEncoding.ASCII.GetString(bytes); | ||
field.SetValue(extracted, result); | ||
|
||
view.Value = result; | ||
this.Data.Add(view); | ||
} | ||
} | ||
return extracted; | ||
} | ||
//bug mit Strings | ||
public Auftragsdatei ByteToType(FileStream fstream) | ||
{ | ||
using (var stream = new BinaryReader(fstream)) | ||
{ | ||
byte[] bytes = stream.ReadBytes(Marshal.SizeOf(typeof(Auftragsdatei))); | ||
GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned); | ||
Auftragsdatei theStructure = (Auftragsdatei)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(Auftragsdatei)); | ||
handle.Free(); | ||
|
||
return theStructure; | ||
} | ||
} | ||
|
||
public SolidColorBrush Valid { get; set; } = Brushes.White; | ||
|
||
public ObservableCollection<View> Data { get; set; } = new ObservableCollection<View>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System.Reflection; | ||
using System.Resources; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
using System.Windows; | ||
|
||
// Allgemeine Informationen über eine Assembly werden über die folgenden | ||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, | ||
// die einer Assembly zugeordnet sind. | ||
[assembly: AssemblyTitle("DTAAuftragsdateiAnalysator")] | ||
[assembly: AssemblyDescription("Analysiert Auftragsdateien")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Roman Kern Software")] | ||
[assembly: AssemblyProduct("DTAAuftragsdateiAnalysator")] | ||
[assembly: AssemblyCopyright("")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar | ||
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von | ||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. | ||
[assembly: ComVisible(false)] | ||
|
||
//Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie | ||
//<UICulture>ImCodeVerwendeteKultur</UICulture> in der .csproj-Datei | ||
//in einer <PropertyGroup> fest. Wenn Sie in den Quelldateien beispielsweise Deutsch | ||
//(Deutschland) verwenden, legen Sie <UICulture> auf \"de-DE\" fest. Heben Sie dann die Auskommentierung | ||
//des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile, | ||
//sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt. | ||
|
||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] | ||
|
||
|
||
[assembly: ThemeInfo( | ||
ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher | ||
//(wird verwendet, wenn eine Ressource auf der Seite | ||
// oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.) | ||
ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs | ||
//(wird verwendet, wenn eine Ressource auf der Seite, in der Anwendung oder einem | ||
// designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.) | ||
)] | ||
|
||
|
||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: | ||
// | ||
// Hauptversion | ||
// Nebenversion | ||
// Buildnummer | ||
// Revision | ||
// | ||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern | ||
// übernehmen, indem Sie "*" eingeben: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("0.1.0.0")] | ||
[assembly: AssemblyFileVersion("0.1.0.0")] |
Oops, something went wrong.