using adas_core.Domain.Models; using adas_core.Domain.Models.MongoModels; using MongoDB.Bson; namespace adas_core.Application.Services.Interfaces; public interface IDiagnosisService : IApiRequestService { /// /// Retrieves all diagnoses associated with the specified patient identifier. /// /// The unique identifier of the patient whose diagnoses are being retrieved. /// A task representing the asynchronous operation, containing a list of records for the specified patient; an empty list is returned if no diagnoses are found. Task> GetByPatientId(ObjectId patientId); /// /// Deletes records associated with the specified patient identifier. /// /// The unique identifier of the patient whose related records should be removed. Task DeleteByPatientId(ObjectId id); /// /// Asynchronously archives the specified patient, marking the patient record as archived rather than permanently deleting it. /// /// The patient to archive. Task Archive(Patient patient); /// /// Archives the records associated with the specified patient identifier. /// /// The unique identifier of the patient whose records will be archived. Task ArchiveByPatientId(ObjectId id); /// /// Processes a diagnosis observation for the specified patient based on the supplied API request data. /// /// The API request containing the diagnosis observation payload and contextual information to process. /// The patient to whom the diagnosis observation pertains. Task ProcessDiagnosisObservation(ApiRequest apiRequest, Patient patient); /// /// Persists the specified API request along with its associated patient data. /// /// The API request to be saved. /// The patient associated with the API request. Task SaveRequest(ApiRequest apiRequest, Patient patient); /// /// Processes the provided list of patient diagnoses for the specified patient at the given message time. /// /// The list of patient diagnoses to be processed. /// The patient associated with the diagnoses. /// The timestamp of the message triggering the diagnosis processing. Task ProcessDiagnosis(List diagnosis, Patient patient, DateTime messageTime); /// /// Updates multiple records by replacing the with the new in the field identified by . /// /// The identifier of the field or property whose ObjectId values will be updated. /// The new ObjectId value to assign to the matching records. /// The existing ObjectId value to be replaced in the matching records. Task UpdateManyObjectId(string nameId, ObjectId id, ObjectId oldId); }