← Back to PayGuide

Award Extractor · sample output

Aged Care Award: draft overtime creation pseudocode

Sample Award Extractor output for the Aged Care Award. Created before any user edit or review, this page shows what Award Extractor produces. In real-world use, a user would review and refine the Interpretation Matrix before relying on it. Award Extractor would then regenerate the pseudocode after any user changes. This often includes removing rules from the Matrix before implementation to simplify the code required. Award Extractor initially retains all rules to preserve coverage rather than silently remove them. It is not an approved interpretation.

Source file: 5_1_OT_creation_pseudocode.md · View raw Markdown

Overtime pseudocode

Derived Fields

Required additional inputs

Rule priority

Process rules in this order:

1. Qualifying sleepover rules.

2. Broken-shift validation and the 12-hour broken-shift boundary.

3. Day-worker span and shift-worker status.

4. Daily ordinary-hours boundaries.

5. Full-time daily authorised work outside rostered ordinary hours.

6. Part-time daily thresholds and agreed-rostered-hours threshold.

7. Casual daily threshold.

8. Part-time and casual weekly and fortnightly thresholds.

9. Selected ordinary-hours model and roster-cycle boundaries as boundary controls.

10. Assign all remaining Unallocated_Hours to Ordinary_Hours.

Where multiple rules identify the same worked hour:

Pseudocode


  Worked_Hour_Units = split each shift into non-overlapping hour units
  Unallocated_Hours = Worked_Hour_Units
  Overtime_Hours = empty
  Ordinary_Hours = empty

  IF Applicable_Ordinary_Hours_Model = "38 hours per week":
      Ordinary_Hours_Model_Boundary = 38 hours per week

  ELSE IF Applicable_Ordinary_Hours_Model = "76 hours per fortnight":
      Ordinary_Hours_Model_Boundary = 76 hours per fortnight

  ELSE IF Applicable_Ordinary_Hours_Model = "114 hours over 21 days":
      Ordinary_Hours_Model_Boundary = 114 hours over 21 days

  ELSE IF Applicable_Ordinary_Hours_Model = "152 hours over four weeks":
      Ordinary_Hours_Model_Boundary = 152 hours over four weeks

  ELSE:
      flag missing ordinary-hours model

  // Clauses 22.1 and 25.1
  Calculate Outside_Ordinary_Hours_Boundary using the selected model.
  Do not classify an hour as overtime from this boundary alone.

  // Clauses 22.1(a) and 22.1(b)
  FOR each 28-calendar-day roster cycle:
      IF Roster_Cycle_Work_Day_Arrangement = "20 work days":
          ordinary roster-cycle arrangement = no more than 20 work days

      ELSE IF Roster_Cycle_Work_Day_Arrangement =
              "19 work days plus accrued paid day off":
          ordinary roster-cycle arrangement =
              no more than 19 work days plus twentieth day as accrued paid day off

      Mark work outside the selected arrangement as Outside_Ordinary_Hours_Boundary.

  // Clauses 22.1(a), 22.1(b), 25.1
  Do not classify roster-cycle boundary hours as overtime unless a cohort-specific
  overtime trigger below also applies.

  // Clauses 22.1(c) and 25.1
  FOR each employee and calendar date:
      IF Shift_Type = "day shift":
          Daily_Ordinary_Hours_Limit = 8 hours
      ELSE IF Shift_Type = "night shift":
          Daily_Ordinary_Hours_Limit = 10 hours
      ELSE:
          flag missing shift type

      Mark hours after Daily_Ordinary_Hours_Limit as
      Outside_Ordinary_Hours_Boundary.

  Do not classify hours after the daily limit as overtime from this boundary alone.
  Apply the employee’s applicable cohort-specific overtime trigger.

  // Clauses 22.2(a) and 22.2(b)
  IF Shift_Worker_Status = "shift worker":
      Employee_Cohort includes Shift_Worker
  ELSE:
      Employee_Cohort includes Day_Worker

  // Clause 22.2(a)
  IF Employee_Cohort includes Day_Worker:
      Mark hours worked before 06:00, after 18:00, or on Saturday/Sunday as
      Outside_Day_Worker_Span.

  // Clauses 22.2(a), 22.2(b)
  Do not use the day-worker span as a standalone overtime trigger.
  For a shift worker, do not apply a separate shift-worker span because the source
  does not specify one.

  // Clauses 22.9, 22.9(a), 22.9(g)(i), 22.9(h)
  IF Employee Type - Full Time/PartTime/Casual = "full-time"
     AND Qualifying_Sleepover_Indicator = TRUE
     AND Sleepover_Start and Sleepover_End define an 8-to-10-hour overnight span
     AND Sleepover_Immediately_Before_or_After_Shift_Indicator = TRUE
     AND Sleepover_Continuity_Permitted_Indicator = TRUE:

      Move all qualifying sleepover hour units from Unallocated_Hours
      to Overtime_Hours.

  // Clause 22.9(g)(ii)
  IF Permanent_Part_Time_Indicator = TRUE
     AND Qualifying_Sleepover_Indicator = TRUE:

      Include all qualifying sleepover hours in Daily_Worked_Hours.

      IF Full_Time_Daily_Hours_Comparator exists:
          Daily_Sleepover_Comparator = Full_Time_Daily_Hours_Comparator
      ELSE:
          Daily_Sleepover_Comparator = 11 hours

      IF Daily_Worked_Hours > Daily_Sleepover_Comparator:
          Identify the portion of the relevant day's worked hours
          exceeding Daily_Sleepover_Comparator.

          Move only those identified hour units still in Unallocated_Hours
          to Overtime_Hours.

  // Clause 22.9(g)(ii)
  IF Permanent_Part_Time_Indicator = TRUE
     AND Qualifying_Sleepover_Indicator = TRUE:

      Include all qualifying sleepover hours in Weekly_Worked_Hours
      and Fortnightly_Worked_Hours.

      IF Weekly_Worked_Hours > 38 hours:
          Identify hours exceeding 38 hours in the relevant week.
          Move only those hour units still in Unallocated_Hours
          to Overtime_Hours.

      IF Fortnightly_Worked_Hours > 76 hours:
          Identify hours exceeding 76 hours in the relevant fortnight.
          Move only those hour units still in Unallocated_Hours
          to Overtime_Hours.

  // Clauses 22.9(g)(iii) and 22.9(k)
  IF Employee Type - Full Time/PartTime/Casual = "casual"
     AND Qualifying_Sleepover_Indicator = TRUE
     AND Full_Time_or_Permanent_Part_Time_Unavailable_Indicator = TRUE
     AND Casual_Exclusively_or_Almost_Exclusively_Sleepovers_Indicator = FALSE:

      Include all qualifying sleepover hours in Weekly_Worked_Hours
      and Fortnightly_Worked_Hours.

      IF Weekly_Worked_Hours > 38 hours:
          Identify hours exceeding 38 hours in the relevant week.
          Move only those hour units still in Unallocated_Hours
          to Overtime_Hours.

      IF Fortnightly_Worked_Hours > 76 hours:
          Identify hours exceeding 76 hours in the relevant fortnight.
          Move only those hour units still in Unallocated_Hours
          to Overtime_Hours.

  IF Employee Type - Full Time/PartTime/Casual = "casual"
     AND Qualifying_Sleepover_Indicator = TRUE
     AND (
         Full_Time_or_Permanent_Part_Time_Unavailable_Indicator = FALSE
         OR Casual_Exclusively_or_Almost_Exclusively_Sleepovers_Indicator = TRUE
     ):
      flag sleepover as not permitted under the reviewed rule

  // Clauses 22.8(a), 22.8(b), and 22.8(f)
  IF Employee Type - Full Time/PartTime/Casual is "casual"
     OR Employee Type - Full Time/PartTime/Casual is "part-time":

      IF Broken_Shift_Agreement_Indicator = TRUE
         AND Non_Meal_Break_Hours <= 4 hours
         AND Broken_Shift_Portion_Minimum_Engagement_Compliant_Indicator = TRUE
         AND Broken_Shift_Span_Hours <= 12 hours:

          record broken shift as valid

      ELSE:
          flag broken shift as not compliant with the reviewed conditions

  // Clause 22.8(d)
  IF Broken_Shift_Span_Hours > 12 hours:
      mark hours beyond the 12-hour broken-shift span as
      Outside_Ordinary_Hours_Boundary

      // Clause 22.8(d) is not a standalone overtime-hours trigger.
      Do not move these hours to Overtime_Hours unless the employee's
      applicable overtime trigger below is also satisfied.

  // Clause 25.1(a)(i)
  IF Employee Type - Full Time/PartTime/Casual = "full-time":

      FOR each calendar date:
          Identify authorised worked hour units performed in addition to
          the employee's rostered ordinary hours for that date.

          IF Authorised_Work_Indicator = TRUE:
              Move only those identified hour units still in Unallocated_Hours
              to Overtime_Hours.

  // Clause 25.1(b)(i)
  IF Employee Type - Full Time/PartTime/Casual = "part-time":

      IF Weekly_Worked_Hours > 38 hours:
          Identify hours exceeding 38 hours in the relevant week.
          Move only those hour units still in Unallocated_Hours
          to Overtime_Hours.

      IF Fortnightly_Worked_Hours > 76 hours:
          Identify hours exceeding 76 hours in the relevant fortnight.
          Move only those hour units still in Unallocated_Hours
          to Overtime_Hours.

  // Clause 25.1(b)(ii)
  IF Employee Type - Full Time/PartTime/Casual = "part-time":

      FOR each calendar date:
          IF Daily_Worked_Hours > 10 hours:
              Identify hours exceeding 10 hours on that date.
              Move only those hour units still in Unallocated_Hours
              to Overtime_Hours.

  // Clauses 10.3(b), 10.3(c), and 25.1(b)(iii)
  IF Employee Type - Full Time/PartTime/Casual = "part-time":

      FOR each calendar date:
          Calculate hours worked above Agreed_Part_Time_Rostered_Hours.

          IF hours worked exceed agreed rostered hours
             AND Documented_Written_Part_Time_Variation_Indicator = FALSE:

              Move only the excess hour units still in Unallocated_Hours
              to Overtime_Hours.

          IF Documented_Written_Part_Time_Variation_Indicator = TRUE:
              do not create overtime under this agreed-rostered-hours rule
              for the varied hours.

  // Clauses 10.3(b), 10.3(c), and 25.1(b)(iii)
  A roster or agreement change without documented written variation does not
  satisfy the exception.

  // Clauses 10.4(a), 10.4(c), and 25.1(c)(i)
  IF Employee Type - Full Time/PartTime/Casual = "casual":

      IF Weekly_Worked_Hours > 38 hours:
          Identify hours exceeding 38 hours in the relevant week.
          Move only those hour units still in Unallocated_Hours
          to Overtime_Hours.

      IF Fortnightly_Worked_Hours > 76 hours:
          Identify hours exceeding 76 hours in the relevant fortnight.
          Move only those hour units still in Unallocated_Hours
          to Overtime_Hours.

  // Clause 25.1(c)(ii)
  IF Employee Type - Full Time/PartTime/Casual = "casual":

      FOR each calendar date:
          IF Daily_Worked_Hours > 10 hours:
              Identify hours exceeding 10 hours on that date.
              Move only those hour units still in Unallocated_Hours
              to Overtime_Hours.

  // Applies after all overtime triggers
  Ordinary_Hours = Unallocated_Hours
  Unallocated_Hours = empty

  ASSERT every worked hour is in exactly one of:
      Overtime_Hours
      Ordinary_Hours

  ASSERT no hour unit appears more than once in Overtime_Hours
  ASSERT Unallocated_Hours is empty

Conditions not considered by the pseudocode

Implementation notes