Interface ITreatmentService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface ITreatmentService : IApiRequestService
- Inherited Members
- Extension Methods
Methods
Archive(Patient)
Archives the specified patient, marking them as archived in the system.
Task Archive(Patient patient)
Parameters
patientPatientThe patient to archive.
Returns
ArchiveByPatientId(ObjectId)
Archives records associated with the specified patient identifier.
Task ArchiveByPatientId(ObjectId id)
Parameters
idObjectIdThe ObjectId of the patient whose records should be archived.
Returns
DeleteById(ObjectId)
Asynchronously deletes the entity identified by the specified identifier.
Task DeleteById(ObjectId id)
Parameters
idObjectIdThe unique identifier of the entity to delete.
Returns
DeleteByPatientId(ObjectId)
Asynchronously deletes an entity associated with the specified patient identifier.
Task<bool> DeleteByPatientId(ObjectId id)
Parameters
idObjectIdThe MongoDB.Bson.ObjectId representing the unique identifier of the patient whose related entity should be removed.
Returns
- Task<bool>
A Task<TResult> containing
trueif the deletion was successful; otherwise,false.
FindByPatientId(ObjectId)
Asynchronously retrieves all patient treatments associated with the specified patient identifier.
Task<IEnumerable<PatientTreatment>> FindByPatientId(ObjectId patientId)
Parameters
patientIdObjectIdThe unique identifier of the patient whose treatments are being queried.
Returns
- Task<IEnumerable<PatientTreatment>>
A task that represents the asynchronous operation, containing a collection of PatientTreatment instances for the specified patient.
FindByPatientIdAsync(ObjectId)
Asynchronously retrieves a cursor over the PatientTreatment records associated with the specified patient identifier.
Task<IAsyncCursor<PatientTreatment>> FindByPatientIdAsync(ObjectId patientId)
Parameters
patientIdObjectIdThe unique identifier of the patient whose treatments should be returned.
Returns
- Task<IAsyncCursor<PatientTreatment>>
A Task<TResult> yielding an MongoDB.Driver.IAsyncCursor<TDocument> that iterates the matching PatientTreatment documents.
GetActiveTreatmentsByPatient(ObjectId)
Retrieves the active treatment records associated with the specified patient identifier.
Task<IEnumerable<PatientTreatment?>> GetActiveTreatmentsByPatient(ObjectId id)
Parameters
idObjectIdThe unique identifier of the patient whose active treatments should be retrieved.
Returns
- Task<IEnumerable<PatientTreatment>>
A task that represents the asynchronous operation, containing an enumerable collection of active PatientTreatment records, which may include null entries.
GetActiveTreatmentsByPatientIdAndOrder(ObjectId, string)
Retrieves the list of active treatments associated with the specified patient, sorted according to the provided order parameter.
Task<List<PatientTreatment>> GetActiveTreatmentsByPatientIdAndOrder(ObjectId patientId, string order)
Parameters
patientIdObjectIdThe unique identifier of the patient whose active treatments are being queried.
orderstringA string defining the ordering criteria applied to the returned treatments.
Returns
- Task<List<PatientTreatment>>
A task that represents the asynchronous operation, containing a list of active PatientTreatment entries for the patient.
GetBolusTreatments(ObjectId)
Retrieves the list of bolus treatments associated with the specified patient.
Task<List<PatientTreatment>> GetBolusTreatments(ObjectId patientId)
Parameters
patientIdObjectIdThe unique identifier of the patient whose bolus treatments are being retrieved.
Returns
- Task<List<PatientTreatment>>
A task that represents the asynchronous operation, containing a list of PatientTreatment records representing the patient's bolus treatments.
GetPaginatedTreatments(PaginationFilter)
Retrieves a paginated list of patient treatments based on the specified filter criteria.
Task<PaginationResponse<PatientTreatment>> GetPaginatedTreatments(PaginationFilter filter)
Parameters
filterPaginationFilterThe pagination filter used to control the page number, page size, and other query options.
Returns
- Task<PaginationResponse<PatientTreatment>>
A task that represents the asynchronous operation, containing the paginated patient treatment results.
GetTreatmentsByPatientId(ObjectId)
Retrieves all treatments associated with the specified patient identifier.
Task<IEnumerable<PatientTreatment>> GetTreatmentsByPatientId(ObjectId id)
Parameters
idObjectIdThe unique identifier of the patient whose treatments are to be retrieved.
Returns
- Task<IEnumerable<PatientTreatment>>
A task that represents the asynchronous operation, containing a collection of PatientTreatment objects for the specified patient.
Insert(PatientTreatment)
Inserts a new PatientTreatment record into the underlying data store.
Task Insert(PatientTreatment treatment)
Parameters
treatmentPatientTreatmentThe patient treatment entity to be added.
Returns
UpdateManyObjectId(string, ObjectId, ObjectId)
Updates many records by replacing the specified old ObjectId with the new ObjectId in the field identified by nameId.
Task UpdateManyObjectId(string nameId, ObjectId id, ObjectId oldId)
Parameters
nameIdstringThe name of the field that contains the ObjectId to be updated.
idObjectIdThe new ObjectId value that will replace the existing one.
oldIdObjectIdThe existing ObjectId value to be replaced.
Returns
UpdateTreatment(PatientTreatment)
Updates an existing patient treatment record in the system.
Task<bool> UpdateTreatment(PatientTreatment patientTreatment)
Parameters
patientTreatmentPatientTreatmentThe patient treatment entity containing the updated information to be persisted.