Files
adas-core/adas-core.Application/Services/Interfaces/IDiagnosisService.cs
T

64 lines
3.6 KiB
C#

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