Skip to content

Commit

Permalink
Merge branch 'master' into ToddWebDev-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ToddWebDev authored Nov 14, 2024
2 parents 38ecd15 + 95d2981 commit e1067e6
Show file tree
Hide file tree
Showing 13 changed files with 556 additions and 1,081 deletions.
671 changes: 178 additions & 493 deletions dist/21-22-schema.json

Large diffs are not rendered by default.

676 changes: 187 additions & 489 deletions dist/21-22A-schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/40-10007-INTEGRATION-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
},
"ssn": {
"type": "string",
"pattern": "^\\d{3}-\\d{2}-\\d{4}$"
"pattern": "^\\d{3}\\d{2}\\d{4}$"
},
"centralMailVaFile": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion dist/40-10007-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
},
"ssn": {
"type": "string",
"pattern": "^\\d{3}-\\d{2}-\\d{4}$"
"pattern": "^\\d{3}\\d{2}\\d{4}$"
},
"centralMailVaFile": {
"type": "string",
Expand Down
22 changes: 11 additions & 11 deletions dist/FEEDBACK-TOOL-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -895,51 +895,51 @@
"issue": {
"type": "object",
"properties": {
"other": {
"recruiting": {
"type": "boolean",
"default": false
},
"recruiting": {
"accreditation": {
"type": "boolean",
"default": false
},
"studentLoans": {
"financialIssues": {
"type": "boolean",
"default": false
},
"quality": {
"studentLoans": {
"type": "boolean",
"default": false
},
"creditTransfer": {
"jobOpportunities": {
"type": "boolean",
"default": false
},
"accreditation": {
"changeInDegree": {
"type": "boolean",
"default": false
},
"jobOpportunities": {
"quality": {
"type": "boolean",
"default": false
},
"gradePolicy": {
"type": "boolean",
"default": false
},
"refundIssues": {
"transcriptRelease": {
"type": "boolean",
"default": false
},
"financialIssues": {
"creditTransfer": {
"type": "boolean",
"default": false
},
"changeInDegree": {
"refundIssues": {
"type": "boolean",
"default": false
},
"transcriptRelease": {
"other": {
"type": "boolean",
"default": false
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vets-json-schema",
"version": "24.5.3",
"version": "24.5.5",
"license": "CC0-1.0",
"repository": {
"type": "git",
Expand Down
102 changes: 67 additions & 35 deletions src/schemas/21-22/schema.js
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;
129 changes: 94 additions & 35 deletions src/schemas/21-22A/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,110 @@ import _ from 'lodash';
import constants from '../../common/constants';
import definitions from '../../common/definitions';

export const address = {
type: 'object',
properties: {
addressLine1: { type: 'string', minLength: 1, maxLength: 30 },
addressLine2: { type: 'string', minLength: 1, maxLength: 5 },
city: { type: 'string', minLength: 1, maxLength: 18 },
state_code: { type: 'string', minLength: 2, maxLength: 2 },
country: { type: 'string', minLength: 3, maxLength: 3 },
zip_code: { type: 'string', "pattern": "^\\d{5}$" },
zip_code_suffix: { type: 'string', "pattern": "^\\d{4}$" },
},
required: ['addressLine1', 'city', 'state_code', 'country', 'zip_code'],
};

export const name = {
type: 'object',
properties: {
first: { type: 'string', minLength: 1, maxLength: 12 },
middle: { type: 'string', minLength: 1, maxLength: 1 },
last: { type: 'string', minLength: 1, maxLength: 18 },
},
required: ['first', 'last'],
};

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 INDIVIDUAL 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 IDENTIFICATION INFORMATION
veteran: {
type: 'object',
properties: {
name: name,
ssn: definitions.ssn,
vaFileNumber: definitions.vaFileNumber,
dateOfBirth: definitions.date,
serviceNumber: definitions.veteranServiceNumber,
serviceBranch: {
type: 'string',
enum: ['ARMY', 'NAVY', 'AIR_FORCE', 'MARINE_CORPS', 'COAST_GUARD', 'SPACE_FORCE', 'NOAA', 'USPHS']
},
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 APPOINTED REPRESENTATIVE'S INFORMATION
representative: {
type: 'object',
properties: {
id: { type: 'string' },

lastServiceBranch: {
type: 'string',
enum: constants.branchesServed.map(option => option.value),
},
lastEntryDate: {
$ref: '#/definitions/date',
},
required: ['id'],
},
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;
3 changes: 2 additions & 1 deletion src/schemas/22-10282/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const { salesforceCountries: countries } = constants;

definitions.country = {
type: 'string',
enum: countries.map(country => country.label),
enum: ['United States', ...countries.filter(country => country.value !== 'USA').map(country => country.label)],
default: 'United States'
};
definitions.state = {
type: 'string',
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/40-10007-integration/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ definitions.phone.minLength = 10;
definitions.phone.maxLength = 20;
definitions.phone.pattern = '^(?:\\D*\\d){10,15}\\D*$';

definitions.ssn.pattern = '^\\d{3}-\\d{2}-\\d{4}$';
definitions.ssn.pattern = '^\\d{3}\\d{2}\\d{4}$';

definitions.ethnicity = {
type: 'string',
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/40-10007/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ definitions.phone.minLength = 10;
definitions.phone.maxLength = 20;
definitions.phone.pattern = '^(?:\\D*\\d){10,15}\\D*$';

definitions.ssn.pattern = '^\\d{3}-\\d{2}-\\d{4}$';
definitions.ssn.pattern = '^\\d{3}\\d{2}\\d{4}$';

definitions.race = {
type: 'object',
Expand Down
Loading

0 comments on commit e1067e6

Please sign in to comment.