feat: Updated incident-contracts to incorporate more fields supporting more forms#616
Open
chetanr25 wants to merge 1 commit into
Open
feat: Updated incident-contracts to incorporate more fields supporting more forms#616chetanr25 wants to merge 1 commit into
chetanr25 wants to merge 1 commit into
Conversation
…g few more forms internationally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expand incident contract and incident record
Why
Reference discussion: Discussion #609
Approach A: extract once into a shared incident schema, fill every form from that stored document. The contract we had was a first pass and did not actually cover what real fire, EMS, and hazmat reports need. This fills that gap so the schema can carry the full pipeline instead of blocking it.
What changed
IncidentRecordnow owns the contract document as the single source of truth, with a derivedincident_datetimeand an analytics block for the stats reporting needs without reading the whole JSONB.FormTypeis now an open string instead of a closed enum, since templates are user-registered per agency. AddedFieldSourceto say whether a template field comes from the contract, a static value, a manual entry, or an LLM-extracted "open" field.Reference
Standards surveyed: NERIS, NFIRS 5.0, ICS-209, NEMSIS, OSHA 301, UK IRS, Australia AIRS, Canada NFID/Ontario SIR, CTIF, UN SSIRS, and Indian state fire proformas. Discussion: #609.
Fix: #615