mirror of
https://github.com/SirLecram/HospitalServerManager
synced 2024-10-19 08:50:36 +02:00
0806b25c79
- EditRecordDialog has been added and edited; Others pages (View) has been added and completed; - All ViewModel and Models was completed; - WebService, ApiComandProvider has full funcionality, - New interface has been created; - Application is working now :) it's time to refractoring and testing
50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HospitalServerManager.Model.Basic
|
|
{
|
|
class Admission : SqlTable
|
|
{
|
|
public DateTime AdmissionDate { get; protected set; }
|
|
public DateTime? LeavingDate { get; protected set; }
|
|
public string PatientPESEL { get; protected set; }
|
|
public string DiagnosisSymbol { get; protected set; }
|
|
public int MainDoctor { get; protected set; }
|
|
public int? OperationID { get; protected set; }
|
|
public int RoomNumber { get; protected set; }
|
|
public bool IsPlanned { get; protected set; }
|
|
|
|
protected Admission() : base() { }
|
|
public Admission(List<string> listOfValues)
|
|
: base(listOfValues[0], "Id_przyjecia", new List<string>())
|
|
{
|
|
AdmissionDate = DateTime.Parse(listOfValues[1]);
|
|
LeavingDate = DateTime.Parse(listOfValues[2]);
|
|
PatientPESEL = listOfValues[3];
|
|
DiagnosisSymbol = listOfValues[4];
|
|
MainDoctor = int.Parse(listOfValues[5]);
|
|
OperationID = int.Parse(listOfValues[6]);
|
|
RoomNumber = int.Parse(listOfValues[7]);
|
|
IsPlanned = bool.Parse(listOfValues[8]);
|
|
}
|
|
[JsonConstructor]
|
|
protected Admission(string admissionID, DateTime admissionDate, DateTime? endDate, string patientPESEL, string diagnosisSymbol,
|
|
int mainDoctor, int planedOperation, int roomNumber, bool isPlanned)
|
|
: base (admissionID, "Id_przyjecia", new List<string>())
|
|
{
|
|
AdmissionDate = admissionDate;
|
|
LeavingDate = endDate ?? null;
|
|
PatientPESEL = patientPESEL;
|
|
DiagnosisSymbol = diagnosisSymbol;
|
|
MainDoctor = mainDoctor;
|
|
OperationID = planedOperation;
|
|
RoomNumber = roomNumber;
|
|
IsPlanned = isPlanned;
|
|
}
|
|
}
|
|
}
|