-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ToddWebDev-patch-1
- Loading branch information
Showing
13 changed files
with
556 additions
and
1,081 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,84 @@ | ||
import _ from 'lodash'; | ||
import constants from '../../common/constants'; | ||
import definitions from '../../common/definitions'; | ||
import { address, name } from '../21-22A/schema'; | ||
|
||
const schema = { | ||
$schema: 'http://json-schema.org/draft-04/schema#', | ||
title: 'APPLICATION FOR APPOINTING AN ACCREDITED REPRESENTATIVE', | ||
definitions: { | ||
date: { | ||
format: 'date', | ||
type: 'string', | ||
}, | ||
}, | ||
title: "APPOINTMENT OF VETERANS SERVICE ORGANIZATION AS CLAIMANT'S REPRESENTATIVE", | ||
type: 'object', | ||
properties: { | ||
attachments: (() => { | ||
const attachments = _.cloneDeep(definitions.files); | ||
attachments.items.properties.dd214 = { type: 'boolean' }; | ||
return attachments; | ||
})(), | ||
veteranFullName: definitions.hcaFullName, | ||
veteranSocialSecurityNumber: definitions.ssn, | ||
gender: { | ||
type: 'string', | ||
enum: constants.genders.map(option => option.value), | ||
// Section I Veteran's Information | ||
veteran: { | ||
type: 'object', | ||
properties: { | ||
name: name, | ||
ssn: definitions.ssn, | ||
vaFileNumber: definitions.vaFileNumber, | ||
dateOfBirth: definitions.date, | ||
serviceNumber: definitions.veteranServiceNumber, | ||
address: address, | ||
phone: definitions.hcaPhone, | ||
email: definitions.hcaEmail, | ||
}, | ||
required: [ | ||
'name', | ||
'ssn', | ||
'dateOfBirth', | ||
'address', | ||
'phone' | ||
], | ||
}, | ||
veteranDateOfBirth: { | ||
$ref: '#/definitions/date', | ||
// Section II Claimant's Information | ||
claimant: { | ||
type: 'object', | ||
properties: { | ||
name: name, | ||
dateOfBirth: definitions.date, | ||
relationship: definitions.relationship, | ||
address: address, | ||
phone: definitions.hcaPhone, | ||
email: definitions.hcaEmail, | ||
}, | ||
// If these are required here but the claimant object isn't required at | ||
// the top level, will that match our use case? Our use case being that | ||
// the claimant object isn't required but if it is present, these fields | ||
// are required. | ||
required: [ | ||
'name', | ||
'dateOfBirth', | ||
'relationship', | ||
'address', | ||
'phone' | ||
], | ||
}, | ||
maritalStatus: definitions.maritalStatus, | ||
veteranAddress: definitions.hcaAddress, | ||
veteranHomeAddress: definitions.hcaAddress, | ||
email: definitions.hcaEmail, | ||
homePhone: definitions.hcaPhone, | ||
mobilePhone: definitions.hcaPhone, | ||
// Section III Service Organization Information | ||
representative: { | ||
type: 'object', | ||
properties: { | ||
id: { type: 'string' }, | ||
organizationId: { type: 'string' }, | ||
|
||
lastServiceBranch: { | ||
type: 'string', | ||
enum: constants.branchesServed.map(option => option.value), | ||
}, | ||
lastEntryDate: { | ||
$ref: '#/definitions/date', | ||
}, | ||
}, | ||
lastDischargeDate: { | ||
$ref: '#/definitions/date', | ||
// Section IV Authorization Information | ||
recordConsent: { type: 'boolean' }, | ||
consentAddressChange: { type: 'boolean' }, | ||
consentLimits: { | ||
type: 'array', | ||
items: { | ||
type: 'string', | ||
enum: ['ALCOHOLISM', 'DRUG_ABUSE', 'HIV', 'SICKLE_CELL'], | ||
} | ||
}, | ||
dischargeType: definitions.dischargeType, | ||
}, | ||
required: ['veteranFullName', 'veteranSocialSecurityNumber', 'veteranDateOfBirth', 'gender', 'veteranAddress'], | ||
required: [ | ||
'veteran', | ||
'representative', | ||
'recordConsent', | ||
'consentAddressChange', | ||
'consentLimits', | ||
], | ||
}; | ||
|
||
export default schema; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.