# Class CheckActiveTreatmentsJob

Namespace
  adas_core.Application.Services

Assembly
  adas-core.Application.dll

Represents a scheduled job that checks the status of active treatments.

    [DisallowConcurrentExecution]
    public class CheckActiveTreatmentsJob : IJob

Inheritance
  object
  CheckActiveTreatmentsJob

Implements
  IJob

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Remarks

The DisallowConcurrentExecution attribute ensures that only one instance of this job can execute at any given time.

## Properties

### CalculatedObservationsService

    public static ICalculatedObservationsService CalculatedObservationsService { get; set; }

#### Property Value

ICalculatedObservationsService

### MedicineService

    public static IMedicineService MedicineService { get; set; }

#### Property Value

IMedicineService

### PatientService

    public static IPatientService PatientService { get; set; }

#### Property Value

IPatientService

### TreatmentService

    public static ITreatmentService TreatmentService { get; set; }

#### Property Value

ITreatmentService

## Methods

### Execute(IJobExecutionContext)

Executes the scheduled job that iterates through all patients, retrieves their active treatments and the associated medicines (excluding nutrition-type medicines), and calculates medicine observations for each patient. Exceptions are caught and logged without rethrowing, and the total execution duration is logged upon completion.

    public Task Execute(IJobExecutionContext context)

#### Parameters

`context` IJobExecutionContext

  The job execution context provided by the scheduler.

#### Returns

Task