Interface IDisplayService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IDisplayService
- Extension Methods
Methods
CountDisplaysByUnitId(ObjectId)
Asynchronously counts the number of displays associated with the specified unit identifier.
Task<long> CountDisplaysByUnitId(ObjectId unitId)
Parameters
unitIdObjectIdThe unique identifier of the unit whose displays should be counted.
Returns
- Task<long>
A task that represents the asynchronous operation. The task result contains the count of displays linked to the specified unit.
DeleteDisplay(ObjectId)
Asynchronously deletes the display identified by the specified identifier.
Task<bool> DeleteDisplay(ObjectId id)
Parameters
idObjectIdThe unique identifier of the display to delete.
Returns
- Task<bool>
A task that represents the asynchronous operation, containing a value indicating whether the display was successfully deleted.
DeleteDisplaysByUnitId(ObjectId)
Deletes display records associated with the specified unit identifier.
Task DeleteDisplaysByUnitId(ObjectId unitId)
Parameters
unitIdObjectIdThe identifier of the unit whose displays should be removed.
Returns
GetAllAvailablePoc(List<string>, bool)
Retrieves all available Points of Contact (POCs) along with their associated unit information, optionally filtered by the provided display identifiers and allowing exclusion of virtual entries.
Task<PocAndUnitDto> GetAllAvailablePoc(List<string> displayIds, bool excludeVirtual = false)
Parameters
displayIdsList<string>The list of display identifiers used to filter the available POCs.
excludeVirtualboolWhen set to
true, excludes virtual POCs from the results; otherwise, virtual POCs are included.
Returns
- Task<PocAndUnitDto>
A task that represents the asynchronous operation. The task result contains a PocAndUnitDto with the matching POCs and their unit details.
GetAllByUser(string?)
Retrieves all displays along with their associated permissions for the specified user.
When userName is null, the behavior is determined by the underlying implementation (e.g., returning all displays or an empty result).
Task<List<DisplayWithPermissionsDto>> GetAllByUser(string? userName)
Parameters
userNamestringThe username used to look up the associated displays and permissions. May be null.
Returns
- Task<List<DisplayWithPermissionsDto>>
A task that represents the asynchronous operation, containing a list of DisplayWithPermissionsDto entries for the user.
GetAllCompact()
Asynchronously retrieves all displays in a compact format containing only minimal identifying information.
Task<List<DisplayMinimalDto>> GetAllCompact()
Returns
- Task<List<DisplayMinimalDto>>
A task that represents the asynchronous operation. The task result contains a list of DisplayMinimalDto objects representing all available displays in a compact projection.
GetAllDisplaySection()
Asynchronously retrieves all display sections as a minimal display list.
Task<MinimalDisplayListDto> GetAllDisplaySection()
Returns
- Task<MinimalDisplayListDto>
A task that represents the asynchronous operation, containing the MinimalDisplayListDto with the display section data.
GetAllPocsByDisplayId(ObjectId)
Asynchronously retrieves all Points of Care (POCs) associated with the specified display identifier.
Task<List<PointOfCare>> GetAllPocsByDisplayId(ObjectId id)
Parameters
idObjectIdThe display identifier used to look up the associated Points of Care.
Returns
- Task<List<PointOfCare>>
A task representing the asynchronous operation, containing a list of Points of Care matching the specified display identifier.
GetByCardConfigId(ObjectId)
Retrieves a list of Display entities associated with the specified card configuration identifier.
Task<List<Display>> GetByCardConfigId(ObjectId configId)
Parameters
configIdObjectIdThe unique identifier of the card configuration whose associated displays are to be retrieved.
Returns
- Task<List<Display>>
A task that represents the asynchronous operation, containing a list of Display objects linked to the given card configuration.
GetByConfigId(ObjectId)
Retrieves a list of displays associated with the specified configuration identifier.
Task<List<Display>> GetByConfigId(ObjectId configId)
Parameters
configIdObjectIdThe unique identifier of the configuration used to filter the displays.
Returns
- Task<List<Display>>
A task that represents the asynchronous operation. The task result contains a list of displays matching the specified configuration identifier.
GetById(ObjectId)
Retrieves a Display entity by its unique identifier.
Task<Display?> GetById(ObjectId id)
Parameters
idObjectIdThe unique identifier of the display to retrieve.
Returns
- Task<Display>
A task that represents the asynchronous operation. The task result contains the Display if found; otherwise,
null.
GetByIdWithPermissions(ObjectId, LocaleEnum)
Asynchronously retrieves a display representation of an entity along with its associated permissions, localized for the specified locale.
Task<DisplayWithPermissionsDto> GetByIdWithPermissions(ObjectId id, LocaleEnum localeEnum)
Parameters
idObjectIdThe unique identifier of the entity to retrieve.
localeEnumLocaleEnumThe locale used to localize the returned display data.
Returns
- Task<DisplayWithPermissionsDto>
A task that represents the asynchronous operation, containing the localized display data with permissions.
GetByName(string)
Retrieves a Display entity by its name asynchronously.
Returns null when no matching display is found.
Task<Display?> GetByName(string name)
Parameters
namestringThe name of the display to look up.
Returns
- Task<Display>
A Task<TResult> that resolves to the matching Display, or
nullif none is found.
GetByPointOfCare(PointOfCare)
Asynchronously retrieves the list of displays associated with the specified point of care.
Task<List<Display>> GetByPointOfCare(PointOfCare pointOfCare)
Parameters
pointOfCarePointOfCareThe point of care used to filter the displays to be returned.
Returns
- Task<List<Display>>
A task that represents the asynchronous operation, containing the list of Display items linked to the given point of care.
GetByType(DisplayType)
Asynchronously retrieves a list of Display entries filtered by the specified display type.
Task<List<Display>> GetByType(DisplayConfigEnums.DisplayType type)
Parameters
typeDisplayConfigEnums.DisplayTypeThe display type used to filter the returned collection.
Returns
- Task<List<Display>>
A task that represents the asynchronous operation, containing the list of Display items matching the specified type.
GetByUnitId(ObjectId)
Retrieves a list of Display records associated with the specified unit identifier.
Task<List<Display>> GetByUnitId(ObjectId id)
Parameters
idObjectIdThe MongoDB.Bson.ObjectId that identifies the unit whose displays are being requested.
Returns
- Task<List<Display>>
A task that represents the asynchronous operation, containing a List<T> of displays linked to the given unit.
GetDisplayConfigLocations(ObjectId)
Retrieves the list of display configuration locations associated with the specified display configuration.
Task<List<DisplayConfigLocationDto>> GetDisplayConfigLocations(ObjectId displayConfigId)
Parameters
displayConfigIdObjectIdThe unique identifier of the display configuration whose locations are being retrieved.
Returns
- Task<List<DisplayConfigLocationDto>>
A task that represents the asynchronous operation, containing a list of DisplayConfigLocationDto objects for the specified display configuration.
GetDisplaySectionByUser(DisplayType, ObjectId?, string?, List<Authorization>?)
Retrieves a list of minimal display sections filtered by display type, current display context, user name, and the provided authorizations.
Task<List<MinimalDisplaySection>> GetDisplaySectionByUser(DisplayConfigEnums.DisplayType type, ObjectId? currentDisplay, string? userName, List<Authorization>? authorizations)
Parameters
typeDisplayConfigEnums.DisplayTypeThe display type used to filter the available sections.
currentDisplayObjectId?The identifier of the current display, or
nullwhen no display is selected.userNamestringThe user name used to resolve user-specific sections, or
nullif not applicable.authorizationsList<Authorization>The list of authorizations used to authorize and filter the returned sections, or
nullif no authorization filtering is required.
Returns
- Task<List<MinimalDisplaySection>>
A task that yields the list of MinimalDisplaySection instances matching the supplied criteria.
GetInfo(ObjectId, string?, List<Authorization>?, LocaleEnum?, bool, bool, bool, bool, CancellationToken)
Retrieves the display identified by id, optionally populating related data such as point-of-care, patient, display list, and display configuration based on the corresponding fill flags.
Task<Display?> GetInfo(ObjectId id, string? userName, List<Authorization>? authorizations, LocaleEnum? locale, bool fillPointOfCare = true, bool fillPatientData = false, bool fillDisplayList = true, bool fillDisplayConfig = true, CancellationToken ct = default)
Parameters
idObjectIdThe identifier of the display to retrieve.
userNamestringThe name of the user requesting the display, used for authorization checks.
authorizationsList<Authorization>Optional collection of authorizations used to control access to the display and its related data.
localeLocaleEnum?Optional locale used to localize the returned display information.
fillPointOfCareboolWhen
true, includes the associated point-of-care data in the result.fillPatientDataboolWhen
true, includes the associated patient data in the result.fillDisplayListboolWhen
true, includes the display list in the result.fillDisplayConfigboolWhen
true, includes the display configuration in the result.ctCancellationTokenToken used to cancel the asynchronous operation.
Returns
- Task<Display>
A Task<TResult> that resolves to the Display if found, or
nullif no display matches the specifiedid.
GetPaginatedDisplays(PaginationFilter)
Retrieves a paginated collection of displays based on the provided filter criteria.
Task<PaginationResponse<Display>> GetPaginatedDisplays(PaginationFilter filter)
Parameters
filterPaginationFilterThe pagination filter that defines the page size, page number, and any additional filtering criteria for the display results.
Returns
- Task<PaginationResponse<Display>>
A task that represents the asynchronous operation, containing a PaginationResponse<T> with the requested page of displays and pagination metadata.
InsertOne(Display)
Inserts a new display record into the data store and returns the persisted entity.
Task<Display> InsertOne(Display display)
Parameters
displayDisplayThe display entity to insert.
Returns
InsertOneTest()
Asynchronously inserts a single test Display record and returns the persisted result.
Task<Display> InsertOneTest()
Returns
- Task<Display>
A Task<TResult> that represents the asynchronous insert operation, containing the inserted Display.
IsDisplayConfigInUse(ObjectId)
Asynchronously determines whether the specified display configuration is currently in use.
Task<bool> IsDisplayConfigInUse(ObjectId displayConfigId)
Parameters
displayConfigIdObjectIdThe identifier of the display configuration to check.
Returns
- Task<bool>
A task that represents the asynchronous operation. The task result is
trueif the display configuration is in use; otherwise,false.
UpdateConfig(Display, DisplayConfig?)
Updates the configuration of an existing display using the provided new configuration.
Task<Display?> UpdateConfig(Display oldDisplay, DisplayConfig? newDisplayConfig)
Parameters
oldDisplayDisplayThe current display whose configuration will be updated.
newDisplayConfigDisplayConfigThe new display configuration to apply, or null to leave the configuration unchanged.
Returns
- Task<Display>
A task that represents the asynchronous operation. The task result contains the updated Display, or null if the update was not performed.
UpdateConfigId(Display, ObjectId)
Updates the configuration identifier associated with the specified display.
Task<Display?> UpdateConfigId(Display oldDisplay, ObjectId configId)
Parameters
oldDisplayDisplayThe existing display whose configuration identifier will be updated.
configIdObjectIdThe new configuration identifier to associate with the display.
Returns
UpdateConfigPreset(ObjectId, ObjectId)
Updates the configuration preset associated with the specified display using the provided configuration display.
Task<Display?> UpdateConfigPreset(ObjectId objectIdDisplay, ObjectId objectIdConfigDisplay)
Parameters
objectIdDisplayObjectIdThe unique identifier of the display whose configuration preset will be updated.
objectIdConfigDisplayObjectIdThe unique identifier of the configuration display to apply as the preset.
Returns
UpdateName(ObjectId, string)
Updates the name of the entity identified by the given identifier and returns the resulting Display.
Task<Display?> UpdateName(ObjectId id, string name)
Parameters
idObjectIdThe identifier of the entity whose name should be updated.
namestringThe new name to apply to the entity.
Returns
- Task<Display>
A task that represents the asynchronous update operation, containing the updated Display or
nullif no entity was found.
UpdatePointOfCareList(ObjectId, List<ObjectId>)
Updates the point of care list associated with the specified object identifier, replacing or merging it with the provided list of point of care object identifiers.
Task<Display?> UpdatePointOfCareList(ObjectId objectId, List<ObjectId> listPocObId)
Parameters
objectIdObjectIdThe identifier of the object whose point of care list is being updated.
listPocObIdList<ObjectId>The collection of point of care object identifiers to apply to the target object.