Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments |
|---|---|---|---|---|---|---|---|---|
| id | VARCHAR | 36 | null |
|
|
|||
| encounter_id | VARCHAR | 36 | null |
|
|
|||
| sp_maladaptive_behavior_id | VARCHAR | 36 | null |
|
|
|||
| behavior_name_snapshot | VARCHAR | 255 | √ | null |
|
|
Snapshot of service_plan_maladaptive_behaviors.name as it read when this episode was recorded (issue #197). Signed notes render from this, not the live item. |
|
| behavior_definition_snapshot | TEXT | 65535 | √ | null |
|
|
Snapshot of the item topography (its operational definition) at record time (issue #197). |
|
| behavior_barrier_snapshot | TEXT | 65535 | √ | null |
|
|
Snapshot of the item barrier at record time (issue #197). |
|
| intensity_key_id | VARCHAR | 36 | √ | null |
|
|
||
| occurred_at | DATETIME | 19 | null |
|
|
|||
| episode_start_time | TIME | 8 | √ | null |
|
|
||
| episode_end_time | TIME | 8 | √ | null |
|
|
||
| duration_seconds | INT | 10 | √ | null |
|
|
||
| count | INT | 10 | 1 |
|
|
|||
| antecedent_notes | TEXT | 65535 | √ | null |
|
|
||
| consequence_notes | TEXT | 65535 | √ | null |
|
|
||
| notes | TEXT | 65535 | √ | null |
|
|
||
| safety_protocol_triggered | BIT | 1 | 0 |
|
|
|||
| safety_protocol_details | TEXT | 65535 | √ | null |
|
|
||
| resulted_in_injury | BIT | 1 | 0 |
|
|
|||
| injury_description | TEXT | 65535 | √ | null |
|
|
||
| antecedent_id | VARCHAR | 36 | √ | null |
|
|
||
| intervention_id | VARCHAR | 36 | √ | null |
|
|
||
| was_resolved | BIT | 1 | 1 |
|
|
|||
| recorded_by | VARCHAR | 36 | √ | null |
|
|
||
| created_at | DATETIME | 19 | CURRENT_TIMESTAMP |
|
|
|||
| updated_at | DATETIME | 19 | CURRENT_TIMESTAMP |
|
|
|||
| created_by | VARCHAR | 36 | √ | null |
|
|
||
| updated_by | VARCHAR | 36 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| idx_behavior_episodes_behavior | Performance | Asc | sp_maladaptive_behavior_id |
| idx_behavior_episodes_enc_behavior | Performance | Asc/Asc | encounter_id + sp_maladaptive_behavior_id |
| idx_behavior_episodes_encounter | Performance | Asc | encounter_id |
| idx_behavior_episodes_injury | Performance | Asc | resulted_in_injury |
| idx_behavior_episodes_intensity | Performance | Asc | intensity_key_id |
| idx_behavior_episodes_occurred | Performance | Asc | occurred_at |
| idx_behavior_episodes_safety | Performance | Asc | safety_protocol_triggered |