Class ConstraintNumeroDiRuoloTurno

java.lang.Object
org.cswteams.ms3.entity.constraint.Constraint
org.cswteams.ms3.entity.constraint.ConstraintNumeroDiRuoloTurno

@Entity public class ConstraintNumeroDiRuoloTurno extends Constraint
This class implements the check of the number of doctors of each seniority in a concrete shift. It defines how many doctors foreach seniority have to be associated to each concrete shift. For instance, nocturne shifts in ward must have one specialist and one structured on duty and one specialist and one structured on call.
  • Constructor Details

    • ConstraintNumeroDiRuoloTurno

      public ConstraintNumeroDiRuoloTurno()
  • Method Details

    • verifyConstraint

      public void verifyConstraint(ContextConstraint context) throws ViolatedConstraintException
      This method checks if numeroDiRuoloTurno constraint is respected while inserting a new concrete shift into a schedule.
      Specified by:
      verifyConstraint in class Constraint
      Parameters:
      context - Object comprehending the new concrete shift to be assigned and the information about doctor's state in the corresponding schedule
      Throws:
      ViolatedConstraintException - Exception thrown if the constraint is violated