Table of Contents

Interface IAdminPanelService

Namespace
adas_core.Application.Services.Interfaces
Assembly
adas-core.Application.dll
public interface IAdminPanelService
Extension Methods

Methods

ArchivePatient(Patient)

Archives the specified patient, marking them as inactive while preserving their record.

Task<bool> ArchivePatient(Patient patient)

Parameters

patient Patient

The patient to be archived.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result contains true if the patient was successfully archived; otherwise, false.

CreateConfig(ConfigObservation)

Asynchronously creates a configuration based on the specified observation.

Task<bool> CreateConfig(ConfigObservation configObservation)

Parameters

configObservation ConfigObservation

The observation data used to create the configuration.

Returns

Task<bool>

A task that represents the asynchronous create operation, containing a value indicating whether the configuration was created successfully.

CreatePatient(AdmPanelRequest)

Creates a new patient based on the provided admin panel request.

Task<Patient?> CreatePatient(AdmPanelRequest apiRequest)

Parameters

apiRequest AdmPanelRequest

The admin panel request containing the data needed to create the patient.

Returns

Task<Patient>

A task that represents the asynchronous operation. The task result contains the created Patient, or null if no patient was created.

DeleteConfigObservationItem(ObjectId)

Deletes the configuration observation item identified by the specified identifier.

Task<bool> DeleteConfigObservationItem(ObjectId id)

Parameters

id ObjectId

The unique identifier of the configuration observation item to delete.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result is true if the item was successfully deleted; otherwise, false.

DeleteMedicineById(string)

Deletes a medicine identified by its unique identifier.

Task<bool> DeleteMedicineById(string medicineId)

Parameters

medicineId string

The unique identifier of the medicine to delete.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result contains true if the medicine was successfully deleted; otherwise, false.

DeleteUnitById(ObjectId)

Asynchronously deletes a unit identified by its unique identifier from the data store. Returns a result indicating whether the deletion was successful (e.g., true if the unit was found and removed, false otherwise).

Task<bool> DeleteUnitById(ObjectId unitId)

Parameters

unitId ObjectId

The unique identifier of the unit to delete.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result is true if the unit was successfully deleted; otherwise, false if the unit was not found.

FindPatient(AdmPanelRequest)

Asynchronously finds and returns a Patient based on the criteria provided in the admission panel request. Returns null when no matching patient is found.

Task<Patient?> FindPatient(AdmPanelRequest request)

Parameters

request AdmPanelRequest

The admission panel request containing the search criteria used to locate the patient.

Returns

Task<Patient>

A Task<TResult> that yields the matching Patient if found, or null otherwise.

FindPatientById(ObjectId)

Asynchronously retrieves a patient from the data store using the specified unique identifier. Returns null when no patient matches the provided identifier.

Task<Patient?> FindPatientById(ObjectId id)

Parameters

id ObjectId

The unique identifier of the patient to retrieve.

Returns

Task<Patient>

A task that represents the asynchronous operation. The task result contains the patient if found; otherwise, null.

FindPatientByLocation(PatientLocation)

Asynchronously retrieves the patient associated with the specified location.

Task<Patient?> FindPatientByLocation(PatientLocation location)

Parameters

location PatientLocation

The location used to look up the associated patient.

Returns

Task<Patient>

A task that resolves to the Patient found at the given location, or null if no patient is associated with that location.

FindPatientByPatientNumber(string)

Asynchronously retrieves a Patient by their unique patient number.

Task<Patient?> FindPatientByPatientNumber(string patientNumber)

Parameters

patientNumber string

The unique identifier of the patient to look up.

Returns

Task<Patient>

A Task<TResult> that yields the matching Patient, or null if no patient is found with the specified number.

GetMedicineById(ObjectId)

Retrieves a Medicine entity by its unique identifier from the data store. Returns null when no medicine matches the provided identifier.

Task<Medicine?> GetMedicineById(ObjectId medicineId)

Parameters

medicineId ObjectId

The unique MongoDB.Bson.ObjectId of the medicine to look up.

Returns

Task<Medicine>

A Task<TResult> that resolves to the matching Medicine, or null if not found.

GetUnitDependencyDto(Unit)

Asynchronously retrieves the dependency information DTO for the specified unit. Returns null when no dependency information is available for the unit.

Task<UnitInfoDto?> GetUnitDependencyDto(Unit unit)

Parameters

unit Unit

The unit for which to retrieve dependency information.

Returns

Task<UnitInfoDto>

A Task<TResult> that yields the unit dependency DTO, or null if none is found.

InsertUnit(Unit)

Inserts a new Unit into the data store and returns the inserted entity.

Task<Unit?> InsertUnit(Unit unit)

Parameters

unit Unit

The Unit to insert.

Returns

Task<Unit>

A Task<TResult> that resolves to the inserted Unit, or null if the insert could not be completed.

PostMedicine(Medicine)

Asynchronously creates and persists a new medicine record.

Task<Medicine?> PostMedicine(Medicine medicine)

Parameters

medicine Medicine

The medicine entity to be created and posted.

Returns

Task<Medicine>

A task that represents the asynchronous operation, containing the newly created Medicine, or null if the operation fails.

UpdateConfig(ConfigObservation)

Asynchronously updates the configuration based on the provided ConfigObservation, applying any required changes derived from the observation data.

Task<bool> UpdateConfig(ConfigObservation configObservation)

Parameters

configObservation ConfigObservation

The observation data used to determine and apply configuration updates.

Returns

Task<bool>

A Task<TResult> that represents the asynchronous update operation, containing a value indicating whether the configuration was successfully updated.

UpdateMedicine(Medicine)

Updates an existing medicine record in the system.

Task<Medicine?> UpdateMedicine(Medicine medicine)

Parameters

medicine Medicine

The medicine entity containing the updated information to be persisted.

Returns

Task<Medicine>

A task that represents the asynchronous operation. The task result contains the updated Medicine if found, or null if the medicine does not exist.

UpdatePatientData(AdmPanelRequest, Patient)

Updates the patient data based on the provided admission panel request, using the existing patient record as a reference.

Task<bool> UpdatePatientData(AdmPanelRequest request, Patient oldPatient)

Parameters

request AdmPanelRequest

The admission panel request containing the updated patient data.

oldPatient Patient

The existing patient record to be updated.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result is true if the patient data was successfully updated; otherwise, false.

UpdatePatientLocation(AdmPanelRequest)

Updates the patient location based on the provided admission panel request.

Task<bool> UpdatePatientLocation(AdmPanelRequest request)

Parameters

request AdmPanelRequest

The admission panel request containing the patient location details to update.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result is true if the update was successful; otherwise, false.