Purpose: Visual verification of the updated IBHRS form (editgrid replaced by datagrid).
Sections: Client Data, Treatment Episode, Service Event
File: combinediowareportingforms.json
Download JSON
datagrid version
Changelog / Applied Changes
v3 - Set clearOnHide=false on all data fields
- Rule: ALL data fields must have
clearOnHide: false to prevent Formio from clearing values when fields become conditionally hidden
- 22 data fields updated: hidden fields (formConfiguration, azzlyData, patientGuid, staffGuid, internalEditStaffGuid, editStaffGuid, clientGuid, appointmentGuid, extendedRecordData), emailAddresses (datagrid), email, careStatusIdentifier, lifetimeTreatedOverdoses, linkedEpisodeIdentifierSelect, linkedCareStatusIdentifierSelect, signature block fields
- 172 data fields already had the flag set by the forms team
- 155 structural components skipped: columns, content, panel, button — layout-only, no data values to preserve
v2 - Snapshot before clearOnHide fix
- Baseline snapshot of the original updated form before applying clearOnHide changes
v1 - Original Updated Form (Datagrid)
- Key change: Treatment Episodes and Service Events now use
datagrid instead of editgrid
- Editgrid is not recommended by the Formio team; datagrid is the standard component
- Form provided by the forms team with updated business rules applied
- This is the starting point for further modifications in this directory
Linkage Priority Rules (for Export Code)
When processing ServiceEvent data in export mappers, linkage fields have TWO sources:
- Select box - for linking to episodes/care statuses in the CURRENT submission
- Text field - for manual entry (linking to PREVIOUS submissions)
Priority: Text field takes precedence over select box if both are filled.
// Episode linkage
const episodeId = data.linkedEpisodeIdentifier || data.linkedEpisodeIdentifierSelect;
// Care Status linkage
const careStatusId = data.linkedCareStatusIdentifier || data.linkedCareStatusIdentifierSelect;
Predecessor Care Status Linkage (for Export Code)
IBHRS Requirement: Transfer and Discharge care statuses must reference their predecessor (the Admission or Transfer they are transitioning from).
Care Status Chain: Admission -> Transfer -> Discharge
- Transfer must link to Admission (or previous Transfer)
- Discharge must link to Admission or Transfer
- Admission and Pre-Admission have no predecessor
Two input methods (same pattern as Episode/Care Status linkage):
- Select box (
predecessorCareStatusIdentifierSelect) - for linking to Admission/Transfer in CURRENT form
- Text field (
predecessorCareStatusIdentifier) - for manual entry (linking to PREVIOUS submissions)
Priority: Select box takes precedence, text field is fallback.
// Predecessor Care Status linkage (for Transfer/Discharge only)
const predecessorId = data.predecessorCareStatusIdentifierSelect || data.predecessorCareStatusIdentifier;
Conditional Fields Reference (for Export Code)
Many fields are conditionally visible based on:
- Care Status - Pre-Admission, Admission, Transfer, Discharge
- Program Area - Substance Use Disorder Treatment, Gambling Treatment
- Known Fields - Count fields show only when corresponding "Known" field is "yes"
- Cross-Field Dependencies - e.g., Clinical Override required if ASAM != Recommended
ASAM Fields by Care Status:
| Field |
Pre-Admission |
Admission |
Transfer |
Discharge |
asamLevelOfCare |
ERROR if provided |
Required |
Required |
Required |
recommendedLevelOfCare |
Hidden |
Required |
Optional |
Optional |
clinicalOverrideReason |
Hidden |
Required if ASAM != Recommended; Warning if provided when same |
Export mappers should check conditional visibility before including fields.
Testing Conditional Fields
To test conditional field visibility:
- Load the form and expand the Treatment Episode section
- Change the Status field to different values:
- Pre-Admission: Most fields should be hidden
- Admission: Prior episode fields should appear
- Transfer/Discharge: Discharge Reason should appear, Prior fields hidden
- Change the Program Area field:
- Substance Use: Days Substance Used, Substance-related arrests visible
- Gambling: Days Gambled, Bankruptcy, Money Lost, Gambling arrests visible
- Toggle Known fields to Yes/No to see count fields appear/disappear