AccidentService

First available in SystemsLink: 2015.2

AccidentService provides methods for working with accident data, including creating accident objects, saving, and searching.

Endpoint address: [SystemsLinkRootUrl]/AccidentService.svc

Methods

Method Name Parameters C# return type Description

Name

Data type

NewItem

Accident

Return a new, empty accident object.

Get

assetTypeEnum

assetTypeEnum

List<Accident>

Retrieve a list of accident items by the assetId, which is based on the specified assetTypeEnum value.

assetId

string

Save

accident

Accident

Accident

Add to or update the accident table based on accidentId provided in the accident object.

Delete

accidentId

int

void

Delete a record from the accident table based on the accidentId.

Search

filter

FilterObjectOfAccident

PagedResultOfAccident

Retrieve accident data by filtering, sorting, and paging results.

Properties and column mapping

Columns in Database column Name are from the Accident database table.
Property Database column Comments

Name

C# data type

Name

Data type

AccidentId

int

acd_id

int

AccidentType1

string

acd_accidenttype1

varchar(6)

AccidentType2

string

acd_accidenttype2

varchar(6)

AccidentType3

string

acd_accidenttype3

varchar(6)

AccidentType4

string

acd_accidenttype4

varchar(6)

AccidentType5

string

acd_accidenttype5

varchar(6)

AccidentType6

string

acd_accidenttype6

varchar(6)

AccidentType7

string

acd_accidenttype7

varchar(6)

AlcoholTestDate

DateTime?

acd_alcoholtestdate

datetime

AlcoholTestPerformed

bool?

acd_alcoholtestdone

When C# data type is bool or bool?, and database data type is char, the database data type should be char(1)

AlcoholTestResult

bool?

acd_alcoholtestresult

char(1)

AssetId

string

Relates to an asset field in the Accident table based on the AssetType specified. See assetTypeEnum for more information.

AssetType

assetTypeEnum

See assetTypeEnum members.

Carrier

string

acd_carrier

varchar(8)

Comment

string

acd_comment

varchar(255)

Description

string

acd_description

text(16)

Driver1

string

acd_driver1

varchar(8)

Driver2

string

acd_driver2

varchar(8)

DriverAtWheel

int?

acd_driveratwheel

tinyint

DrugTestDate

DateTime?

acd_drugtestdate

datetime

DrugTestPerformed

bool?

acd_drugtestdone

char(1)

DrugTestResult

bool?

acd_drugtestresult

char(1)

EstimateSpeed

short?

acd_estspeed

smallint

EventDate

DateTime?

acd_date1

datetime

EventLocation

AdHocAddress

If the srp_id from the Accident table matches the srp_id from the SafetyReport table, EventLocation will be mapped to SafetyReport table fields. See AdHocAddress properties for EventLocation. See Safety Service documentation for more information.

FatalityCount

int?

acd_nbroffatalities

tinyint

Hazardous

int?

acd_hazmat

tinyint

HoursToAlcoholTest

int?

acd_hourstoalcoholtest

tinyint

HoursToDrugTest

int?

acd_hourstodrugtest

tinyint

Illumination

string

acd_illumination

varchar(6)

InjuryCount

int?

acd_nbrofinjuries

tinyint

InsuranceReportDate

DateTime?

acd_insreportdate

datetime

IsCorrectiveActionRequired

bool?

acd_correctiveactionreq

char(1)

IsDOTRecordable

bool?

acd_dotrecordable

char(1)

IsReportedToInsurance

bool?

acd_reportedtoinsuranceco

char(1)

LawEnforcementDepartmentLocation

AdHocAddress

See AdHocAddress properties for LawEnforcementDepartmentLocation.

LawEnfourcementDepartmentName

string

acd_lawenfdeptname

varchar(50)

OfficerBadgeNumber

string

acd_lawenfofficerbadge

varchar(20)

OfficerName

string

acd_lawenfofficer

varchar(50)

Points

int?

acd_points

tinyint

PoliceReportNumber

string

acd_policereportnumber

varchar(30)

Preventable

string

acd_accdntpreventability

varchar(6)

RoadCondition

string

acd_roadsituation

varchar(6)

RoadSurface

string

acd_roadsurface

varchar(6)

RoadType

string

acd_roadtype

varchar(6)

TicketDescription

string

acd_ticketdesc

varchar(50)

TicketIssued

bool?

acd_ticketissued

char(1)

TicketIssuedTo

string

acd_ticketissuedto

char(1)

TowLocation

AdHocAddress

See AdHocAddress properties for TowLocation.

Tractor

string

acd_tractor

varchar(8)

TractorDamage

string

acd_trcdamage

varchar(255)

TrafficViolation

string

acd_trafficviolation

varchar(6)

Trailer1

string

acd_trailer1

varchar(13)

Trailer1Damage

string

acd_trl1damage

varchar(255)

Trailer2

string

acd_trailer2

varchar(13)

Trailer2Damage

string

acd_trl2damage

varchar(255)

VehicleTowed

bool?

acd_vehicletowed

char(1)

WeatherType

string

acd_weathertype

varchar(6)

TowLocation: AdHocAddress properties and column mapping

Columns in Database column Name are from the Accident database table.
Property Database column Comments

Name

C# data type

Name

Data type

Name

string

acd_towdestination

varchar(100)

Address1

string

acd_towdestaddress

varchar(100)

Address2

string

acd_towdeststate

varchar(6)

CityId

int?

Not mapped to database for TowLocation.

ZipCode

string

acd_towdestzip

varchar(10)

LawEnforcementDepartmentLocation: AdHocAddress properties and column mapping

Columns in Database column Name are from the Accident database table.
Property Database column Comments

Name

C# data type

Name

Data type

Name

string

acd_lawenfdeptname

varchar(50)

Address1

string

acd_lawenfdeptaddress

varchar(50)

Address2

string

acd_lawenfdeptstate

varchar(6)

CityId

int?

Not mapped to database for LawEnforcementDepartmentLocation.

ZipCode

string

acd_lawenfdeptzip

varchar(10)

EventLocation: AdHocAddress properties and column mapping

Columns in Database column Name are from the SafetyReport database table. See SafetyService Documentation for more information.
Property Database column Comments

Name

C# data type

Name

Data type

Name

string

srp_eventloc

varchar(100)

Address1

string

srp_eventaddress1

varchar(100)

Address2

string

srp_eventaddress2

varchar(100)

CityId

int?

srp_eventcity

int

ZipCode

string

srp_eventzip

varchar(10)

Accident AssetTypeEnum

Enum members indicate the asset type to search by in the Accident table.
Members Comments

Driver

Indicates the the asset is a Driver and searches by the acd_driver1and the acd_driver2 fields.

Tractor

Indicates the the asset is a Tractor and searches by the acd_tractor field.

Trailer

Indicates the the asset is a Trailer and searches by the acd_trailer1 and acd_trailer2 fields.

Carrier

Indicates the the asset is a Carrier and searches by the acd_carrier field.