Interface IAppointmentRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface IAppointmentRepository : IMongoRepository<PatientAppointment>
- Inherited Members
- Extension Methods
Methods
DeleteAsync(ObjectId)
Asynchronously deletes the entity identified by the specified identifier.
Task DeleteAsync(ObjectId id)
Parameters
idObjectIdThe ObjectId of the entity to delete.
Returns
DeleteByPatientId(ObjectId)
Asynchronously deletes records associated with the specified patient identifier.
Task DeleteByPatientId(ObjectId patientId)
Parameters
patientIdObjectIdThe unique ObjectId of the patient whose related records should be removed.
Returns
FindByLocation(PatientLocation)
Retrieves a list of patient appointments associated with the specified location.
Task<List<PatientAppointment>> FindByLocation(PatientLocation location)
Parameters
locationPatientLocationThe patient location used to filter and retrieve matching appointments.
Returns
- Task<List<PatientAppointment>>
A task that represents the asynchronous operation, containing a list of PatientAppointment entries for the given location.
FindByPatientAndReason(ObjectId, string?)
Asynchronously retrieves a patient appointment matching the specified patient identifier and appointment reason.
Returns null when no matching appointment is found.
Task<PatientAppointment?> FindByPatientAndReason(ObjectId patientId, string? appointmentReason)
Parameters
patientIdObjectIdThe unique identifier of the patient whose appointment should be located.
appointmentReasonstringThe appointment reason used to filter the lookup, or
nullto match any reason.
Returns
- Task<PatientAppointment>
A Task<TResult> that resolves to the matching PatientAppointment, or
nullif none exists.
FindByPatientAndVisitNumber(ObjectId, string)
Asynchronously retrieves a PatientAppointment matching the specified patient identifier and visit number.
Task<PatientAppointment?> FindByPatientAndVisitNumber(ObjectId patientId, string visitNumber)
Parameters
patientIdObjectIdThe unique identifier of the patient whose appointment should be located.
visitNumberstringThe visit number used to identify the specific appointment for the patient.
Returns
- Task<PatientAppointment>
A task that represents the asynchronous operation. The task result contains the matching PatientAppointment if found; otherwise,
null.
FindByPatientIdAsync(ObjectId)
Asynchronously retrieves a cursor of PatientAppointment records associated with the specified patient identifier.
Task<IAsyncCursor<PatientAppointment>> FindByPatientIdAsync(ObjectId patientId)
Parameters
patientIdObjectIdThe unique MongoDB.Bson.ObjectId of the patient whose appointments are being queried.
Returns
- Task<IAsyncCursor<PatientAppointment>>
A Task<TResult> that yields the matching patient appointments; the cursor may be empty if no appointments are found for the given patient.
FindByPoC(PointOfCare)
Asynchronously retrieves the list of patient appointments associated with the specified point of care.
Task<List<PatientAppointment>> FindByPoC(PointOfCare poc)
Parameters
pocPointOfCareThe point of care used to filter the patient appointments.
Returns
- Task<List<PatientAppointment>>
A task that represents the asynchronous operation. The task result contains a list of patient appointments for the given point of care.
GetByPatient(ObjectId)
Asynchronously retrieves the list of patient appointments associated with the specified patient identifier.
Task<List<PatientAppointment>> GetByPatient(ObjectId patientId)
Parameters
patientIdObjectIdThe unique identifier of the patient whose appointments are being retrieved.
Returns
- Task<List<PatientAppointment>>
A task that represents the asynchronous operation, containing a list of PatientAppointment objects for the specified patient.
InsertOneAsync(PatientAppointment)
Asynchronously inserts a single patient appointment record into the data store.
Task InsertOneAsync(PatientAppointment appointment)
Parameters
appointmentPatientAppointmentThe patient appointment entity to be inserted.
Returns
Update(PatientAppointment)
Updates an existing patient appointment asynchronously.
Task Update(PatientAppointment appointment)
Parameters
appointmentPatientAppointmentThe patient appointment containing the updated information.
Returns
UpdateManyObjectId(string, ObjectId, ObjectId)
Updates the MongoDB.Bson.ObjectId field identified by nameId across many records, replacing the existing value oldId with the new value id.
Task UpdateManyObjectId(string nameId, ObjectId id, ObjectId oldId)
Parameters
nameIdstringThe name of the field that contains the MongoDB.Bson.ObjectId to update.
idObjectIdThe new MongoDB.Bson.ObjectId value to assign to matching records.
oldIdObjectIdThe current MongoDB.Bson.ObjectId value to be replaced.