using adas_core.Domain.Models.MongoModels;
using adas_core.Domain.Models.Pumps;
using MongoDB.Bson;
using Newtonsoft.Json;
namespace adas_core.Domain.Models;
///
/// Represents a request payload for the administrative panel operations.
///
public class AdmPanelRequest
{
public string? Type { get; set; }
public string? PatientNumber { get; set; }
public Person? Patient { get; set; }
public string? PatientId { get; set; }
public string? Id { get; set; }
public DateTime? AdmTime { get; set; }
public DateTime? DisTime { get; set; }
public PatientLocation? Location { get; set; }
public ObjectId? PointOfCareId { get; set; }
public ObjectId? UnitId { get; set; }
// ADT
public PatientLocation? OldLocation { get; set; }
public Person? AttendingDoctor { get; set; }
public string? OldPatientNumber { get; set; }
// ORU
public ObservationData? ObservationData { get; set; }
public ObservationData? ObsertationData
{
get => ObservationData;
set => ObservationData = value;
}
public List? Observations { get; set; }
public PatientObservation? Observation { get; set; }
public List? PumpObservations { get; set; }
public PumpObservation? PumpObservation { get; set; }
public string SectionId { get; set; } = string.Empty;
public string SectionItemGroup { get; set; } = string.Empty;
public Box? SectionItemBoxUpdated { get; set; }
public Dictionary? SectionItems { get; set; }
///
/// Returns a JSON representation of the current object using with no formatting.
/// If serialization fails, falls back to the base implementation.
///
/// A JSON-serialized string of the object, or the result of base.ToString() if serialization throws an exception.
public override string? ToString()
{
try
{
return JsonConvert.SerializeObject(this, Formatting.None);
}
catch
{
return base.ToString();
}
}
}