# Interface IPatientCarePlanRepository

Namespace
  adas_core.Application.Repositories.Interfaces

Assembly
  adas-core.Application.dll

    public interface IPatientCarePlanRepository : IMongoRepository<PatientCarePlan>

Inherited Members
  IMongoRepository<PatientCarePlan>.Collection
  IMongoRepository<PatientCarePlan>.GetCollectionName()
  IMongoRepository<PatientCarePlan>.InsertOneAsync(PatientCarePlan)
  IMongoRepository<PatientCarePlan>.DeleteAsync(ObjectId)
  IMongoRepository<PatientCarePlan>.UpdateOneAsync(ObjectId, PatientCarePlan)

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

## Methods

### FindAll()

Asynchronously retrieves all patient care plans from the data store.

    Task<List<PatientCarePlan>> FindAll()

#### Returns

Task<List<PatientCarePlan>>

  A task representing the asynchronous operation, containing a list of all PatientCarePlan records.

### FindByPatientId(ObjectId)

Retrieves the list of care plans associated with the specified patient identifier.

    Task<List<PatientCarePlan>> FindByPatientId(ObjectId patientId)

#### Parameters

`patientId` ObjectId

  The unique identifier of the patient whose care plans are being requested.

#### Returns

Task<List<PatientCarePlan>>

  A task that represents the asynchronous operation, containing a list of PatientCarePlan records for the patient, or an empty list if no care plans are found.

### FindByUserId(ObjectId)

Asynchronously retrieves the list of patient care plans associated with the specified user identifier.

    Task<List<PatientCarePlan>> FindByUserId(ObjectId userId)

#### Parameters

`userId` ObjectId

  The unique identifier of the user whose patient care plans are being requested.

#### Returns

Task<List<PatientCarePlan>>

  A task that represents the asynchronous operation, containing a list of PatientCarePlan objects linked to the specified user.

### UpdateManyObjectId(string, ObjectId, ObjectId)

Updates all records that reference the specified old ObjectId so they are associated with the new patient ObjectId.

    Task UpdateManyObjectId(string patientid, ObjectId patientId, ObjectId oldId)

#### Parameters

`patientid` string

  The string identifier of the patient whose related records will be updated.

`patientId` ObjectId

  The new ObjectId that will replace the previous identifier in the matching records.

`oldId` ObjectId

  The previous ObjectId whose references should be replaced across the matching records.

#### Returns

Task