Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  •   If XREF Code = "7" Then
    •  r@Level7Description := True
    •  set Out of Service equal to "No"
    •  If Federal Code begins with"395.13D" or "395.15G"
      •  Disable (Out of Service)
      •  If Date Inspection Started is not equal to Smart Logic Date
        •  ErrLog("smartlogicDateViolation must be the Current Date.
          •  r@Level7Description := False
        •  Else
          •  If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 7 ) ) = "395.13D"
            •  Enable (Date OOS, Time OOS, OOS Satisfied Flag, Inspection Number)
      •   If OOS Satisfied Flag = "" Then
        •  r@Level7Description := False
          •  Do not set the description until both OOS fields are filled in
            •  If OOS Satisfied Flag <> "" Then
            •  If OOS Satisfied Flag = "Y" Then
            •  Out of Service := "N"
            •  Else
            •  Out of Service := "Y"
            •  Disable (Out of Service)
            •  r@Level7Description := True
    •  If Federal Code begins with"395.15B" Then
      r@Vio3958e := 0
      For r@VioCount = 1 to GroupCountAll ("Violation")
      If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 8 ) ) = "
      •  Count all violations where Federal Code starts with "395.8E"
      Then
      r@Vio3958e := r@Vio3958e + 1
      EndIf
      Next
      EndIf
      If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 9 ) ) =
        •  set r@Vio3958e to that number
    •  If Federal Code begins with "395.3A3II" Then
      r@Vio3A3II := 0
      r@Vio8A := 0
      For r@VioCount = 1 to GroupCountAll ("Violation")
      If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 9 ) ) = "
      •  Count all violations where Federal Code starts with "395.3A3II"
      Then
      r@Vio3A3II := r@Vio3A3II + 1
      EndIf
      If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 6 ) ) =
        •  set r@Vio3A3II to that number
      •  Count all violations where Federal Code starts with "395.8A"
      And Smart Logic Date = [SmartLogic.smartlogicDateViolation(r@VioCount)] Then
      r@Vio8A := r@Vio8A + 1
      EndIf
      Next
      • and Smart logic dates equal
        •  set r@Vio8A to that number
      •  If r@Vio3A3II > 1
      Then
        •  r@Level7Description := False

      EndIf
      •  If r@Vio3A3II >= 1 And r@Vio8A >= 1
      Then
        •  r@Level7Description := False

      EndIf
      EndIf
      If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 7 ) ) =
      •   If Federal Code begins with "395.15F"
      Then
      If [SmartLogic.smartlogicAOBRDFlag(r@VioCount)] = "" Then
      Enable ([SmartLogic.smartlogicAOBRDFlag(r@VioCount)])
      //[SmartLogic.smartlogicAOBRDFlag(r@VioCount).focus] := True
      EndIf
      If [SmartLogic.smartlogicAOBRDFlag(r@VioCount)] <> "Y" Then
      r@Level7Description := False
      EndIf
      EndIf
      If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 7 ) ) = "395.15G" Then
      r@Vio15G := 0
      For r@VioCount = 1 to GroupCountAll ("Violation")
      If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 7 ) ) = "395.15G" Then
      r@Vio15G := r@Vio15G + 1
      EndIf
      Next
      If r@Vio15G > 1 Then
      r@Level7Description := False
      EndIf
      EndIf
      If r@Level7Description = True Then
        •  If AOBRD Flag is blank
          •  Enable (AOBRD Flag)
          •  if AOBRD Flag not equal to "Yes"
            •  r@Level7Description := False
      •  If Federal Code begins with "395.15G"
        •  Count all violations where Federal Code starts with "395.15G"
          •  set r@Vio15G to that number
        •  If r@Vio15G > 1 Then
          •  r@Level7Description := False
      •  If r@Level7Description = True
        •  Supplemental Description := "On " & Smart Logic Date& " " &
      [Violation.violationFederalDescription(r@parentGroupInstance)]
      EndIf
      EndIf
      //All Other smartlogicDriverViolationFlags
        • Federal Description

Level 14

All Other Smart Logic Driver Violation Flags

  •   If XREF Code = "14" Then

    • r@Vio383Count := 0
      For r@VioCount = 1 to GroupCountAll ("Violation")
      If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 8 ) ) = "  Count all violations where Federal Code starts with "383.23A2" Then
      r@Vio383Count := r@Vio383Count + 1
      EndIf
      Next
      •  set r@Vio383Count to that number
    •   Supplemental Description := Federal Violation Description
    •   If r@Vio383Count <= 1 Then
      •  set Out of Service
      :=
      • equal to "
      Y
      • Yes"

      •  Disable (Out of Service)

      •  Supplemental Description := "Driver Operating without " & "- " & Federal Violation Description
      EndIf
      EndIf
      //

Level 50

Log Book Form and Manner Violations

  •   If XREF Code = "50" Then

    •   Out of Service := "N"
    •  r@Level50Description := False
    •   f@SmartLogic := ""
    •  r@violationdescriptiontext := ""
    •  r@addviotext := ""
    •  r@notestext := ""
    •  Enable (Smart Logic Date)
    •  If [Violation.violationFederalCode(any )] = any Federal Code equals "395.8" Then
      //
      •  Figure out which violations need filtered

      •  r@Level50Description := True

      For r@VioCount = 1 to GroupCountAll ("Violation")
      If UCase ([Violation.violationFederalCode(r@VioCount)]) = "
      •  scan all violations where Federal Code starts with "395.8"
      Then
      r@filter3958 := r@VioCount
      ExitFor
      EndIf
      Next
      EndIf
      If [Violation.violationFederalCode(any )] =
        •  set r@filter3958 that instance
    •  If Federal Code equals "395.15I5" Then
      //
      •  Figure out which violations need filtered

      •  r@Level50Description := True

      For r@VioCount = 1 to GroupCountAll ("Violation")
      If UCase ([Violation.violationFederalCode(r@VioCount)]) = "
      •  scan all violations where Federal Code starts with "395.15I5"
      Then
      r@filter39515 := r@VioCount
      ExitFor
      EndIf
      Next
      EndIf
      //Build notes
      For r@VioCount = 1 to GroupCountAll ("Violation")
      r@OtherSmartLogicInstance := GetSubGroupInstanceByParent ("Violation", r@VioCount, "SmartLogic", 1 )
      If (r@Viocount > r@filter3958 And r@filter3958 <> "" And r@filter3958 <> 0 ) Or (r@Viocount > r@filter39515 And r@filter39515 <> "" And r@filter39515 <> 0 ) Then
      If [Violation.violationFederalCode(r@VioCount)] <> "" Then
      If r@addviotxt = "" Then
      r@addviotxt := "Violation(s) of: " & [Violation.violationFederalCode(r@VioCount)]
      Else
      r@addviotxt := r@addviotxt & ", " & [Violation.violationFederalCode(r@VioCount)]
      EndIf
      If r@notestxt = "" Then
      r@notestxt :=
        •  set r@filter39515 that instance

Build notes

  •  scan all violations and concatenate
    •  Violation(s) of: " & Federal Code
    •  "Record of Duty Status, Form and Manner Violations on " & [SmartLogic.smartlogicDateViolation(r@OtherSmartLogicInstance)] Smart Logic Date & ":" & newline & [Violation.violationFederalCode(r@VioCount)] Federal Code & "-" & [SmartLogic.smartlogicItemRemark(r@OtherSmartLogicInstance)]& newline
      Else
      r@notestxt := r@notestxt & [Violation.violationFederalCode(r@VioCount)]& "-" & [SmartLogic.smartlogicItemRemark(r@OtherSmartLogicInstance)]& newline
      EndIf
      EndIf
      EndIf
      Next
      //Apply Notes
      If r@addviotxt <> "" Or r@notestxt <> "" Then
      //Place in tbd field
      [Description.descriptionNotes(0 )] := r@addviotxt & Newline & "***********************" & newline & r@notestxt
      EndIf
      EndIf
      If XREF Code = "" And [Violation.violationTraCSFederalKey(r@parentGroupInstance)] = "" Then
      DisableWithClear (Smart Logic Date, Evidence, Driver Violation Flag, Date OOS, Time OOS, [OOS Satisfied Flag, [Inspection Number, [SmartLogic.smartlogicAOBRDFlag(r@subgroupinstance)], Supplemental Description)
      Clear ([Violation.violationCitationFlag(r@parentGroupInstance)])
      EndIf
      EndIf
  •  
  •  
  •  
    • Supplemental Description & newline
  •  Apply Notes
    •  Narrative field

Other Occurrences and Supplementation Violations Fields

...

Other Occurrences

  •  Yes or No fields
  •  Enable for XRef codes of 4 or 6
  •  These are the last 7 calendar dates where the violation could have occurred based on the Federal Code violated. Check the dates not in compliance.
  •  The once one or more dates have been checked the Supplemental Description will enter the Dates in Violation along with the Federal codes description of the violation.

...