- This subgroup opens when XREF is one of the following: 2, 3, 4, 5, 6, 7, 14, or 50
- Their are currently a max of 1 subgroups available.
Smart Logic Senerios
Level 2
False Log
- if XREF Code = 2
- If the Federal Code starts with "395.8E"
- Enable (Smart Logic Date)
- Enable (Evidence)
- Out of Service := Evidence
- If Smart Logic Date is not blank And Supplemental Description is not blank
- Supplemental Description :=
- "Driver False Log on " & Smart Logic Date& " - " & Federal Violation Description
- Disable (Out of Service)
Level 3
Log Not Current
- If XREF Code = "3"
- (Federal Code, starts with "395.8K2" Or "395.8F1"
- Count Federal Code starts with "395.8A" and if none
- Enable (Smart Logic Date)
- If Federal Code begins with "395.8K2"
- set Out of Service to Yes
- If XREF Code not equal "6" And Smart Logic Date is not equal to blank, today or yesterday E
- Enable Federal Description
- r@currenterrortext := "Failed to retain"
- r@lognotcurrenterror := True
- Disable (Out of Service)
- If Federal Code begins with "395.8F1"
- set Out of Service to No
- Smart Logic Date, is equal to today or yesterday
- Enable Federal Description
- r@currenterrortext := "Log not Current"
- r@lognotcurrenterror := True
- Disable (Out of Service)
- If r@lognotcurrenterror = True
- set Supplemental Description equal to r@currenterrortext & " on " & Smart Logic Date& " " & Federal Violation Description
- Else
- set Supplemental Description equal to Federal Violation Description
No Log
- If XREF Code = "3"
- if Federal Code begins with "395.8A"
- Enable (Smart Logic Date)
- count other violations with Federal Code beginning with "395.8"
- If Federal Code, begins with "395.3A3II" And the smart logic date is equual to this violation smart logic date
- set Supplemental Description equal to Federal Description
- Else
- set Out of Service equal to "Yes"
- set Supplemental Description := "Driver <NO LOG> on " & Smart Logic Date& " - " & Federal Violation Description
- Disable (Out of Service)
Level 4
10/11 and 14/15 hours
- If XREF Code = "4"
- r@Level4Description := True
- r@Prop := False
- r@Psgr := False
- Check to see if Vehicle Type is Passenger or Property
- PASSENGER
- If any vehicle Type is ("BU", "LM", "MC", "SB")
- r@Psgr := True
- PROPERTY
- If any vehicle Type is ("CL", "DC", "FT", "IC", "OT", "PT", "ST", "TR", "TT", "VN")
- r@Prop := True
- If r@Prop = True
- if Federal Code begins with "395.5A"
- ErrLog("You cannot cite this violation to a driver of a Property Carrying Vehicle.",
- r@Level4Description := False
- If r@Psgr = True
- if Federal Code begins with "395.3A"
- ErrLog("You cannot cite this violation to a driver of a Passenger Carrying Vehicle."
- r@Level4Description := False
- If r@Level4Description = True
- Enable (Smart Logic Date)
- If Smart Logic Date is blank
- Disable(Driver Violation Flag)
- ExitRule
- If (Smart Logic Date, is over 7 days prior than Date Inspection Started
- ErrLog("The selected Smart Logic Date must be the Date Inspection Started, or one of the previous 7 days."
- r@Level4Description := False
- If r@Prop = True Or r@Psgr = True Then
- Count all violations where
- Federal Code begins with 395.3A and the smart logic dates equal
- Set r@3953ACited to that number
- Federal Code begins with 395.5A and the smart logic dates equal
- Set r@3955ACited to that number
- If r@3953ACited > 2 Or r@3955ACited > 2
- r@Level4Description := False
- If r@Level4Description = True
- /Needed 2 levels of control to determine if description shows, prevents us from having to manage the description in 2 or 3 places
- r@ShowLevel4Description := False
- If Smart Logic Date is not blank and Smart Logic date equals Date Inspection Started
- Enable (Driver Violation)
- If Driver Violation is blank Then
- DisableWithClear (Out of Service)
- else if Driver Violation is not blank
- set Out of Service := Driver Violation
- Disable (Out of Service)
- r@ShowLevel4Description := True
- Else
- DisableWithClear (Driver Violation)
- Disable (Out of Service)
- set Out of Service := "N"
- r@ShowLevel4Description := True
Level 5
Alaska Only violations
- If XREF Code = "5"
- Enable (Smart Logic Date)
- If Federal Code begins with "395.1H1" Or "395.1H2"
- Enable (Smart Logic Date)
Alaska Only
- If XREF Code = "5"
- r@Level5Description := False
- r@InAlaska := False
- If time Zone equals "ALASKA" Then
- r@Level5Description := True
- r@InAlaska := True
- If r@InAlaska = False
- if (Smart Logic Date equals (Date Inspection Started,
- r@Level5Description := False
- Else
- r@Level5Description := True
- Count all violations for
- Federal Code begins with 395.1H1
- Set r@3951H1Count to that number
- Federal Code begins with 395.1H2
- Set r@3951H2Count to that number
- Federal Code begins with 395.3
- Set r@3953Count to that number
- Federal Code begins with 395.5
- Set r@3955Count to that number
- If Federal Code begins with "395.1H1" and r@3951H2Count > 0
- r@Level5Description := False
- If Federal Code begins with "395.1H2" and r@3951H1Count > 0
- r@Level5Description := False
- If r@3953Count > 0 Or r@3955Count > 0
- r@Level5Description := False
- If XREF Code = "5" And Federal Code is not equal to "395.1H2" or "395.1H1"
- r@Level5Description := True
- r@OtherLevel5 := True
- Is Driver Currently In Violation
- If r@Level5Description = True
- Enable (Driver Violation Flag)
- If Driver Violation Flag is not blank
- Out of Service := Driver Violation Flag
- Supplemental Description := "On " & Smart Logic Date& " " & Federal Violation Description
- Else
- Enable (Driver Violation Flag)
- else
- Supplemental Description := Federal Violation Description
Level 6
60/70 Hours
- if XREF Code = "6"
- Enable (Smart Logic Date)
EndIf - If XREF Code = "6"
- r@Level6Description := True
- r@MultiCode6 := 0
- Count all violations for
- Federal Code equal to current Federal Code
- Set r@MultiCode6 Count to that number
- Federal Code begins with 395.3B1
- Set r@3953b1 Count to that number
- Federal Code begins with 395.3B2
- Set r@3953b2 Count to that number
- Federal Code begins with 395.5B1
- Set r@3955b1 Count to that number
- Federal Code begins with 395.5B2
- Set r@3955b2 Count to that number
- Federal Code begins with 395.3
- Set r@3953 Count to that number
- Federal Code begins with 395.5
- Set r@3955 Count to that number
- Federal Code begins with 395.8A
- Set r@3958a Count to that number
- Federal Code begins with 395.8E
- Set r@3958e Count to that number
- Count to see if multiple violationXREFCode = 6
- If r@MultiCode6 > 1
- r@Level6Description := False
- Check to see if both 395.3B1 and 395.3B2 are cited
- If r@3953b1 > 0 And r@3953b2 > 0
- r@Level6Description := False
- Check to see if both 395.5B1 and 395.5B2 are cited
- If r@3955b1 > 0 And r@3955b2 > 0
- r@Level6Description := False
- Check to see if a 395.3% and a 395.5% are cited
- r@3953 > 0 And r@3955 > 0
- r@Level6Description := False
- Check to see if 395.8A is cited
- If r@3958a > 0
- r@Level6Description := False
- If Smart Logic Date prior to 7 days before Date Inspection Started
- r@Level6Description := False
- Is Driver Currently In Violation
- if r@Level6Description = True
- Date Inspection Started, is not equal to Smart Logic Date And Smart Logic Date is not blank
- Out of Service := "N"
- DisableWithClear (Driver Violation Flag)
- Disable (Out of Service)
- Else
- DisableWithClear (Out of Service)
- Enable (Driver Violation Flag)
- If Driver Violation Flag is not blank
- set Out of Service := Driver Violation Flag
All Other Hours of Service
- If XREF Code = "7"
Enable (Smart Logic Date)
All Other Hours of Service
- 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 ) ) = "395.8E" Then
r@Vio3958e := r@Vio3958e + 1
EndIf
Next
EndIf
If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 9 ) ) = "395.3A3II" Then
r@Vio3A3II := 0
r@Vio8A := 0
For r@VioCount = 1 to GroupCountAll ("Violation")
If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 9 ) ) = "395.3A3II" Then
r@Vio3A3II := r@Vio3A3II + 1
EndIf
If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 6 ) ) = "395.8A" And Smart Logic Date = [SmartLogic.smartlogicDateViolation(r@VioCount)] Then
r@Vio8A := r@Vio8A + 1
EndIf
Next
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 ) ) = "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
Supplemental Description := "On " & Smart Logic Date& " " & [Violation.violationFederalDescription(r@parentGroupInstance)]
EndIf
EndIf
//All Other smartlogicDriverViolationFlags
If XREF Code = "14" Then
r@Vio383Count := 0
For r@VioCount = 1 to GroupCountAll ("Violation")
If UCase (Left ([Violation.violationFederalCode(r@VioCount)], 8 ) ) = "383.23A2" Then
r@Vio383Count := r@Vio383Count + 1
EndIf
Next
Supplemental Description := Federal Violation Description
If r@Vio383Count <= 1 Then
Out of Service := "Y"
Disable (Out of Service)
Supplemental Description := "Driver Operating without " & "- " & Federal Violation Description
EndIf
EndIf
//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 )] = "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)]) = "395.8" Then
r@filter3958 := r@VioCount
ExitFor
EndIf
Next
EndIf
If [Violation.violationFederalCode(any )] = "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)]) = "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 := "Record of Duty Status, Form and Manner Violations on " & [SmartLogic.smartlogicDateViolation(r@OtherSmartLogicInstance)]& ":" & newline & [Violation.violationFederalCode(r@VioCount)]& "-" & [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
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.
Supplemental Violations
- Enabled by violations in federal Section
- 395.8
- 395.15I5
- list are populated ViolationID in V3ViolationMasterSafetyNet equals the above values
- This will adjust the Supplemental description field and narrative.
Supplemental Description
- Added to the Federal Description form the Other Occurrences fields.
- if not added by the other occurrences or Supplemental Violations it will be entered into the Narrative.
Add Comment