Class PatientLocation
Represents the location of a patient within a healthcare or clinical context. Implements IEquatable<T> to provide type-specific equality comparison between patient location instances.
public class PatientLocation : IEquatable<PatientLocation>
- Inheritance
-
PatientLocation
- Implements
- Inherited Members
- Extension Methods
Constructors
PatientLocation()
public PatientLocation()
PatientLocation(string?, string?)
public PatientLocation(string? unitName, string? bed)
Parameters
PatientLocation(string?, string?, string?)
public PatientLocation(string? unitName, string? bed, string? room)
Parameters
Properties
Bed
public string? Bed { get; set; }
Property Value
Room
public string? Room { get; init; }
Property Value
UnitName
public string? UnitName { get; init; }
Property Value
Methods
Equals(PatientLocation?)
Determines whether the specified PatientLocation is equal to the current instance by comparing the UnitName, Bed, and Room properties.
public bool Equals(PatientLocation? other)
Parameters
otherPatientLocationThe PatientLocation to compare with the current instance.
Returns
- bool
true when all three properties (
UnitName,Bed, andRoom) match; otherwise, false. Returns false ifotheris null.
IsEmpty()
Determines whether the current instance is considered empty by checking that both the UnitName and Bed values are null or empty strings.
public bool IsEmpty()
Returns
IsFullEmpty()
Determines whether the unit name, bed, and room fields are all null or empty, indicating the entity is fully empty.
public bool IsFullEmpty()
Returns
ToString()
Returns a human-readable string representation of the PatientLocation, including the unit name, room, and bed.
public override string ToString()
Returns
- string
A formatted string in the form "PatientLocation[Unit: {UnitName},room: {Room} ,bed: {Bed}]".