> ## Documentation Index
> Fetch the complete documentation index at: https://coloradobehavioralhealthadministration.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Date Sequencing

> Chronological ordering rules across the treatment episode lifecycle

CoBHRM enforces chronological ordering rules across the lifecycle of a client's treatment episode. Submitting records with dates out of sequence will produce validation errors.

## Client-Level Date Rules

| Rule | Constraint |
| - | - |
| DOB before record creation | Client must be born before the record is created |
| DOB within 120 years | Age at admission cannot exceed 120 years |

## Admission Timeline

The core admission timeline follows this required sequence:

```
FIRST_CONTACT_DATE  ≤  FIRST_APPOINTMENT_OFFERED_DATE  ≤  ADMISSION_DATE
```

| Rule | Constraint |
| - | - |
| `FIRST_CONTACT_DATE` \<= `ADMISSION_DATE` | First contact must be on or before admission |
| `FIRST_APPOINTMENT_OFFERED_DATE` \<= `ADMISSION_DATE` | First appointment offered must be on or before admission |
| `FIRST_APPOINTMENT_OFFERED_DATE` >= `FIRST_CONTACT_DATE` | Cannot offer an appointment before first contact |

> [!NOTE]
>
> The admission date anchors the timeline. Both the first contact and first appointment offered must precede or equal it, and the appointment offer cannot come before the first contact.

## Discharge Timeline

```
ADMISSION_DATE  ≤  LAST_CONTACT_DATE  ≤  DISCHARGE_DATE
```

| Rule | Constraint |
| - | - |
| `LAST_CONTACT_DATE` >= `ADMISSION_DATE` | Last contact must be on or after admission |
| `LAST_CONTACT_DATE` \<= `DISCHARGE_DATE` | Last contact must be on or before discharge |
| `DISCHARGE_DATE` >= `ADMISSION_DATE` | Discharge must be on or after admission |

## Effective Date Rules

| Rule | Constraint |
| - | - |
| For `TRANSACTION_TYPE = A` | `LAST_UPDATED_DATE` must equal `CREATED_DATE` |
| For all records | `EFFECTIVE_DATE` determines the "most recent" record when combined with identifiers |

See [Transaction Types](https://coloradobehavioralhealthadministration.mintlify.site/getting-started/transaction-types.md) for details on how `EFFECTIVE_DATE` interacts with Add, Update, and Replace operations.

## ACT Survey Date Constraints

```
2000-01-01  ≤  Admission Date  ≤  ASSESSMENT_COMPLETION_DATE

ACT_DISCHARGE_DATE must be in the same FY quarter as ASSESSMENT_COMPLETION_DATE
```

| Rule | Constraint |
| - | - |
| `ASSESSMENT_COMPLETION_DATE` >= `2000-01-01` | Floor date |
| `ASSESSMENT_COMPLETION_DATE` >= Admission Date | Assessment must be on or after admission |
| `ACT_DISCHARGE_DATE` >= Admission Date | Discharge must be after admission |
| `ACT_DISCHARGE_DATE` within same FY Quarter as Assessment Date | Must be in the same reporting quarter |

> [!WARNING]
>
> If `ACT_DISCHARGE_DATE` is not null, then `ACT_DISCHARGE_OUTCOME` is required. If `ACT_DISCHARGE_DATE` is null, then `ACT_DISCHARGE_OUTCOME` must also be null.

## Ascent Survey Date Constraints

The Ascent (First Episode Psychosis) program has additional date requirements tied to the client's age and the program start date.

```
2016-01-01          ≤  ASCENT_ADMISSION_DATE
Client DOB + 13y   ≤  ASCENT_ADMISSION_DATE
FIRST_EPISODE_DATE  <  ASCENT_ADMISSION_DATE

ASCENT_ADMISSION_DATE  ≤  ASSESSMENT_COMPLETION_DATE  ≤  DISCHARGE_DATE
```

| Rule | Constraint |
| - | - |
| `ASCENT_ADMISSION_DATE` >= `2016-01-01` | Program start floor |
| `ASCENT_ADMISSION_DATE` >= Client DOB + 13 years | Client must be at least 13 years old at Ascent admission |
| `FIRST_EPISODE_DATE` >= `1980-01-01` | BHA-determined cutoff |
| `FIRST_EPISODE_DATE` > Client DOB | Must be after birth (but can be before age 13) |
| `FIRST_EPISODE_DATE` \< `ASCENT_ADMISSION_DATE` | Episode must precede program enrollment |
| `ASSESSMENT_COMPLETION_DATE` >= `2016-01-01` | Program start floor |
| `ASSESSMENT_COMPLETION_DATE` >= `ASCENT_ADMISSION_DATE` | Assessment must be after admission |
| `DISCHARGE_DATE` >= `2016-01-01` | Program start floor |
| `DISCHARGE_DATE` >= `ASCENT_ADMISSION_DATE` | Discharge must be after admission |
| `DISCHARGE_DATE` >= `ASSESSMENT_COMPLETION_DATE` | Discharge must be on or after assessment |

> [!NOTE]
>
> For Ascent Admission records (Record Type = `ASA`), the `ASCENT_ADMISSION_DATE` must be within the same fiscal year quarter as the `ASSESSMENT_COMPLETION_DATE`. The same applies to discharge -- the `DISCHARGE_DATE` must be within the same FY quarter as the assessment date.

## Pregnancy Risk Screening Dates

| Rule | Constraint |
| - | - |
| `EVALUATION_DATE` \<= `CREATED_DATE` | Evaluation cannot be in the future relative to record creation |

## Fiscal Year Quarter Definitions

ACT and Ascent surveys use the `ASSESSMENT_COMPLETION_DATE` to determine the fiscal year and quarter. Colorado's state fiscal year runs July 1 through June 30.

| Quarter | Months | Example (FY2026) |
| - | - | - |
| Q1 | July - September | Jul 1, 2025 - Sep 30, 2025 |
| Q2 | October - December | Oct 1, 2025 - Dec 31, 2025 |
| Q3 | January - March | Jan 1, 2026 - Mar 31, 2026 |
| Q4 | April - June | Apr 1, 2026 - Jun 30, 2026 |

> [!TIP]
>
> When troubleshooting date validation errors, check the full chain from DOB through discharge. A single out-of-order date can cascade into multiple validation failures.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.