# Class HistoricalId

Namespace
  adas_core.Domain.Models.MongoModels

Assembly
  adas-core.Domain.dll

Represents a historical identifier that associates a specific point in time with a set of patient identifiers.

    public class HistoricalId

Inheritance
  object
  HistoricalId

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Remarks

The type holds a timestamp together with a dictionary of patient IDs, providing a snapshot of the identification data at the given time.

## Constructors

### HistoricalId(DateTime, Dictionary<string, string>)

Represents a historical identifier that associates a specific point in time with a set of patient identifiers.

    public HistoricalId(DateTime time, Dictionary<string, string> patientIds)

#### Parameters

`time` DateTime
`patientIds` Dictionary<string, string>

#### Remarks

The type holds a timestamp together with a dictionary of patient IDs, providing a snapshot of the identification data at the given time.

## Properties

### PatientIds

    public Dictionary<string, string> PatientIds { get; set; }

#### Property Value

Dictionary<string, string>

### Time

    public DateTime? Time { get; set; }

#### Property Value

DateTime?

## Methods

### IsEmpty()

Determines whether the appointment is empty by checking if the Time has not been set (is the default DateTime) and no patient identifiers have been associated.

    public bool IsEmpty()

#### Returns

bool

  true if both the time is uninitialized and the patient list is empty; otherwise, false.

### IsFull()

Determines whether the current entity is fully populated by verifying that a time has been explicitly assigned and at least one patient is associated.

    public bool IsFull()

#### Returns

bool

  `true` if both the `Time` property is set to a non-default DateTime value and the `PatientIds` collection contains at least one entry; otherwise, `false`.

### ToString()

Returns a string representation of the HistoricalId, including the time and a comma-separated list of patient identifiers.

    public override string ToString()

#### Returns

string

  A formatted string in the form "HistoricalId[Time: {Time}, PatientIds: {idsString}]" where idsString is the patient identifiers joined by commas.