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:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Occupant name (defaults to "Occupant {index}") |
age | int32 | Yes | Age in years (1-120) |
gender | enum | Yes | MALE, FEMALE, or OTHER |
height | int32 | No | Height in centimeters (120-250 cm) |
weight | int32 | No | Weight in kilograms (30-300 kg) |
position | enum | Yes | Seating position (see below) |
allegedInjuries | InjuryType[] | Yes | At least 1 injury type required |
injurySeverity | enum | No | Overall severity (MINOR to CRITICAL) |
preExistingConditions | string | No | Pre-existing medical conditions |
seatbeltWorn | boolean | No | Seatbelt usage (default: true) |
Occupant Position Values
DRIVER- Driver seatFRONT_PASSENGER- Front passenger seatREAR_LEFT- Rear left seatREAR_CENTER- Rear center seatREAR_RIGHT- Rear right seat
Injury Type Values
The service provides specialized analysis for 9 injury categories:
| Injury Type | Description | Analysis Includes |
|---|---|---|
HEAD_BRAIN | Head or brain injury | Traumatic brain injury risk, concussion assessment, head acceleration analysis |
CERVICAL_SPINE | Cervical spine (neck) injury | Neck injury biomechanics, whiplash assessment, cervical force analysis |
THORACIC_SPINE | Thoracic spine (upper back) injury | Upper back injury analysis, rib fracture risk, thoracic loading |
LUMBAR_SPINE | Lumbar spine (lower back) injury | Lower back injury assessment, disc herniation risk, lumbar force calculations |
SHOULDER | Shoulder injury | Rotator cuff injury risk, shoulder dislocation forces, joint loading |
HIP | Hip injury | Hip fracture risk, joint force analysis, acetabular loading |
KNEE | Knee injury | Ligament injury risk (ACL/MCL/PCL), tibial loading, joint forces |
FOOT_ANKLE | Foot or ankle injury | Ankle fracture risk, foot injury biomechanics, lower extremity forces |
PREGNANCY_COMPLICATIONS | Pregnancy-related complications | Fetal injury risk, placental abruption assessment, pregnancy-specific biomechanics |
Injury Severity Values
MINOR- Minor injuriesMODERATE- Moderate injuriesSERIOUS- Serious injuriesSEVERE- Severe injuriesCRITICAL- Critical injuries
CrashParameters Structure (Optional)
Crash parameters can be provided manually or auto-populated from a accident reconstruction report:
| Field | Type | Required | Description |
|---|---|---|---|
deltaVMph | string | No | Change in velocity in MPH |
pdofDegrees | string | No | Principal Direction of Force (0-360°) |
impactType | string | No | Impact type ("frontal", "rear", "side") |
collisionType | string | No | Collision description |
airbagDeployed | boolean | No | Airbag deployment status |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
caseId | string | Yes | Case ID to associate reports with |
occupants | OccupantData[] | Yes | Occupant data (1-10 occupants) |
crashParameters | CrashParameters | No | Crash data (manual) |
crashAnalysisReportId | string | No | Auto-populate from accident reconstruction |
Response
Returns:
reportIds: Array of report IDs (one per occupant)
Examples
Single Occupant with Manual Crash Data
- Go
- TypeScript
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)
import { setApiKey, createBiomechanicsReport, OccupantGender, OccupantPosition, InjuryType, InjurySeverity } from "@silentwitness/typescript-sdk";
setApiKey("sk_test_...");
// Single occupant with cervical spine and shoulder injuries
const response = await createBiomechanicsReport({
caseId: "case_xyz789",
occupants: [{
name: "John Doe",
age: 45,
gender: OccupantGender.MALE,
height: 178,
weight: 82,
position: OccupantPosition.DRIVER,
allegedInjuries: [
InjuryType.CERVICAL_SPINE,
InjuryType.SHOULDER
],
injurySeverity: InjurySeverity.MODERATE,
preExistingConditions: "None reported",
seatbeltWorn: true
}],
crashParameters: {
deltaVMph: "15",
pdofDegrees: "180",
impactType: "rear",
collisionType: "rear-end collision",
airbagDeployed: false
}
});
console.log(`Report IDs: ${response.reportIds}`);
Multiple Occupants with Auto-Populated Crash Data
- Go
- TypeScript
// 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])
// Auto-populate crash data from existing accident reconstruction
const response = await createBiomechanicsReport({
caseId: "case_xyz789",
// Reference existing accident reconstruction report
crashAnalysisReportId: "crash_abc123",
// Analyze both driver and passenger
occupants: [
{
name: "Driver",
age: 45,
gender: OccupantGender.MALE,
position: OccupantPosition.DRIVER,
allegedInjuries: [
InjuryType.CERVICAL_SPINE,
InjuryType.LUMBAR_SPINE
]
},
{
name: "Front Passenger",
age: 38,
gender: OccupantGender.FEMALE,
position: OccupantPosition.FRONT_PASSENGER,
allegedInjuries: [
InjuryType.SHOULDER,
InjuryType.KNEE
]
}
]
});
// Returns 2 report IDs (one per occupant)
console.log(`Driver Report: ${response.reportIds[0]}`);
console.log(`Passenger Report: ${response.reportIds[1]}`);
Pregnancy Complications Analysis
- TypeScript
// 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
caseIdmust be valid- At least 1 occupant required (maximum 10)
- Per occupant:
agerequired (1-120)genderrequired (cannot be UNSPECIFIED)positionrequired (cannot be UNSPECIFIED)allegedInjuriesmust have at least 1 injury type
Optional Field Ranges
height: 120-250 cmweight: 30-300 kg
Accident Reconstruction Reference
crashAnalysisReportIdmust belong to the same case- If provided, crash parameters are auto-populated (can be overridden)
Errors
| Code | Description |
|---|---|
INVALID_ARGUMENT | Invalid parameters, missing required fields, or out-of-range values |
NOT_FOUND | Case or accident reconstruction report not found |
PERMISSION_DENIED | Crash analysis report belongs to different case |
RESOURCE_EXHAUSTED | Rate limit exceeded or too many occupants |
UNAUTHENTICATED | Invalid or missing API key |
Next Steps
After creating reports, poll for completion:
- Get Result - Check status and download PDFs