Jan2021
This commit is contained in:
@@ -144,19 +144,15 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = AdmissionStatus;
|
||||
}
|
||||
public SysId FacilityId { get; set; }
|
||||
public SysId FacilityTemplateId { get; set; }
|
||||
public DateTime AdmissionFrom { get; set; }
|
||||
public DateTime AdmissionTo { get; set; }
|
||||
public DateTime ToComeIn { get; set; }
|
||||
public bool RequiresSeq() { return RequiresSeq(/*AdmissionType*/); }
|
||||
public ushort Seq { get; set; }
|
||||
public Spm.AdmissionType AdmissionType { get; set; }
|
||||
public Spm.AdmissionOccupancy Occupancy { get; set; }
|
||||
@@ -194,7 +190,6 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public Spm.AttendanceType AttendanceType { get; set; }
|
||||
public String AttendanceStatus { get; set; }
|
||||
public String ComfortScore { get; set; }
|
||||
|
||||
// Admission times.
|
||||
public DateTime TimeCalled { get; set; }
|
||||
public DateTime TimeArrived { get; set; }
|
||||
@@ -204,19 +199,318 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public DateTime TimeInRecovery { get; set; }
|
||||
public DateTime TimeInformDest { get; set; }
|
||||
public DateTime TimeLeave { get; set; }
|
||||
|
||||
// Cancellation.
|
||||
public static bool IsCancelled(Spm.AdmissionCancelType cancel) { return (cancel != Spm.AdmissionCancelType.None); }
|
||||
public bool IsCancelled() { return IsCancelled(/*CancelType*/); }
|
||||
public static bool IsCancelled (Spm.AdmissionCancelType cancel) { return (cancel != Spm.AdmissionCancelType.None); }
|
||||
public bool IsCancelled () { return IsCancelled(/*CancelType*/); }
|
||||
public Spm.AdmissionCancelType CancelType { get; set; }
|
||||
public DateTime CancelDate { get; set; }
|
||||
public ushort CancelCount { get; set; }
|
||||
public String CancelCode { get; set; }
|
||||
public String CancelReason { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId FacilityId
|
||||
{
|
||||
get { return data.FacilityId; }
|
||||
set { CheckChanged(data.FacilityId, value); data.FacilityId = value; }
|
||||
}
|
||||
public SysId FacilityTemplateId
|
||||
{
|
||||
get { return data.FacilityTemplateId; }
|
||||
set { CheckChanged(data.FacilityTemplateId, value); data.FacilityTemplateId = value; }
|
||||
}
|
||||
public DateTime AdmissionFrom
|
||||
{
|
||||
get { return data.AdmissionFrom; }
|
||||
set { CheckChanged(data.AdmissionFrom, value); data.AdmissionFrom = value; }
|
||||
}
|
||||
public DateTime AdmissionTo
|
||||
{
|
||||
get { return data.AdmissionTo; }
|
||||
set { CheckChanged(data.AdmissionTo, value); data.AdmissionTo = value; }
|
||||
}
|
||||
public DateTime ToComeIn
|
||||
{
|
||||
get { return data.ToComeIn; }
|
||||
set { CheckChanged(data.ToComeIn, value); data.ToComeIn = value; }
|
||||
}
|
||||
public ushort Seq
|
||||
{
|
||||
get { return data.Seq; }
|
||||
set { CheckChanged(data.Seq, value); data.Seq = value; }
|
||||
}
|
||||
public Spm.AdmissionType AdmissionType
|
||||
{
|
||||
get { return data.AdmissionType; }
|
||||
set { CheckChanged((int)data.AdmissionType, (int)value); data.AdmissionType = value; }
|
||||
}
|
||||
public Spm.AdmissionOccupancy Occupancy
|
||||
{
|
||||
get { return data.Occupancy; }
|
||||
set { CheckChanged((int)data.Occupancy, (int)value); data.Occupancy = value; }
|
||||
}
|
||||
public DateTime DecisionToReferOn
|
||||
{
|
||||
get { return data.DecisionToReferOn; }
|
||||
set { CheckChanged(data.DecisionToReferOn, value); data.DecisionToReferOn = value; }
|
||||
}
|
||||
public DateTime ReferredOn
|
||||
{
|
||||
get { return data.ReferredOn; }
|
||||
set { CheckChanged(data.ReferredOn, value); data.ReferredOn = value; }
|
||||
}
|
||||
public DateTime DecisionToAdmitOn
|
||||
{
|
||||
get { return data.DecisionToAdmitOn; }
|
||||
set { CheckChanged(data.DecisionToAdmitOn, value); data.DecisionToAdmitOn = value; }
|
||||
}
|
||||
public DateTime BreechOn
|
||||
{
|
||||
get { return data.BreechOn; }
|
||||
set { CheckChanged(data.BreechOn, value); data.BreechOn = value; }
|
||||
}
|
||||
public SysId PatientId
|
||||
{
|
||||
get { return data.PatientId; }
|
||||
set { CheckChanged(data.PatientId, value); data.PatientId = value; }
|
||||
}
|
||||
public String PatientNo
|
||||
{
|
||||
get { return data.PatientNo; }
|
||||
set { CheckChanged(data.PatientNo, value); data.PatientNo = value; }
|
||||
}
|
||||
public String NhsNumber
|
||||
{
|
||||
get { return data.NhsNumber; }
|
||||
set { CheckChanged(data.NhsNumber, value); data.NhsNumber = value; }
|
||||
}
|
||||
public String Title
|
||||
{
|
||||
get { return data.Title; }
|
||||
set { CheckChanged(data.Title, value); data.Title = value; }
|
||||
}
|
||||
public String Forename
|
||||
{
|
||||
get { return data.Forename; }
|
||||
set { CheckChanged(data.Forename, value); data.Forename = value; }
|
||||
}
|
||||
public String Surname
|
||||
{
|
||||
get { return data.Surname; }
|
||||
set { CheckChanged(data.Surname, value); data.Surname = value; }
|
||||
}
|
||||
public Spm.Gender Gender
|
||||
{
|
||||
get { return data.Gender; }
|
||||
set { CheckChanged((int)data.Gender, (int)value); data.Gender = value; }
|
||||
}
|
||||
public DateTime BirthOn
|
||||
{
|
||||
get { return data.BirthOn; }
|
||||
set { CheckChanged(data.BirthOn, value); data.BirthOn = value; }
|
||||
}
|
||||
public String Age
|
||||
{
|
||||
get { return data.Age; }
|
||||
set { CheckChanged(data.Age, value); data.Age = value; }
|
||||
}
|
||||
public DateTime AgeOn
|
||||
{
|
||||
get { return data.AgeOn; }
|
||||
set { CheckChanged(data.AgeOn, value); data.AgeOn = value; }
|
||||
}
|
||||
public SysId FacilityIdWard
|
||||
{
|
||||
get { return data.FacilityIdWard; }
|
||||
set { CheckChanged(data.FacilityIdWard, value); data.FacilityIdWard = value; }
|
||||
}
|
||||
public String Ward
|
||||
{
|
||||
get { return data.Ward; }
|
||||
set { CheckChanged(data.Ward, value); data.Ward = value; }
|
||||
}
|
||||
public SysId ProcedureId
|
||||
{
|
||||
get { return data.ProcedureId; }
|
||||
set { CheckChanged(data.ProcedureId, value); data.ProcedureId = value; }
|
||||
}
|
||||
public String SpecialityCode
|
||||
{
|
||||
get { return data.SpecialityCode; }
|
||||
set { CheckChanged(data.SpecialityCode, value); data.SpecialityCode = value; }
|
||||
}
|
||||
public String ProcedureDesc
|
||||
{
|
||||
get { return data.ProcedureDesc; }
|
||||
set { CheckChanged(data.ProcedureDesc, value); data.ProcedureDesc = value; }
|
||||
}
|
||||
public String ComplexityCode
|
||||
{
|
||||
get { return data.ComplexityCode; }
|
||||
set { CheckChanged(data.ComplexityCode, value); data.ComplexityCode = value; }
|
||||
}
|
||||
public String ProcedureIndication
|
||||
{
|
||||
get { return data.ProcedureIndication; }
|
||||
set { CheckChanged(data.ProcedureIndication, value); data.ProcedureIndication = value; }
|
||||
}
|
||||
public String PatientHistory
|
||||
{
|
||||
get { return data.PatientHistory; }
|
||||
set { CheckChanged(data.PatientHistory, value); data.PatientHistory = value; }
|
||||
}
|
||||
public String GestationPeriod
|
||||
{
|
||||
get { return data.GestationPeriod; }
|
||||
set { CheckChanged(data.GestationPeriod, value); data.GestationPeriod = value; }
|
||||
}
|
||||
public String SystemRef
|
||||
{
|
||||
get { return data.SystemRef; }
|
||||
set { CheckChanged(data.SystemRef, value); data.SystemRef = value; }
|
||||
}
|
||||
public ushort DurationExp
|
||||
{
|
||||
get { return data.DurationExp; }
|
||||
set { CheckChanged(data.DurationExp, value); data.DurationExp = value; }
|
||||
}
|
||||
public ushort DurationAct
|
||||
{
|
||||
get { return data.DurationAct; }
|
||||
set { CheckChanged(data.DurationAct, value); data.DurationAct = value; }
|
||||
}
|
||||
public decimal UnitsExp
|
||||
{
|
||||
get { return data.UnitsExp; }
|
||||
set { CheckChanged(data.UnitsExp, value); data.UnitsExp = value; }
|
||||
}
|
||||
public decimal UnitsAct
|
||||
{
|
||||
get { return data.UnitsAct; }
|
||||
set { CheckChanged(data.UnitsAct, value); data.UnitsAct = value; }
|
||||
}
|
||||
public String Anaesthetic
|
||||
{
|
||||
get { return data.Anaesthetic; }
|
||||
set { CheckChanged(data.Anaesthetic, value); data.Anaesthetic = value; }
|
||||
}
|
||||
public String Position
|
||||
{
|
||||
get { return data.Position; }
|
||||
set { CheckChanged(data.Position, value); data.Position = value; }
|
||||
}
|
||||
public String SpecialEquipment
|
||||
{
|
||||
get { return data.SpecialEquipment; }
|
||||
set { CheckChanged(data.SpecialEquipment, value); data.SpecialEquipment = value; }
|
||||
}
|
||||
public Spm.AttendanceType AttendanceType
|
||||
{
|
||||
get { return data.AttendanceType; }
|
||||
set { CheckChanged((int)data.AttendanceType, (int)value); data.AttendanceType = value; }
|
||||
}
|
||||
public String AttendanceStatus
|
||||
{
|
||||
get { return data.AttendanceStatus; }
|
||||
set { CheckChanged(data.AttendanceStatus, value); data.AttendanceStatus = value; }
|
||||
}
|
||||
public String ComfortScore
|
||||
{
|
||||
get { return data.ComfortScore; }
|
||||
set { CheckChanged(data.ComfortScore, value); data.ComfortScore = value; }
|
||||
}
|
||||
// Admission time.
|
||||
public DateTime TimeCalled
|
||||
{
|
||||
get { return data.TimeCalled; }
|
||||
set { CheckChanged(data.TimeCalled, value); data.TimeCalled = value; }
|
||||
}
|
||||
public DateTime TimeArrived
|
||||
{
|
||||
get { return data.TimeArrived; }
|
||||
set { CheckChanged(data.TimeArrived, value); data.TimeArrived = value; }
|
||||
}
|
||||
public DateTime TimeAnaesStart
|
||||
{
|
||||
get { return data.TimeAnaesStart; }
|
||||
set { CheckChanged(data.TimeAnaesStart, value); data.TimeAnaesStart = value; }
|
||||
}
|
||||
public DateTime TimeProcStart
|
||||
{
|
||||
get { return data.TimeProcStart; }
|
||||
set { CheckChanged(data.TimeProcStart, value); data.TimeProcStart = value; }
|
||||
}
|
||||
public DateTime TimeProcEnd
|
||||
{
|
||||
get { return data.TimeProcEnd; }
|
||||
set { CheckChanged(data.TimeProcEnd, value); data.TimeProcEnd = value; }
|
||||
}
|
||||
public DateTime TimeInRecovery
|
||||
{
|
||||
get { return data.TimeInRecovery; }
|
||||
set { CheckChanged(data.TimeInRecovery, value); data.TimeInRecovery = value; }
|
||||
}
|
||||
public DateTime TimeInformDest
|
||||
{
|
||||
get { return data.TimeInformDest; }
|
||||
set { CheckChanged(data.TimeInformDest, value); data.TimeInformDest = value; }
|
||||
}
|
||||
public DateTime TimeLeave
|
||||
{
|
||||
get { return data.TimeLeave; }
|
||||
set { CheckChanged(data.TimeLeave, value); data.TimeLeave = value; }
|
||||
}
|
||||
// Cancellation.
|
||||
public Spm.AdmissionCancelType CancelType
|
||||
{
|
||||
get { return data.CancelType; }
|
||||
set { CheckChanged((int)data.CancelType, (int)value); data.CancelType = value; }
|
||||
}
|
||||
public DateTime CancelDate
|
||||
{
|
||||
get { return data.CancelDate; }
|
||||
set { CheckChanged(data.CancelDate, value); data.CancelDate = value; }
|
||||
}
|
||||
public ushort CancelCount
|
||||
{
|
||||
get { return data.CancelCount; }
|
||||
set { CheckChanged(data.CancelCount, value); data.CancelCount = value; }
|
||||
}
|
||||
public String CancelCode
|
||||
{
|
||||
get { return data.CancelCode; }
|
||||
set { CheckChanged(data.CancelCode, value); data.CancelCode = value; }
|
||||
}
|
||||
public String CancelReason
|
||||
{
|
||||
get { return data.CancelReason; }
|
||||
set { CheckChanged(data.CancelReason, value); data.CancelReason = value; }
|
||||
}
|
||||
// Flags.
|
||||
|
||||
internal void PopulateFrom(Data data)
|
||||
public bool HasRisk
|
||||
{
|
||||
get { return GetFlag(Flag_HasRisk); }
|
||||
set { SetFlag(Flag_HasRisk, value); }
|
||||
}
|
||||
public bool HighlightNotes
|
||||
{
|
||||
get { return GetFlag(Flag_HighlightNotes); }
|
||||
set { SetFlag(Flag_HighlightNotes, value); }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
FacilityId = data.FacilityId;
|
||||
FacilityTemplateId = data.FacilityTemplateId;
|
||||
@@ -275,7 +569,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
CancelReason = data.CancelReason;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -283,7 +577,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue FacilityId { get; set; } = ValidValue.Valid;
|
||||
@@ -346,12 +641,12 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private readonly Data data = new Data();
|
||||
public static readonly ushort Flag_HasRisk = 0x01;
|
||||
public static readonly ushort Flag_HighlightNotes = 0x02;
|
||||
public static readonly Byte Flag_HasRisk = 0x01;
|
||||
public static readonly Byte Flag_HighlightNotes = 0x02;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmAdmission(SysId facilityId, SysId facilityTemplateId) : base()
|
||||
protected SpmAdmission (SysId facilityId, SysId facilityTemplateId) : base()
|
||||
{
|
||||
facilityId = FacilityId;
|
||||
facilityTemplateId = FacilityTemplateId;
|
||||
@@ -367,7 +662,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> AdmissionStatuses { get { return new List<SaStatus>(admissionStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
admissionStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -384,8 +679,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -399,29 +694,29 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId FacilityId
|
||||
{
|
||||
get { return data.FacilityId; }
|
||||
set { CheckChanged(data.FacilityId, value); data.FacilityId = value; }
|
||||
set { data.FacilityId = value; }
|
||||
}
|
||||
public SysId FacilityTemplateId
|
||||
{
|
||||
get { return data.FacilityTemplateId; }
|
||||
set { CheckChanged(data.FacilityTemplateId, value); data.FacilityTemplateId = value; }
|
||||
set { data.FacilityTemplateId = value; }
|
||||
}
|
||||
public DateTime AdmissionFrom
|
||||
{
|
||||
get { return data.AdmissionFrom; }
|
||||
set { CheckChanged(data.AdmissionFrom, value); data.AdmissionFrom = value; }
|
||||
set { data.AdmissionFrom = value; }
|
||||
}
|
||||
public DateTime AdmissionTo
|
||||
{
|
||||
get { return data.AdmissionTo; }
|
||||
set { CheckChanged(data.AdmissionTo, value); data.AdmissionTo = value; }
|
||||
set { data.AdmissionTo = value; }
|
||||
}
|
||||
public DateTime ToComeIn
|
||||
{
|
||||
get { return data.ToComeIn; }
|
||||
set { CheckChanged(data.ToComeIn, value); data.ToComeIn = value; }
|
||||
set { data.ToComeIn = value; }
|
||||
}
|
||||
public static bool RequiresSeq(Spm.AdmissionType admissionType)
|
||||
public static bool RequiresSeq (Spm.AdmissionType admissionType)
|
||||
{
|
||||
switch (admissionType)
|
||||
{
|
||||
@@ -436,20 +731,14 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public ushort Seq
|
||||
{
|
||||
get { return data.Seq; }
|
||||
set { CheckChanged(data.Seq, value); data.Seq = value; }
|
||||
set { data.Seq = value; }
|
||||
}
|
||||
public Spm.AdmissionType AdmissionType
|
||||
{
|
||||
get { return data.AdmissionType; }
|
||||
set { CheckChanged((int)data.AdmissionType, (int)value); data.AdmissionType = value; }
|
||||
set { data.AdmissionType = value; }
|
||||
}
|
||||
public Spm.AdmissionOccupancy Occupancy
|
||||
{
|
||||
get { return data.Occupancy; }
|
||||
set { CheckChanged((int)data.Occupancy, (int)value); data.Occupancy = value; }
|
||||
}
|
||||
|
||||
public bool IsTheatreAdmission()
|
||||
public bool IsTheatreAdmission ()
|
||||
{
|
||||
switch (AdmissionType)
|
||||
{
|
||||
@@ -460,7 +749,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public bool IsClinicAdmission()
|
||||
public bool IsClinicAdmission ()
|
||||
{
|
||||
switch (AdmissionType)
|
||||
{
|
||||
@@ -469,7 +758,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public bool IsWardAdmission()
|
||||
public bool IsWardAdmission ()
|
||||
{
|
||||
switch (AdmissionType)
|
||||
{
|
||||
@@ -479,57 +768,62 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public Spm.AdmissionOccupancy Occupancy
|
||||
{
|
||||
get { return data.Occupancy; }
|
||||
set { data.Occupancy = value; }
|
||||
}
|
||||
public DateTime DecisionToReferOn
|
||||
{
|
||||
get { return data.DecisionToReferOn; }
|
||||
set { CheckChanged(data.DecisionToReferOn, value); data.DecisionToReferOn = value; }
|
||||
set { data.DecisionToReferOn = value; }
|
||||
}
|
||||
public DateTime ReferredOn
|
||||
{
|
||||
get { return data.ReferredOn; }
|
||||
set { CheckChanged(data.ReferredOn, value); data.ReferredOn = value; }
|
||||
set { data.ReferredOn = value; }
|
||||
}
|
||||
public DateTime DecisionToAdmitOn
|
||||
{
|
||||
get { return data.DecisionToAdmitOn; }
|
||||
set { CheckChanged(data.DecisionToAdmitOn, value); data.DecisionToAdmitOn = value; }
|
||||
set { data.DecisionToAdmitOn = value; }
|
||||
}
|
||||
public DateTime BreechOn
|
||||
{
|
||||
get { return data.BreechOn; }
|
||||
set { CheckChanged(data.BreechOn, value); data.BreechOn = value; }
|
||||
set { data.BreechOn = value; }
|
||||
}
|
||||
public SysId PatientId
|
||||
{
|
||||
get { return data.PatientId; }
|
||||
set { CheckChanged(data.PatientId, value); data.PatientId = value; }
|
||||
set { data.PatientId = value; }
|
||||
}
|
||||
public String PatientNo
|
||||
{
|
||||
get { return data.PatientNo; }
|
||||
set { CheckChanged(data.PatientNo, value); data.PatientNo = value; }
|
||||
set { data.PatientNo = value; }
|
||||
}
|
||||
public String NhsNumber
|
||||
{
|
||||
get { return data.NhsNumber; }
|
||||
set { CheckChanged(data.NhsNumber, value); data.NhsNumber = value; }
|
||||
set { data.NhsNumber = value; }
|
||||
}
|
||||
public String Title
|
||||
{
|
||||
get { return data.Title; }
|
||||
set { CheckChanged(data.Title, value); data.Title = value; }
|
||||
set { data.Title = value; }
|
||||
}
|
||||
public String Forename
|
||||
{
|
||||
get { return data.Forename; }
|
||||
set { CheckChanged(data.Forename, value); data.Forename = value; }
|
||||
set { data.Forename = value; }
|
||||
}
|
||||
public String Surname
|
||||
{
|
||||
get { return data.Surname; }
|
||||
set { CheckChanged(data.Surname, value); data.Surname = value; }
|
||||
set { data.Surname = value; }
|
||||
}
|
||||
public static String GetDisplayName(String surname, String forename, bool upperSurname = true)
|
||||
public static String GetDisplayName (String surname, String forename, bool upperSurname = true)
|
||||
{
|
||||
String name = surname;
|
||||
if (upperSurname)
|
||||
@@ -539,210 +833,211 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
name += forename;
|
||||
return name;
|
||||
}
|
||||
public String GetDisplayName(bool upperSurname = true)
|
||||
public String GetDisplayName (bool upperSurname = true)
|
||||
{
|
||||
return GetDisplayName(Surname, Forename, upperSurname);
|
||||
}
|
||||
public Spm.Gender Gender
|
||||
{
|
||||
get { return data.Gender; }
|
||||
set { CheckChanged((int)data.Gender, (int)value); data.Gender = value; }
|
||||
set { data.Gender = value; }
|
||||
}
|
||||
public DateTime BirthOn
|
||||
{
|
||||
get { return data.BirthOn; }
|
||||
set { CheckChanged(data.BirthOn, value); data.BirthOn = value; }
|
||||
set { data.BirthOn = value; }
|
||||
}
|
||||
public String Age
|
||||
{
|
||||
get { return data.Age; }
|
||||
set { CheckChanged(data.Age, value); data.Age = value; }
|
||||
set { data.Age = value; }
|
||||
}
|
||||
public DateTime AgeOn
|
||||
{
|
||||
get { return data.AgeOn; }
|
||||
set { CheckChanged(data.AgeOn, value); data.AgeOn = value; }
|
||||
set { data.AgeOn = value; }
|
||||
}
|
||||
public String GetPatientAge(DateTime dob, DateTime ageOn)
|
||||
public String GetPatientAge (DateTime dob, DateTime ageOn)
|
||||
{
|
||||
String patientAge = "";
|
||||
if (DateUtil.IsValid(dob) && DateUtil.IsValid(ageOn) && dob < ageOn)
|
||||
{
|
||||
/*ushort age = Date::CalculateAge(dob, ageOn);
|
||||
ushort ageMonths = Date::CalculateAgeMonths(dob, ageOn);
|
||||
ushort age = DateUtil.CalculateAge(dob, ageOn);
|
||||
ushort ageMonths = DateUtil.CalculateAgeMonths(dob, ageOn);
|
||||
if (age >= 2) patientAge = age.ToString();
|
||||
else if (ageMonths > 0) patientAge = ageMonths.ToString() + "M";*/
|
||||
else if (ageMonths > 0) patientAge = ageMonths.ToString() + "M";
|
||||
}
|
||||
return patientAge;
|
||||
}
|
||||
public SysId FacilityIdWard
|
||||
{
|
||||
get { return data.FacilityIdWard; }
|
||||
set { CheckChanged(data.FacilityIdWard, value); data.FacilityIdWard = value; }
|
||||
set { data.FacilityIdWard = value; }
|
||||
}
|
||||
public String Ward
|
||||
{
|
||||
get { return data.Ward; }
|
||||
set { CheckChanged(data.Ward, value); data.Ward = value; }
|
||||
set { data.Ward = value; }
|
||||
}
|
||||
public SysId ProcedureId
|
||||
{
|
||||
get { return data.ProcedureId; }
|
||||
set { CheckChanged(data.ProcedureId, value); data.ProcedureId = value; }
|
||||
set { data.ProcedureId = value; }
|
||||
}
|
||||
public String SpecialityCode
|
||||
{
|
||||
get { return data.SpecialityCode; }
|
||||
set { CheckChanged(data.SpecialityCode, value); data.SpecialityCode = value; }
|
||||
set { data.SpecialityCode = value; }
|
||||
}
|
||||
public String ProcedureDesc
|
||||
{
|
||||
get { return data.ProcedureDesc; }
|
||||
set { CheckChanged(data.ProcedureDesc, value); data.ProcedureDesc = value; }
|
||||
set { data.ProcedureDesc = value; }
|
||||
}
|
||||
public String ComplexityCode
|
||||
{
|
||||
get { return data.ComplexityCode; }
|
||||
set { CheckChanged(data.ComplexityCode, value); data.ComplexityCode = value; }
|
||||
set { data.ComplexityCode = value; }
|
||||
}
|
||||
public String ProcedureIndication
|
||||
{
|
||||
get { return data.ProcedureIndication; }
|
||||
set { CheckChanged(data.ProcedureIndication, value); data.ProcedureIndication = value; }
|
||||
set { data.ProcedureIndication = value; }
|
||||
}
|
||||
public String PatientHistory
|
||||
{
|
||||
get { return data.PatientHistory; }
|
||||
set { CheckChanged(data.PatientHistory, value); data.PatientHistory = value; }
|
||||
set { data.PatientHistory = value; }
|
||||
}
|
||||
public String GestationPeriod
|
||||
{
|
||||
get { return data.GestationPeriod; }
|
||||
set { CheckChanged(data.GestationPeriod, value); data.GestationPeriod = value; }
|
||||
set { data.GestationPeriod = value; }
|
||||
}
|
||||
public String SystemRef
|
||||
{
|
||||
get { return data.SystemRef; }
|
||||
set { CheckChanged(data.SystemRef, value); data.SystemRef = value; }
|
||||
set { data.SystemRef = value; }
|
||||
}
|
||||
public ushort DurationExp
|
||||
{
|
||||
get { return data.DurationExp; }
|
||||
set { CheckChanged(data.DurationExp, value); data.DurationExp = value; }
|
||||
set { data.DurationExp = value; }
|
||||
}
|
||||
public ushort DurationAct
|
||||
{
|
||||
get { return data.DurationAct; }
|
||||
set { CheckChanged(data.DurationAct, value); data.DurationAct = value; }
|
||||
set { data.DurationAct = value; }
|
||||
}
|
||||
public decimal UnitsExp
|
||||
{
|
||||
get { return data.UnitsExp; }
|
||||
set { CheckChanged(data.UnitsExp, value); data.UnitsExp = value; }
|
||||
set { data.UnitsExp = value; }
|
||||
}
|
||||
public decimal UnitsAct
|
||||
{
|
||||
get { return data.UnitsAct; }
|
||||
set { CheckChanged(data.UnitsAct, value); data.UnitsAct = value; }
|
||||
set { data.UnitsAct = value; }
|
||||
}
|
||||
public String Anaesthetic
|
||||
{
|
||||
get { return data.Anaesthetic; }
|
||||
set { CheckChanged(data.Anaesthetic, value); data.Anaesthetic = value; }
|
||||
set { data.Anaesthetic = value; }
|
||||
}
|
||||
public String Position
|
||||
{
|
||||
get { return data.Position; }
|
||||
set { CheckChanged(data.Position, value); data.Position = value; }
|
||||
set { data.Position = value; }
|
||||
}
|
||||
public String SpecialEquipment
|
||||
{
|
||||
get { return data.SpecialEquipment; }
|
||||
set { CheckChanged(data.SpecialEquipment, value); data.SpecialEquipment = value; }
|
||||
set { data.SpecialEquipment = value; }
|
||||
}
|
||||
public Spm.AttendanceType AttendanceType
|
||||
{
|
||||
get { return data.AttendanceType; }
|
||||
set { CheckChanged((int)data.AttendanceType, (int)value); data.AttendanceType = value; }
|
||||
set { data.AttendanceType = value; }
|
||||
}
|
||||
public String AttendanceStatus
|
||||
{
|
||||
get { return data.AttendanceStatus; }
|
||||
set { CheckChanged(data.AttendanceStatus, value); data.AttendanceStatus = value; }
|
||||
set { data.AttendanceStatus = value; }
|
||||
}
|
||||
public String ComfortScore
|
||||
{
|
||||
get { return data.ComfortScore; }
|
||||
set { CheckChanged(data.ComfortScore, value); data.ComfortScore = value; }
|
||||
set { data.ComfortScore = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Admission time.
|
||||
public DateTime TimeCalled
|
||||
{
|
||||
get { return data.TimeCalled; }
|
||||
set { CheckChanged(data.TimeCalled, value); data.TimeCalled = value; }
|
||||
set { data.TimeCalled = value; }
|
||||
}
|
||||
public DateTime TimeArrived
|
||||
{
|
||||
get { return data.TimeArrived; }
|
||||
set { CheckChanged(data.TimeArrived, value); data.TimeArrived = value; }
|
||||
set { data.TimeArrived = value; }
|
||||
}
|
||||
public DateTime TimeAnaesStart
|
||||
{
|
||||
get { return data.TimeAnaesStart; }
|
||||
set { CheckChanged(data.TimeAnaesStart, value); data.TimeAnaesStart = value; }
|
||||
set { data.TimeAnaesStart = value; }
|
||||
}
|
||||
public DateTime TimeProcStart
|
||||
{
|
||||
get { return data.TimeProcStart; }
|
||||
set { CheckChanged(data.TimeProcStart, value); data.TimeProcStart = value; }
|
||||
set { data.TimeProcStart = value; }
|
||||
}
|
||||
public DateTime TimeProcEnd
|
||||
{
|
||||
get { return data.TimeProcEnd; }
|
||||
set { CheckChanged(data.TimeProcEnd, value); data.TimeProcEnd = value; }
|
||||
set { data.TimeProcEnd = value; }
|
||||
}
|
||||
public DateTime TimeInRecovery
|
||||
{
|
||||
get { return data.TimeInRecovery; }
|
||||
set { CheckChanged(data.TimeInRecovery, value); data.TimeInRecovery = value; }
|
||||
set { data.TimeInRecovery = value; }
|
||||
}
|
||||
public DateTime TimeInformDest
|
||||
{
|
||||
get { return data.TimeInformDest; }
|
||||
set { CheckChanged(data.TimeInformDest, value); data.TimeInformDest = value; }
|
||||
set { data.TimeInformDest = value; }
|
||||
}
|
||||
public DateTime TimeLeave
|
||||
{
|
||||
get { return data.TimeLeave; }
|
||||
set { CheckChanged(data.TimeLeave, value); data.TimeLeave = value; }
|
||||
set { data.TimeLeave = value; }
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
// Cancellation.
|
||||
public Spm.AdmissionCancelType CancelType
|
||||
{
|
||||
get { return data.CancelType; }
|
||||
set { CheckChanged((int)data.CancelType, (int)value); data.CancelType = value; }
|
||||
set { data.CancelType = value; }
|
||||
}
|
||||
public DateTime CancelDate
|
||||
{
|
||||
get { return data.CancelDate; }
|
||||
set { CheckChanged(data.CancelDate, value); data.CancelDate = value; }
|
||||
set { data.CancelDate = value; }
|
||||
}
|
||||
public ushort CancelCount
|
||||
{
|
||||
get { return data.CancelCount; }
|
||||
set { CheckChanged(data.CancelCount, value); data.CancelCount = value; }
|
||||
set { data.CancelCount = value; }
|
||||
}
|
||||
public String CancelCode
|
||||
{
|
||||
get { return data.CancelCode; }
|
||||
set { CheckChanged(data.CancelCode, value); data.CancelCode = value; }
|
||||
set { data.CancelCode = value; }
|
||||
}
|
||||
public String CancelReason
|
||||
{
|
||||
get { return data.CancelReason; }
|
||||
set { CheckChanged(data.CancelReason, value); data.CancelReason = value; }
|
||||
set { data.CancelReason = value; }
|
||||
}
|
||||
|
||||
|
||||
@@ -763,36 +1058,36 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
// A s s o c i a t e d D a t a E l e m e n t s
|
||||
//-------------------------------------------------------------------
|
||||
// Admission Roles
|
||||
public bool HasRoles() { return HasRole(Spm.EmployeeRole.Unknown, ""); }
|
||||
public abstract bool HasRole(Spm.EmployeeRole admissionRole); // Any admission.
|
||||
public abstract bool HasRole(Spm.EmployeeRole admissionRole, String admissionCode); // Specific emloyee.
|
||||
public abstract List<SpmAdmissionRole> GetRoles();
|
||||
public abstract bool SetRoles(List<SpmAdmissionRole> admissionRoles); // Without commiting the changes.
|
||||
public abstract bool CommitRoles();
|
||||
public bool HasRoles () { return HasRole(Spm.EmployeeRole.Unknown, ""); }
|
||||
public abstract bool HasRole (Spm.EmployeeRole admissionRole); // Any admission.
|
||||
public abstract bool HasRole (Spm.EmployeeRole admissionRole, String admissionCode); // Specific emloyee.
|
||||
public abstract List<SpmAdmissionRole> GetRoles ();
|
||||
public abstract bool SetRoles (List<SpmAdmissionRole> admissionRoles); // Without commiting the changes.
|
||||
public abstract bool CommitRoles ();
|
||||
|
||||
// Admission Action.
|
||||
public bool HasActions() { return HasAction(Spm.AdmissionActionType.Unknown); }
|
||||
public abstract bool HasAction(Spm.AdmissionActionType admissionActionType); // Any admission.
|
||||
public abstract bool GetActions();
|
||||
public abstract bool SetActions(); // Without commiting the changes.
|
||||
public abstract bool CommitActions();
|
||||
public bool HasActions () { return HasAction(Spm.AdmissionActionType.Unknown); }
|
||||
public abstract bool HasAction (Spm.AdmissionActionType admissionActionType); // Any admission.
|
||||
public abstract bool GetActions ();
|
||||
public abstract bool SetActions (); // Without commiting the changes.
|
||||
public abstract bool CommitActions ();
|
||||
|
||||
|
||||
// Admission Data.
|
||||
public bool HasDatas() { return HasData(Spm.AdmissionDataType.Unknown); }
|
||||
public abstract bool HasData(Spm.AdmissionDataType admissionDataType); // Any admission.
|
||||
public abstract bool GetDatas();
|
||||
public abstract bool SetDatas(); // Without commiting the changes.
|
||||
public abstract bool CommitDatas();
|
||||
public bool HasDatas () { return HasData(Spm.AdmissionDataType.Unknown); }
|
||||
public abstract bool HasData (Spm.AdmissionDataType admissionDataType); // Any admission.
|
||||
public abstract bool GetDatas ();
|
||||
public abstract bool SetDatas (); // Without commiting the changes.
|
||||
public abstract bool CommitDatas ();
|
||||
|
||||
public abstract List<String> GetProcedureKits();
|
||||
public abstract List<String> GetAllergies();
|
||||
public abstract List<String> GetRiskFactors();
|
||||
public abstract bool SetProcedureKits(List<String> procedures);
|
||||
public abstract bool SetAllergies(List<String> allergies);
|
||||
public abstract bool SetRiskFactors(List<String> riskFactors);
|
||||
public abstract List<String> GetProcedureKits ();
|
||||
public abstract List<String> GetAllergies ();
|
||||
public abstract List<String> GetRiskFactors ();
|
||||
public abstract bool SetProcedureKits (List<String> procedures);
|
||||
public abstract bool SetAllergies (List<String> allergies);
|
||||
public abstract bool SetRiskFactors (List<String> riskFactors);
|
||||
|
||||
public abstract bool ClearAssociatedData();
|
||||
public abstract bool ClearAssociatedData ();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a r a m s
|
||||
|
||||
@@ -64,13 +64,10 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = AdmissionActionStatus;
|
||||
}
|
||||
public SysId AdmissionId { get; set; }
|
||||
public Spm.AdmissionActionType AdmissionActionType { get; set; }
|
||||
public DateTime Raised { get; set; }
|
||||
@@ -78,6 +75,56 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public DateTime Completed { get; set; }
|
||||
public SysId EmployeeIdCompleted { get; set; }
|
||||
public String ActionData { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId AdmissionId
|
||||
{
|
||||
get { return data.AdmissionId; }
|
||||
set { CheckChanged(data.AdmissionId, value); data.AdmissionId = value; }
|
||||
}
|
||||
public Spm.AdmissionActionType AdmissionActionType
|
||||
{
|
||||
get { return data.AdmissionActionType; }
|
||||
set { CheckChanged((int)data.AdmissionActionType, (int)value); data.AdmissionActionType = value; }
|
||||
}
|
||||
public DateTime Raised
|
||||
{
|
||||
get { return data.Raised; }
|
||||
set { CheckChanged(data.Raised, value); data.Raised = value; }
|
||||
}
|
||||
public SysId EmployeeIdRaised
|
||||
{
|
||||
get { return data.EmployeeIdRaised; }
|
||||
set { CheckChanged(data.EmployeeIdRaised, value); data.EmployeeIdRaised = value; }
|
||||
}
|
||||
public DateTime Completed
|
||||
{
|
||||
get { return data.Completed; }
|
||||
set { CheckChanged(data.Completed, value); data.Completed = value; }
|
||||
}
|
||||
public SysId EmployeeIdCompleted
|
||||
{
|
||||
get { return data.EmployeeIdCompleted; }
|
||||
set { CheckChanged(data.EmployeeIdCompleted, value); data.EmployeeIdCompleted = value; }
|
||||
}
|
||||
public String ActionData
|
||||
{
|
||||
get { return data.ActionData; }
|
||||
set { CheckChanged(data.ActionData, value); data.ActionData = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom(Data data)
|
||||
{
|
||||
AdmissionId = data.AdmissionId;
|
||||
@@ -97,7 +144,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue AdmissionId { get; set; } = ValidValue.Valid;
|
||||
@@ -187,37 +235,37 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId AdmissionId
|
||||
{
|
||||
get { return data.AdmissionId; }
|
||||
set { CheckChanged(data.AdmissionId, value); data.AdmissionId = value; }
|
||||
set { data.AdmissionId = value; }
|
||||
}
|
||||
public Spm.AdmissionActionType AdmissionActionType
|
||||
{
|
||||
get { return data.AdmissionActionType; }
|
||||
set { CheckChanged((int)data.AdmissionActionType, (int)value); data.AdmissionActionType = value; }
|
||||
set { data.AdmissionActionType = value; }
|
||||
}
|
||||
public DateTime Raised
|
||||
{
|
||||
get { return data.Raised; }
|
||||
set { CheckChanged(data.Raised, value); data.Raised = value; }
|
||||
set { data.Raised = value; }
|
||||
}
|
||||
public SysId EmployeeIdRaised
|
||||
{
|
||||
get { return data.EmployeeIdRaised; }
|
||||
set { CheckChanged(data.EmployeeIdRaised, value); data.EmployeeIdRaised = value; }
|
||||
set { data.EmployeeIdRaised = value; }
|
||||
}
|
||||
public DateTime Completed
|
||||
{
|
||||
get { return data.Completed; }
|
||||
set { CheckChanged(data.Completed, value); data.Completed = value; }
|
||||
set { data.Completed = value; }
|
||||
}
|
||||
public SysId EmployeeIdCompleted
|
||||
{
|
||||
get { return data.EmployeeIdCompleted; }
|
||||
set { CheckChanged(data.EmployeeIdCompleted, value); data.EmployeeIdCompleted = value; }
|
||||
set { data.EmployeeIdCompleted = value; }
|
||||
}
|
||||
public String ActionData
|
||||
{
|
||||
get { return data.ActionData; }
|
||||
set { CheckChanged(data.ActionData, value); data.ActionData = value; }
|
||||
set { data.ActionData = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -33,25 +33,51 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = AdmissionDataStatus;
|
||||
}
|
||||
public SysId AdmissionId { get; set; }
|
||||
public Spm.AdmissionDataType AdmissionDataType { get; set; }
|
||||
public String AdmissionData { get; set; }
|
||||
}
|
||||
|
||||
internal void PopulateFrom(Data data)
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId AdmissionId
|
||||
{
|
||||
get { return data.AdmissionId; }
|
||||
set { CheckChanged(data.AdmissionId, value); data.AdmissionId = value; }
|
||||
}
|
||||
public Spm.AdmissionDataType AdmissionDataType
|
||||
{
|
||||
get { return data.AdmissionDataType; }
|
||||
set { CheckChanged((int)data.AdmissionDataType, (int)value); data.AdmissionDataType = value; }
|
||||
}
|
||||
public String AdmissionData
|
||||
{
|
||||
get { return data.AdmissionData; }
|
||||
set { CheckChanged(data.AdmissionData, value); data.AdmissionData = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
AdmissionId = data.AdmissionId;
|
||||
AdmissionDataType = data.AdmissionDataType;
|
||||
AdmissionData = data.AdmissionData;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -59,7 +85,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue AdmissionId { get; set; } = ValidValue.Valid;
|
||||
@@ -73,7 +100,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmAdmissionData(SysId admissionId, Spm.AdmissionDataType admissionDataType) : base()
|
||||
protected SpmAdmissionData (SysId admissionId, Spm.AdmissionDataType admissionDataType) : base()
|
||||
{
|
||||
admissionId = AdmissionId;
|
||||
admissionDataType = AdmissionDataType;
|
||||
@@ -89,7 +116,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> AdmissionDataStatuses { get { return new List<SaStatus>(admissionDataStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
admissionDataStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -106,8 +133,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -121,17 +148,17 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId AdmissionId
|
||||
{
|
||||
get { return data.AdmissionId; }
|
||||
set { CheckChanged(data.AdmissionId, value); data.AdmissionId = value; }
|
||||
set { data.AdmissionId = value; }
|
||||
}
|
||||
public Spm.AdmissionDataType AdmissionDataType
|
||||
{
|
||||
get { return data.AdmissionDataType; }
|
||||
set { CheckChanged((int)data.AdmissionDataType, (int)value); data.AdmissionDataType = value; }
|
||||
set { data.AdmissionDataType = value; }
|
||||
}
|
||||
public String AdmissionData
|
||||
{
|
||||
get { return data.AdmissionData; }
|
||||
set { CheckChanged(data.AdmissionData, value); data.AdmissionData = value; }
|
||||
set { data.AdmissionData = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -172,18 +199,18 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public static class SpmAdmissionDataList
|
||||
{
|
||||
/// <summary>Check whether admission data exists/locate in list with specified Id.</summary>
|
||||
public static bool SetIdentity(this List<SpmAdmissionData> values, SpmAdmission admission)
|
||||
public static bool SetIdentity (this List<SpmAdmissionData> values, SpmAdmission admission)
|
||||
{
|
||||
foreach (SpmAdmissionData admissionData in values)
|
||||
admissionData.AdmissionId = admission.Id;
|
||||
return true;
|
||||
}
|
||||
public static bool Find(this List<SpmAdmissionData> values, SpmAdmissionData admissionData)
|
||||
public static bool Find (this List<SpmAdmissionData> values, SpmAdmissionData admissionData)
|
||||
{
|
||||
if (admissionData == null) return false;
|
||||
return (values.Find(item => item == admissionData) != null);
|
||||
}
|
||||
public static bool FindByType(this List<SpmAdmissionData> values, String admissionDataType)
|
||||
public static bool FindByType (this List<SpmAdmissionData> values, String admissionDataType)
|
||||
{
|
||||
if (StringUtil.IsEmpty(admissionDataType)) return false;
|
||||
return values.Exists(item => item.AdmissionDataType.ToString().EqualsCI(admissionDataType));
|
||||
|
||||
@@ -35,20 +35,62 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = AdmissionRoleStatus;
|
||||
}
|
||||
public SysId AdmissionId { get; set; }
|
||||
public Spm.EmployeeRole EmployeeRole { get; set; }
|
||||
public Spm.EmployeeRoleCategory EmployeeRoleCategory { get; set; }
|
||||
public ushort Seq { get; set; }
|
||||
public SysId EmployeeRoleId { get; set; }
|
||||
public String EmployeeCode { get; set; }
|
||||
internal void PopulateFrom(Data data)
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId AdmissionId
|
||||
{
|
||||
get { return data.AdmissionId; }
|
||||
set { CheckChanged(data.AdmissionId, value); data.AdmissionId = value; }
|
||||
}
|
||||
public Spm.EmployeeRole EmployeeRole
|
||||
{
|
||||
get { return data.EmployeeRole; }
|
||||
set { CheckChanged((int)data.EmployeeRole, (int)value); data.EmployeeRole = value; }
|
||||
}
|
||||
public Spm.EmployeeRoleCategory EmployeeRoleCategory
|
||||
{
|
||||
get { return data.EmployeeRoleCategory; }
|
||||
set { CheckChanged((int)data.EmployeeRoleCategory, (int)value); data.EmployeeRoleCategory = value; }
|
||||
}
|
||||
public ushort Seq
|
||||
{
|
||||
get { return data.Seq; }
|
||||
set { CheckChanged(data.Seq, value); data.Seq = value; }
|
||||
}
|
||||
public SysId EmployeeRoleId
|
||||
{
|
||||
get { return data.EmployeeRoleId; }
|
||||
set { CheckChanged(data.EmployeeRoleId, value); data.EmployeeRoleId = value; }
|
||||
}
|
||||
public String EmployeeCode
|
||||
{
|
||||
get { return data.EmployeeCode; }
|
||||
set { CheckChanged(data.EmployeeCode, value); data.EmployeeCode = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
AdmissionId = data.AdmissionId;
|
||||
EmployeeRole = data.EmployeeRole;
|
||||
@@ -58,7 +100,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
EmployeeCode = data.EmployeeCode;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -66,7 +108,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue AdmissionId { get; set; } = ValidValue.Valid;
|
||||
@@ -83,7 +126,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmAdmissionRole(SysId admissionId, Spm.EmployeeRole employeeRole, Spm.EmployeeRoleCategory employeeRoleCategory) : base()
|
||||
protected SpmAdmissionRole (SysId admissionId, Spm.EmployeeRole employeeRole, Spm.EmployeeRoleCategory employeeRoleCategory) : base()
|
||||
{
|
||||
admissionId = AdmissionId;
|
||||
employeeRole = EmployeeRole;
|
||||
@@ -100,7 +143,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> AdmissionRoleStatuses { get { return new List<SaStatus>(admissionRoleStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
admissionRoleStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -117,8 +160,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -132,32 +175,32 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId AdmissionId
|
||||
{
|
||||
get { return data.AdmissionId; }
|
||||
set { CheckChanged(data.AdmissionId, value); data.AdmissionId = value; }
|
||||
set { data.AdmissionId = value; }
|
||||
}
|
||||
public Spm.EmployeeRole EmployeeRole
|
||||
{
|
||||
get { return data.EmployeeRole; }
|
||||
set { CheckChanged((int)data.EmployeeRole, (int)value); data.EmployeeRole = value; }
|
||||
set { data.EmployeeRole = value; }
|
||||
}
|
||||
public Spm.EmployeeRoleCategory EmployeeRoleCategory
|
||||
{
|
||||
get { return data.EmployeeRoleCategory; }
|
||||
set { CheckChanged((int)data.EmployeeRoleCategory, (int)value); data.EmployeeRoleCategory = value; }
|
||||
set { data.EmployeeRoleCategory = value; }
|
||||
}
|
||||
public ushort Seq
|
||||
{
|
||||
get { return data.Seq; }
|
||||
set { CheckChanged(data.Seq, value); data.Seq = value; }
|
||||
set { data.Seq = value; }
|
||||
}
|
||||
public SysId EmployeeRoleId
|
||||
{
|
||||
get { return data.EmployeeRoleId; }
|
||||
set { CheckChanged(data.EmployeeRoleId, value); data.EmployeeRoleId = value; }
|
||||
set { data.EmployeeRoleId = value; }
|
||||
}
|
||||
public String EmployeeCode
|
||||
{
|
||||
get { return data.EmployeeCode; }
|
||||
set { CheckChanged(data.EmployeeCode, value); data.EmployeeCode = value; }
|
||||
set { data.EmployeeCode = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -199,7 +242,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
//=======================================================================
|
||||
public static class SpmAdmissionRoleList
|
||||
{
|
||||
public static int CompareByRoleSeq(SpmAdmissionRole p1, SpmAdmissionRole p2)
|
||||
public static int CompareByRoleSeq (SpmAdmissionRole p1, SpmAdmissionRole p2)
|
||||
{
|
||||
Spm.EmployeeRole role1 = (p1 != null ? p1.EmployeeRole : Spm.EmployeeRole.Unknown);
|
||||
Spm.EmployeeRole role2 = (p2 != null ? p2.EmployeeRole : Spm.EmployeeRole.Unknown);
|
||||
@@ -213,7 +256,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
public enum SortMode { SortRoleSeq, };
|
||||
|
||||
public static void Sort(this List<SpmAdmissionRole> values, SortMode admissionRoleSort, bool ascending = true)
|
||||
public static void Sort (this List<SpmAdmissionRole> values, SortMode admissionRoleSort, bool ascending = true)
|
||||
{
|
||||
if (admissionRoleSort == SortMode.SortRoleSeq)
|
||||
values.Sort
|
||||
@@ -222,33 +265,33 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
{
|
||||
return CompareByRoleSeq(admissionRole1, admissionRole2);
|
||||
}
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
public static void SetSequence(this List<SpmAdmissionRole> values)
|
||||
public static void SetSequence (this List<SpmAdmissionRole> values)
|
||||
{
|
||||
if (values != null || values.Count == 0) return;
|
||||
for (int itemIdx = 0; itemIdx < values.Count; itemIdx++)
|
||||
values[itemIdx].Seq = (ushort)(itemIdx + 1);
|
||||
}
|
||||
|
||||
public static bool SetIdentity(this List<SpmAdmissionRole> values, SpmAdmission admission)
|
||||
public static bool SetIdentity (this List<SpmAdmissionRole> values, SpmAdmission admission)
|
||||
{
|
||||
foreach (SpmAdmissionRole admissionRole in values)
|
||||
admissionRole.AdmissionId = admission.Id;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool Find(this List<SpmAdmissionRole> values, SpmAdmissionRole admissionRole)
|
||||
public static bool Find (this List<SpmAdmissionRole> values, SpmAdmissionRole admissionRole)
|
||||
{
|
||||
if (admissionRole == null) return false;
|
||||
return (values.Find(item => item == admissionRole) != null);
|
||||
}
|
||||
|
||||
public static bool FindByRoleCatSeq(this List<SpmAdmissionRole> values, Spm.EmployeeRole role, Spm.EmployeeRoleCategory category, ushort seq)
|
||||
public static bool FindByRoleCatSeq (this List<SpmAdmissionRole> values, Spm.EmployeeRole role, Spm.EmployeeRoleCategory category, ushort seq)
|
||||
{
|
||||
if ((int)role > 0 && (int)category > 0) return false;
|
||||
return values.Exists(item => item.EmployeeRole.Equals(role) && item.EmployeeRoleCategory.Equals(category) && item.Seq.Equals(seq));
|
||||
return values.Exists(item => item.EmployeeRole.Equals(role) && item.EmployeeRoleCategory.Equals(category) && item.Seq.Equals(seq));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,31 +33,68 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data ()
|
||||
{
|
||||
Status = SpmDepartment.DefaultStatus;
|
||||
}
|
||||
public SysId InstitutionId { get; set; }
|
||||
public String Name { get; set; }
|
||||
public uint FacilityTypes { get; set; } = 0;
|
||||
public bool HasFacilityType (Spm.FacilityType facilityType)
|
||||
{
|
||||
return SpmDepartment.HasFacilityType(FacilityTypes, facilityType);
|
||||
}
|
||||
public uint AllowAnyFacilities { get; set; } = 0;
|
||||
public bool AllowAnyFacility (Spm.FacilityType facilityType)
|
||||
{
|
||||
return SpmDepartment.AllowAnyFacility(AllowAnyFacilities, facilityType);
|
||||
}
|
||||
public ushort GetCancelReBookLimit (Spm.FacilityType facilityType)
|
||||
{
|
||||
return SpmDepartment.GetCancelReBookLimit("", facilityType);
|
||||
}
|
||||
public DateTime ApplicableFrom { get; set; }
|
||||
public DateTime ApplicableTo { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId InstitutionId
|
||||
{
|
||||
get { return data.InstitutionId; }
|
||||
set { CheckChanged(data.InstitutionId, value); data.InstitutionId = value; }
|
||||
}
|
||||
public String Name
|
||||
{
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
}
|
||||
public uint FacilityTypes
|
||||
{
|
||||
get { return data.FacilityTypes; }
|
||||
set { data.FacilityTypes = value; }
|
||||
}
|
||||
public bool HasFacilityType (Spm.FacilityType facilityType)
|
||||
{
|
||||
return SpmDepartment.HasFacilityType(data.FacilityTypes, facilityType);
|
||||
}
|
||||
public uint AllowAnyFacilities
|
||||
{
|
||||
get { return data.AllowAnyFacilities; }
|
||||
set { data.AllowAnyFacilities = value; }
|
||||
}
|
||||
public bool AllowAnyFacility (Spm.FacilityType facilityType)
|
||||
{
|
||||
return SpmDepartment.AllowAnyFacility(data.AllowAnyFacilities, facilityType);
|
||||
}
|
||||
public DateTime ApplicableFrom
|
||||
{
|
||||
get { return data.ApplicableFrom; }
|
||||
set { CheckChanged(data.ApplicableFrom, value); data.ApplicableFrom = value; }
|
||||
}
|
||||
public DateTime ApplicableTo
|
||||
{
|
||||
get { return data.ApplicableTo; }
|
||||
set { CheckChanged(data.ApplicableTo, value); data.ApplicableTo = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
InstitutionId = data.InstitutionId;
|
||||
@@ -75,7 +112,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// ErrField.
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue InstitutionId { get; set; } = ValidValue.Valid;
|
||||
@@ -137,12 +174,12 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId InstitutionId
|
||||
{
|
||||
get { return data.InstitutionId; }
|
||||
protected set { CheckChanged(data.InstitutionId, value); data.InstitutionId = value; }
|
||||
protected set { data.InstitutionId = value; }
|
||||
}
|
||||
public String Name
|
||||
{
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
set { data.Name = value; }
|
||||
}
|
||||
// Facility types.
|
||||
public uint FacilityTypes { get { return data.FacilityTypes; } set { data.FacilityTypes = value; } }
|
||||
@@ -167,7 +204,11 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
return HasFacilityType(data.FacilityTypes, facilityType);
|
||||
}
|
||||
// Allow any facility.
|
||||
public uint AllowAnyFacilities { get { return data.AllowAnyFacilities; } set { data.AllowAnyFacilities = value; } }
|
||||
public uint AllowAnyFacilities
|
||||
{
|
||||
get { return data.AllowAnyFacilities; }
|
||||
set { data.AllowAnyFacilities = value; }
|
||||
}
|
||||
public static bool AllowAnyFacility (uint allowAnyFacilities, Spm.FacilityType facilityType)
|
||||
{
|
||||
int facilityTypeBit = GetFacilityTypeBit(facilityType);
|
||||
@@ -189,15 +230,16 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
{
|
||||
return GetCancelReBookLimit("", facilityType);
|
||||
}
|
||||
// Applicable period.
|
||||
public DateTime ApplicableFrom
|
||||
{
|
||||
get { return data.ApplicableFrom; }
|
||||
set { CheckChanged(data.ApplicableFrom, value); data.ApplicableFrom = value; }
|
||||
set { data.ApplicableFrom = value; }
|
||||
}
|
||||
public DateTime ApplicableTo
|
||||
{
|
||||
get { return data.ApplicableTo; }
|
||||
set { CheckChanged(data.ApplicableTo, value); data.ApplicableTo = value; }
|
||||
set { data.ApplicableTo = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -35,13 +35,10 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = EmployeeStatus;
|
||||
}
|
||||
public SysId InstitutionId { get; set; }
|
||||
public String EmployeeNo { get; set; }
|
||||
public String Code { get; set; }
|
||||
@@ -49,7 +46,57 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public String Title { get; set; }
|
||||
public String Forename { get; set; }
|
||||
public String Surname { get; set; }
|
||||
internal void PopulateFrom(Data data)
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId InstitutionId
|
||||
{
|
||||
get { return data.InstitutionId; }
|
||||
set { CheckChanged(data.InstitutionId, value); data.InstitutionId = value; }
|
||||
}
|
||||
public String EmployeeNo
|
||||
{
|
||||
get { return data.EmployeeNo; }
|
||||
set { CheckChanged(data.EmployeeNo, value); data.EmployeeNo = value; }
|
||||
}
|
||||
public String Code
|
||||
{
|
||||
get { return data.Code; }
|
||||
set { CheckChanged(data.Code, value); data.Code = value; }
|
||||
}
|
||||
public String Initials
|
||||
{
|
||||
get { return data.Initials; }
|
||||
set { CheckChanged(data.Initials, value); data.Initials = value; }
|
||||
}
|
||||
public String Title
|
||||
{
|
||||
get { return data.Title; }
|
||||
set { CheckChanged(data.Title, value); data.Title = value; }
|
||||
}
|
||||
public String Forename
|
||||
{
|
||||
get { return data.Forename; }
|
||||
set { CheckChanged(data.Forename, value); data.Forename = value; }
|
||||
}
|
||||
public String Surname
|
||||
{
|
||||
get { return data.Surname; }
|
||||
set { CheckChanged(data.Surname, value); data.Surname = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
InstitutionId = data.InstitutionId;
|
||||
EmployeeNo = data.EmployeeNo;
|
||||
@@ -60,7 +107,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
Surname = data.Surname;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -68,7 +115,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue InstitutionId { get; set; } = ValidValue.Valid;
|
||||
@@ -86,7 +134,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmEmployee(SysId id, SysId institutionId) : base()
|
||||
protected SpmEmployee (SysId id, SysId institutionId) : base()
|
||||
{
|
||||
institutionId = InstitutionId;
|
||||
Status = DefaultStatus;
|
||||
@@ -101,7 +149,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> EmployeeStatuses { get { return new List<SaStatus>(employeeStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
employeeStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -118,8 +166,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -133,39 +181,39 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId InstitutionId
|
||||
{
|
||||
get { return data.InstitutionId; }
|
||||
set { CheckChanged(data.InstitutionId, value); data.InstitutionId = value; }
|
||||
set { data.InstitutionId = value; }
|
||||
}
|
||||
public String EmployeeNo
|
||||
{
|
||||
get { return data.EmployeeNo; }
|
||||
set { CheckChanged(data.EmployeeNo, value); data.EmployeeNo = value; }
|
||||
set { data.EmployeeNo = value; }
|
||||
}
|
||||
public String Code
|
||||
{
|
||||
get { return data.Code; }
|
||||
set { CheckChanged(data.Code, value); data.Code = value; }
|
||||
set { data.Code = value; }
|
||||
}
|
||||
public String Initials
|
||||
{
|
||||
get { return data.Initials; }
|
||||
set { CheckChanged(data.Initials, value); data.Initials = value; }
|
||||
set { data.Initials = value; }
|
||||
}
|
||||
public String Title
|
||||
{
|
||||
get { return data.Title; }
|
||||
set { CheckChanged(data.Title, value); data.Title = value; }
|
||||
set { data.Title = value; }
|
||||
}
|
||||
public String Forename
|
||||
{
|
||||
get { return data.Forename; }
|
||||
set { CheckChanged(data.Forename, value); data.Forename = value; }
|
||||
set { data.Forename = value; }
|
||||
}
|
||||
public String Surname
|
||||
{
|
||||
get { return data.Surname; }
|
||||
set { CheckChanged(data.Surname, value); data.Surname = value; }
|
||||
set { data.Surname = value; }
|
||||
}
|
||||
public static String GetDisplayName(String surname, String forename, bool upperSurname = true)
|
||||
public static String GetDisplayName (String surname, String forename, bool upperSurname = true)
|
||||
{
|
||||
String name = surname;
|
||||
if (upperSurname)
|
||||
@@ -175,7 +223,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
name += forename;
|
||||
return name;
|
||||
}
|
||||
public String GetDisplayName(bool upperSurname = true)
|
||||
public String GetDisplayName (bool upperSurname = true)
|
||||
{
|
||||
return GetDisplayName(Surname, Forename, upperSurname);
|
||||
}
|
||||
@@ -186,7 +234,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
//-------------------------------------------------------------------
|
||||
// A s s o c i a t e d D a t a E l e m e n t s
|
||||
//-------------------------------------------------------------------
|
||||
public abstract bool HasRoles();
|
||||
public abstract bool HasRoles ();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a r a m s
|
||||
|
||||
@@ -34,20 +34,56 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = EmployeeRoleStatus;
|
||||
}
|
||||
public SysId DepartmentId { get; set; }
|
||||
public SysId EmployeeId { get; set; }
|
||||
public Spm.EmployeeRole EmployeeRole { get; set; }
|
||||
public DateTime ApplicationFrom { get; set; }
|
||||
public DateTime ApplicationTo { get; set; }
|
||||
}
|
||||
|
||||
internal void PopulateFrom(Data data)
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId DepartmentId
|
||||
{
|
||||
get { return data.DepartmentId; }
|
||||
set { CheckChanged(data.DepartmentId, value); data.DepartmentId = value; }
|
||||
}
|
||||
public SysId EmployeeId
|
||||
{
|
||||
get { return data.EmployeeId; }
|
||||
set { CheckChanged(data.EmployeeId, value); data.EmployeeId = value; }
|
||||
}
|
||||
public Spm.EmployeeRole EmployeeRole
|
||||
{
|
||||
get { return data.EmployeeRole; }
|
||||
set { CheckChanged((int)data.EmployeeRole, (int)value); data.EmployeeRole = value; }
|
||||
}
|
||||
public DateTime ApplicationFrom
|
||||
{
|
||||
get { return data.ApplicationFrom; }
|
||||
set { CheckChanged(data.ApplicationFrom, value); data.ApplicationFrom = value; }
|
||||
}
|
||||
public DateTime ApplicationTo
|
||||
{
|
||||
get { return data.ApplicationTo; }
|
||||
set { CheckChanged(data.ApplicationTo, value); data.ApplicationTo = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
DepartmentId = data.DepartmentId;
|
||||
EmployeeId = data.EmployeeId;
|
||||
@@ -56,7 +92,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
ApplicationTo = data.ApplicationTo;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -64,7 +100,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue DepartmentId { get; set; } = ValidValue.Valid;
|
||||
@@ -80,7 +117,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmEmployeeRole(SysId departmentId, SysId employeeId, Spm.EmployeeRole employeeRole) : base()
|
||||
protected SpmEmployeeRole (SysId departmentId, SysId employeeId, Spm.EmployeeRole employeeRole) : base()
|
||||
{
|
||||
departmentId = DepartmentId;
|
||||
employeeId = EmployeeId;
|
||||
@@ -97,7 +134,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> EmployeeRoleStatuses { get { return new List<SaStatus>(employeeRoleStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
employeeRoleStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -114,8 +151,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -129,37 +166,36 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId DepartmentId
|
||||
{
|
||||
get { return data.DepartmentId; }
|
||||
set { CheckChanged(data.DepartmentId, value); data.DepartmentId = value; }
|
||||
set { data.DepartmentId = value; }
|
||||
}
|
||||
public SysId EmployeeId
|
||||
{
|
||||
get { return data.EmployeeId; }
|
||||
set { CheckChanged(data.EmployeeId, value); data.EmployeeId = value; }
|
||||
set { data.EmployeeId = value; }
|
||||
}
|
||||
public Spm.EmployeeRole EmployeeRole
|
||||
{
|
||||
get { return data.EmployeeRole; }
|
||||
set { CheckChanged((int)data.EmployeeRole, (int)value); data.EmployeeRole = value; }
|
||||
set { data.EmployeeRole = value; }
|
||||
}
|
||||
public DateTime ApplicationFrom
|
||||
{
|
||||
get { return data.ApplicationFrom; }
|
||||
set { CheckChanged(data.ApplicationFrom, value); data.ApplicationFrom = value; }
|
||||
set { data.ApplicationFrom = value; }
|
||||
}
|
||||
public DateTime ApplicationTo
|
||||
{
|
||||
get { return data.ApplicationTo; }
|
||||
set { CheckChanged(data.ApplicationTo, value); data.ApplicationTo = value; }
|
||||
set { data.ApplicationTo = value; }
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Flags.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// A s s o c i a t e d D a t a E l e m e n t s
|
||||
//-------------------------------------------------------------------
|
||||
public abstract bool HasAdmissionRoles();
|
||||
public abstract bool HasAdmissionRoles ();
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a r a m s
|
||||
|
||||
@@ -41,13 +41,10 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = FacilityStatus;
|
||||
}
|
||||
public SysId DepartmentId { get; set; }
|
||||
public Spm.FacilityType FacilityType { get; set; }
|
||||
public String Name { get; set; }
|
||||
@@ -59,7 +56,85 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public String ScheduleFreezeData { get; set; }
|
||||
public DateTime ApplicationFrom { get; set; }
|
||||
public DateTime ApplicationTo { get; set; }
|
||||
internal void PopulateFrom(Data data)
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId DepartmentId
|
||||
{
|
||||
get { return data.DepartmentId; }
|
||||
set { CheckChanged(data.DepartmentId, value); data.DepartmentId = value; }
|
||||
}
|
||||
public Spm.FacilityType FacilityType
|
||||
{
|
||||
get { return data.FacilityType; }
|
||||
set { CheckChanged((int)data.FacilityType, (int)value); data.FacilityType = value; }
|
||||
}
|
||||
public String Name
|
||||
{
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
}
|
||||
public String SortCode
|
||||
{
|
||||
get { return data.SortCode; }
|
||||
set { CheckChanged(data.SortCode, value); data.SortCode = value; }
|
||||
}
|
||||
public String Desc
|
||||
{
|
||||
get { return data.Desc; }
|
||||
set { CheckChanged(data.Desc, value); data.Desc = value; }
|
||||
}
|
||||
public Spm.FacilityTemplateMapType TemplateMapType
|
||||
{
|
||||
get { return data.TemplateMapType; }
|
||||
set { CheckChanged((int)data.TemplateMapType, (int)value); data.TemplateMapType = value; }
|
||||
}
|
||||
public Spm.ScheduleFreezeType ScheduleFreezeType
|
||||
{
|
||||
get { return data.ScheduleFreezeType; }
|
||||
set { CheckChanged((int)data.ScheduleFreezeType, (int)value); data.ScheduleFreezeType = value; }
|
||||
}
|
||||
public DateTime ScheduleFreezeAtTime
|
||||
{
|
||||
get { return data.ScheduleFreezeAtTime; }
|
||||
set { CheckChanged(data.ScheduleFreezeAtTime, value); data.ScheduleFreezeAtTime = value; }
|
||||
}
|
||||
public String ScheduleFreezeData
|
||||
{
|
||||
get { return data.ScheduleFreezeData; }
|
||||
set { CheckChanged(data.ScheduleFreezeData, value); data.ScheduleFreezeData = value; }
|
||||
}
|
||||
public DateTime ApplicationFrom
|
||||
{
|
||||
get { return data.ApplicationFrom; }
|
||||
set { CheckChanged(data.ApplicationFrom, value); data.ApplicationFrom = value; }
|
||||
}
|
||||
public DateTime ApplicationTo
|
||||
{
|
||||
get { return data.ApplicationTo; }
|
||||
set { CheckChanged(data.ApplicationTo, value); data.ApplicationTo = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Flags.
|
||||
public bool IsBookingToFacility
|
||||
{
|
||||
get { return GetFlag(Flag_BookingToFacility); }
|
||||
set { SetFlag(Flag_BookingToFacility, value); }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
DepartmentId = data.DepartmentId;
|
||||
FacilityType = data.FacilityType;
|
||||
@@ -74,7 +149,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
ApplicationTo = data.ApplicationTo;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -82,7 +157,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue DepartmentId { get; set; } = ValidValue.Valid;
|
||||
@@ -101,11 +177,11 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private readonly Data data = new Data();
|
||||
public static readonly ushort Flag_BookingToFacility = 0x01;
|
||||
public static readonly Byte Flag_BookingToFacility = 0x01;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmFacility(SysId facilityId, SysId departmentId, Spm.FacilityType facilityType) : base()
|
||||
protected SpmFacility (SysId facilityId, SysId departmentId, Spm.FacilityType facilityType) : base()
|
||||
{
|
||||
departmentId = DepartmentId;
|
||||
facilityType = FacilityType;
|
||||
@@ -121,7 +197,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> FacilityStatuses { get { return new List<SaStatus>(facilityStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
facilityStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -135,25 +211,25 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Utilities.
|
||||
public Spm.WardAdmissionMode GetBookingMode()
|
||||
{
|
||||
// Based on 'Booking to Facility' flag etc.
|
||||
if (FacilityType == Spm.FacilityType.Ward && IsBookingToFacility)
|
||||
return Spm.WardAdmissionMode.ByWard;
|
||||
return Spm.WardAdmissionMode.ByResource;
|
||||
}
|
||||
public Spm.WardAdmissionMode GetBookingMode ()
|
||||
{
|
||||
// Based on 'Booking to Facility' flag etc.
|
||||
if (FacilityType == Spm.FacilityType.Ward && IsBookingToFacility)
|
||||
return Spm.WardAdmissionMode.ByWard;
|
||||
return Spm.WardAdmissionMode.ByResource;
|
||||
}
|
||||
|
||||
public bool IsTemplateRequiredForBooking()
|
||||
{
|
||||
if (GetBookingMode() == Spm.WardAdmissionMode.ByWard)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public bool IsTemplateRequiredForBooking ()
|
||||
{
|
||||
if (GetBookingMode() == Spm.WardAdmissionMode.ByWard)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -167,57 +243,57 @@ public Data GetData() { return data.Clone(); }
|
||||
public SysId DepartmentId
|
||||
{
|
||||
get { return data.DepartmentId; }
|
||||
set { CheckChanged(data.DepartmentId, value); data.DepartmentId = value; }
|
||||
set { data.DepartmentId = value; }
|
||||
}
|
||||
public Spm.FacilityType FacilityType
|
||||
{
|
||||
get { return data.FacilityType; }
|
||||
set { CheckChanged((int)data.FacilityType, (int)value); data.FacilityType = value; }
|
||||
set { data.FacilityType = value; }
|
||||
}
|
||||
public String Name
|
||||
{
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
set { data.Name = value; }
|
||||
}
|
||||
public String SortCode
|
||||
{
|
||||
get { return data.SortCode; }
|
||||
set { CheckChanged(data.SortCode, value); data.SortCode = value; }
|
||||
set { data.SortCode = value; }
|
||||
}
|
||||
public String Desc
|
||||
{
|
||||
get { return data.Desc; }
|
||||
set { CheckChanged(data.Desc, value); data.Desc = value; }
|
||||
set { data.Desc = value; }
|
||||
}
|
||||
public Spm.FacilityTemplateMapType TemplateMapType
|
||||
{
|
||||
get { return data.TemplateMapType; }
|
||||
set { CheckChanged((int)data.TemplateMapType, (int)value); data.TemplateMapType = value; }
|
||||
set { data.TemplateMapType = value; }
|
||||
}
|
||||
public Spm.ScheduleFreezeType ScheduleFreezeType
|
||||
{
|
||||
get { return data.ScheduleFreezeType; }
|
||||
set { CheckChanged((int)data.ScheduleFreezeType, (int)value); data.ScheduleFreezeType = value; }
|
||||
set { data.ScheduleFreezeType = value; }
|
||||
}
|
||||
public DateTime ScheduleFreezeAtTime
|
||||
{
|
||||
get { return data.ScheduleFreezeAtTime; }
|
||||
set { CheckChanged(data.ScheduleFreezeAtTime, value); data.ScheduleFreezeAtTime = value; }
|
||||
set { data.ScheduleFreezeAtTime = value; }
|
||||
}
|
||||
public String ScheduleFreezeData
|
||||
{
|
||||
get { return data.ScheduleFreezeData; }
|
||||
set { CheckChanged(data.ScheduleFreezeData, value); data.ScheduleFreezeData = value; }
|
||||
set { data.ScheduleFreezeData = value; }
|
||||
}
|
||||
public DateTime ApplicationFrom
|
||||
{
|
||||
get { return data.ApplicationFrom; }
|
||||
set { CheckChanged(data.ApplicationFrom, value); data.ApplicationFrom = value; }
|
||||
set { data.ApplicationFrom = value; }
|
||||
}
|
||||
public DateTime ApplicationTo
|
||||
{
|
||||
get { return data.ApplicationTo; }
|
||||
set { CheckChanged(data.ApplicationTo, value); data.ApplicationTo = value; }
|
||||
set { data.ApplicationTo = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -231,15 +307,15 @@ public Data GetData() { return data.Clone(); }
|
||||
//-------------------------------------------------------------------
|
||||
// A s s o c i a t e d D a t a E l e m e n t s
|
||||
//-------------------------------------------------------------------
|
||||
public abstract bool HasTemplates(); // eg. Slots.
|
||||
public abstract bool HasSessions();
|
||||
public abstract bool HasSessionsBefore(DateTime target, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasSessionsAfter(DateTime target, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasSessions(DateTime before, DateTime after, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissions(Spm.AdmissionCancelType admissionCancelType);
|
||||
public abstract bool HasAdmissionsBefore(DateTime target, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissionsAfter(DateTime target, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissions(DateTime before, DateTime after, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasTemplates (); // eg. Slots.
|
||||
public abstract bool HasSessions ();
|
||||
public abstract bool HasSessionsBefore (DateTime target, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasSessionsAfter (DateTime target, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasSessions (DateTime before, DateTime after, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissions (Spm.AdmissionCancelType admissionCancelType);
|
||||
public abstract bool HasAdmissionsBefore (DateTime target, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissionsAfter (DateTime target, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissions (DateTime before, DateTime after, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a r a m s
|
||||
|
||||
@@ -106,36 +106,168 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = FacilitySessionStatus;
|
||||
}
|
||||
public SysId FacilityId{ get; set; }
|
||||
public SysId FacilityTemplateId{ get; set; }
|
||||
public DateTime SessionDate{ get; set; }
|
||||
public SysId FacilityId { get; set; }
|
||||
public SysId FacilityTemplateId { get; set; }
|
||||
public DateTime SessionDate { get; set; }
|
||||
public Spm.TemplateType TemplateType { get; set; }
|
||||
public String Name { get; set; }
|
||||
public String Desc { get; set; }
|
||||
public String SessionCode{ get; set; }
|
||||
public String Description { get; set; }
|
||||
public String SessionCode { get; set; }
|
||||
public DateTime StartTime { get; set; }
|
||||
public DateTime FinishTime { get; set; }
|
||||
// Ward resources & Clinic sessions.
|
||||
public Spm.ResourceCapacityType ResourceCapacityType { get; set; }
|
||||
public short CapacityMin { get; set; }
|
||||
public short CapacityMax { get; set; }
|
||||
public decimal UnitsExp { get; set; }
|
||||
public decimal UnitsExp { get; set; }
|
||||
public short DurationInterval { get; set; }
|
||||
public short DurationMin { get; set; }
|
||||
public short DurationMax { get; set; }
|
||||
public short DurationBreaks { get; set; }
|
||||
// Theatre & Clinic sessions.
|
||||
public SysId ConsultantId{ get; set; }
|
||||
public String ConsultantCode{ get; set; }
|
||||
public String SpecialityCode{ get; set; }
|
||||
public SysId ConsultantId { get; set; }
|
||||
public String ConsultantCode { get; set; }
|
||||
public String SpecialityCode { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId FacilityId
|
||||
{
|
||||
get { return data.FacilityId; }
|
||||
set { CheckChanged(data.FacilityId, value); data.FacilityId = value; }
|
||||
}
|
||||
public SysId FacilityTemplateId
|
||||
{
|
||||
get { return data.FacilityTemplateId; }
|
||||
set { CheckChanged(data.FacilityTemplateId, value); data.FacilityTemplateId = value; }
|
||||
}
|
||||
public DateTime SessionDate
|
||||
{
|
||||
get { return data.SessionDate; }
|
||||
set { CheckChanged(data.SessionDate, value); data.SessionDate = value; }
|
||||
}
|
||||
public Spm.TemplateType TemplateType
|
||||
{
|
||||
get { return data.TemplateType; }
|
||||
set { CheckChanged((int)data.TemplateType, (int)value); data.TemplateType = value; }
|
||||
}
|
||||
public String Name
|
||||
{
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
}
|
||||
public String Description
|
||||
{
|
||||
get { return data.Description; }
|
||||
set { CheckChanged(data.Description, value); data.Description = value; }
|
||||
}
|
||||
public String SessionCode
|
||||
{
|
||||
get { return data.SessionCode; }
|
||||
set { CheckChanged(data.SessionCode, value); data.SessionCode = value; }
|
||||
}
|
||||
public DateTime StartTime
|
||||
{
|
||||
get { return data.StartTime; }
|
||||
set { CheckChanged(data.StartTime, value); data.StartTime = value; }
|
||||
}
|
||||
public DateTime FinishTime
|
||||
{
|
||||
get { return data.FinishTime; }
|
||||
set { CheckChanged(data.FinishTime, value); data.FinishTime = value; }
|
||||
}
|
||||
public Spm.ResourceCapacityType ResourceCapacityType
|
||||
{
|
||||
get { return data.ResourceCapacityType; }
|
||||
set { CheckChanged((int)data.ResourceCapacityType, (int)value); data.ResourceCapacityType = value; }
|
||||
}
|
||||
public short CapacityMin
|
||||
{
|
||||
get { return data.CapacityMin; }
|
||||
set { CheckChanged(data.CapacityMin, value); data.CapacityMin = value; }
|
||||
}
|
||||
public short CapacityMax
|
||||
{
|
||||
get { return data.CapacityMax; }
|
||||
set { CheckChanged(data.CapacityMax, value); data.CapacityMax = value; }
|
||||
}
|
||||
public decimal UnitsExp
|
||||
{
|
||||
get { return data.UnitsExp; }
|
||||
set { CheckChanged(data.UnitsExp, value); data.UnitsExp = value; }
|
||||
}
|
||||
public short DurationInterval
|
||||
{
|
||||
get { return data.DurationInterval; }
|
||||
set { CheckChanged(data.DurationInterval, value); data.DurationInterval = value; }
|
||||
}
|
||||
public short DurationMin
|
||||
{
|
||||
get { return data.DurationMin; }
|
||||
set { CheckChanged(data.DurationMin, value); data.DurationMin = value; }
|
||||
}
|
||||
public short DurationMax
|
||||
{
|
||||
get { return data.DurationMax; }
|
||||
set { CheckChanged(data.DurationMax, value); data.DurationMax = value; }
|
||||
}
|
||||
public short DurationBreaks
|
||||
{
|
||||
get { return data.DurationBreaks; }
|
||||
set { CheckChanged(data.DurationBreaks, value); data.DurationBreaks = value; }
|
||||
}
|
||||
public SysId ConsultantId
|
||||
{
|
||||
get { return data.ConsultantId; }
|
||||
set { CheckChanged(data.ConsultantId, value); data.ConsultantId = value; }
|
||||
}
|
||||
public String ConsultantCode
|
||||
{
|
||||
get { return data.ConsultantCode; }
|
||||
set { CheckChanged(data.ConsultantCode, value); data.ConsultantCode = value; }
|
||||
}
|
||||
public String SpecialityCode
|
||||
{
|
||||
get { return data.SpecialityCode; }
|
||||
set { CheckChanged(data.SpecialityCode, value); data.SpecialityCode = value; }
|
||||
}
|
||||
// Flags.
|
||||
public bool NotAvailable
|
||||
{
|
||||
get { return GetFlag(Flag_NotAvailable); }
|
||||
set { SetFlag(Flag_NotAvailable, value); }
|
||||
}
|
||||
public bool HideTemplateNotes
|
||||
{
|
||||
get { return GetFlag(Flag_HideTemplateNotes); }
|
||||
set { SetFlag(Flag_HideTemplateNotes, value); }
|
||||
}
|
||||
public bool HighlightSessionNotes
|
||||
{
|
||||
get { return GetFlag(Flag_HighlightSessionNotes); }
|
||||
set { SetFlag(Flag_HighlightSessionNotes, value); }
|
||||
}
|
||||
public bool Finalised
|
||||
{
|
||||
get { return GetFlag(Flag_Finalised); }
|
||||
set { SetFlag(Flag_Finalised, value); }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom(Data data)
|
||||
{
|
||||
FacilityId = data.FacilityId;
|
||||
@@ -143,7 +275,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
SessionDate = data.SessionDate;
|
||||
TemplateType = data.TemplateType;
|
||||
Name = data.Name;
|
||||
Desc = data.Desc;
|
||||
Description = data.Description;
|
||||
SessionCode = data.SessionCode;
|
||||
StartTime = data.StartTime;
|
||||
FinishTime = data.FinishTime;
|
||||
@@ -168,7 +300,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue FacilityId { get; set; } = ValidValue.Valid;
|
||||
@@ -176,7 +309,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public ValidValue SessionDate { get; set; } = ValidValue.Valid;
|
||||
public ValidValue TemplateType { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Name { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Desc { get; set; } = ValidValue.Valid;
|
||||
public ValidValue Description { get; set; } = ValidValue.Valid;
|
||||
public ValidValue SessionCode { get; set; } = ValidValue.Valid;
|
||||
public ValidValue StartTime { get; set; } = ValidValue.Valid;
|
||||
public ValidValue FinishTime { get; set; } = ValidValue.Valid;
|
||||
@@ -196,10 +329,10 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private readonly Data data = new Data();
|
||||
public static readonly ushort Flag_NotAvailable = 0x01;
|
||||
public static readonly ushort Flag_HideTemplateNotes = 0x02;
|
||||
public static readonly ushort Flag_HighlightSessionNotes = 0x03;
|
||||
public static readonly ushort Flag_Finalised = 0x04;
|
||||
public static readonly Byte Flag_NotAvailable = 0x01;
|
||||
public static readonly Byte Flag_HideTemplateNotes = 0x02;
|
||||
public static readonly Byte Flag_HighlightSessionNotes = 0x03;
|
||||
public static readonly Byte Flag_Finalised = 0x04;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
@@ -252,67 +385,67 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId FacilityId
|
||||
{
|
||||
get { return data.FacilityId; }
|
||||
set { CheckChanged(data.FacilityId, value); data.FacilityId = value; }
|
||||
set { data.FacilityId = value; }
|
||||
}
|
||||
public SysId FacilityTemplateId
|
||||
{
|
||||
get { return data.FacilityTemplateId; }
|
||||
set { CheckChanged(data.FacilityTemplateId, value); data.FacilityTemplateId = value; }
|
||||
set { data.FacilityTemplateId = value; }
|
||||
}
|
||||
public DateTime SessionDate
|
||||
{
|
||||
get { return data.SessionDate; }
|
||||
set { CheckChanged(data.SessionDate, value); data.SessionDate = value; }
|
||||
set { data.SessionDate = value; }
|
||||
}
|
||||
public Spm.TemplateType TemplateType
|
||||
{
|
||||
get { return data.TemplateType; }
|
||||
set { CheckChanged((int)data.TemplateType, (int)value); data.TemplateType = value; }
|
||||
set { data.TemplateType = value; }
|
||||
}
|
||||
public String Name
|
||||
{
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
set { data.Name = value; }
|
||||
}
|
||||
public String Description
|
||||
{
|
||||
get { return data.Desc; }
|
||||
set { CheckChanged(data.Desc, value); data.Desc = value; }
|
||||
get { return data.Description; }
|
||||
set { data.Description = value; }
|
||||
}
|
||||
public String SessionCode
|
||||
{
|
||||
get { return data.SessionCode; }
|
||||
set { CheckChanged(data.SessionCode, value); data.SessionCode = value; }
|
||||
set { data.SessionCode = value; }
|
||||
}
|
||||
public DateTime StartTime
|
||||
{
|
||||
get { return data.StartTime; }
|
||||
set { CheckChanged(data.StartTime, value); data.StartTime = value; }
|
||||
set { data.StartTime = value; }
|
||||
}
|
||||
public DateTime FinishTime
|
||||
{
|
||||
get { return data.FinishTime; }
|
||||
set { CheckChanged(data.FinishTime, value); data.FinishTime = value; }
|
||||
set { data.FinishTime = value; }
|
||||
}
|
||||
public Spm.ResourceCapacityType ResourceCapacityType
|
||||
{
|
||||
get { return data.ResourceCapacityType; }
|
||||
set { CheckChanged((int)data.ResourceCapacityType, (int)value); data.ResourceCapacityType = value; }
|
||||
set { data.ResourceCapacityType = value; }
|
||||
}
|
||||
public short CapacityMin
|
||||
{
|
||||
get { return data.CapacityMin; }
|
||||
set { CheckChanged(data.CapacityMin, value); data.CapacityMin = value; }
|
||||
set { data.CapacityMin = value; }
|
||||
}
|
||||
public short CapacityMax
|
||||
{
|
||||
get { return data.CapacityMax; }
|
||||
set { CheckChanged(data.CapacityMax, value); data.CapacityMax = value; }
|
||||
set { data.CapacityMax = value; }
|
||||
}
|
||||
public decimal UnitsExp
|
||||
{
|
||||
get { return data.UnitsExp; }
|
||||
set { CheckChanged(data.UnitsExp, value); data.UnitsExp = value; }
|
||||
set { data.UnitsExp = value; }
|
||||
}
|
||||
public static ushort GetDurationIntervalDefault()
|
||||
{
|
||||
@@ -321,37 +454,37 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public short DurationInterval
|
||||
{
|
||||
get { return data.DurationInterval; }
|
||||
set { CheckChanged(data.DurationInterval, value); data.DurationInterval = value; }
|
||||
set { data.DurationInterval = value; }
|
||||
}
|
||||
public short DurationMin
|
||||
{
|
||||
get { return data.DurationMin; }
|
||||
set { CheckChanged(data.DurationMin, value); data.DurationMin = value; }
|
||||
set { data.DurationMin = value; }
|
||||
}
|
||||
public short DurationMax
|
||||
{
|
||||
get { return data.DurationMax; }
|
||||
set { CheckChanged(data.DurationMax, value); data.DurationMax = value; }
|
||||
set { data.DurationMax = value; }
|
||||
}
|
||||
public short DurationBreaks
|
||||
{
|
||||
get { return data.DurationBreaks; }
|
||||
set { CheckChanged(data.DurationBreaks, value); data.DurationBreaks = value; }
|
||||
set { data.DurationBreaks = value; }
|
||||
}
|
||||
public SysId ConsultantId
|
||||
{
|
||||
get { return data.ConsultantId; }
|
||||
set { CheckChanged(data.ConsultantId, value); data.ConsultantId = value; }
|
||||
set { data.ConsultantId = value; }
|
||||
}
|
||||
public String ConsultantCode
|
||||
{
|
||||
get { return data.ConsultantCode; }
|
||||
set { CheckChanged(data.ConsultantCode, value); data.ConsultantCode = value; }
|
||||
set { data.ConsultantCode = value; }
|
||||
}
|
||||
public String SpecialityCode
|
||||
{
|
||||
get { return data.SpecialityCode; }
|
||||
set { CheckChanged(data.SpecialityCode, value); data.SpecialityCode = value; }
|
||||
set { data.SpecialityCode = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -55,13 +55,10 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = FacilityTemplateStatus;
|
||||
}
|
||||
public SysId FacilityId { get; set; }
|
||||
public Spm.ResourceCategory ResourceCategory { get; set; }
|
||||
public Spm.TemplateType TemplateType { get; set; }
|
||||
@@ -82,15 +79,156 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
// Theatre & Clinic sessions.
|
||||
public ushort WeekOfMonth { get; set; }
|
||||
public ushort DayOfWeek { get; set; }
|
||||
public SysId ConsultantId { get; set; } // Employee role.
|
||||
public SysId ConsultantId { get; set; }
|
||||
public String ConsultantCode { get; set; }
|
||||
public String SpecialityCode { get; set; }
|
||||
public DateTime StartTime { get; set; }
|
||||
public DateTime FinishTime { get; set; }
|
||||
public DateTime ApplicationFrom { get; set; }
|
||||
public DateTime ApplicationTo { get; set; }
|
||||
}
|
||||
|
||||
internal void PopulateFrom(Data data)
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId FacilityId
|
||||
{
|
||||
get { return data.FacilityId; }
|
||||
set { CheckChanged(data.FacilityId, value); data.FacilityId = value; }
|
||||
}
|
||||
public Spm.ResourceCategory ResourceCategory
|
||||
{
|
||||
get { return data.ResourceCategory; }
|
||||
set { CheckChanged((int)data.ResourceCategory, (int)value); data.ResourceCategory = value; }
|
||||
}
|
||||
public Spm.TemplateType TemplateType
|
||||
{
|
||||
get { return data.TemplateType; }
|
||||
set { CheckChanged((int)data.TemplateType, (int)value); data.TemplateType = value; }
|
||||
}
|
||||
public String Name
|
||||
{
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
}
|
||||
public String SortCode
|
||||
{
|
||||
get { return data.SortCode; }
|
||||
set { CheckChanged(data.SortCode, value); data.SortCode = value; }
|
||||
}
|
||||
public String Desc
|
||||
{
|
||||
get { return data.Desc; }
|
||||
set { CheckChanged(data.Desc, value); data.Desc = value; }
|
||||
}
|
||||
public String SessionCode
|
||||
{
|
||||
get { return data.SessionCode; }
|
||||
set { CheckChanged(data.SessionCode, value); data.SessionCode = value; }
|
||||
}
|
||||
public String Group
|
||||
{
|
||||
get { return data.Group; }
|
||||
set { CheckChanged(data.Group, value); data.Group = value; }
|
||||
}
|
||||
// Ward resources & Clinic sessions.
|
||||
public Spm.ResourceCapacityType ResourceCapacityType
|
||||
{
|
||||
get { return data.ResourceCapacityType; }
|
||||
set { CheckChanged((int)data.ResourceCapacityType, (int)value); data.ResourceCapacityType = value; }
|
||||
}
|
||||
public ushort CapacityMin
|
||||
{
|
||||
get { return data.CapacityMin; }
|
||||
set { CheckChanged(data.CapacityMin, value); data.CapacityMin = value; }
|
||||
}
|
||||
public ushort CapacityMax
|
||||
{
|
||||
get { return data.CapacityMax; }
|
||||
set { CheckChanged(data.CapacityMax, value); data.CapacityMax = value; }
|
||||
}
|
||||
public decimal UnitsExp
|
||||
{
|
||||
get { return data.UnitsExp; }
|
||||
set { CheckChanged(data.UnitsExp, value); data.UnitsExp = value; }
|
||||
}
|
||||
public ushort DurationInterval
|
||||
{
|
||||
get { return data.DurationInterval; }
|
||||
set { CheckChanged(data.DurationInterval, value); data.DurationInterval = value; }
|
||||
}
|
||||
public ushort DurationMin
|
||||
{
|
||||
get { return data.DurationMin; }
|
||||
set { CheckChanged(data.DurationMin, value); data.DurationMin = value; }
|
||||
}
|
||||
public ushort DurationMax
|
||||
{
|
||||
get { return data.DurationMax; }
|
||||
set { CheckChanged(data.DurationMax, value); data.DurationMax = value; }
|
||||
}
|
||||
public ushort DurationBreaks
|
||||
{
|
||||
get { return data.DurationBreaks; }
|
||||
set { CheckChanged(data.DurationBreaks, value); data.DurationBreaks = value; }
|
||||
}
|
||||
// Theatre & Clinic sessions.
|
||||
public ushort WeekOfMonth
|
||||
{
|
||||
get { return data.WeekOfMonth; }
|
||||
set { CheckChanged(data.WeekOfMonth, value); data.WeekOfMonth = value; }
|
||||
}
|
||||
public ushort DayOfWeek
|
||||
{
|
||||
get { return data.DayOfWeek; }
|
||||
set { CheckChanged(data.DayOfWeek, value); data.DayOfWeek = value; }
|
||||
}
|
||||
public SysId ConsultantId
|
||||
{
|
||||
get { return data.ConsultantId; }
|
||||
set { CheckChanged(data.ConsultantId, value); data.ConsultantId = value; }
|
||||
}
|
||||
public String ConsultantCode
|
||||
{
|
||||
get { return data.ConsultantCode; }
|
||||
set { CheckChanged(data.ConsultantCode, value); data.ConsultantCode = value; }
|
||||
}
|
||||
public String SpecialityCode
|
||||
{
|
||||
get { return data.SpecialityCode; }
|
||||
set { CheckChanged(data.SpecialityCode, value); data.SpecialityCode = value; }
|
||||
}
|
||||
public DateTime StartTime
|
||||
{
|
||||
get { return data.StartTime; }
|
||||
set { CheckChanged(data.StartTime, value); data.StartTime = value; }
|
||||
}
|
||||
public DateTime FinishTime
|
||||
{
|
||||
get { return data.FinishTime; }
|
||||
set { CheckChanged(data.FinishTime, value); data.FinishTime = value; }
|
||||
}
|
||||
public DateTime ApplicationFrom
|
||||
{
|
||||
get { return data.ApplicationFrom; }
|
||||
set { CheckChanged(data.ApplicationFrom, value); data.ApplicationFrom = value; }
|
||||
}
|
||||
public DateTime ApplicationTo
|
||||
{
|
||||
get { return data.ApplicationTo; }
|
||||
set { CheckChanged(data.ApplicationTo, value); data.ApplicationTo = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
FacilityId = data.FacilityId;
|
||||
ResourceCategory = data.ResourceCategory;
|
||||
@@ -119,7 +257,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
ApplicationTo = data.ApplicationTo;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -127,7 +265,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue FacilityId { get; set; } = ValidValue.Valid;
|
||||
@@ -163,7 +302,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmFacilityTemplate(SysId facilityId, Spm.ResourceCategory resourceCategory) : base()
|
||||
protected SpmFacilityTemplate (SysId facilityId, Spm.ResourceCategory resourceCategory) : base()
|
||||
{
|
||||
facilityId = FacilityId;
|
||||
resourceCategory = ResourceCategory;
|
||||
@@ -179,7 +318,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> FacilityTemplateStatuses { get { return new List<SaStatus>(facilityTemplateStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
facilityTemplateStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -199,8 +338,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -214,133 +353,133 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId FacilityId
|
||||
{
|
||||
get { return data.FacilityId; }
|
||||
set { CheckChanged(data.FacilityId, value); data.FacilityId = value; }
|
||||
set { data.FacilityId = value; }
|
||||
}
|
||||
public Spm.ResourceCategory ResourceCategory
|
||||
{
|
||||
get { return data.ResourceCategory; }
|
||||
set { CheckChanged((int)data.ResourceCategory, (int)value); data.ResourceCategory = value; }
|
||||
set { data.ResourceCategory = value; }
|
||||
}
|
||||
public Spm.TemplateType TemplateType
|
||||
{
|
||||
get { return data.TemplateType; }
|
||||
set { CheckChanged((int)data.TemplateType, (int)value); data.TemplateType = value; }
|
||||
set { data.TemplateType = value; }
|
||||
}
|
||||
public String Name
|
||||
{
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
set { data.Name = value; }
|
||||
}
|
||||
public String SortCode
|
||||
{
|
||||
get { return data.SortCode; }
|
||||
set { CheckChanged(data.SortCode, value); data.SortCode = value; }
|
||||
set { data.SortCode = value; }
|
||||
}
|
||||
public String Desc
|
||||
{
|
||||
get { return data.Desc; }
|
||||
set { CheckChanged(data.Desc, value); data.Desc = value; }
|
||||
set { data.Desc = value; }
|
||||
}
|
||||
public String SessionCode
|
||||
{
|
||||
get { return data.SessionCode; }
|
||||
set { CheckChanged(data.SessionCode, value); data.SessionCode = value; }
|
||||
set { data.SessionCode = value; }
|
||||
}
|
||||
public String Group
|
||||
{
|
||||
get { return data.Group; }
|
||||
set { CheckChanged(data.Group, value); data.Group = value; }
|
||||
set { data.Group = value; }
|
||||
}
|
||||
// Ward resources & Clinic sessions.
|
||||
public Spm.ResourceCapacityType ResourceCapacityType
|
||||
{
|
||||
get { return data.ResourceCapacityType; }
|
||||
set { CheckChanged((int)data.ResourceCapacityType, (int)value); data.ResourceCapacityType = value; }
|
||||
set { data.ResourceCapacityType = value; }
|
||||
}
|
||||
public ushort CapacityMin
|
||||
{
|
||||
get { return data.CapacityMin; }
|
||||
set { CheckChanged(data.CapacityMin, value); data.CapacityMin = value; }
|
||||
set { data.CapacityMin = value; }
|
||||
}
|
||||
public ushort CapacityMax
|
||||
{
|
||||
get { return data.CapacityMax; }
|
||||
set { CheckChanged(data.CapacityMax, value); data.CapacityMax = value; }
|
||||
set { data.CapacityMax = value; }
|
||||
}
|
||||
public decimal UnitsExp
|
||||
{
|
||||
get { return data.UnitsExp; }
|
||||
set { CheckChanged(data.UnitsExp, value); data.UnitsExp = value; }
|
||||
set { data.UnitsExp = value; }
|
||||
}
|
||||
public static ushort GetDurationIntervalDefault()
|
||||
public static ushort GetDurationIntervalDefault ()
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
public ushort DurationInterval
|
||||
{
|
||||
get { return data.DurationInterval; }
|
||||
set { CheckChanged(data.DurationInterval, value); data.DurationInterval = value; }
|
||||
set { data.DurationInterval = value; }
|
||||
}
|
||||
public ushort DurationMin
|
||||
{
|
||||
get { return data.DurationMin; }
|
||||
set { CheckChanged(data.DurationMin, value); data.DurationMin = value; }
|
||||
set { data.DurationMin = value; }
|
||||
}
|
||||
public ushort DurationMax
|
||||
{
|
||||
get { return data.DurationMax; }
|
||||
set { CheckChanged(data.DurationMax, value); data.DurationMax = value; }
|
||||
set { data.DurationMax = value; }
|
||||
}
|
||||
public ushort DurationBreaks
|
||||
{
|
||||
get { return data.DurationBreaks; }
|
||||
set { CheckChanged(data.DurationBreaks, value); data.DurationBreaks = value; }
|
||||
set { data.DurationBreaks = value; }
|
||||
}
|
||||
// Theatre & Clinic sessions.
|
||||
public ushort WeekOfMonth
|
||||
{
|
||||
get { return data.WeekOfMonth; }
|
||||
set { CheckChanged(data.WeekOfMonth, value); data.WeekOfMonth = value; }
|
||||
set { data.WeekOfMonth = value; }
|
||||
}
|
||||
public ushort DayOfWeek
|
||||
{
|
||||
get { return data.DayOfWeek; }
|
||||
set { CheckChanged(data.DayOfWeek, value); data.DayOfWeek = value; }
|
||||
set { data.DayOfWeek = value; }
|
||||
}
|
||||
public SysId ConsultantId
|
||||
{
|
||||
get { return data.ConsultantId; }
|
||||
set { CheckChanged(data.ConsultantId, value); data.ConsultantId = value; }
|
||||
set { data.ConsultantId = value; }
|
||||
}
|
||||
public String ConsultantCode
|
||||
{
|
||||
get { return data.ConsultantCode; }
|
||||
set { CheckChanged(data.ConsultantCode, value); data.ConsultantCode = value; }
|
||||
set { data.ConsultantCode = value; }
|
||||
}
|
||||
public String SpecialityCode
|
||||
{
|
||||
get { return data.SpecialityCode; }
|
||||
set { CheckChanged(data.SpecialityCode, value); data.SpecialityCode = value; }
|
||||
set { data.SpecialityCode = value; }
|
||||
}
|
||||
public DateTime StartTime
|
||||
{
|
||||
get { return data.StartTime; }
|
||||
set { CheckChanged(data.StartTime, value); data.StartTime = value; }
|
||||
set { data.StartTime = value; }
|
||||
}
|
||||
public DateTime FinishTime
|
||||
{
|
||||
get { return data.FinishTime; }
|
||||
set { CheckChanged(data.FinishTime, value); data.FinishTime = value; }
|
||||
set { data.FinishTime = value; }
|
||||
}
|
||||
public DateTime ApplicationFrom
|
||||
{
|
||||
get { return data.ApplicationFrom; }
|
||||
set { CheckChanged(data.ApplicationFrom, value); data.ApplicationFrom = value; }
|
||||
set { data.ApplicationFrom = value; }
|
||||
}
|
||||
public DateTime ApplicationTo
|
||||
{
|
||||
get { return data.ApplicationTo; }
|
||||
set { CheckChanged(data.ApplicationTo, value); data.ApplicationTo = value; }
|
||||
set { data.ApplicationTo = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -349,16 +488,16 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
//-------------------------------------------------------------------
|
||||
// A s s o c i a t e d D a t a E l e m e n t s
|
||||
//-------------------------------------------------------------------
|
||||
public abstract bool HasDataItems(); // eg. Slots.
|
||||
public abstract bool HasSessions();
|
||||
public abstract bool HasSessionsBefore(DateTime target, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasSessionsAfter(DateTime target, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasSessions(DateTime before, DateTime after, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissions(Spm.AdmissionCancelType admissionCancelType);
|
||||
public abstract bool HasAdmissionsBefore(DateTime target, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissionsAfter(DateTime target, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissions(DateTime before, DateTime after, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract long GetSessionComplexityCount(DateTime admission, String complexity,SysId admissionExcludeId);
|
||||
public abstract bool HasDataItems (); // eg. Slots.
|
||||
public abstract bool HasSessions ();
|
||||
public abstract bool HasSessionsBefore (DateTime target, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasSessionsAfter (DateTime target, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasSessions (DateTime before, DateTime after, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissions (Spm.AdmissionCancelType admissionCancelType);
|
||||
public abstract bool HasAdmissionsBefore (DateTime target, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissionsAfter (DateTime target, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract bool HasAdmissions (DateTime before, DateTime after, Spm.AdmissionCancelType admissionCancelType, ref DateTime? earliest, ref DateTime? latest);
|
||||
public abstract long GetSessionComplexityCount (DateTime admission, String complexity, SysId admissionExcludeId);
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a r a m s
|
||||
|
||||
@@ -29,21 +29,37 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public String Name { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
public Data()
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
//Status = InstitutionStatus;
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
public String Name { get; set; }
|
||||
|
||||
internal void PopulateFrom(Data data)
|
||||
// Properties.
|
||||
public String Name
|
||||
{
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
Name = data.Name;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -51,7 +67,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue Name { get; set; } = ValidValue.Valid;
|
||||
@@ -63,7 +80,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmInstitution(SysId id) : base(id)
|
||||
protected SpmInstitution (SysId id) : base(id)
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
base.SetData(data);
|
||||
@@ -77,7 +94,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> InstitutionStatuses { get { return new List<SaStatus>(institutionStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
institutionStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -94,8 +111,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -109,7 +126,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public String Name
|
||||
{
|
||||
get { return data.Name; }
|
||||
set { CheckChanged(data.Name, value); data.Name = value; }
|
||||
set { data.Name = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -31,25 +31,51 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = OperationStatus;
|
||||
}
|
||||
public SysId InstitutionId { get; set; }
|
||||
public String Code { get; set; }
|
||||
public String Description { get; set; }
|
||||
}
|
||||
|
||||
internal void PopulateFrom(Data data)
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId InstitutionId
|
||||
{
|
||||
get { return data.InstitutionId; }
|
||||
set { CheckChanged(data.InstitutionId, value); data.InstitutionId = value; }
|
||||
}
|
||||
public String Code
|
||||
{
|
||||
get { return data.Code; }
|
||||
set { CheckChanged(data.Code, value); data.Code = value; }
|
||||
}
|
||||
public String Description
|
||||
{
|
||||
get { return data.Description; }
|
||||
set { CheckChanged(data.Description, value); data.Description = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
InstitutionId = data.InstitutionId;
|
||||
Code = data.Code;
|
||||
Description = data.Description;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -57,7 +83,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue InstitutionId { get; set; } = ValidValue.Valid;
|
||||
@@ -71,7 +98,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmOperation(SysId departmentId, SysId institionId) : base()
|
||||
protected SpmOperation (SysId departmentId, SysId institionId) : base()
|
||||
{
|
||||
institionId = InstitutionId;
|
||||
Status = DefaultStatus;
|
||||
@@ -86,7 +113,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> OperationStatuses { get { return new List<SaStatus>(operationStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
operationStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -103,8 +130,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -118,28 +145,27 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId InstitutionId
|
||||
{
|
||||
get { return data.InstitutionId; }
|
||||
set { CheckChanged(data.InstitutionId, value); data.InstitutionId = value; }
|
||||
set { data.InstitutionId = value; }
|
||||
}
|
||||
public String Code
|
||||
{
|
||||
get { return data.Code; }
|
||||
set { CheckChanged(data.Code, value); data.Code = value; }
|
||||
set { data.Code = value; }
|
||||
}
|
||||
public String Description
|
||||
{
|
||||
get { return data.Description; }
|
||||
set { CheckChanged(data.Description, value); data.Description = value; }
|
||||
set { data.Description = value; }
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Flags.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// A s s o c i a t e d D a t a E l e m e n t s
|
||||
//-------------------------------------------------------------------
|
||||
public abstract bool HasProcedures();
|
||||
public abstract long GetProcedureCount(String filter = null);
|
||||
public abstract bool HasProcedures ();
|
||||
public abstract long GetProcedureCount (String filter = null);
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a r a m s
|
||||
|
||||
@@ -38,13 +38,10 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = PatientStatus;
|
||||
}
|
||||
public SysId InstitutionId { get; set; }
|
||||
public String PatientNo { get; set; }
|
||||
public String NhsNumber { get; set; }
|
||||
@@ -55,7 +52,71 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public DateTime BirthOn { get; set; }
|
||||
public String Age { get; set; }
|
||||
public DateTime AgeOn { get; set; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId InstitutionId
|
||||
{
|
||||
get { return data.InstitutionId; }
|
||||
set { CheckChanged(data.InstitutionId, value); data.InstitutionId = value; }
|
||||
}
|
||||
public String PatientNo
|
||||
{
|
||||
get { return data.PatientNo; }
|
||||
set { CheckChanged(data.PatientNo, value); data.PatientNo = value; }
|
||||
}
|
||||
public String NhsNumber
|
||||
{
|
||||
get { return data.NhsNumber; }
|
||||
set { CheckChanged(data.NhsNumber, value); data.NhsNumber = value; }
|
||||
}
|
||||
public String Title
|
||||
{
|
||||
get { return data.Title; }
|
||||
set { CheckChanged(data.Title, value); data.Title = value; }
|
||||
}
|
||||
public String Forename
|
||||
{
|
||||
get { return data.Forename; }
|
||||
set { CheckChanged(data.Forename, value); data.Forename = value; }
|
||||
}
|
||||
public String Surname
|
||||
{
|
||||
get { return data.Surname; }
|
||||
set { CheckChanged(data.Surname, value); data.Surname = value; }
|
||||
}
|
||||
public Spm.Gender Gender
|
||||
{
|
||||
get { return data.Gender; }
|
||||
set { CheckChanged((int)data.Gender, (int)value); data.Gender = value; }
|
||||
}
|
||||
public DateTime BirthOn
|
||||
{
|
||||
get { return data.BirthOn; }
|
||||
set { CheckChanged(data.BirthOn, value); data.BirthOn = value; }
|
||||
}
|
||||
public String Age
|
||||
{
|
||||
get { return data.Age; }
|
||||
set { CheckChanged(data.Age, value); data.Age = value; }
|
||||
}
|
||||
public DateTime AgeOn
|
||||
{
|
||||
get { return data.AgeOn; }
|
||||
set { CheckChanged(data.AgeOn, value); data.AgeOn = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom(Data data)
|
||||
{
|
||||
InstitutionId = data.InstitutionId;
|
||||
@@ -78,7 +139,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue InstitutionId { get; set; } = ValidValue.Valid;
|
||||
@@ -146,32 +208,32 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId InstitutionId
|
||||
{
|
||||
get { return data.InstitutionId; }
|
||||
set { CheckChanged(data.InstitutionId, value); data.InstitutionId = value; }
|
||||
set { data.InstitutionId = value; }
|
||||
}
|
||||
public String PatientNo
|
||||
{
|
||||
get { return data.PatientNo; }
|
||||
set { CheckChanged(data.PatientNo, value); data.PatientNo = value; }
|
||||
set { data.PatientNo = value; }
|
||||
}
|
||||
public String NhsNumber
|
||||
{
|
||||
get { return data.NhsNumber; }
|
||||
set { CheckChanged(data.NhsNumber, value); data.NhsNumber = value; }
|
||||
set { data.NhsNumber = value; }
|
||||
}
|
||||
public String Title
|
||||
{
|
||||
get { return data.Title; }
|
||||
set { CheckChanged(data.Title, value); data.Title = value; }
|
||||
set { data.Title = value; }
|
||||
}
|
||||
public String Forename
|
||||
{
|
||||
get { return data.Forename; }
|
||||
set { CheckChanged(data.Forename, value); data.Forename = value; }
|
||||
set { data.Forename = value; }
|
||||
}
|
||||
public String Surname
|
||||
{
|
||||
get { return data.Surname; }
|
||||
set { CheckChanged(data.Surname, value); data.Surname = value; }
|
||||
set { data.Surname = value; }
|
||||
}
|
||||
public static String GetDisplayName(String surname, String forename, bool upperSurname = true)
|
||||
{
|
||||
@@ -190,25 +252,24 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public Spm.Gender Gender
|
||||
{
|
||||
get { return data.Gender; }
|
||||
set { CheckChanged((int)data.Gender, (int)value); data.Gender = value; }
|
||||
set { data.Gender = value; }
|
||||
}
|
||||
public DateTime BirthOn
|
||||
{
|
||||
get { return data.BirthOn; }
|
||||
set { CheckChanged(data.BirthOn, value); data.BirthOn = value; }
|
||||
set { data.BirthOn = value; }
|
||||
}
|
||||
public String Age
|
||||
{
|
||||
get { return data.Age; }
|
||||
set { CheckChanged(data.Age, value); data.Age = value; }
|
||||
set { data.Age = value; }
|
||||
}
|
||||
public DateTime AgeOn
|
||||
{
|
||||
get { return data.AgeOn; }
|
||||
set { CheckChanged(data.AgeOn, value); data.AgeOn = value; }
|
||||
set { data.AgeOn = value; }
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Flags.
|
||||
|
||||
|
||||
@@ -36,13 +36,10 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = ProcedureStatus;
|
||||
}
|
||||
public SysId DepartmentId { get; set; } // Department.
|
||||
public SysId OperationId { get; set; } // Operation Id.
|
||||
public String OperationCode { get; set; } // Operation code.
|
||||
@@ -53,8 +50,72 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public short DurationTraining { get; set; } // Minutes.
|
||||
public decimal Units { get; set; }
|
||||
public decimal UnitsTraining { get; set; }
|
||||
}
|
||||
|
||||
internal void PopulateFrom(Data data)
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId DepartmentId
|
||||
{
|
||||
get { return data.DepartmentId; }
|
||||
set { CheckChanged(data.DepartmentId, value); data.DepartmentId = value; }
|
||||
}
|
||||
public SysId OperationId
|
||||
{
|
||||
get { return data.OperationId; }
|
||||
set { CheckChanged(data.OperationId, value); data.OperationId = value; }
|
||||
}
|
||||
public String OperationCode
|
||||
{
|
||||
get { return data.OperationCode; }
|
||||
set { CheckChanged(data.OperationCode, value); data.OperationCode = value; }
|
||||
}
|
||||
public String Description
|
||||
{
|
||||
get { return data.Description; }
|
||||
set { CheckChanged(data.Description, value); data.Description = value; }
|
||||
}
|
||||
public String SpecialityCode
|
||||
{
|
||||
get { return data.SpecialityCode; }
|
||||
set { CheckChanged(data.SpecialityCode, value); data.SpecialityCode = value; }
|
||||
}
|
||||
public String ComplexityCode
|
||||
{
|
||||
get { return data.ComplexityCode; }
|
||||
set { CheckChanged(data.ComplexityCode, value); data.ComplexityCode = value; }
|
||||
}
|
||||
public short Duration
|
||||
{
|
||||
get { return data.Duration; }
|
||||
set { CheckChanged(data.Duration, value); data.Duration = value; }
|
||||
}
|
||||
public short DurationTraining
|
||||
{
|
||||
get { return data.DurationTraining; }
|
||||
set { CheckChanged(data.DurationTraining, value); data.DurationTraining = value; }
|
||||
}
|
||||
public decimal Units
|
||||
{
|
||||
get { return data.Units; }
|
||||
set { CheckChanged(data.Units, value); data.Units = value; }
|
||||
}
|
||||
public decimal UnitsTraining
|
||||
{
|
||||
get { return data.UnitsTraining; }
|
||||
set { CheckChanged(data.UnitsTraining, value); data.UnitsTraining = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
DepartmentId = data.DepartmentId;
|
||||
OperationId = data.OperationId;
|
||||
@@ -68,7 +129,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UnitsTraining = data.UnitsTraining;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -76,7 +137,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue DepartmentId { get; set; } = ValidValue.Valid;
|
||||
@@ -97,7 +159,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmProcedure(SysId procedureId, SysId departmentId) : base()
|
||||
protected SpmProcedure (SysId procedureId, SysId departmentId) : base()
|
||||
{
|
||||
departmentId = DepartmentId;
|
||||
Status = DefaultStatus;
|
||||
@@ -112,7 +174,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> ProcedureStatuses { get { return new List<SaStatus>(procedureStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
procedureStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -129,8 +191,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -144,52 +206,52 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId DepartmentId
|
||||
{
|
||||
get { return data.DepartmentId; }
|
||||
set { CheckChanged(data.DepartmentId, value); data.DepartmentId = value; }
|
||||
set { data.DepartmentId = value; }
|
||||
}
|
||||
public SysId OperationId
|
||||
{
|
||||
get { return data.OperationId; }
|
||||
set { CheckChanged(data.OperationId, value); data.OperationId = value; }
|
||||
set { data.OperationId = value; }
|
||||
}
|
||||
public String OperationCode
|
||||
{
|
||||
get { return data.OperationCode; }
|
||||
set { CheckChanged(data.OperationCode, value); data.OperationCode = value; }
|
||||
set { data.OperationCode = value; }
|
||||
}
|
||||
public String Description
|
||||
{
|
||||
get { return data.Description; }
|
||||
set { CheckChanged(data.Description, value); data.Description = value; }
|
||||
set { data.Description = value; }
|
||||
}
|
||||
public String SpecialityCode
|
||||
{
|
||||
get { return data.SpecialityCode; }
|
||||
set { CheckChanged(data.SpecialityCode, value); data.SpecialityCode = value; }
|
||||
set { data.SpecialityCode = value; }
|
||||
}
|
||||
public String ComplexityCode
|
||||
{
|
||||
get { return data.ComplexityCode; }
|
||||
set { CheckChanged(data.ComplexityCode, value); data.ComplexityCode = value; }
|
||||
set { data.ComplexityCode = value; }
|
||||
}
|
||||
public short Duration
|
||||
{
|
||||
get { return data.Duration; }
|
||||
set { CheckChanged(data.Duration, value); data.Duration = value; }
|
||||
set { data.Duration = value; }
|
||||
}
|
||||
public short DurationTraining
|
||||
{
|
||||
get { return data.DurationTraining; }
|
||||
set { CheckChanged(data.DurationTraining, value); data.DurationTraining = value; }
|
||||
set { data.DurationTraining = value; }
|
||||
}
|
||||
public decimal Units
|
||||
{
|
||||
get { return data.Units; }
|
||||
set { CheckChanged(data.Units, value); data.Units = value; }
|
||||
set { data.Units = value; }
|
||||
}
|
||||
public decimal UnitsTraining
|
||||
{
|
||||
get { return data.UnitsTraining; }
|
||||
set { CheckChanged(data.UnitsTraining, value); data.UnitsTraining = value; }
|
||||
set { data.UnitsTraining = value; }
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -198,7 +260,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
//-------------------------------------------------------------------
|
||||
// A s s o c i a t e d D a t a E l e m e n t s
|
||||
//-------------------------------------------------------------------
|
||||
public abstract bool HasAdmission();
|
||||
public abstract bool HasAdmission ();
|
||||
//-------------------------------------------------------------------
|
||||
// P a r a m s
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -32,19 +32,56 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
UpdateOn_Date,
|
||||
}
|
||||
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Properties other than common.</summary>
|
||||
public class DataProperties
|
||||
{
|
||||
public Data()
|
||||
{
|
||||
//Status = TemplateDataStatus;
|
||||
}
|
||||
public SysId FacilityTemplateId { get; set; }
|
||||
public Spm.TemplateDataType TemplateDataType { get; set; }
|
||||
public short Seq { get; set; }
|
||||
public String Identifier { get; set; }
|
||||
public String Value { get; set; }
|
||||
internal void PopulateFrom(Data data)
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data.
|
||||
public new class Data : SacsHierarchyItem.Data
|
||||
{
|
||||
// Data members.
|
||||
private readonly DataProperties data = new DataProperties();
|
||||
// Construction.
|
||||
public Data ()
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
}
|
||||
// Properties.
|
||||
public SysId FacilityTemplateId
|
||||
{
|
||||
get { return data.FacilityTemplateId; }
|
||||
set { CheckChanged(data.FacilityTemplateId, value); data.FacilityTemplateId = value; }
|
||||
}
|
||||
public Spm.TemplateDataType TemplateDataType
|
||||
{
|
||||
get { return data.TemplateDataType; }
|
||||
set { CheckChanged((int)data.TemplateDataType, (int)value); data.TemplateDataType = value; }
|
||||
}
|
||||
public short Seq
|
||||
{
|
||||
get { return data.Seq; }
|
||||
set { CheckChanged(data.Seq, value); data.Seq = value; }
|
||||
}
|
||||
public String Identifier
|
||||
{
|
||||
get { return data.Identifier; }
|
||||
set { CheckChanged(data.Identifier, value); data.Identifier = value; }
|
||||
}
|
||||
public String Value
|
||||
{
|
||||
get { return data.Value; }
|
||||
set { CheckChanged(data.Value, value); data.Value = value; }
|
||||
}
|
||||
// Population.
|
||||
internal void PopulateFrom (Data data)
|
||||
{
|
||||
FacilityTemplateId = FacilityTemplateId;
|
||||
TemplateDataType = TemplateDataType;
|
||||
@@ -53,7 +90,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
Value = Value;
|
||||
base.PopulateFrom(data);
|
||||
}
|
||||
public Data Clone()
|
||||
public Data Clone ()
|
||||
{
|
||||
Data data = new Data();
|
||||
data.PopulateFrom(this);
|
||||
@@ -61,7 +98,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
}
|
||||
}
|
||||
|
||||
// ErrField.
|
||||
//-------------------------------------------------------------------
|
||||
// Error field - identify properties with validation error.
|
||||
public new class ErrField : SacsHierarchyItem.ErrField
|
||||
{
|
||||
public ValidValue FacilityTemplateId { get; set; } = ValidValue.Valid;
|
||||
@@ -77,7 +115,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SpmTemplateData(SysId id) : base(id)
|
||||
protected SpmTemplateData (SysId id) : base(id)
|
||||
{
|
||||
Status = DefaultStatus;
|
||||
base.SetData(data);
|
||||
@@ -91,7 +129,7 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
};
|
||||
public static SaStatus DefaultStatus { get { return SaStatus.Current; } }
|
||||
public static List<SaStatus> TemplateDataStatuses { get { return new List<SaStatus>(templateDataStatuses); } }
|
||||
public static DataValue.TriStateType GetStatusTriState(SaStatus status)
|
||||
public static DataValue.TriStateType GetStatusTriState (SaStatus status)
|
||||
{
|
||||
templateDataStatuses.Add(SaStatus.Current);
|
||||
|
||||
@@ -108,8 +146,8 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public Data GetData() { return data.Clone(); }
|
||||
public void SetData(Data data)
|
||||
public Data GetData () { return data.Clone(); }
|
||||
public void SetData (Data data)
|
||||
{
|
||||
String fn = GetType().Name + ".SetData";
|
||||
// Properties that cannot be changed if previously specified.
|
||||
@@ -123,30 +161,29 @@ namespace Sarand.PatientMgr.Core.Bus
|
||||
public SysId FacilityTemplateId
|
||||
{
|
||||
get { return data.FacilityTemplateId; }
|
||||
set { CheckChanged(data.FacilityTemplateId, value); data.FacilityTemplateId = value; }
|
||||
set { data.FacilityTemplateId = value; }
|
||||
}
|
||||
public Spm.TemplateDataType TemplateDataType
|
||||
{
|
||||
get { return data.TemplateDataType; }
|
||||
set { CheckChanged((int)data.TemplateDataType, (int)value); data.TemplateDataType = value; }
|
||||
set { data.TemplateDataType = value; }
|
||||
}
|
||||
public short Seq
|
||||
{
|
||||
get { return data.Seq; }
|
||||
set { CheckChanged(data.Seq, value); data.Seq = value; }
|
||||
set { data.Seq = value; }
|
||||
}
|
||||
public String Identifier
|
||||
{
|
||||
get { return data.Identifier; }
|
||||
set { CheckChanged(data.Identifier, value); data.Identifier = value; }
|
||||
set { data.Identifier = value; }
|
||||
}
|
||||
public String Value
|
||||
{
|
||||
get { return data.Value; }
|
||||
set { CheckChanged(data.Value, value); data.Value = value; }
|
||||
set { data.Value = value; }
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Flags.
|
||||
|
||||
|
||||
@@ -65,9 +65,9 @@ namespace Sarand.PatientMgr.Core.Mgr
|
||||
errField.Name = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
if (errField.Desc != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.Desc, "Description", (long)SpmDbDfn.GetColTextLen(SpmDbDfn.ColumnIdx.SwmFacilitySession_Description), true))
|
||||
if (errField.Description != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.Description, "Description", (long)SpmDbDfn.GetColTextLen(SpmDbDfn.ColumnIdx.SwmFacilitySession_Description), true))
|
||||
{
|
||||
errField.Desc = SacsHierarchyItem.ValidValue.Invalid;
|
||||
errField.Description = SacsHierarchyItem.ValidValue.Invalid;
|
||||
return false;
|
||||
}
|
||||
if (errField.SessionCode != SacsHierarchyItem.ValidValue.Ignore && !IsValidValue(data.SessionCode, "SessionCode", (long)SpmDbDfn.GetColTextLen(SpmDbDfn.ColumnIdx.SwmFacilitySession_SessionCode), true))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props')" />
|
||||
<Import Project="..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -40,10 +40,10 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
|
||||
<HintPath>..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
|
||||
<HintPath>..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -54,6 +54,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -101,8 +102,8 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets')" />
|
||||
<Import Project="..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets')" />
|
||||
</Project>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.8.9.0" newVersion="1.8.9.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.3.1.9" newVersion="1.3.1.9" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MSTest.TestAdapter" version="1.3.2" targetFramework="net46" />
|
||||
<package id="MSTest.TestFramework" version="1.3.2" targetFramework="net46" />
|
||||
<package id="MSTest.TestAdapter" version="2.1.2" targetFramework="net46" />
|
||||
<package id="MSTest.TestFramework" version="2.1.2" targetFramework="net46" />
|
||||
</packages>
|
||||
@@ -55,14 +55,14 @@ namespace Sarand.PatientMgr.Win.Dbas.Utils
|
||||
DatabaseDefinitionGenerator.Config config = new DatabaseDefinitionGenerator.Config();
|
||||
config.Database = database;
|
||||
config.OutputDirectory = directory;
|
||||
config.NamespaceDefinition = "Sarand.PatientMgr.Core.App";
|
||||
config.NamespaceTableObjects = "Sarand.PatientMgr.Win.Dbas.Internal";
|
||||
config.ClassnameDefinition = "SpmDbDfn";
|
||||
config.TablesExcluded.AddRange(new String[] { "NextId", "SaCode", "SaCodeType", "SaSecItem", "SaSecurityItem", "SaSecLink", "SaSecurityLink", "SaItemData", "SaItemDoc", "SaItemOption", "SaInterface", "SaInterfaceProcess", "SaInterfaceProcessMessage", "SaInterfaceDataItem", "SaInterfaceProcessDataItem", "SaAttrUpdate" });
|
||||
config.Namespace_DatabaseDefinition = "Sarand.PatientMgr.Core.App";
|
||||
config.Namespace_TableObjects = "Sarand.PatientMgr.Win.Dbas.Internal";
|
||||
config.Classname_DatabaseDefinition = "SpmDbDfn";
|
||||
config.Tables_Excluded.AddRange(new String[] { "NextId", "SaCode", "SaCodeType", "SaSecItem", "SaSecurityItem", "SaSecLink", "SaSecurityLink", "SaItemData", "SaItemDoc", "SaItemOption", "SaInterface", "SaInterfaceProcess", "SaInterfaceProcessMessage", "SaInterfaceDataItem", "SaInterfaceProcessDataItem", "SaAttrUpdate" });
|
||||
// Columns to exclude from update.
|
||||
config.InsertOnlyColumns.Add(".*", "CreateOn,CreateBy,CreateHost");
|
||||
// Table class.
|
||||
config.TableClass.NamespaceBaseClass = "Sarand.PatientMgr.Win.Dbas.Data";
|
||||
config.TableClass.Namespace_BaseClass = "Sarand.PatientMgr.Win.Dbas.Data";
|
||||
config.TableClass.BaseClass = "SpmDbDataItem";
|
||||
config.TableClass.MandatoryConstructorDbInfo = true;
|
||||
// Generate database definition.
|
||||
|
||||
@@ -146,22 +146,6 @@ namespace Sarand.PatientMgr.Win.Forms.TabPages
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l E v e n t s
|
||||
//-------------------------------------------------------------------
|
||||
private void panel_ItemCreated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemCreatedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
private void panel_ItemUpdated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemUpdatedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
private void panel_ItemDeleted(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemDeletedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l S i z e a n d P o s i t i o n
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -192,22 +192,6 @@ namespace Sarand.PatientMgr.Win.Forms.TabPages
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l E v e n t s
|
||||
//-------------------------------------------------------------------
|
||||
private void panel_ItemCreated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemCreatedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
private void panel_ItemUpdated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemUpdatedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
private void panel_ItemDeleted(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemDeletedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l S i z e a n d P o s i t i o n
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -146,22 +146,6 @@ namespace Sarand.PatientMgr.Win.Forms.TabPages
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l E v e n t s
|
||||
//-------------------------------------------------------------------
|
||||
private void panel_ItemCreated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemCreatedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
private void panel_ItemUpdated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemUpdatedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
private void panel_ItemDeleted(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemDeletedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l S i z e a n d P o s i t i o n
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -146,22 +146,6 @@ namespace Sarand.PatientMgr.Win.Forms.TabPages
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l E v e n t s
|
||||
//-------------------------------------------------------------------
|
||||
private void panel_ItemCreated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemCreatedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
private void panel_ItemUpdated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemUpdatedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
private void panel_ItemDeleted(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemDeletedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l S i z e a n d P o s i t i o n
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
@@ -146,22 +146,6 @@ namespace Sarand.PatientMgr.Win.Forms.TabPages
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l E v e n t s
|
||||
//-------------------------------------------------------------------
|
||||
private void panel_ItemCreated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemCreatedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
private void panel_ItemUpdated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemUpdatedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
private void panel_ItemDeleted(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
|
||||
{
|
||||
InvokeItemDeletedEvent((short)e.ItemType, e.ItemId);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a n e l S i z e a n d P o s i t i o n
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user