Interface IDischargeService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IDischargeService : IApiRequestService
- Inherited Members
- Extension Methods
Methods
CountDischargesByUnitId(ObjectId)
Asynchronously counts the number of discharge records associated with the specified unit.
Task<long> CountDischargesByUnitId(ObjectId unitId)
Parameters
unitIdObjectIdThe identifier of the unit whose discharges should be counted.
Returns
- Task<long>
A task that represents the asynchronous operation, containing the total number of discharges for the specified unit.
DeleteDischargeAsync(Discharge)
Asynchronously deletes the specified discharge record.
Task DeleteDischargeAsync(Discharge discharge)
Parameters
dischargeDischargeThe discharge entity to be removed.
Returns
DeleteDischargeByIdAsync(ObjectId)
Asynchronously deletes a discharge record identified by the specified identifier.
Task DeleteDischargeByIdAsync(ObjectId dischargeId)
Parameters
dischargeIdObjectIdThe unique identifier of the discharge to delete.
Returns
DeleteDischargesByUnitId(ObjectId)
Deletes discharge records associated with the specified unit identifier.
Task DeleteDischargesByUnitId(ObjectId unitId)
Parameters
unitIdObjectIdThe unique identifier of the unit whose discharge records should be removed.
Returns
DeletePatientMasterListItem(OptionList, IEnumerable<Unit>, string)
Deletes the specified patient master list item associated with the given option list and units.
Task DeletePatientMasterListItem(OptionList opt, IEnumerable<Unit> unitList, string typeName)
Parameters
optOptionListThe option list containing the patient master list item to delete.
unitListIEnumerable<Unit>The collection of units associated with the item to be deleted.
typeNamestringThe name of the type used to identify the patient master list item.
Returns
- Task
A task that represents the asynchronous delete operation.
GetDischargeByIdAsync(ObjectId)
Asynchronously retrieves a discharge record by its unique identifier, returning null if no matching discharge is found.
Task<Discharge?> GetDischargeByIdAsync(ObjectId dischargeId)
Parameters
dischargeIdObjectIdThe unique identifier of the discharge to look up.
Returns
- Task<Discharge>
A task that represents the asynchronous operation, containing the Discharge if found, or null when no record matches the provided identifier.
GetDischargeByLocation(PatientLocation)
Retrieves the discharge record associated with the specified patient location, returning null if no matching discharge is found.
Task<Discharge?> GetDischargeByLocation(PatientLocation location)
Parameters
locationPatientLocationThe patient location used to look up the discharge record.
Returns
- Task<Discharge>
A task that represents the asynchronous operation. The task result contains the matching Discharge if found, or null if no discharge is associated with the specified location.
GetDischargeByPatientId(ObjectId)
Retrieves the discharge record associated with the specified patient identifier.
Task<Discharge?> GetDischargeByPatientId(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 if found; otherwise,
null.
GetDischargeByPointOfCareId(ObjectId)
Retrieves a discharge record associated with the specified point of care location identifier.
Task<Discharge?> GetDischargeByPointOfCareId(ObjectId location)
Parameters
locationObjectIdThe ObjectId of the point of care location used to look up the discharge.
Returns
- Task<Discharge>
A task that represents the asynchronous operation. The task result contains the matching Discharge if found, or
nullif no discharge exists for the specified point of care location.
GetDischargeByPointOfCareIdWithLocale(ObjectId, LocaleEnum)
Retrieves the discharge associated with the specified point of care location, returning localized data for the requested locale. Returns null when no matching discharge is found.
Task<Discharge?> GetDischargeByPointOfCareIdWithLocale(ObjectId location, LocaleEnum dataLocale)
Parameters
locationObjectIdThe identifier of the point of care location whose discharge should be retrieved.
dataLocaleLocaleEnumThe locale used to determine the language of the returned discharge data.
Returns
- Task<Discharge>
A task containing the matching Discharge, or null if no discharge exists for the given location.
GetDischargesAsync()
Asynchronously retrieves a collection of discharge records.
Task<IEnumerable<Discharge>> GetDischargesAsync()
Returns
- Task<IEnumerable<Discharge>>
A task that represents the asynchronous operation. The task result contains an enumerable collection of Discharge objects.
InsertDischarge(Discharge)
Inserts a new discharge record into the data store. Returns the inserted Discharge entity, or null if the record could not be created.
Task<Discharge?> InsertDischarge(Discharge discharge)
Parameters
Returns
- Task<Discharge>
A Task<TResult> that resolves to the inserted Discharge, or null when the insertion does not produce a result.
SendDischargeBroadcast(Discharge, OperationType)
Sends a broadcast notification for the specified discharge based on the given operation type.
void SendDischargeBroadcast(Discharge discharge, OperationType operation)
Parameters
dischargeDischargeThe discharge entity to be included in the broadcast.
operationOperationTypeThe type of operation (e.g., create, update, delete) that determines the broadcast context.
UpdateDischargeAsync(Discharge)
Asynchronously updates an existing discharge record in the data store.
Task UpdateDischargeAsync(Discharge discharge)
Parameters
Returns
UpdatePatientMasterListItemChange(UpdateOptionMasterListDto, IEnumerable<Unit>, string)
Updates a patient master list item change using the provided update options, applying the change across the specified unit list and master list type.
Task UpdatePatientMasterListItemChange(UpdateOptionMasterListDto opt, IEnumerable<Unit> unitList, string typeName)
Parameters
optUpdateOptionMasterListDtoThe update options describing the change to apply to the patient master list item.
unitListIEnumerable<Unit>The collection of units to which the master list item change should be applied.
typeNamestringThe name of the master list type that identifies which list the item belongs to.