From c3fc556d2402db411f410052197aa06922cfa6dc Mon Sep 17 00:00:00 2001 From: Carl Johnson Date: Fri, 4 Nov 2016 13:04:55 -0400 Subject: [PATCH] EVSS: Add other documents to events timeline (#444) * EVSS: Add other documents to events timeline Refs https://github.com/department-of-veterans-affairs/sunsets-team/issues/197 * Add date to objects * Clearer spec --- .../disability_claim_detail_serializer.rb | 12 + .../claim-with-documents.json | 688 ++++++++++++++++++ ...disability_claim_detail_serializer_spec.rb | 20 + 3 files changed, 720 insertions(+) create mode 100644 spec/fixtures/disability_claim/claim-with-documents.json diff --git a/app/serializers/disability_claim_detail_serializer.rb b/app/serializers/disability_claim_detail_serializer.rb index 0063e0b256c..11c8645fc59 100644 --- a/app/serializers/disability_claim_detail_serializer.rb +++ b/app/serializers/disability_claim_detail_serializer.rb @@ -30,6 +30,9 @@ def events_timeline # Add tracked items events += create_events_for_tracked_items + # Add documents not associated with a tracked item + events += create_events_for_documents + # Make reverse chron with nil date items at the end events.compact.sort_by { |h| h[:date] || Date.new }.reverse end @@ -66,6 +69,15 @@ def create_events_for_tracked_items end.flatten end + def create_events_for_documents + # Objects with trackedItemId are part of other events, so don't duplicate them + docs = sub_objects_of('vbaDocumentList').select { |obj| obj['trackedItemId'].nil? } + docs = create_documents docs + docs.map do |obj| + obj.merge(type: :other_documents_list, date: obj[:upload_date]) + end + end + # Order of EVENT_DATE_FIELDS determines which date trumps in timeline sorting EVENT_DATE_FIELDS = %i( closed_date diff --git a/spec/fixtures/disability_claim/claim-with-documents.json b/spec/fixtures/disability_claim/claim-with-documents.json new file mode 100644 index 00000000000..822852a823c --- /dev/null +++ b/spec/fixtures/disability_claim/claim-with-documents.json @@ -0,0 +1,688 @@ +{ + "appealPossible" : "No", + "attentionNeeded" : "Yes", + "baseEndProductCode" : "010", + "benefitClaimTypeCode" : "010LCOMP", + "claimConsolidatable" : false, + "claimPhaseDates" : { + "currentPhaseBack" : false, + "everPhaseBack" : true, + "latestPhaseType" : "Gathering of Evidence", + "phase1CompleteDate" : "11/03/2016", + "phase2CompleteDate" : "11/03/2016", + "phaseChangeDate" : "11/03/2016", + "phaseMaxEstDate" : "12/18/2016", + "phaseMinEstDate" : "01/31/2017", + "phaseTypeChangeInd" : "23" + }, + "claimTrackedItems" : { + "neverReceivedFromOthersList" : [ ], + "neverReceivedFromYouList" : [ ], + "receivedFromOthersList" : [ ], + "receivedFromYouList" : [ ], + "stillNeedFromOthersList" : [ { + "description" : "Medical evidence from private provider", + "displayedName" : "Request 14", + "dvlpmtTc" : "3RDPRTYRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "11/19/2016", + "thirdPartyName" : "Dr. Jonesy", + "trackedItemId" : 211689, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Medical evidence from private provider", + "displayedName" : "Request 15", + "dvlpmtTc" : "3RDPRTYRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "11/19/2016", + "thirdPartyName" : "Dr. Smithy", + "trackedItemId" : 211688, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Service information from Reserve or Guard Unit", + "displayedName" : "Request 16", + "dvlpmtTc" : "3RDPRTYRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "thirdPartyName" : "101st Airborne Reserve", + "trackedItemId" : 211687, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Requested radiation exposure documents from the Army.", + "displayedName" : "Request 17", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "thirdPartyName" : "Dr. Jonesy, Dr. Smithy, 101st Airborne Reserve", + "trackedItemId" : 211678, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + } ], + "stillNeedFromYouList" : [ { + "description" : "Due to a change in privacy law, the authorization form you sent to us to request treatment records from <provdr_nm of no 4142> is no longer valid. Before we can request your treatment records from <provdr_nm of no 4142>, we need the enclosed VA Form 21-4142, Authorization and Consent to Release Information to the Department of Veterans Affairs(VA), signed, dated and returned to us. This form has been updated to comply with the new privacy requirements.", + "displayedName" : "Request 1", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211673, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Please send us copies of your final Leave and Earnings Statement, W-2, or other papers from the military showing both the gross and net (before and after tax) amounts of separation pay you received. We also need the date that you received the payment.", + "displayedName" : "Request 2", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211672, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "You did not claim a specific disability. Please tell us the name of your claimed disability. You may provide this information on the enclosed VA Form 21-4138, Statement in Support of Claim. Please note that we can not take further action on your claim until we receive this information.", + "displayedName" : "Request 3", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211676, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Send verification that you engaged in combat. Below is a list of individual decorations that will be considered substantiating evidence.\r
\r
Air Force Achievement Medal with \"V\" Device\r
Air Force Combat Action Medal\r
Air Force Commendation Medal with \"V\" Device\r
Air Force Cross\r
Air Medal with \"V\" Device\r
Army Commendation Medal with \"V\" Device\r
Bronze Star Medal with \"V\" Device\r
Combat Action Badge\r
Combat Action Ribbon (Note: Prior to February 1969, the Navy Achievement Medal with \"V\" Device was awarded.)\r
Combat Aircrew Insignia\r
Combat Infantry/Infantryman Badge\r
Combat Medical Badge\r
Distinguished Flying Cross\r
Distinguished Service Cross\r
Joint Service Commendation Medal with \"V\" Device\r
Medal of Honor \r
Navy Commendation Medal with \"V\" Device \r
Navy Cross \r
Purple Heart \r
Silver Star\r
\r
Often service treatment records do not contain entries of treatment given to veterans who served during a period of war and engaged in combat with the enemy. However, we may accept satisfactory lay or other evidence of in-service occurrence if the evidence is consistent with the conditions and circumstances of your service.\r
* Provide a detailed description of the event resulting in your claimed condition.\r
* Provide the date or dates during combat when you sustained your claimed condition. We need the month and year if possible.\r
* Provide the location of your assigned duty station and the specific unit to which you were assigned (division, regiment, battalion, and company).", + "displayedName" : "Request 4", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211677, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "You mentioned treatment at a VA Medical Center. Provide us with the location and the dates of treatment, on the attached VA form 21-4138 Statement in Support of Claim, and we will request the records.", + "displayedName" : "Request 5", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211675, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "You did not tell us the disability related to your National Guard or Reserve duty. Tell us the name of your disability.", + "displayedName" : "Request 6", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211674, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Send evidence showing service in the Southwest Asia Theater of Operations (i.e., official orders, travel vouchers, performance evaluations or receipts from purchases made.)", + "displayedName" : "Request 7", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211679, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Please send us copies of your Physical Evaluation Board (PEB) proceedings if you had one. The PEB shows the medical condition(s) for which you received disability severance pay.", + "displayedName" : "Request 8", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211681, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Send us a copy of your DD Form 214 or other separation papers for all periods of service.", + "displayedName" : "Request 9", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211680, + "trackedItemStatus" : "SUBMITTED_AWAITING_REVIEW", + "uploaded" : true, + "uploadsAllowed" : true, + "vbaDocuments" : [ { + "corporateDocumentId" : 96633, + "documentId" : "{0D5CB4A0-1E26-4B3B-9F03-81CE010C3FAA}", + "documentSize" : 0, + "documentTypeLabel" : "Military Personnel Record", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211680, + "uploadDate" : 1478196931000 + } ] + }, { + "description" : "Please complete and return the enclosed VA Form 21-4142, Authorization to Disclose Information, so that we can obtain the authorization to request treatment records from your private medical sources listed on the received VA Form 21-4142a, General Release for Medical Provider Information.", + "displayedName" : "Request 10", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211682, + "trackedItemStatus" : "SUBMITTED_AWAITING_REVIEW", + "uploaded" : true, + "uploadsAllowed" : true, + "vbaDocuments" : [ { + "corporateDocumentId" : 96632, + "documentId" : "{FF1D1549-98CE-407D-BA27-71EE5A7E35C2}", + "documentSize" : 0, + "documentTypeLabel" : "VA Form 21-4192 - Request for Employment Information in Connection with Claim for Disability", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211682, + "uploadDate" : 1478196877000 + } ] + }, { + "description" : "You were previously denied service connection for posttraumatic stress disorder (PTSD). You were notified of the decision on <Date of previous denial>. The appeal period for that decision has expired and the decision is now final. In order for us to reopen your claim, we need new and material evidence. Your claim was previously denied because <Reason for previous denial>. Therefore, the evidence you submit must be new and relate to this fact. If your PTSD is caused by a fear associated with hostile military or terrorist activity, you must provide evidence or a statement to support your claim.", + "displayedName" : "Request 11", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211683, + "trackedItemStatus" : "SUBMITTED_AWAITING_REVIEW", + "uploaded" : true, + "uploadsAllowed" : true, + "vbaDocuments" : [ { + "corporateDocumentId" : 96631, + "documentId" : "{6CF4AC54-3484-41FD-BF77-EF989622B789}", + "documentSize" : 0, + "documentTypeLabel" : "VA Form 21-4142a - General Release for Medical Provider Information", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211683, + "uploadDate" : 1478196740000 + } ] + }, { + "description" : "Send us medical evidence that shows the diagnosis and earliest symptoms for each disability below that resulted from your exposure to herbicides (Agent Orange):\r
\r
<output_arg.algatn_nm>\r
\r
If you are claiming a skin condition, we need medical evidence that shows your skin condition was present during the first year after your last service in Vietnam.", + "displayedName" : "Request 12", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211684, + "trackedItemStatus" : "SUBMITTED_AWAITING_REVIEW", + "uploaded" : true, + "uploadsAllowed" : true, + "vbaDocuments" : [ { + "corporateDocumentId" : 96629, + "documentId" : "{7907981B-4EE5-48D1-B8F1-965A7F1BE7A7}", + "documentSize" : 0, + "documentTypeLabel" : "Other Correspondence", + "originalFileName" : "VAprivacy.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211684, + "uploadDate" : 1478195624000 + } ] + }, { + "description" : "Automated 5103 Notice Response", + "displayedName" : "Request 13", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211661, + "trackedItemStatus" : "SUBMITTED_AWAITING_REVIEW", + "uploaded" : true, + "uploadsAllowed" : true, + "vbaDocuments" : [ { + "corporateDocumentId" : 96630, + "documentId" : "{A31352BB-B932-4832-97DB-443AAE5D80CF}", + "documentSize" : 0, + "documentTypeLabel" : "VA Form 21-0781a - Statement in Support of Claim for PTSD Secondary to Personal Assault", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211661, + "uploadDate" : 1478196475000 + } ] + } ] + }, + "consolidatedTrackedItemsList" : [ { + "description" : "Due to a change in privacy law, the authorization form you sent to us to request treatment records from <provdr_nm of no 4142> is no longer valid. Before we can request your treatment records from <provdr_nm of no 4142>, we need the enclosed VA Form 21-4142, Authorization and Consent to Release Information to the Department of Veterans Affairs(VA), signed, dated and returned to us. This form has been updated to comply with the new privacy requirements.", + "displayedName" : "Request 1", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211673, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Please send us copies of your final Leave and Earnings Statement, W-2, or other papers from the military showing both the gross and net (before and after tax) amounts of separation pay you received. We also need the date that you received the payment.", + "displayedName" : "Request 2", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211672, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "You did not claim a specific disability. Please tell us the name of your claimed disability. You may provide this information on the enclosed VA Form 21-4138, Statement in Support of Claim. Please note that we can not take further action on your claim until we receive this information.", + "displayedName" : "Request 3", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211676, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Send verification that you engaged in combat. Below is a list of individual decorations that will be considered substantiating evidence.\r
\r
Air Force Achievement Medal with \"V\" Device\r
Air Force Combat Action Medal\r
Air Force Commendation Medal with \"V\" Device\r
Air Force Cross\r
Air Medal with \"V\" Device\r
Army Commendation Medal with \"V\" Device\r
Bronze Star Medal with \"V\" Device\r
Combat Action Badge\r
Combat Action Ribbon (Note: Prior to February 1969, the Navy Achievement Medal with \"V\" Device was awarded.)\r
Combat Aircrew Insignia\r
Combat Infantry/Infantryman Badge\r
Combat Medical Badge\r
Distinguished Flying Cross\r
Distinguished Service Cross\r
Joint Service Commendation Medal with \"V\" Device\r
Medal of Honor \r
Navy Commendation Medal with \"V\" Device \r
Navy Cross \r
Purple Heart \r
Silver Star\r
\r
Often service treatment records do not contain entries of treatment given to veterans who served during a period of war and engaged in combat with the enemy. However, we may accept satisfactory lay or other evidence of in-service occurrence if the evidence is consistent with the conditions and circumstances of your service.\r
* Provide a detailed description of the event resulting in your claimed condition.\r
* Provide the date or dates during combat when you sustained your claimed condition. We need the month and year if possible.\r
* Provide the location of your assigned duty station and the specific unit to which you were assigned (division, regiment, battalion, and company).", + "displayedName" : "Request 4", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211677, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "You mentioned treatment at a VA Medical Center. Provide us with the location and the dates of treatment, on the attached VA form 21-4138 Statement in Support of Claim, and we will request the records.", + "displayedName" : "Request 5", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211675, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "You did not tell us the disability related to your National Guard or Reserve duty. Tell us the name of your disability.", + "displayedName" : "Request 6", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211674, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Send evidence showing service in the Southwest Asia Theater of Operations (i.e., official orders, travel vouchers, performance evaluations or receipts from purchases made.)", + "displayedName" : "Request 7", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211679, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Please send us copies of your Physical Evaluation Board (PEB) proceedings if you had one. The PEB shows the medical condition(s) for which you received disability severance pay.", + "displayedName" : "Request 8", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211681, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Send us a copy of your DD Form 214 or other separation papers for all periods of service.", + "displayedName" : "Request 9", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211680, + "trackedItemStatus" : "SUBMITTED_AWAITING_REVIEW", + "uploaded" : true, + "uploadsAllowed" : true, + "vbaDocuments" : [ { + "corporateDocumentId" : 96633, + "documentId" : "{0D5CB4A0-1E26-4B3B-9F03-81CE010C3FAA}", + "documentSize" : 0, + "documentTypeLabel" : "Military Personnel Record", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211680, + "uploadDate" : 1478196931000 + } ] + }, { + "description" : "Please complete and return the enclosed VA Form 21-4142, Authorization to Disclose Information, so that we can obtain the authorization to request treatment records from your private medical sources listed on the received VA Form 21-4142a, General Release for Medical Provider Information.", + "displayedName" : "Request 10", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211682, + "trackedItemStatus" : "SUBMITTED_AWAITING_REVIEW", + "uploaded" : true, + "uploadsAllowed" : true, + "vbaDocuments" : [ { + "corporateDocumentId" : 96632, + "documentId" : "{FF1D1549-98CE-407D-BA27-71EE5A7E35C2}", + "documentSize" : 0, + "documentTypeLabel" : "VA Form 21-4192 - Request for Employment Information in Connection with Claim for Disability", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211682, + "uploadDate" : 1478196877000 + } ] + }, { + "description" : "You were previously denied service connection for posttraumatic stress disorder (PTSD). You were notified of the decision on <Date of previous denial>. The appeal period for that decision has expired and the decision is now final. In order for us to reopen your claim, we need new and material evidence. Your claim was previously denied because <Reason for previous denial>. Therefore, the evidence you submit must be new and relate to this fact. If your PTSD is caused by a fear associated with hostile military or terrorist activity, you must provide evidence or a statement to support your claim.", + "displayedName" : "Request 11", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211683, + "trackedItemStatus" : "SUBMITTED_AWAITING_REVIEW", + "uploaded" : true, + "uploadsAllowed" : true, + "vbaDocuments" : [ { + "corporateDocumentId" : 96631, + "documentId" : "{6CF4AC54-3484-41FD-BF77-EF989622B789}", + "documentSize" : 0, + "documentTypeLabel" : "VA Form 21-4142a - General Release for Medical Provider Information", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211683, + "uploadDate" : 1478196740000 + } ] + }, { + "description" : "Send us medical evidence that shows the diagnosis and earliest symptoms for each disability below that resulted from your exposure to herbicides (Agent Orange):\r
\r
<output_arg.algatn_nm>\r
\r
If you are claiming a skin condition, we need medical evidence that shows your skin condition was present during the first year after your last service in Vietnam.", + "displayedName" : "Request 12", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211684, + "trackedItemStatus" : "SUBMITTED_AWAITING_REVIEW", + "uploaded" : true, + "uploadsAllowed" : true, + "vbaDocuments" : [ { + "corporateDocumentId" : 96629, + "documentId" : "{7907981B-4EE5-48D1-B8F1-965A7F1BE7A7}", + "documentSize" : 0, + "documentTypeLabel" : "Other Correspondence", + "originalFileName" : "VAprivacy.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211684, + "uploadDate" : 1478195624000 + } ] + }, { + "description" : "Automated 5103 Notice Response", + "displayedName" : "Request 13", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "trackedItemId" : 211661, + "trackedItemStatus" : "SUBMITTED_AWAITING_REVIEW", + "uploaded" : true, + "uploadsAllowed" : true, + "vbaDocuments" : [ { + "corporateDocumentId" : 96630, + "documentId" : "{A31352BB-B932-4832-97DB-443AAE5D80CF}", + "documentSize" : 0, + "documentTypeLabel" : "VA Form 21-0781a - Statement in Support of Claim for PTSD Secondary to Personal Assault", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211661, + "uploadDate" : 1478196475000 + } ] + }, { + "description" : "Medical evidence from private provider", + "displayedName" : "Request 14", + "dvlpmtTc" : "3RDPRTYRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "11/19/2016", + "thirdPartyName" : "Dr. Jonesy", + "trackedItemId" : 211689, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Medical evidence from private provider", + "displayedName" : "Request 15", + "dvlpmtTc" : "3RDPRTYRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "11/19/2016", + "thirdPartyName" : "Dr. Smithy", + "trackedItemId" : 211688, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Service information from Reserve or Guard Unit", + "displayedName" : "Request 16", + "dvlpmtTc" : "3RDPRTYRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "thirdPartyName" : "101st Airborne Reserve", + "trackedItemId" : 211687, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + }, { + "description" : "Requested radiation exposure documents from the Army.", + "displayedName" : "Request 17", + "dvlpmtTc" : "CLMNTRQST", + "openedDate" : "11/03/2016", + "overdue" : false, + "suspenseDate" : "12/04/2016", + "thirdPartyName" : "Dr. Jonesy, Dr. Smithy, 101st Airborne Reserve", + "trackedItemId" : 211678, + "trackedItemStatus" : "NEEDED", + "uploaded" : false, + "uploadsAllowed" : true + } ], + "contentionList" : [ "Heart disease", " arteriosclerotic (New)", " left arm peripheral neuropathy (New)", " Arterial hypertension (Secondary)", " Neurogenic bladder (Secondary)" ], + "date" : "07/01/2016", + "dbqList" : [ ], + "decisionNotificationSent" : "No", + "developmentLetterSent" : "Yes", + "endProductCode" : "010", + "id" : "600088684", + "jurisdiction" : "National Work Queue", + "mailingAddress" : { + "addressLine1" : "National Work Queue", + "addressLine2" : "810 Vermont Avenue NW", + "addressLine3" : "", + "city" : "Washington", + "state" : "DC", + "zip" : "20420" + }, + "maxEstClaimDate" : "09/16/2017", + "minEstClaimDate" : "04/11/2017", + "newEvidenceReceived" : false, + "pastEstClaimDate" : false, + "pastEvidenceDueDate" : false, + "pastPhaseEstDate" : false, + "poa" : "AMERICAN LEGION", + "programType" : "CPL", + "status" : "PEND", + "statusChanged" : false, + "statusType" : "Compensation", + "tempJurisdiction" : "", + "vbaDocumentList" : [ { + "corporateDocumentId" : 96644, + "documentId" : "{49442097-7D1B-420F-893C-F00B5421DBFD}", + "documentSize" : 0, + "documentTypeLabel" : "Disability Benefits Questionnaire (DBQ)", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "uploadDate" : 1478204405000 + }, { + "corporateDocumentId" : 96633, + "documentId" : "{0D5CB4A0-1E26-4B3B-9F03-81CE010C3FAA}", + "documentSize" : 0, + "documentTypeLabel" : "Military Personnel Record", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211680, + "uploadDate" : 1478196931000 + }, { + "corporateDocumentId" : 96632, + "documentId" : "{FF1D1549-98CE-407D-BA27-71EE5A7E35C2}", + "documentSize" : 0, + "documentTypeLabel" : "VA Form 21-4192 - Request for Employment Information in Connection with Claim for Disability", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211682, + "uploadDate" : 1478196877000 + }, { + "corporateDocumentId" : 96631, + "documentId" : "{6CF4AC54-3484-41FD-BF77-EF989622B789}", + "documentSize" : 0, + "documentTypeLabel" : "VA Form 21-4142a - General Release for Medical Provider Information", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211683, + "uploadDate" : 1478196740000 + }, { + "corporateDocumentId" : 96630, + "documentId" : "{A31352BB-B932-4832-97DB-443AAE5D80CF}", + "documentSize" : 0, + "documentTypeLabel" : "VA Form 21-0781a - Statement in Support of Claim for PTSD Secondary to Personal Assault", + "originalFileName" : "the-view-hotel-monument-valley-united-states_1152_12873632126-tpfil02aw-16797.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211661, + "uploadDate" : 1478196475000 + }, { + "corporateDocumentId" : 96629, + "documentId" : "{7907981B-4EE5-48D1-B8F1-965A7F1BE7A7}", + "documentSize" : 0, + "documentTypeLabel" : "Other Correspondence", + "originalFileName" : "VAprivacy.pdf", + "source" : "eBenefits", + "submitter" : { + "firstName" : "JOHNNIE", + "lastName" : "WEAVER", + "middleName" : "LEONARD", + "personId" : "600043180" + }, + "trackedItemId" : 211684, + "uploadDate" : 1478195624000 + } ], + "waiver5103Submitted" : false +} diff --git a/spec/serializers/disability_claim_detail_serializer_spec.rb b/spec/serializers/disability_claim_detail_serializer_spec.rb index 983ab90beb7..c2eb966b341 100644 --- a/spec/serializers/disability_claim_detail_serializer_spec.rb +++ b/spec/serializers/disability_claim_detail_serializer_spec.rb @@ -44,4 +44,24 @@ expect(attributes['waiver_submitted']).to eq true end end + + context 'with items in vbaDocuments' do + let(:raw_data) do + fixture_file_name = "#{::Rails.root}/spec/fixtures/disability_claim/claim-with-documents.json" + File.open(fixture_file_name, 'rb') do |f| + raw_claim = f.read + JSON.parse raw_claim + end + end + let(:disability_claim) do + FactoryGirl.build(:disability_claim, data: raw_data) + end + let(:other_documents) do + attributes['events_timeline'].select { |obj| obj['type'] == 'other_documents_list' } + end + it 'should only add documents without a tracked_item_id into other_documents_list' do + expect(other_documents.count).to eq 1 + expect(other_documents.select { |obj| !obj['tracked_item_id'].nil? }.count).to eq 0 + end + end end