106 lines
3.8 KiB
C#
106 lines
3.8 KiB
C#
using Sarand.Core.App;
|
|
using Sarand.Core.Base;
|
|
using Sarand.Core.Bus;
|
|
using Sarand.PatientMgr.Core.App;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Sarand.PatientMgr.Core.Base
|
|
{
|
|
//=======================================================================
|
|
public class SpmSessionProperties
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Schdedule display characteristics.
|
|
/// <summary>Earliest date to list - 2 year in past.</summary>
|
|
public DateTime ScheduleStart { get; } = DateUtil.IncrementDate(DateTime.Today, -2 * 365);
|
|
/// <summary>Latest date to list - 2 year in future.</summary>
|
|
public DateTime ScheduleEnd { get; } = DateUtil.IncrementDate(DateTime.Today, 2 * 365);
|
|
/// <summary>Show filter.</summary>
|
|
public bool DisplayFilter { get; set; }
|
|
|
|
//-------------------------------------------------------------------
|
|
private readonly Dictionary<Spm.DisplayFont,int> textHeights = new Dictionary<Spm.DisplayFont,int>();
|
|
/// <summary>Admission display text height (standard, medium, large)</summary>
|
|
public int GetTextHeight (Spm.DisplayFont displayFont)
|
|
{
|
|
return textHeights.GetValue(displayFont, 0);
|
|
}
|
|
public void SetTextHeight (Spm.DisplayFont displayFont, int textHeight)
|
|
{
|
|
textHeights[displayFont] = textHeight;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
private readonly Dictionary<Spm.DisplayBoundary,int> displayBoundaries = new Dictionary<Spm.DisplayBoundary,int>();
|
|
/// <summary>Width for selected boundary definition</summary>
|
|
public int GetDisplayBoundary (Spm.DisplayBoundary displayBoundary)
|
|
{
|
|
return displayBoundaries.GetValue(displayBoundary, 0);
|
|
}
|
|
public void SetDisplayBoundary (Spm.DisplayBoundary displayBoundary, int boundary)
|
|
{
|
|
displayBoundaries[displayBoundary] = boundary;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Schedule filter.
|
|
public class FilterData
|
|
{
|
|
// Data members.
|
|
private SysId departmentId;
|
|
private Spm.FacilityType facilityType;
|
|
private SpmResourceGroupParam resourceGroup { get; set; } = new SpmResourceGroupParam("");
|
|
// Properties.
|
|
public SysId DepartmentId
|
|
{
|
|
get { return departmentId; }
|
|
set
|
|
{
|
|
if (SysId.ToInt(departmentId) == SysId.ToInt(value)) return;
|
|
departmentId = value;
|
|
facilityType = Spm.FacilityType.Unknown;
|
|
}
|
|
}
|
|
public Spm.FacilityType FacilityType
|
|
{
|
|
get { return facilityType; }
|
|
set
|
|
{
|
|
if (facilityType == value) return;
|
|
facilityType = value;
|
|
FacilityId = null;
|
|
}
|
|
}
|
|
public SysId FacilityId { get; set; }
|
|
public SpmResourceGroupParam ResourceGroup
|
|
{
|
|
get { return resourceGroup; }
|
|
set
|
|
{
|
|
if (SacsSystem.DebugMode) Logger.Debug(GetType().Name + ".ResourceGroup.set Code: " + value.Code + " [" + resourceGroup.Code + "], Including: " + value.Including + " [" + resourceGroup.Including + "].");
|
|
resourceGroup = value;
|
|
}
|
|
}
|
|
public int WorkingDayOfWeek { get; set; } = -1;
|
|
public String Consultant { get; set; }
|
|
public String Speciality { get; set; }
|
|
public String SessionName { get; set; }
|
|
public String ResourceName { get; set; }
|
|
public Spm.WardPeriodLength WardPeriodLength { get; set; } = Spm.WardPeriodLength.Unknown;
|
|
public Spm.WardResourceDisplay WardResourceDisplay { get; set; } = Spm.WardResourceDisplay.Unknown;
|
|
public Spm.WardHighlighting WardHighlighting { get; set; } = Spm.WardHighlighting.Unknown;
|
|
}
|
|
public FilterData Filter { get; } = new FilterData();
|
|
|
|
//-------------------------------------------------------------------
|
|
// Data folders.
|
|
public String AdmissionExportFolder { get; set; }
|
|
public String StatisticsExportFolder { get; set; }
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|