src/applications/disability-benefits/2346/schemas/2346-schema.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "MEDICAL DEVICES ORDERING TOOL",
"type": "object",
"additionalProperties": false,
"definitions": {
"privacyAgreementAccepted": {
"type": "boolean",
"enum": [true]
},
"fullName": {
"type": "object",
"properties": {
"first": {
"type": "string",
"minLength": 1,
"maxLength": 30
},
"middle": {
"type": "string"
},
"last": {
"type": "string",
"minLength": 1,
"maxLength": 30
},
"suffix": {
"type": "string",
"enum": ["Jr.", "Sr.", "II", "III", "IV"]
}
},
"required": ["first", "last"]
},
"address": {
"type": "object",
"oneOf": [
{
"properties": {
"country": {
"type": "string",
"enum": ["CAN"]
},
"state": {
"type": "string",
"enum": [
"AB",
"BC",
"MB",
"NB",
"NF",
"NT",
"NV",
"NU",
"ON",
"PE",
"QC",
"SK",
"YT"
]
},
"postalCode": {
"type": "string",
"maxLength": 10
}
}
},
{
"properties": {
"country": {
"type": "string",
"enum": ["MEX"]
},
"state": {
"type": "string",
"enum": [
"aguascalientes",
"baja-california-norte",
"baja-california-sur",
"campeche",
"chiapas",
"chihuahua",
"coahuila",
"colima",
"distrito-federal",
"durango",
"guanajuato",
"guerrero",
"hidalgo",
"jalisco",
"mexico",
"michoacan",
"morelos",
"nayarit",
"nuevo-leon",
"oaxaca",
"puebla",
"queretaro",
"quintana-roo",
"san-luis-potosi",
"sinaloa",
"sonora",
"tabasco",
"tamaulipas",
"tlaxcala",
"veracruz",
"yucatan",
"zacatecas"
]
},
"postalCode": {
"type": "string",
"maxLength": 10
}
}
},
{
"properties": {
"country": {
"type": "string",
"enum": ["USA"]
},
"state": {
"type": "string",
"enum": [
"AL",
"AK",
"AS",
"AZ",
"AR",
"AA",
"AE",
"AP",
"CA",
"CO",
"CT",
"DE",
"DC",
"FM",
"FL",
"GA",
"GU",
"HI",
"ID",
"IL",
"IN",
"IA",
"KS",
"KY",
"LA",
"ME",
"MH",
"MD",
"MA",
"MI",
"MN",
"MS",
"MO",
"MT",
"NE",
"NV",
"NH",
"NJ",
"NM",
"NY",
"NC",
"ND",
"MP",
"OH",
"OK",
"OR",
"PW",
"PA",
"PR",
"RI",
"SC",
"SD",
"TN",
"TX",
"UT",
"VT",
"VI",
"VA",
"WA",
"WV",
"WI",
"WY"
]
},
"postalCode": {
"type": "string",
"maxLength": 10
}
}
},
{
"properties": {
"country": {
"not": {
"type": "string",
"enum": ["CAN", "MEX", "USA"]
}
},
"state": {
"type": "string",
"maxLength": 51
},
"postalCode": {
"type": "string",
"maxLength": 51
}
}
}
],
"properties": {
"street": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"street2": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 51
},
"country": {
"type": "string",
"default": "USA",
"enum": ["USA", "CAN", "MEX"],
"enumNames": ["United States", "Canada", "Mexico"]
},
"state": {
"type": "string",
"enum": [
"AL",
"AK",
"AS",
"AZ",
"AR",
"AA",
"AE",
"AP",
"CA",
"CO",
"CT",
"DE",
"DC",
"FM",
"FL",
"GA",
"GU",
"HI",
"ID",
"IL",
"IN",
"IA",
"KS",
"KY",
"LA",
"ME",
"MH",
"MD",
"MA",
"MI",
"MN",
"MS",
"MO",
"MT",
"NE",
"NV",
"NH",
"NJ",
"NM",
"NY",
"NC",
"ND",
"MP",
"OH",
"OK",
"OR",
"PW",
"PA",
"PR",
"RI",
"SC",
"SD",
"TN",
"TX",
"UT",
"VT",
"VI",
"VA",
"WA",
"WV",
"WI",
"WY"
]
},
"postalCode": {
"type": "string",
"maxLength": 10
}
},
"required": ["street", "city", "state", "country", "postalCode"]
},
"email": {
"type": "string"
},
"supplies": {
"type": "array",
"minItems": 0,
"maxItems": 50,
"items": {
"type": "object",
"properties": {
"deviceName": {
"type": "string"
},
"productName": {
"type": "string"
},
"productGroup": {
"type": "string"
},
"productId": {
"type": "number"
},
"availableForReorder": {
"type": "boolean"
},
"lastOrderDate": {
"type": "string",
"format": "date"
},
"quantity": {
"type": "number"
}
}
}
},
"gender": {
"type": "string",
"enum": ["F", "M"]
},
"date": {
"pattern": "^(\\d{4}|XXXX)-(0[1-9]|1[0-2]|XX)-(0[1-9]|[1-2][0-9]|3[0-1]|XX)$",
"type": "string"
}
},
"properties": {
"email": {
"$ref": "#/definitions/email"
},
"dateOfBirth": {
"$ref": "#/definitions/date"
},
"privacyAgreementAccepted": {
"$ref": "#/definitions/privacyAgreementAccepted"
},
"fullName": {
"$ref": "#/definitions/fullName"
},
"permanentAddress": {
"$ref": "#/definitions/address"
},
"temporaryAddress": {
"$ref": "#/definitions/address"
},
"gender": {
"$ref": "#/definitions/gender"
},
"supplies": {
"$ref": "#/definitions/supplies"
}
},
"required": [
"privacyAgreementAccepted",
"permanentAddress",
"temporaryAddress",
"fullName",
"gender",
"email",
"dateOfBirth",
"supplies"
]
}