Interface IGroupedObservationService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IGroupedObservationService
- Extension Methods
Methods
CreateNextEmptyObs(WsSubscriberGrouped)
Asynchronously creates a new empty observation for the next available slot in the grouped web service subscription.
Task<GroupedObservation> CreateNextEmptyObs(WsSubscriberGrouped ws)
Parameters
wsWsSubscriberGroupedThe grouped web service subscriber for which the next empty observation is created.
Returns
- Task<GroupedObservation>
A task that represents the asynchronous operation, containing the newly created GroupedObservation.
FindLastObservations(ObjectId, int, List<string>?)
Retrieves the most recent observations for a specified patient, optionally filtered by observation types.
Task<List<PatientObservation>> FindLastObservations(ObjectId patientId, int num = 2, List<string>? filterObservations = null)
Parameters
patientIdObjectIdThe unique identifier of the patient whose observations are being retrieved.
numintThe maximum number of recent observations to return. Defaults to 2.
filterObservationsList<string>An optional list of observation names to include; if null, all observation types are considered.
Returns
- Task<List<PatientObservation>>
A task that resolves to a list of the most recent PatientObservation entries for the patient.
GenerateGroupedObservation(ObjectId, GroupedField, List<GroupedObservationObs>, PatientObservation, string)
Generates a GroupedObservation for the specified patient based on the provided patient observation, grouped field configuration, and any previously recorded grouped observations, applying the supplied time zone for date and time handling.
Task<GroupedObservation> GenerateGroupedObservation(ObjectId obsPatientId, GroupedField groupedField, List<GroupedObservation.GroupedObservationObs> wsgLastGroupedObservationObs, PatientObservation obs, string timeZoneId = "Romance Standard Time")
Parameters
obsPatientIdObjectIdThe identifier of the patient whose observation is being grouped.
groupedFieldGroupedFieldThe grouped field definition that drives how the observation is categorized and aggregated.
wsgLastGroupedObservationObsList<GroupedObservation.GroupedObservationObs>The list of the most recent grouped observation entries used as context when building the new grouped observation.
obsPatientObservationThe patient observation to be processed and grouped.
timeZoneIdstringThe time zone identifier used when computing date and time values for the grouped observation. Defaults to "Romance Standard Time".
Returns
- Task<GroupedObservation>
A Task<TResult> that resolves to the generated grouped observation for the patient.
GenerateGroupedObservation(ObjectId, GroupedField, string, bool, CancellationToken)
Generates a grouped observation for the specified identifier and grouped field, applying the provided time zone for time-based calculations.
Task<GroupedObservation> GenerateGroupedObservation(ObjectId id, GroupedField groupedField, string timeZoneId = "Romance Standard Time", bool cacheIsChecked = false, CancellationToken ct = default)
Parameters
idObjectIdThe unique identifier of the source entity used to produce the grouped observation.
groupedFieldGroupedFieldThe field definition that determines how the observation is grouped.
timeZoneIdstringThe identifier of the time zone to apply when interpreting time values. Defaults to "Romance Standard Time".
cacheIsCheckedboolIndicates whether the cache should be consulted before generating the result. Defaults to
false.ctCancellationTokenThe cancellation token used to cancel the operation.
Returns
- Task<GroupedObservation>
A task that represents the asynchronous generation, producing the resulting GroupedObservation.