Interface IAdmissionService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IAdmissionService : IApiRequestService
- Inherited Members
- Extension Methods
Methods
AdmitPatient(Admission, bool)
Admits a patient based on the provided admission details, optionally registering the patient as new.
Task AdmitPatient(Admission admission, bool isNew = false)
Parameters
admissionAdmissionThe admission information used to process the patient admission.
isNewboolIndicates whether the patient is being admitted for the first time. Defaults to
false.
Returns
CountAdmissionsByUnitId(ObjectId)
Asynchronously counts the number of admissions associated with the specified unit identifier.
Task<long> CountAdmissionsByUnitId(ObjectId unitId)
Parameters
unitIdObjectIdThe MongoDB ObjectId of the unit whose admissions should be counted.
Returns
- Task<long>
A task that represents the asynchronous operation, containing the total count of admissions for the given unit.
DeleteAdmissionAsync(Admission)
Asynchronously deletes the specified admission record.
Task DeleteAdmissionAsync(Admission admission)
Parameters
admissionAdmissionThe admission entity to remove.
Returns
DeleteAdmissionByIdAsync(ObjectId)
Asynchronously deletes an admission record identified by the specified admission ID.
Task DeleteAdmissionByIdAsync(ObjectId admissionId)
Parameters
admissionIdObjectIdThe unique identifier of the admission to delete.
Returns
DeleteAdmissionsByUnitId(ObjectId)
Deletes all admissions associated with the specified unit identifier.
Task DeleteAdmissionsByUnitId(ObjectId unitId)
Parameters
unitIdObjectIdThe identifier of the unit whose admissions will be deleted.
Returns
DeletePatientMasterListItem(OptionList, IEnumerable<Unit>, string)
Deletes a patient master list item identified by the specified options, units, and type name.
Task DeletePatientMasterListItem(OptionList opt, IEnumerable<Unit> unitList, string typeName)
Parameters
optOptionListThe option list used to identify the master list item to delete.
unitListIEnumerable<Unit>The collection of units associated with the master list item.
typeNamestringThe name of the type associated with the master list item.
Returns
GetAdmissionByIdAsync(ObjectId)
Asynchronously retrieves an admission by its unique identifier, returning null when no matching admission is found.
Task<Admission?> GetAdmissionByIdAsync(ObjectId admissionId)
Parameters
admissionIdObjectIdThe unique identifier of the admission to retrieve.
Returns
- Task<Admission>
A task that represents the asynchronous operation, containing the Admission if found, or
nullif no admission matches the specified identifier.
GetAdmissionByLocation(PatientLocation)
Retrieves a list of admissions associated with the specified patient location.
Task<List<Admission>> GetAdmissionByLocation(PatientLocation location)
Parameters
locationPatientLocationThe patient location used to filter the admissions.
Returns
- Task<List<Admission>>
A task that represents the asynchronous operation, containing a list of admissions for the given location.
GetAdmissionByPatientNumber(string)
Retrieves the admission record associated with the specified patient number, returning null when no matching admission is found.
Task<Admission?> GetAdmissionByPatientNumber(string patientNumber)
Parameters
patientNumberstringThe unique patient number used to look up the admission.
Returns
- Task<Admission>
A task that resolves to the matching Admission, or
nullif no admission exists for the given patient number.
GetAdmissionByPointOfCareId(ObjectId)
Asynchronously retrieves the list of admissions associated with the specified point of care identifier.
Task<List<Admission>> GetAdmissionByPointOfCareId(ObjectId id)
Parameters
idObjectIdThe MongoDB.Bson.ObjectId of the point of care used to filter the admissions.
Returns
- Task<List<Admission>>
A task that represents the asynchronous operation. The task result contains a list of Admission objects matching the specified point of care id, or an empty list if no admissions are found.
GetAdmissionByPointOfCareIdAndLocale(ObjectId, LocaleEnum)
Retrieves the list of admissions associated with the specified point of care, localized for the given locale.
Task<List<Admission>> GetAdmissionByPointOfCareIdAndLocale(ObjectId pocId, LocaleEnum locale)
Parameters
pocIdObjectIdThe identifier of the point of care whose admissions are being queried.
localeLocaleEnumThe locale used to localize the returned admission data.
Returns
- Task<List<Admission>>
A task that resolves to the list of admissions matching the point of care and locale; an empty list when no matches are found.
GetAdmissionByUnitIdWithOutPoC(ObjectId)
Retrieves a list of admissions associated with the specified unit identifier, excluding any Point of Care (PoC) related admissions.
Task<List<Admission>> GetAdmissionByUnitIdWithOutPoC(ObjectId unitId)
Parameters
unitIdObjectIdThe unique identifier of the unit whose admissions should be retrieved.
Returns
- Task<List<Admission>>
A task that represents the asynchronous operation. The task result contains a list of admissions for the specified unit, excluding PoC admissions.
GetAdmissionsAsync()
Asynchronously retrieves a collection of admissions.
Task<IEnumerable<Admission>> GetAdmissionsAsync()
Returns
- Task<IEnumerable<Admission>>
A task that represents the asynchronous operation. The task result contains an enumerable collection of Admission objects.
InsertAdmission(Admission)
Asynchronously inserts a new admission record and returns the created entry, or null if the insertion was not performed.
Task<Admission?> InsertAdmission(Admission admission)
Parameters
admissionAdmissionThe admission entity to be inserted into the data store.
Returns
- Task<Admission>
A task that represents the asynchronous operation. The task result contains the inserted Admission, or null when no record is produced.
ReturnPatientToAdmissions(ObjectId)
Processes the return of a patient to the admissions workflow, typically used when a patient needs to be re-queued or reinstated for admission processing.
Task ReturnPatientToAdmissions(ObjectId patientId)
Parameters
patientIdObjectIdThe unique identifier of the patient to be returned to admissions.
Returns
ReturnPatientToAdmissions(ObjectId, Admission)
Asynchronously returns a patient to the admissions workflow using the specified admission record.
Task ReturnPatientToAdmissions(ObjectId patientId, Admission adm)
Parameters
patientIdObjectIdThe unique identifier of the patient being returned to admissions.
admAdmissionThe admission record associated with the patient being returned.
Returns
SearchByPatientNumberAndDistinctUnit(string, ObjectId)
Searches for a patient by their patient number within the specified unit, returning the matching patient search result or null if no match is found.
Task<PatientSearch?> SearchByPatientNumberAndDistinctUnit(string patientNumber, ObjectId unitId)
Parameters
patientNumberstringThe patient number used to identify the patient.
unitIdObjectIdThe identifier of the unit in which the patient is being searched.
Returns
- Task<PatientSearch>
A task that returns the matching PatientSearch if found; otherwise, null.
UpdateAdmissionAsync(Admission)
Asynchronously updates an existing admission record with the provided information.
Task UpdateAdmissionAsync(Admission admission)
Parameters
admissionAdmissionThe admission entity containing the updated data to be persisted.
Returns
- Task
A task that represents the asynchronous update operation.
UpdatePatientMasterListItemChange(UpdateOptionMasterListDto, IEnumerable<Unit>, string)
Updates a patient master list item based on the provided option change and related unit and type information.
Task UpdatePatientMasterListItemChange(UpdateOptionMasterListDto opt, IEnumerable<Unit> unitList, string typeName)
Parameters
optUpdateOptionMasterListDtoThe update option master list data transfer object containing the change details.
unitListIEnumerable<Unit>The collection of units associated with the master list item change.
typeNamestringThe name of the type used to identify the master list item category.
Returns
- Task
A task that represents the asynchronous update operation.