Interface IDiagnosisRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface IDiagnosisRepository : IMongoRepository<PatientDiagnosis>
- Inherited Members
- Extension Methods
Methods
DeleteAsync(ObjectId)
Asynchronously deletes the entity identified by the specified identifier.
Task DeleteAsync(ObjectId id)
Parameters
idObjectIdThe unique identifier of the entity to delete.
Returns
DeleteByPatientId(ObjectId)
Asynchronously deletes records associated with the specified patient identifier.
Task DeleteByPatientId(ObjectId patientId)
Parameters
patientIdObjectIdThe unique MongoDB.Bson.ObjectId of the patient whose related records should be removed.
Returns
FindByPatientIdAndCode(ObjectId, string?, string?)
Asynchronously retrieves the PatientDiagnosis associated with the specified patient, diagnosis code, and coding system. Returns null when no matching diagnosis is found.
Task<PatientDiagnosis?> FindByPatientIdAndCode(ObjectId patientId, string? diagnosisCode, string? codingSystem)
Parameters
patientIdObjectIdThe unique identifier of the patient whose diagnosis is being looked up.
diagnosisCodestringThe diagnosis code to match. May be null.
codingSystemstringThe coding system of the diagnosis code (for example, ICD-10 or SNOMED). May be null.
Returns
- Task<PatientDiagnosis>
A task that resolves to the matching PatientDiagnosis, or null if no diagnosis matches the given criteria.
FindByPatientIdAsync(ObjectId)
Asynchronously finds all patient diagnoses associated with the specified patient identifier, returning a cursor to iterate over the matching documents.
Task<IAsyncCursor<PatientDiagnosis>> FindByPatientIdAsync(ObjectId patientId)
Parameters
patientIdObjectIdThe unique identifier of the patient whose diagnoses should be retrieved.
Returns
- Task<IAsyncCursor<PatientDiagnosis>>
A task that represents the asynchronous operation, containing an IAsyncCursor of PatientDiagnosis that yields the matching documents.
GetByPatient(ObjectId)
Asynchronously retrieves a list of patient diagnoses associated with the specified patient identifier.
Task<List<PatientDiagnosis>> GetByPatient(ObjectId patientId)
Parameters
patientIdObjectIdThe unique identifier of the patient whose diagnoses are to be retrieved.
Returns
- Task<List<PatientDiagnosis>>
A task that represents the asynchronous operation, containing a list of PatientDiagnosis objects for the specified patient.
InsertOneAsync(PatientDiagnosis)
Asynchronously inserts a single patient diagnosis record into the data store.
Task InsertOneAsync(PatientDiagnosis diagnosis)
Parameters
diagnosisPatientDiagnosisThe patient diagnosis entity to insert.
Returns
UpdateManyObjectId(string, ObjectId, ObjectId)
Updates many records by replacing the existing MongoDB.Bson.ObjectId identified by oldId with the new MongoDB.Bson.ObjectId id, scoped to the specified nameId.
Task UpdateManyObjectId(string nameId, ObjectId id, ObjectId oldId)
Parameters
nameIdstringThe identifier of the field or collection on which the update is performed.
idObjectIdThe new MongoDB.Bson.ObjectId value to assign.
oldIdObjectIdThe existing MongoDB.Bson.ObjectId value to be replaced.