BWSBetreuenWohnenSoziales/CustomerDataReport mit Medikamentenliste

SupportOID=169324
This commit is contained in:
2026-07-30 13:35:10 +02:00
parent 8b3b2b7a14
commit 4f49e6b252
5 changed files with 2051 additions and 1 deletions

View File

@@ -58,6 +58,12 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Translation\TranslationDictionary.cs" />
<Compile Include="CustomerDataReport.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CustomerDataReport.Designer.cs">
<DependentUpon>CustomerDataReport.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Data\Data.csproj">
@@ -77,6 +83,12 @@
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="CustomerDataReport.resx">
<DependentUpon>CustomerDataReport.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\licenses.licx" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,83 @@
using System;
using System.Drawing;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using BS.Shared.DataContracts;
namespace BWSBetreuenWohnenSoziales
{
public partial class Klientenstammblatt : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<CustomerDataRO>
{
public Klientenstammblatt()
{
InitializeComponent();
}
public void SetReportDataSource(CustomerDataRO pRO)
{
this.bindingSource1.DataSource = pRO;
// Medikamentenverordnungen der gueltigen Liste(n) flach binden.
// DevExpress iteriert ueber den zweistufigen Collection-Pfad nur die
// aeussere Liste und zeigt daher nur eine Zeile. Deshalb sammeln wir
// die Verordnungen hier in eine flache Liste.
//
// Zusaetzlich werden regulaere Medikamentenverordnungen und
// Bedarfsmedikation (MedListType == true) ueber die Gruppierung im
// Report (GruppenSortierung/GruppenTitel) in zwei Tabellen getrennt.
var zeilen = new List<MedikamentenZeile>();
if (pRO != null && pRO.Customer != null && pRO.Customer.Medikamentenverordnungslisten != null)
{
foreach (var liste in pRO.Customer.Medikamentenverordnungslisten)
{
if (liste.Gueltig && liste.Medikamentenverordnungen != null)
{
var titel = liste.MedListType ? "Bedarfsmedikation" : "Medikamentenverordnung";
var sortierung = liste.MedListType ? 1 : 0;
foreach (var verordnung in liste.Medikamentenverordnungen)
{
zeilen.Add(new MedikamentenZeile(verordnung, titel, sortierung));
}
}
}
}
this.DetailReport7.DataSource = zeilen.OrderBy(z => z.GruppenSortierung).ToList();
this.DetailReport7.DataMember = string.Empty;
}
}
// Wrapper um eine Medikamentenverordnung, der zusaetzlich die Gruppierungs-
// information (regulaer vs. Bedarfsmedikation) traegt. Die Property-Namen
// entsprechen denen der Zell-Bindungen im Report.
public class MedikamentenZeile
{
private readonly MedikamentenverordnungDC _verordnung;
public MedikamentenZeile(MedikamentenverordnungDC verordnung, string gruppenTitel, int gruppenSortierung)
{
_verordnung = verordnung;
GruppenTitel = gruppenTitel;
GruppenSortierung = gruppenSortierung;
}
public string GruppenTitel { get; }
public int GruppenSortierung { get; }
public DateTime? Verordnungsdatum { get { return _verordnung.Verordnungsdatum; } }
public MedArtDC MedArt { get { return _verordnung.MedArt; } }
public string MedName { get { return _verordnung.MedName; } }
public DarreichungsformDC Darreichungsform { get { return _verordnung.Darreichungsform; } }
public double Morgens { get { return _verordnung.Morgens; } }
public double Mittags { get { return _verordnung.Mittags; } }
public double Abends { get { return _verordnung.Abends; } }
public double Nachts { get { return _verordnung.Nachts; } }
public int DepotMenge { get { return _verordnung.DepotMenge; } }
public DepotRhythmusDC DepotRhythmus { get { return _verordnung.DepotRhythmus; } }
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1 @@
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a