Open SamStuckey opened 2 days ago
Resources
vets-json-schema
Example JSON IPF
ipf = InProgressForm.last
json = JSON.parse(ipf.form_data)
"mental_health": {
"conditions": { ## sourced from newly claimed disabilities
"a_new_condition": boolean,
"none": boolean
}
},
"view:traumatic_events_info": {},
"additional_forms": {
"form0781": {
"state": ["not_started", "opted_out", "in_progress", "complete"], ## enum
"submit_method": ["online_form", "upload", "opt_out"], ## enum
"attachment": {
"name": string,
"confirmation_code": string,
"is_encrypted": boolean,
"attachment_id": string ## L228 or something different as it's a new version with a new name?
},
"traumas": {
"combat_related": boolean,
"mst": boolean,
"interactions": boolean,
"other": boolean
},
"events": { ## currently termed incidents ## should be array
"description": string, ## currently termed incident_description
"location": string ## currently termed incident_location
"timing": string ## currently termed incident_date
"reports" {
"restricted_report": boolean,
"unrestricted_report": boolean,
"police_report": boolean, {
"issuing_agency": ,
"city": ,
"state": ,
"township": ,
"country":
},
"other_report": boolean,
"no_report": boolean
}
},
"behavioral_changes": { ## currently termed mental_changes ## populate object with selected `"change": true`
"opt_out": boolean,
"none": boolean,
## example: { "reassignment": true }
## if "other" is selected, provided name needs to be stored and referenced in "behavioral_details"
"behavioral_details": { ## add entered "detail" for each selected "change"
"reassignment": {}, ## example: { "description": "My duties changed" }
"absences": {},
"performance":{},
"consultations": {},
"distress": {},
"medications": {},
"self_medication": {},
"substances", {},
"appetite": {},
"pregnancy": {},
"screenings": {},
"social_economic": {},
"relationships": {},
"infractions": {},
"other": {}
}
}
}
}
Current 0781 JSON
form0781: {
type: 'object',
properties: {
remarks: {
type: 'string',
},
additionalIncidentText: {
type: 'string',
},
additionalSecondaryIncidentText: {
type: 'string',
},
otherInformation: {
type: 'array',
items: {
type: 'string',
},
},
incidents: {
type: 'array',
minItems: 1,
items: {
type: 'object',
required: ['personalAssault'],
properties: {
personalAssault: {
type: 'boolean',
},
medalsCitations: {
type: 'string',
},
incidentDate: {
$ref: '#/definitions/date',
},
incidentLocation: form0781AddressDef,
incidentDescription: {
type: 'string',
},
unitAssigned: {
type: 'string',
},
unitAssignedDates: {
$ref: '#/definitions/dateRange',
},
personsInvolved: {
type: 'array',
items: {
type: 'object',
properties: {
name: {
type: 'object',
properties: {
first: {
type: 'string',
},
middle: {
type: 'string',
},
last: {
type: 'string',
},
},
},
rank: {
type: 'string',
},
injuryDeath: {
type: 'string',
enum: ['killedInAction', 'killedNonBattle', 'woundedInAction', 'injuredNonBattle', 'other'],
},
injuryDeathOther: {
type: 'string',
},
injuryDeathDate: {
$ref: '#/definitions/date',
},
unitAssigned: {
type: 'string',
},
description: {
type: 'string',
},
},
},
},
sources: {
type: 'array',
items: {
type: 'object',
properties: {
name: {
type: 'string',
},
address: incidentSourceAddressDef,
},
},
},
},
},
},
},
}
Swagger
Testability: foundational
Description
Paper sync will require a digital representation of the form in our database. What we have right now is a copy of the new paper form. We need to
Acceptance Criteria
Expected Deployments
None.
See the Planning Doc for more info