Skip to content

Commit

Permalink
Api 27050 request disability examples (#12931)
Browse files Browse the repository at this point in the history
* Update example.json, fix logic to handle no secondary disabilities case

* Add rswag for updated 526 submit example
  • Loading branch information
mchristiansonVA authored Jun 13, 2023
1 parent d557682 commit 75e9736
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def collect_primary_secondary_disability_names(disabilities)
names = []
disabilities.each do |disability|
names << disability['name'].strip.downcase
disability['secondaryDisabilities'].each do |secondary|
disability['secondaryDisabilities']&.each do |secondary|
names << secondary['name'].strip.downcase
end
end
Expand Down
69 changes: 33 additions & 36 deletions modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3863,53 +3863,50 @@
},
"disabilities": [
{
"disabilityActionType": "REOPEN",
"name": "PTSD (post traumatic stress disorder)",
"classificationCode": "ABCDEFGHIJ",
"serviceRelevance": "ABCDEFG",
"approximateDate": "4592-11-04",
"ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX",
"diagnosticCode": 0,
"secondaryDisabilities": [
{
"name": "ABCDEF",
"disabilityActionType": "SECONDARY",
"serviceRelevance": "ABCDEFGHIJKLMNOPQ",
"classificationCode": "ABCDEFGHIJKLMNO",
"approximateDate": "9904-01-03",
"exposureOrEventOrInjury": "EXPOSURE"
}
],
"disabilityActionType": "NEW",
"name": "Hearing Loss",
"classificationCode": "3140",
"serviceRelevance": "Heavy equipment operator in service",
"approximateDate": "07-1968",
"isRelatedToToxicExposure": false,
"exposureOrEventOrInjury": "Noise"
},
{
"disabilityActionType": "INCREASE",
"name": "diabetes, adult-onset",
"classificationCode": "2065",
"serviceRelevance": "Service in Vietnam War",
"approximateDate": "12-1972",
"ratedDisabilityId": "1234567",
"diagnosticCode": 9999,
"isRelatedToToxicExposure": true,
"exposureOrEventOrInjury": "EXPOSURE"
"exposureOrEventOrInjury": "Agent Orange"
},
{
"disabilityActionType": "REOPEN",
"name": "Trauma",
"classificationCode": "ABCDEFGHIJ",
"serviceRelevance": "ABCDEFG",
"approximateDate": "4592-11-04",
"ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX",
"diagnosticCode": 0,
"disabilityActionType": "NONE",
"name": "knee condition, right",
"classificationCode": "3710",
"serviceRelevance": "Explanation of service connection",
"approximateDate": "11-04-2019",
"ratedDisabilityId": "1234567",
"diagnosticCode": 9999,
"isRelatedToToxicExposure": false,
"secondaryDisabilities": [
{
"name": "GHIJKLM",
"name": "knee condition, left",
"disabilityActionType": "SECONDARY",
"serviceRelevance": "ABCDEFGHIJKLMNOPQ",
"classificationCode": "ABCDEFGHIJKLMNO",
"approximateDate": "9904-01-03",
"exposureOrEventOrInjury": "EXPOSURE"
"classificationCode": "3700",
"serviceRelevance": "Injured left knee when brace on right knee failed",
"approximateDate": "06-11-2008"
}
],
"isRelatedToToxicExposure": true,
"exposureOrEventOrInjury": "EXPOSURE"
]
}
],
"treatments": [
{
"treatedDisabilityNames": [
"PTSD (post traumatic stress disorder)",
"Trauma"
"Hearing Loss",
"diabetes, adult-onset"
],
"center": {
"name": "Center One",
Expand All @@ -3920,7 +3917,7 @@
},
{
"treatedDisabilityNames": [
"Trauma"
"knee condition, right"
],
"center": {
"name": "Center One",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,51 +87,48 @@
},
"disabilities": [
{
"disabilityActionType": "REOPEN",
"name": "PTSD (post traumatic stress disorder)",
"classificationCode": "ABCDEFGHIJ",
"serviceRelevance": "ABCDEFG",
"approximateDate": "4592-11-04",
"ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX",
"diagnosticCode": 0,
"secondaryDisabilities": [
{
"name": "ABCDEF",
"disabilityActionType": "SECONDARY",
"serviceRelevance": "ABCDEFGHIJKLMNOPQ",
"classificationCode": "ABCDEFGHIJKLMNO",
"approximateDate": "9904-01-03",
"exposureOrEventOrInjury": "EXPOSURE"
}
],
"isRelatedToToxicExposure": true,
"exposureOrEventOrInjury": "EXPOSURE"
"disabilityActionType": "NEW",
"name": "Hearing Loss",
"classificationCode": "3140",
"serviceRelevance": "Heavy equipment operator in service",
"approximateDate": "07-1968",
"isRelatedToToxicExposure": false,
"exposureOrEventOrInjury": "Noise"
},
{
"disabilityActionType": "REOPEN",
"name": "Trauma",
"classificationCode": "ABCDEFGHIJ",
"serviceRelevance": "ABCDEFG",
"approximateDate": "4592-11-04",
"ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX",
"diagnosticCode": 0,
"secondaryDisabilities": [
{
"name": "GHIJKLM",
"disabilityActionType": "SECONDARY",
"serviceRelevance": "ABCDEFGHIJKLMNOPQ",
"classificationCode": "ABCDEFGHIJKLMNO",
"approximateDate": "9904-01-03",
"exposureOrEventOrInjury": "EXPOSURE"
}
],
"isRelatedToToxicExposure": true,
"exposureOrEventOrInjury": "EXPOSURE"
"disabilityActionType": "INCREASE",
"name": "diabetes, adult-onset",
"classificationCode": "2065",
"serviceRelevance": "Service in Vietnam War",
"approximateDate": "12-1972",
"ratedDisabilityId": "1234567",
"diagnosticCode": 9999,
"isRelatedToToxicExposure": true,
"exposureOrEventOrInjury": "Agent Orange"
},
{
"disabilityActionType": "NONE",
"name": "knee condition, right",
"classificationCode": "3710",
"serviceRelevance": "Explanation of service connection",
"approximateDate": "11-04-2019",
"ratedDisabilityId": "1234567",
"diagnosticCode": 9999,
"isRelatedToToxicExposure": false,
"secondaryDisabilities": [
{
"name": "knee condition, left",
"disabilityActionType": "SECONDARY",
"classificationCode": "3700",
"serviceRelevance": "Injured left knee when brace on right knee failed",
"approximateDate": "06-11-2008"
}
]
}
],
],
"treatments": [
{
"treatedDisabilityNames": ["PTSD (post traumatic stress disorder)", "Trauma"],
"treatedDisabilityNames": ["Hearing Loss", "diabetes, adult-onset"],
"center": {
"name": "Center One",
"state": "GA",
Expand All @@ -140,15 +137,15 @@
"startDate": "03-1985"
},
{
"treatedDisabilityNames": ["Trauma"],
"treatedDisabilityNames": ["knee condition, right"],
"center": {
"name": "Center One",
"state": "GA",
"city": "Decatur"
},
"startDate": "03-1985"
}
],
],
"serviceInformation": {
"servicePeriods": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def transform_disabilities
disability.delete('ratedDisabilityId')
disability.delete('diagnosticCode')
disability.delete('disabilityActionType')
sec_dis = disability['secondaryDisabilities'].map do |secondary_disability|
sec_dis = disability['secondaryDisabilities']&.map do |secondary_disability|
secondary_disability['disability'] = secondary_disability['name']
secondary_disability
end
Expand Down

0 comments on commit 75e9736

Please sign in to comment.