Interface IDischargeRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface IDischargeRepository : IMongoRepository<Discharge>
- Inherited Members
- Extension Methods
Methods
CountByUnitId(ObjectId)
Asynchronously counts the number of records associated with the specified unit identifier.
Task<long> CountByUnitId(ObjectId unitId)
Parameters
unitIdObjectIdThe ObjectId of the unit whose associated records will be counted.
Returns
- Task<long>
A task that represents the asynchronous operation. The task result contains the count of records for the specified unit.
Delete(ObjectId)
Deletes the entity identified by the specified identifier.
Task Delete(ObjectId id)
Parameters
idObjectIdThe unique identifier of the entity to delete.
Returns
DeleteByUnitId(ObjectId)
Deletes the entity associated with the specified unit identifier.
Task<bool> DeleteByUnitId(ObjectId unitId)
Parameters
unitIdObjectIdThe unique identifier of the unit whose associated record should be removed.
Returns
- Task<bool>
A task that represents the asynchronous operation. The result is
trueif a record was deleted; otherwise,false.
DeleteMasterListOption(List<ObjectId>, OptionList, string)
Deletes the specified master list option from the given units and returns the resulting discharges.
Task<IEnumerable<Discharge>> DeleteMasterListOption(List<ObjectId> unitIds, OptionList opt, string typeName)
Parameters
unitIdsList<ObjectId>The identifiers of the units from which the option will be removed.
optOptionListThe master list option to delete.
typeNamestringThe type name associated with the option.
Returns
- Task<IEnumerable<Discharge>>
A task that represents the asynchronous operation, containing the collection of Discharge objects resulting from the deletion.
FindAll()
Asynchronously retrieves all discharge records.
Task<IEnumerable<Discharge>> FindAll()
Returns
- Task<IEnumerable<Discharge>>
A task that represents the asynchronous operation. The task result contains a collection of all Discharge entities.
FindByDestination(string)
Asynchronously retrieves the collection of discharge records associated with the specified destination.
Task<IEnumerable<Discharge>?> FindByDestination(string destination)
Parameters
destinationstringThe destination identifier used to look up matching discharge records.
Returns
- Task<IEnumerable<Discharge>>
A task that yields an IEnumerable<T> of matching discharge records, or
nullif no records are found for the given destination.
FindById(ObjectId)
Retrieves a Discharge record by its unique identifier.
Task<Discharge?> FindById(ObjectId id)
Parameters
idObjectIdThe unique identifier of the discharge record to find.
Returns
- Task<Discharge>
A task that represents the asynchronous operation. The task result contains the Discharge if a matching record is found; otherwise,
null.
FindByPoCId(ObjectId)
Asynchronously retrieves the collection of Discharge records associated with the specified point-of-care identifier.
Task<IEnumerable<Discharge>?> FindByPoCId(ObjectId pocId)
Parameters
pocIdObjectIdThe point-of-care identifier used to look up the associated discharges.
Returns
- Task<IEnumerable<Discharge>>
A task that returns an IEnumerable<T> of Discharge records, or null if no discharges are found for the given point-of-care identifier.
FindByService(string)
Asynchronously retrieves a collection of discharges associated with the specified service. Returns null when no matching discharges are found for the given service.
Task<IEnumerable<Discharge>?> FindByService(string service)
Parameters
servicestringThe service identifier used to look up matching discharge records.
Returns
- Task<IEnumerable<Discharge>>
A task that represents the asynchronous operation. The result is an IEnumerable<T> of Discharge entries for the specified service, or
nullif none are found.
FindByUnit(string)
Asynchronously retrieves a collection of Discharge records associated with the specified unit, or null if no matching records are found.
Task<IEnumerable<Discharge>?> FindByUnit(string unit)
Parameters
unitstringThe unit identifier used to filter the discharge records.
Returns
- Task<IEnumerable<Discharge>>
A task that represents the asynchronous operation. The result is an IEnumerable<T> of Discharge containing the matching records, or null when no records are found.
GetByPatientId(ObjectId)
Retrieves the discharge record associated with the specified patient identifier, or null if no discharge exists for that patient.
Task<Discharge?> GetByPatientId(ObjectId patientId)
Parameters
patientIdObjectIdThe unique identifier of the patient whose discharge record is being requested.
Returns
- Task<Discharge>
A Task<TResult> that resolves to the matching Discharge, or null when no record is found.
GetDischargeByLocation(PatientLocation)
Asynchronously retrieves the discharge record associated with the specified patient location, returning null if no discharge is found for that location.
Task<Discharge?> GetDischargeByLocation(PatientLocation location)
Parameters
locationPatientLocationThe patient location used to look up the associated discharge record.
Returns
- Task<Discharge>
A task that represents the asynchronous operation. The task result contains the matching Discharge if found; otherwise,
null.
GetDischargeByPointOfCareId(ObjectId)
Retrieves the discharge associated with the specified point of care identifier.
Task<Discharge?> GetDischargeByPointOfCareId(ObjectId poc)
Parameters
pocObjectIdThe identifier of the point of care used to look up the discharge.
Returns
GetDischargesByUnitIds(IEnumerable<ObjectId>?)
Asynchronously retrieves a collection of Discharge records associated with the specified unit identifiers.
Task<IEnumerable<Discharge>?> GetDischargesByUnitIds(IEnumerable<ObjectId>? unitIds)
Parameters
unitIdsIEnumerable<ObjectId>The collection of unit identifiers used to look up the matching discharges. May be
null.
Returns
- Task<IEnumerable<Discharge>>
A task that represents the asynchronous operation, containing a collection of Discharge objects, or
nullwhen no matching discharges are available.
Update(Discharge)
Asynchronously updates an existing discharge record.
Task Update(Discharge discharge)
Parameters
dischargeDischargeThe discharge entity containing the updated information to be persisted.
Returns
UpdateMasterListOption(List<ObjectId>, UpdateOptionMasterListDto, string)
Updates the master list option for the specified units based on the provided update details and type name.
Task<IEnumerable<Discharge>> UpdateMasterListOption(List<ObjectId> unitIds, UpdateOptionMasterListDto opt, string typeName)
Parameters
unitIdsList<ObjectId>The list of unit identifiers to be updated.
optUpdateOptionMasterListDtoThe update option master list data transfer object containing the new option details.
typeNamestringThe name of the type to which the master list option applies.
Returns
- Task<IEnumerable<Discharge>>
A task that represents the asynchronous operation. The task result contains a collection of updated Discharge records.
UpdatePatient(ObjectId, Patient)
Updates an existing patient record identified by the specified identifier with the provided patient data.
Task UpdatePatient(ObjectId id, Patient patient)
Parameters
idObjectIdThe unique identifier of the patient to update.
patientPatientThe patient object containing the updated information to be applied to the existing record.
Returns
UpdateUnit(ObjectId, string)
Asynchronously updates the unit associated with the specified object identifier.
Task UpdateUnit(ObjectId id, string unit)
Parameters
idObjectIdThe unique identifier of the object whose unit will be updated.
unitstringThe new unit value to assign to the object.