85 lines
2.3 KiB
C#
85 lines
2.3 KiB
C#
using adas_core.Domain.Models.MongoModels;
|
|
using adas_core.Domain.Models.Pumps;
|
|
using MongoDB.Bson;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace adas_core.Domain.Models;
|
|
|
|
/// <summary>
|
|
/// Represents a request payload for the administrative panel operations.
|
|
/// </summary>
|
|
/// <!-- aidoc:v1 sig=9d0f4b5 -->
|
|
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<PatientObservation>? Observations { get; set; }
|
|
|
|
public PatientObservation? Observation { get; set; }
|
|
|
|
public List<PumpObservation>? 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<string, object>? SectionItems { get; set; }
|
|
|
|
/// <summary>
|
|
/// Returns a JSON representation of the current object using <see cref="JsonConvert.SerializeObject(object, Formatting)"/> with no formatting.
|
|
/// If serialization fails, falls back to the base <see cref="object.ToString"/> implementation.
|
|
/// </summary>
|
|
/// <returns>A JSON-serialized string of the object, or the result of <c>base.ToString()</c> if serialization throws an exception.</returns>
|
|
/// <!-- aidoc:v1 sig=483eaf3 body=7f15aa0 -->
|
|
public override string? ToString()
|
|
{
|
|
try
|
|
{
|
|
return JsonConvert.SerializeObject(this, Formatting.None);
|
|
}
|
|
catch
|
|
{
|
|
return base.ToString();
|
|
}
|
|
}
|
|
} |