Table of Contents

Class HistoricalLocation

Namespace
adas_core.Domain.Models
Assembly
adas-core.Domain.dll

Represents a historical location and provides type-safe equality comparison between instances of HistoricalLocation.

public class HistoricalLocation : IEquatable<HistoricalLocation>
Inheritance
HistoricalLocation
Implements
Inherited Members
Extension Methods

Remarks

Implements IEquatable<T> of HistoricalLocation to allow instances to be compared for value equality without relying on object identity.

Constructors

HistoricalLocation()

Initializes a new instance of the HistoricalLocation class, which represents a historical record of a location.

public HistoricalLocation()

HistoricalLocation(DateTime, PatientLocation)

public HistoricalLocation(DateTime admTime, PatientLocation patientLocation)

Parameters

admTime DateTime
patientLocation PatientLocation

Properties

AdmTime

public DateTime? AdmTime { get; set; }

Property Value

DateTime?

PatientLocation

public PatientLocation? PatientLocation { get; set; }

Property Value

PatientLocation

Methods

Equals(HistoricalLocation?)

Determines whether the current HistoricalLocation instance is equal to another instance, based on the admission time and the patient location (when present, with null locations treated as equal).

public bool Equals(HistoricalLocation? other)

Parameters

other HistoricalLocation

The other HistoricalLocation instance to compare with this one.

Returns

bool

true if both the admission time and patient location match; otherwise, false.

IsEmpty()

Determines whether this instance is considered empty by verifying that no admission time is set and that the patient location is either null or empty.

public bool IsEmpty()

Returns

bool

true when AdmTime has no value and PatientLocation is null or empty; otherwise, false.

IsFull()

Determines whether the instance is in a full state by verifying that an admission time has been set, a patient location is assigned, and the assigned location is not full or empty.

public bool IsFull()

Returns

bool

true when AdmTime has a value, PatientLocation is not null, and the location is not full or empty; otherwise, false.

ToString()

Returns a string representation of the HistoricalLocation, including the admission time and patient location.

public override string ToString()

Returns

string

A formatted string with the values of AdmTime and PatientLocation.