amida-tech/blue-button

CCDA parser returns invalid BB JSON according to schema validator

Closed this issue · 0 comments

Using CCD_1.xml sample

result:
validation result: false
{
"valid": false,
"errors": [
{
"code": "OBJECT_ADDITIONAL_PROPERTIES",
"message": "Additional properties not allowed",
"path": "#/data/medications/[0]",
"params": {
"properties": [
"supply"
]
}
},
{
"code": "INVALID_TYPE",
"message": "invalid type: array (expected object)",
"path": "#/data/medications/[0]/product/identifiers",
"params": {
"expected": "object",
"type": "array"
}
},
{
"code": "OBJECT_ADDITIONAL_PROPERTIES",
"message": "Additional properties not allowed",
"path": "#/data/medications/[0]/administration",
"params": {
"properties": [
"interval"
]
}
},
{
"code": "OBJECT_REQUIRED",
"message": "Missing required property: address",
"path": "#/data/encounters/[0]/performers/[0]",
"params": {
"property": "address"
}
},
{
"code": "INVALID_TYPE",
"message": "invalid type: string (expected array)",
"path": "#/data/encounters/[0]/performers/[0]/name",
"params": {
"expected": "array",
"type": "string"
}
},
{
"code": "OBJECT_ADDITIONAL_PROPERTIES",
"message": "Additional properties not allowed",
"path": "#/data/encounters/[0]/locations/[0]",
"params": {
"properties": [
"location_type",
"address"
]
}
},
{
"code": "INVALID_TYPE",
"message": "invalid type: array (expected object)",
"path": "#/data/social_history",
"params": {
"expected": "object",
"type": "array"
}
},
{
"code": "OBJECT_ADDITIONAL_PROPERTIES",
"message": "Additional properties not allowed",
"path": "#/data/procedures/[1]/locations/[0]",
"params": {
"properties": [
"location_type",
"address"
]
}
},
{
"code": "OBJECT_ADDITIONAL_PROPERTIES",
"message": "Additional properties not allowed",
"path": "#/data/procedures/[2]/locations/[0]",
"params": {
"properties": [
"location_type",
"address"
]
}
}
],
"warnings": []
}