Interface IAlarmService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IAlarmService : IApiRequestService
- Inherited Members
- Extension Methods
Methods
CalculateAlarmTest(BasePatientObservationValue, string)
Asynchronously calculates an alarm test result based on the provided patient observation value.
Task CalculateAlarmTest(BasePatientObservationValue source, string name)
Parameters
sourceBasePatientObservationValueThe base patient observation value used as input for the alarm evaluation.
namestringThe name that identifies the alarm test to be calculated.
Returns
CheckObservationAlarm(PatientObservation)
Asynchronously checks the observation alarm for the specified patient observation.
Task CheckObservationAlarm(PatientObservation obs4)
Parameters
obs4PatientObservationThe patient observation to evaluate for alarm conditions.
Returns
FindLastObservationsByField(ObjectId, List<Field>?)
Retrieves the most recent patient observations for the specified patient, optionally filtered by a set of fields.
Task<List<PatientObservationAlarm>> FindLastObservationsByField(ObjectId patientId, List<Field>? filterObservations = null)
Parameters
patientIdObjectIdThe identifier of the patient whose last observations should be retrieved.
filterObservationsList<Field>An optional list of fields to restrict the returned observations; when null, no field filter is applied.
Returns
- Task<List<PatientObservationAlarm>>
A task that resolves to the list of the patient's most recent PatientObservationAlarm records.
FindLastValuesNotExpired(ObjectId, List<Field>, List<ConfigObservation>)
Retrieves the most recent non-expired patient observation alarms for a specific patient, based on the provided alarm fields and configuration.
Task<List<PatientObservationAlarm>> FindLastValuesNotExpired(ObjectId patientId, List<Field> dataAlarmfields, List<ConfigObservation> configAlarm)
Parameters
patientIdObjectIdThe unique identifier of the patient whose alarms are being queried.
dataAlarmfieldsList<Field>The list of fields used to identify and filter the patient observation alarm data.
configAlarmList<ConfigObservation>The list of configuration observations that define the alarm criteria, including expiration rules.
Returns
- Task<List<PatientObservationAlarm>>
A task that represents the asynchronous operation, containing the list of the latest non-expired PatientObservationAlarm entries for the patient.
MapObservation(PatientObservationAlarm, bool)
Maps a patient observation alarm, optionally restricting the lookup to name-based matching only. Returns a null result when no matching alarm is found.
Task<PatientObservationAlarm?> MapObservation(PatientObservationAlarm obs, bool onlyByName = false)
Parameters
obsPatientObservationAlarmThe patient observation alarm to be mapped.
onlyByNameboolWhen true, limits the mapping to lookups performed by name only.
Returns
- Task<PatientObservationAlarm>
A task that resolves to the mapped patient observation alarm, or null if no corresponding alarm is found.
MapObservationsByName(PatientObservationAlarm)
Maps the given patient observation alarm to a corresponding record by name, returning a null result when no matching observation is found.
Task<PatientObservationAlarm?> MapObservationsByName(PatientObservationAlarm obs)
Parameters
obsPatientObservationAlarmThe patient observation alarm to be mapped by name.
Returns
- Task<PatientObservationAlarm>
A task containing the mapped PatientObservationAlarm, or
nullif no matching observation exists.
ProcessAlarmObservations(List<PatientObservationAlarm>, List<PatientObservation>, Patient, DateTime, ObservationData?)
Processes a collection of patient observation alarms, associating them with the corresponding observations and patient, and recording the processing time.
Task ProcessAlarmObservations(List<PatientObservationAlarm> alarmObservations, List<PatientObservation> observations, Patient patient, DateTime messageTime, ObservationData? observationData = null)
Parameters
alarmObservationsList<PatientObservationAlarm>The list of patient observation alarms to be processed.
observationsList<PatientObservation>The list of patient observations related to the alarms.
patientPatientThe patient to whom the observations and alarms belong.
messageTimeDateTimeThe timestamp associated with the message being processed.
observationDataObservationDataOptional additional observation data used during processing.
Returns
SendAlarm(PatientObservation, string, Name?, Severity, Type)
Sends an alarm notification associated with the specified patient observation, using the provided name, optional code, severity, and type.
Task SendAlarm(PatientObservation obs, string name, AlarmEnum.Name? code, AlarmEnum.Severity severity, AlarmEnum.Type type)
Parameters
obsPatientObservationThe patient observation that triggers the alarm.
namestringThe display name of the alarm.
codeAlarmEnum.Name?The optional alarm code identifier, or null when not applicable.
severityAlarmEnum.SeverityThe severity level assigned to the alarm.
typeAlarmEnum.TypeThe type category of the alarm.
Returns
- Task
A task that represents the asynchronous alarm sending operation.