Skip to main content

Create Report

Create biomechanics analysis reports for one or more occupants involved in a vehicle collision. Each occupant receives an individual analysis report.

OccupantData Structure

Each occupant requires the following information:

FieldTypeRequiredDescription
namestringNoOccupant name (defaults to "Occupant {index}")
ageint32YesAge in years (1-120)
genderenumYesMALE, FEMALE, or OTHER
heightint32NoHeight in centimeters (120-250 cm)
weightint32NoWeight in kilograms (30-300 kg)
positionenumYesSeating position (see below)
allegedInjuriesInjuryType[]YesAt least 1 injury type required
injurySeverityenumNoOverall severity (MINOR to CRITICAL)
preExistingConditionsstringNoPre-existing medical conditions
seatbeltWornbooleanNoSeatbelt usage (default: true)

Occupant Position Values

  • DRIVER - Driver seat
  • FRONT_PASSENGER - Front passenger seat
  • REAR_LEFT - Rear left seat
  • REAR_CENTER - Rear center seat
  • REAR_RIGHT - Rear right seat

Injury Type Values

The service provides specialized analysis for 9 injury categories:

Injury TypeDescriptionAnalysis Includes
HEAD_BRAINHead or brain injuryTraumatic brain injury risk, concussion assessment, head acceleration analysis
CERVICAL_SPINECervical spine (neck) injuryNeck injury biomechanics, whiplash assessment, cervical force analysis
THORACIC_SPINEThoracic spine (upper back) injuryUpper back injury analysis, rib fracture risk, thoracic loading
LUMBAR_SPINELumbar spine (lower back) injuryLower back injury assessment, disc herniation risk, lumbar force calculations
SHOULDERShoulder injuryRotator cuff injury risk, shoulder dislocation forces, joint loading
HIPHip injuryHip fracture risk, joint force analysis, acetabular loading
KNEEKnee injuryLigament injury risk (ACL/MCL/PCL), tibial loading, joint forces
FOOT_ANKLEFoot or ankle injuryAnkle fracture risk, foot injury biomechanics, lower extremity forces
PREGNANCY_COMPLICATIONSPregnancy-related complicationsFetal injury risk, placental abruption assessment, pregnancy-specific biomechanics

Injury Severity Values

  • MINOR - Minor injuries
  • MODERATE - Moderate injuries
  • SERIOUS - Serious injuries
  • SEVERE - Severe injuries
  • CRITICAL - Critical injuries

CrashParameters Structure (Optional)

Crash parameters can be provided manually or auto-populated from a accident reconstruction report:

FieldTypeRequiredDescription
deltaVMphstringNoChange in velocity in MPH
pdofDegreesstringNoPrincipal Direction of Force (0-360°)
impactTypestringNoImpact type ("frontal", "rear", "side")
collisionTypestringNoCollision description
airbagDeployedbooleanNoAirbag deployment status

Request Parameters

ParameterTypeRequiredDescription
caseIdstringYesCase ID to associate reports with
occupantsOccupantData[]YesOccupant data (1-10 occupants)
crashParametersCrashParametersNoCrash data (manual)
crashAnalysisReportIdstringNoAuto-populate from accident reconstruction

Response

Returns:

  • reportIds: Array of report IDs (one per occupant)

Examples

Single Occupant with Manual Crash Data

import "github.com/silentwitness/go-sdk"

silentwitness.Key = "sk_test_..."

// Single occupant with cervical spine and shoulder injuries
response, err := silentwitness.BiomechanicsAnalysis.Create(ctx, &silentwitness.CreateBiomechanicsReportRequest{
CaseId: "case_xyz789",

Occupants: []*silentwitness.OccupantData{
{
Name: silentwitness.String("John Doe"),
Age: silentwitness.Int32(45),
Gender: silentwitness.OccupantGender(silentwitness.OccupantGenderMale),
Height: silentwitness.Int32(178),
Weight: silentwitness.Int32(82),
Position: silentwitness.OccupantPosition(silentwitness.OccupantPositionDriver),
AllegedInjuries: []silentwitness.InjuryType{
silentwitness.InjuryTypeCervicalSpine,
silentwitness.InjuryTypeShoulder,
},
InjurySeverity: silentwitness.InjurySeverity(silentwitness.InjurySeverityModerate),
PreExistingConditions: silentwitness.String("None reported"),
SeatbeltWorn: silentwitness.Bool(true),
},
},

CrashParameters: &silentwitness.CrashParameters{
DeltaVMph: silentwitness.String("15"),
PdofDegrees: silentwitness.String("180"),
ImpactType: silentwitness.String("rear"),
CollisionType: silentwitness.String("rear-end collision"),
AirbagDeployed: silentwitness.Bool(false),
},
})
if err != nil {
log.Fatal(err)
}

fmt.Printf("Report IDs: %v\n", response.ReportIds)

Multiple Occupants with Auto-Populated Crash Data

// Auto-populate crash data from existing accident reconstruction
response, err := silentwitness.BiomechanicsAnalysis.Create(ctx, &silentwitness.CreateBiomechanicsReportRequest{
CaseId: "case_xyz789",

// Reference existing accident reconstruction report
CrashAnalysisReportId: silentwitness.String("crash_abc123"),

// Analyze both driver and passenger
Occupants: []*silentwitness.OccupantData{
{
Name: silentwitness.String("Driver"),
Age: silentwitness.Int32(45),
Gender: silentwitness.OccupantGender(silentwitness.OccupantGenderMale),
Position: silentwitness.OccupantPosition(silentwitness.OccupantPositionDriver),
AllegedInjuries: []silentwitness.InjuryType{
silentwitness.InjuryTypeCervicalSpine,
silentwitness.InjuryTypeLumbarSpine,
},
},
{
Name: silentwitness.String("Front Passenger"),
Age: silentwitness.Int32(38),
Gender: silentwitness.OccupantGender(silentwitness.OccupantGenderFemale),
Position: silentwitness.OccupantPosition(silentwitness.OccupantPositionFrontPassenger),
AllegedInjuries: []silentwitness.InjuryType{
silentwitness.InjuryTypeShoulder,
silentwitness.InjuryTypeKnee,
},
},
},
})

// Returns 2 report IDs (one per occupant)
fmt.Printf("Driver Report: %s\n", response.ReportIds[0])
fmt.Printf("Passenger Report: %s\n", response.ReportIds[1])

Pregnancy Complications Analysis

// Analyze pregnancy-related injuries
const response = await createBiomechanicsReport({
caseId: "case_xyz789",

occupants: [{
name: "Jane Smith",
age: 28,
gender: OccupantGender.FEMALE,
position: OccupantPosition.DRIVER,
allegedInjuries: [
InjuryType.PREGNANCY_COMPLICATIONS,
InjuryType.CERVICAL_SPINE
],
injurySeverity: InjurySeverity.SERIOUS,
seatbeltWorn: true
}],

crashParameters: {
deltaVMph: "20",
pdofDegrees: "0",
impactType: "frontal"
}
});

Validation Rules

Required Fields

  • caseId must be valid
  • At least 1 occupant required (maximum 10)
  • Per occupant:
    • age required (1-120)
    • gender required (cannot be UNSPECIFIED)
    • position required (cannot be UNSPECIFIED)
    • allegedInjuries must have at least 1 injury type

Optional Field Ranges

  • height: 120-250 cm
  • weight: 30-300 kg

Accident Reconstruction Reference

  • crashAnalysisReportId must belong to the same case
  • If provided, crash parameters are auto-populated (can be overridden)

Errors

CodeDescription
INVALID_ARGUMENTInvalid parameters, missing required fields, or out-of-range values
NOT_FOUNDCase or accident reconstruction report not found
PERMISSION_DENIEDCrash analysis report belongs to different case
RESOURCE_EXHAUSTEDRate limit exceeded or too many occupants
UNAUTHENTICATEDInvalid or missing API key

Next Steps

After creating reports, poll for completion: