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
patientPatientThe patient to be archived.
Returns
- Task<bool>
A task that represents the asynchronous operation. The task result contains
trueif the patient was successfully archived; otherwise,false.
CreateConfig(ConfigObservation)
Asynchronously creates a configuration based on the specified observation.
Task<bool> CreateConfig(ConfigObservation configObservation)
Parameters
configObservationConfigObservationThe 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
apiRequestAdmPanelRequestThe 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
nullif no patient was created.
DeleteConfigObservationItem(ObjectId)
Deletes the configuration observation item identified by the specified identifier.
Task<bool> DeleteConfigObservationItem(ObjectId id)
Parameters
idObjectIdThe unique identifier of the configuration observation item to delete.
Returns
- Task<bool>
A task that represents the asynchronous operation. The task result is
trueif the item was successfully deleted; otherwise,false.
DeleteMedicineById(string)
Deletes a medicine identified by its unique identifier.
Task<bool> DeleteMedicineById(string medicineId)
Parameters
medicineIdstringThe unique identifier of the medicine to delete.
Returns
- Task<bool>
A task that represents the asynchronous operation. The task result contains
trueif 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
unitIdObjectIdThe unique identifier of the unit to delete.
Returns
- Task<bool>
A task that represents the asynchronous operation. The task result is
trueif the unit was successfully deleted; otherwise,falseif 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
requestAdmPanelRequestThe 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
nullotherwise.
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
idObjectIdThe 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
locationPatientLocationThe location used to look up the associated patient.
Returns
- Task<Patient>
A task that resolves to the Patient found at the given location, or
nullif no patient is associated with that location.
FindPatientByPatientNumber(string)
Asynchronously retrieves a Patient by their unique patient number.
Task<Patient?> FindPatientByPatientNumber(string patientNumber)
Parameters
patientNumberstringThe unique identifier of the patient to look up.
Returns
- Task<Patient>
A Task<TResult> that yields the matching Patient, or
nullif 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
medicineIdObjectIdThe unique MongoDB.Bson.ObjectId of the medicine to look up.
Returns
- Task<Medicine>
A Task<TResult> that resolves to the matching Medicine, or
nullif 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
unitUnitThe unit for which to retrieve dependency information.
Returns
- Task<UnitInfoDto>
A Task<TResult> that yields the unit dependency DTO, or
nullif none is found.
InsertUnit(Unit)
Inserts a new Unit into the data store and returns the inserted entity.
Task<Unit?> InsertUnit(Unit unit)
Parameters
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
medicineMedicineThe medicine entity to be created and posted.
Returns
- Task<Medicine>
A task that represents the asynchronous operation, containing the newly created Medicine, or
nullif 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
configObservationConfigObservationThe 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
medicineMedicineThe 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
nullif 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
requestAdmPanelRequestThe admission panel request containing the updated patient data.
oldPatientPatientThe existing patient record to be updated.
Returns
- Task<bool>
A task that represents the asynchronous operation. The task result is
trueif 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
requestAdmPanelRequestThe admission panel request containing the patient location details to update.