Skip to content

Person Escort Record Events

George Schena edited this page Apr 26, 2022 · 18 revisions

Person Escort Record Events

This page documents Person Escort Record Events that can happen in the Book a secure move API.

PerConcealed

Description

Records a change to the PER related to concealed items on the person after the move has started.

Attributes

  • location - Location the property change occurred
  • supplier_personnel_number - Indicates the supplier personnel around during the concealed items change
  • police_personnel_number - Indicates the police personnel around during the concealed items change
  • vehicle_reg - The vehicle registration if the concealed items change happened in a vehicle

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "2f2010d1-02ce-4a13-be24-4582c8994379",
        "vehicle_reg": "VIO-9070"
      },
      "event_type": "PerConcealed"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "6deba85f-76be-471c-9ef1-3f55182dc899"
        }
      },
      "location": {
        "data": {
          "id": "13611e59-ac85-45cc-a479-25876b0f5568",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence
  • supplier_personnel_number - presence (unless police_personnel_number is set)
  • police_personnel_number - presence (unless supplier_personnel_number is set)
  • vehicle_reg - optional (provide if administered in vehicle)

Triggers

None

PerConfirmation (soon to be deprecated)

Description

When a PER is confirmed, the following event is automatically triggered, and will hold the time the PER was confirmed as well as who confirmed it.

Attributes

confirmed_at - Indicates the timestamp a PER was confirmed

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Automatically generated event",
      "details": {
        "confirmed_at": "2020-12-03T10:51:41+00:00"
      },
      "event_type": "PerConfirmation"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "53f7e9a3-0d3a-4667-b6d5-793a4d53d673"
        }
      }
    }
  }
}

Validations

  • confirmed_at - presence

Triggers

None

PerCourtAllDocumentationProvidedToSupplier

Description

Court order/ warrant/ Placement Confirmation Form (For young people) made available to the supplier personnel. Where unavailable CDI to fall back on the latest time the person was returned to the court custody are from the court dock.

Attributes

subtype - Indicates the type of documentation that was handed over court_location - The location where the handover occurred

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "subtype": "warrant"
      },
      "event_type": "PerCourtAllDocumentationProvidedToSupplier"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "53f7e9a3-0d3a-4667-b6d5-793a4d53d673"
        }
      },
      "court_location": {
        "data": {
          "id": "e3da777d-0daa-4bbf-a010-3ed6dbc69aa9",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • subtype - presence, one of extradition_order, warrant or placement_confirmation
  • court_location - presence

Triggers

None

PerCourtExcessiveDelayNotDueToSupplier

Description

Excessive delay caused by party other than Supplier. Can have one of two subtypes which indicate the of the delay.

Use occurred_at to indicate when the delay started and ended_at to indicated when the delay finished.

Attributes

subtype - Indication of activity that was delayed vehicle_reg - Registration of the vehicle that was delayed ended_at - Date time when the delay finished location - The location indicating where the delay occurred

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03 10:51:40 +0000",
      "recorded_at": "2020-12-03 10:51:40 +0000",
      "notes": "Additional information about this event",
      "details": {
        "subtype": "making_prisoner_available_for_loading",
        "vehicle_reg": "YPX-8952",
        "ended_at": "2020-12-03T10:51:40+00:00"
      },
      "event_type": "PerCourtExcessiveDelayNotDueToSupplier"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "61db4479-eb38-4793-9c30-eafa9560dbcc"
        }
      },
      "location": {
        "data": {
          "id": "eb9297f1-ca85-4f83-8ffd-aba533bfe38f",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • subtype - presence, one of making_prisoner_available_for_loading or access_to_or_from_location_when_collecting_dropping_off_prisoner
  • vehicle_reg - presence
  • ended_at - presence, iso8601 date time
  • location - presence

Triggers

None

PerCourtCellShareRiskAssessment

Description

Indicates when a cell risk assessment was done for a person at court.

Attributes

location - The location of the court

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03 10:51:40 +0000",
      "recorded_at": "2020-12-03 10:51:40 +0000",
      "notes": "Additional information about this event",
      "details": {
      },
      "event_type": "PerCourtCellShareRiskAssessment"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "c821a731-854f-42c3-9854-18ba4bcf6e6a"
        }
      },
      "location": {
        "data": {
          "id": "41ad59c5-6bbe-417d-af6d-f38bb9213c7c",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence

Triggers

PerCourtAssignCellInCustody

Description

Time placed in court custody cell.

Attributes

court_cell_number - The unique cell number that indicates where the person is being assigned location - The location of the court

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03 10:51:40 +0000",
      "recorded_at": "2020-12-03 10:51:40 +0000",
      "notes": "Additional information about this event",
      "details": {
        "court_cell_number": "7b"
      },
      "event_type": "PerCourtAssignCellInCustody"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "2ebe3e7c-1d34-43f1-b476-5a2c692a7d57"
        }
      },
      "location": {
        "data": {
          "id": "707b73f1-db5f-4c02-a0db-ad1664183b64",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • court_cell_number - presence
  • location - presence

Triggers

None

PerCourtReadyInCustody

Description

Person ready and available within court custody area.

Attributes

  • location - The location of the court

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03 10:51:40 +0000",
      "recorded_at": "2020-12-03 10:51:40 +0000",
      "notes": "Additional information about this event",
      "details": {
      },
      "event_type": "PerCourtReadyInCustody"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "b3247bbd-cb48-4a1b-8f52-7104923bba44"
        }
      },
      "location": {
        "data": {
          "id": "b6468f00-3449-4da7-897a-86ec5563bd58",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence

Triggers

PerCourtTakeFromCustodyToDock

Description

Person taken from court custody to court dock

Attributes

  • location - The location of the court

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
      },
      "event_type": "PerCourtTakeFromCustodyToDock"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "e590f9ae-ad36-4204-aaff-45f572795084"
        }
      },
      "location": {
        "data": {
          "id": "3b52b124-f75c-41f0-aa54-9ae7a4de7e31",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence

Triggers

None

PerCourtTakeToSeeVisitors

Description

Supplier court custody staff escort person to visitor area.

Attributes

  • location - The location of the court

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
      },
      "event_type": "PerCourtTakeToSeeVisitors"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "da43f5cd-86ae-4d71-ac78-ebec4923fbe1"
        }
      },
      "location": {
        "data": {
          "id": "a0b8622f-2595-4f34-b8a9-572806fa7517",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence

Triggers

None

PerCourtReturnToCustodyAreaFromVisitorArea

Description

Supplier court custody staff escort person from visitor area back to custody area.

Attributes

  • court_cell_number - The unique cell number that indicates where the person is being returned too
  • location - The location

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "85c76c45-661d-434e-882b-39c855d65392",
        "court_cell_number": "7b"
      },
      "event_type": "PerCourtReturnToCustodyAreaFromVisitorArea"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "727ca45c-7f9d-46c1-918e-fd4d89a5da01"
        }
      },
      "location": {
        "data": {
          "id": "fb4009bc-756a-4fec-a657-271a85de0bb9",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence

Triggers

None

PerCourtTask

Description

Supplier to record any other reportable events that may occur at Court that may be relevant to authority.

Attributes

  • supplier_personnel_number - the unique identifier of the personnel that completed the court task
  • location - the location of the court

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "0a1c678f-6c0f-4806-8cfe-919ea60dd261"
      },
      "event_type": "PerCourtTask"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "8a5b9c10-da35-4d1f-b2ec-e8b071ba4db4"
        }
      },
      "location": {
        "data": {
          "id": "3e735102-0d9d-45bb-80e4-cf2b8fa89a33",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • supplier_personnel_number - presence
  • location - presence

Triggers

None

PerEscape

Description

Records a change to the PER related to an escape risk after the move has started.

Attributes

  • location - Location the property change occurred
  • supplier_personnel_number - Indicates the supplier personnel around during the escape risk change
  • police_personnel_number - Indicates the police personnel around during the escape risk change
  • vehicle_reg - The vehicle registration if the escape risk change happened in a vehicle

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "2f2010d1-02ce-4a13-be24-4582c8994379",
        "vehicle_reg": "VIO-9070"
      },
      "event_type": "PerEscape"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "6deba85f-76be-471c-9ef1-3f55182dc899"
        }
      },
      "location": {
        "data": {
          "id": "13611e59-ac85-45cc-a479-25876b0f5568",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence
  • supplier_personnel_number - presence (unless police_personnel_number is set)
  • police_personnel_number - presence (unless supplier_personnel_number is set)
  • vehicle_reg - optional (provide if administered in vehicle)

Triggers

None

PerCourtHearing

Description

Indicates that a court hearing took place.

Attributes

  • is_virtual - Is this a virtual court hearing?
  • is_trial - Is this a trial?
  • court_listing_at - When was the court listing at?
  • started_at - When did the court hearing start?
  • ended_at - When did the court hearing end?
  • agreed_at - Designated Ready and Available for Court Time (DRACT)
  • court_outcome - What was the outcome of the court hearing?
  • location - The location of the court hearing

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03 10:51:40 +0000",
      "recorded_at": "2020-12-03 10:51:40 +0000",
      "notes": "Additional information about this event",
      "details": {
        "is_virtual": true,
        "is_trial": true,
        "court_listing_at": "2020-12-03T10:51:40+00:00",
        "started_at": "2020-12-03T10:51:40+00:00",
        "ended_at": "2020-12-03T10:51:40+00:00",
        "agreed_at": "2020-12-03T10:51:40+00:00",
        "court_outcome": "Defendant acquitted"
      },
      "event_type": "PerCourtHearing"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "049074f3-e4ec-450a-bdfe-3896567706fa"
        }
      },
      "location": {
        "data": {
          "id": "ece2447d-95bb-4fef-8dea-73e8f9fe0ce7",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • is_virtual - present, one of true or false
  • is_trial - present, one of true or false
  • court_listing_at - presence, iso8601 datetime
  • started_at - presence, iso8601 datetime
  • ended_at - presence, iso8601 datetime
  • agreed_at - optional, iso8601 datetime
  • court_outcome - presence
  • location - presence, must exist in PECs database

Triggers

None

PerCourtPreReleaseChecksCompleted

Description

Pre-release checks

Attributes

  • supplier_personnel_number - the unique identifier of the personnel that completed the pre-release checks
  • location - the location the pre release check was completed

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "a22f43d7-6f8c-48ee-8c02-45dcfdf05afd"
      },
      "event_type": "PerCourtPreReleaseChecksCompleted"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "983ca584-d83b-42dd-a155-a2a20a3e3f25"
        }
      },
      "location": {
        "data": {
          "id": "d9f4d14d-649d-4e1e-9cca-80af2659037c",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • supplier_personnel_number - presence
  • location - presence

Triggers

None

PerCourtRelease

Description

Person left custody area after release

Attributes

  • supplier_personnel_number - the unique identifier of the personnel that performed release
  • location - the location the release happened

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "3f5d2cbb-d48b-4095-8f59-6bdca13fc593"
      },
      "event_type": "PerCourtRelease"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "97defe02-b812-408c-8b16-d8db5b17774a"
        }
      },
      "location": {
        "data": {
          "id": "2baa8a58-154a-4e54-9809-40ee238fde43",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • supplier_personnel_number - presence
  • location - presence

Triggers

None

PerCourtReleaseOnBail

Description

Person left custody area after release on bail

Attributes

  • supplier_personnel_number - the unique identifier of the personnel that performed the release
  • location - the location the release happened

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03 10:51:40 +0000",
      "recorded_at": "2020-12-03 10:51:40 +0000",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "b53f2e79-d811-48d6-bf9c-e6507be13c40"
      },
      "event_type": "PerCourtReleaseOnBail"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "15a3ac54-31cd-4bf1-8d78-cc427717d587"
        }
      },
      "location": {
        "data": {
          "id": "349bfb2e-811e-49c2-950a-e04caff0b8e6",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • supplier_personnel_number - presence
  • location - presence

Triggers

None

PerCourtReturnToCustodyAreaFromDock

Description

Person returned to court custody area from court dock

Attributes

  • court_cell_number - The unique cell number that indicates where the person is being returned too
  • location - The location of the court

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "court_cell_number": "7b"
      },
      "event_type": "PerCourtReturnToCustodyAreaFromDock"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "31e6bc56-e632-43f2-94ca-ade9620954f9"
        }
      },
      "location": {
        "data": {
          "id": "634584cd-7e80-4d26-be49-00b8e40fd851",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence

Triggers

PerHandover (soon to replace PerConfirmation)

Description

When a PER is handed over, the following event is automatically triggered, and will hold the time the PER was occurred as well as details of the officers dispatching and receiving the person involved.

Use the occurred_at common attribute to indicate the date and time when the handover occurred.

Note that this event replaces the previous PerConfirmation event.

Attributes

  • dispatching_officer - Name of the officer handing over the person
  • dispatching_officer_id - Identification number of the officer handing over the person
  • dispatching_officer_contact - Contact phone number of the officer handing over the person
  • receiving_officer - Name of the officer receiving the person
  • receiving_officer_id - Identification number of the officer receiving the person
  • receiving_officer_contact - Contact phone number of the officer receiving the person
  • receiving_officer_organisation - Organisation name of the receiving officer

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Automatically generated event",
      "details": {
        "dispatching_officer": "Mr. Officer",
        "dispatching_officer_id": "12345",
        "dispatching_officer_contact": "01 811 8055",
        "receiving_officer": "Mrs. Officer",
        "receiving_officer_id": "54321",
        "receiving_officer_contact": "",
        "receiving_officer_organisation": "Suppliers & Sons",
      },
      "event_type": "PerHandover"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "53f7e9a3-0d3a-4667-b6d5-793a4d53d673"
        }
      }
    }
  }
}

Validations

None

Triggers

None

PerMedicalAid

Description

Record of medical attention requested by a person including details on the time of request, the time of medical advice was first sought from a healthcare professional and time when treatment was provided.

Use the occurred_at common attribute to indicate the date and time when the treatment was requested.

Attributes

  • advised_at - Date and time the medical aid was advised
  • advised_by - Name of the healthcare professional that advised the medical aid be provided
  • treated_at - Date and time the medical aid was provided
  • treated_by - Name of who applied the provided medical aid
  • location - Location the treatment was provided
  • supplier_personnel_number - Indicates the supplier personnel around during medical aid
  • vehicle_reg - The vehicle registration if the medical treatment was supplied in a vehicle

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "advised_by": "Marc Lynch",
        "advised_at": "2020-12-03T10:51:41+00:00",
        "treated_by": "Lorelei Roberts LLD",
        "treated_at": "2020-12-03T10:51:41+00:00",
        "supplier_personnel_number": "2f2010d1-02ce-4a13-be24-4582c8994379",
        "vehicle_reg": "VIO-9070"
      },
      "event_type": "PerMedicalAid"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "6deba85f-76be-471c-9ef1-3f55182dc899"
        }
      },
      "location": {
        "data": {
          "id": "13611e59-ac85-45cc-a479-25876b0f5568",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • advised_at - presence, iso8601 datetime
  • advised_by - presence
  • treated_at - optional (provide if treated), iso8601 datetime
  • treated_by - optional (provide if treated)
  • location - presence
  • supplier_personnel_number - presence
  • vehicle_reg - optional (provide if administered in vehicle)

Triggers

None

PerMedicalDrugsAlcohol

Description

Record of drugs or alcohol related change to the PER while a move is being carried out.

Attributes

  • location - Location the treatment was provided
  • supplier_personnel_number - Indicates the supplier personnel around during medical event
  • police_personnel_number - Indicates the police personnel around during medical event
  • vehicle_reg - The vehicle registration if the medical treatment was supplied in a vehicle

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "2f2010d1-02ce-4a13-be24-4582c8994379",
        "vehicle_reg": "VIO-9070"
      },
      "event_type": "PerMedicalDrugsAlcohol"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "6deba85f-76be-471c-9ef1-3f55182dc899"
        }
      },
      "location": {
        "data": {
          "id": "13611e59-ac85-45cc-a479-25876b0f5568",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence
  • supplier_personnel_number - presence (unless police_personnel_number is set)
  • police_personnel_number - presence (unless supplier_personnel_number is set)
  • vehicle_reg - optional (provide if administered in vehicle)

Triggers

None

PerMedicalMedication

Description

Record of medication related change to the PER while a move is being carried out.

Attributes

  • location - Location the treatment was provided
  • supplier_personnel_number - Indicates the supplier personnel around during medical event
  • police_personnel_number - Indicates the police personnel around during medical event
  • vehicle_reg - The vehicle registration if the medical treatment was supplied in a vehicle

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "2f2010d1-02ce-4a13-be24-4582c8994379",
        "vehicle_reg": "VIO-9070"
      },
      "event_type": "PerMedicalMedication"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "6deba85f-76be-471c-9ef1-3f55182dc899"
        }
      },
      "location": {
        "data": {
          "id": "13611e59-ac85-45cc-a479-25876b0f5568",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence
  • supplier_personnel_number - presence (unless police_personnel_number is set)
  • police_personnel_number - presence (unless supplier_personnel_number is set)
  • vehicle_reg - optional (provide if administered in vehicle)

Triggers

None

PerMedicalMentalHealth

Description

Record of mental health related change to the PER while a move is being carried out.

Attributes

  • location - Location the treatment was provided
  • supplier_personnel_number - Indicates the supplier personnel around during medical event
  • police_personnel_number - Indicates the police personnel around during medical event
  • vehicle_reg - The vehicle registration if the medical treatment was supplied in a vehicle

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "2f2010d1-02ce-4a13-be24-4582c8994379",
        "vehicle_reg": "VIO-9070"
      },
      "event_type": "PerMentalHealth"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "6deba85f-76be-471c-9ef1-3f55182dc899"
        }
      },
      "location": {
        "data": {
          "id": "13611e59-ac85-45cc-a479-25876b0f5568",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence
  • supplier_personnel_number - presence (unless police_personnel_number is set)
  • police_personnel_number - presence (unless supplier_personnel_number is set)
  • vehicle_reg - optional (provide if administered in vehicle)

Triggers

None

PerPrisonerWelfare

Description

Record a welfare event for the current Person Escort Record.

Attributes

  • given_at - Date and time the welfare was given to the person
  • outcome - Whether the person accepted or refused the welfare offered
  • subtype - The type of welfare given (see validations for available types)
  • supplier_personnel_number - Indicates the supplier personnel around during the welfare event
  • vehicle_reg - The vehicle registration if the welfare was supplied in a vehicle
  • location - Location the welfare was provided

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "given_at": "2020-12-03T10:51:41+00:00",
        "outcome": "accepted",
        "subtype": "food",
        "supplier_personnel_number": "bf170d77-dd0d-49e7-bdcc-1582e35a8408",
        "vehicle_reg": "ZUW-6359"
      },
      "event_type": "PerPrisonerWelfare"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "db1ae132-4973-4400-a79d-059a8fdb95ce"
        }
      },
      "location": {
        "data": {
          "id": "505d4b1c-06b0-4bf9-84ae-58322de80854",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • given_at - presence, iso8601 datetime
  • outcome - presence, one of accepted, refused
  • subtype - presence, one of comfort_break, food, beverage, additional_clothing, relevant_information_given, miscellaneous_welfare
  • supplier_personnel_number - presence
  • vehicle_reg - optional (provide if given in vehicle)
  • location - presence

Triggers

None

PerPropertyChange

Description

Record of a property change that happens while the move is being carried out.

Attributes

  • location - Location the property change occurred
  • supplier_personnel_number - Indicates the supplier personnel around during the property change
  • police_personnel_number - Indicates the police personnel around during the property change
  • vehicle_reg - The vehicle registration if the property change happened in a vehicle

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "2f2010d1-02ce-4a13-be24-4582c8994379",
        "vehicle_reg": "VIO-9070"
      },
      "event_type": "PerPropertyChange"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "6deba85f-76be-471c-9ef1-3f55182dc899"
        }
      },
      "location": {
        "data": {
          "id": "13611e59-ac85-45cc-a479-25876b0f5568",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence
  • supplier_personnel_number - presence (unless police_personnel_number is set)
  • police_personnel_number - presence (unless supplier_personnel_number is set)
  • vehicle_reg - optional (provide if administered in vehicle)

Triggers

None

PerSelfHarm

Description

Records a change to the PER related to self harm risk after the move has started.

Attributes

  • location - Location the property change occurred
  • supplier_personnel_number - Indicates the supplier personnel around during the self harm risk change
  • police_personnel_number - Indicates the police personnel around during the self harm risk change
  • vehicle_reg - The vehicle registration if the self harm risk change happened in a vehicle

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "2f2010d1-02ce-4a13-be24-4582c8994379",
        "vehicle_reg": "VIO-9070"
      },
      "event_type": "PerSelfHarm"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "6deba85f-76be-471c-9ef1-3f55182dc899"
        }
      },
      "location": {
        "data": {
          "id": "13611e59-ac85-45cc-a479-25876b0f5568",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence
  • supplier_personnel_number - presence (unless police_personnel_number is set)
  • police_personnel_number - presence (unless supplier_personnel_number is set)
  • vehicle_reg - optional (provide if administered in vehicle)

Triggers

None

PerViolentDangerous

Description

Records a change to the PER related to violent or dangerous risk after the move has started.

Attributes

  • location - Location the property change occurred
  • supplier_personnel_number - Indicates the supplier personnel around during the violent or dangerous risk change
  • police_personnel_number - Indicates the police personnel around during the violent or dangerous risk change
  • vehicle_reg - The vehicle registration if the violent or dangerous risk change happened in a vehicle

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "2f2010d1-02ce-4a13-be24-4582c8994379",
        "vehicle_reg": "VIO-9070"
      },
      "event_type": "PerViolentDangerous"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "6deba85f-76be-471c-9ef1-3f55182dc899"
        }
      },
      "location": {
        "data": {
          "id": "13611e59-ac85-45cc-a479-25876b0f5568",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence
  • supplier_personnel_number - presence (unless police_personnel_number is set)
  • police_personnel_number - presence (unless supplier_personnel_number is set)
  • vehicle_reg - optional (provide if administered in vehicle)

Triggers

None

PerWeapons

Description

Records a change to the PER related to weapons risk after the move has started.

Attributes

  • location - Location the property change occurred
  • supplier_personnel_number - Indicates the supplier personnel around during the weapons risk change
  • police_personnel_number - Indicates the police personnel around during the weapons risk change
  • vehicle_reg - The vehicle registration if the weapons risk change happened in a vehicle

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
        "supplier_personnel_number": "2f2010d1-02ce-4a13-be24-4582c8994379",
        "vehicle_reg": "VIO-9070"
      },
      "event_type": "PerWeapons"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "6deba85f-76be-471c-9ef1-3f55182dc899"
        }
      },
      "location": {
        "data": {
          "id": "13611e59-ac85-45cc-a479-25876b0f5568",
          "type": "locations"
        }
      }
    }
  }
}

Validations

  • location - presence
  • supplier_personnel_number - presence (unless police_personnel_number is set)
  • police_personnel_number - presence (unless supplier_personnel_number is set)
  • vehicle_reg - optional (provide if administered in vehicle)

Triggers

None

PerGeneric

Description

Generic Event that happened during the move

Attributes

Common attributes, only

Request Example

POST /api/events

{
  "data": {
    "type": "events",
    "attributes": {
      "occurred_at": "2020-12-03T10:51:41+00:00",
      "recorded_at": "2020-12-03T10:51:41+00:00",
      "notes": "Additional information about this event",
      "details": {
      },
      "event_type": "PerGeneric"
    },
    "relationships": {
      "eventable": {
        "data": {
          "type": "person_escort_records",
          "id": "a5f103e5-37e4-437e-93ef-be409002a7a8"
        }
      }
    }
  }
}

Validations

Common event validations, only

Triggers

None

Clone this wiki locally