# Interface ITreatmentArchiveRepository

Namespace
  adas_core.Application.Repositories.Interfaces

Assembly
  adas-core.Application.dll

    public interface ITreatmentArchiveRepository

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

## Methods

### DeleteBeforeDate(DateTime)

Asynchronously deletes items whose associated date is earlier than the specified cutoff date.

    Task DeleteBeforeDate(DateTime date)

#### Parameters

`date` DateTime

  The cutoff date; items dated before this value are removed.

#### Returns

Task

### FindAllFromPatient(ObjectId)

Asynchronously retrieves all patient treatment records associated with the specified patient identifier.

    Task<List<PatientTreatment>> FindAllFromPatient(ObjectId patientId)

#### Parameters

`patientId` ObjectId

  The unique identifier of the patient whose treatments are being queried.

#### Returns

Task<List<PatientTreatment>>

  A task that represents the asynchronous operation, containing a list of PatientTreatment records for the given patient.

### InsertBatch(IEnumerable<PatientTreatment>)

Asynchronously inserts a batch of PatientTreatment records.

    Task<long> InsertBatch(IEnumerable<PatientTreatment> treatments)

#### Parameters

`treatments` IEnumerable<PatientTreatment>

  The collection of patient treatment entities to be inserted.

#### Returns

Task<long>

  A task that represents the asynchronous operation. The task result contains a long value associated with the batch insertion.

### InsertOneAsync(PatientTreatment)

Asynchronously inserts a new patient treatment record into the underlying data store.

    Task InsertOneAsync(PatientTreatment patientTreatment)

#### Parameters

`patientTreatment` PatientTreatment

  The patient treatment entity to insert.

#### Returns

Task