Skip to content

Commit

Permalink
When establishing a board grant or remand claim, set the status to "R…
Browse files Browse the repository at this point in the history
…FD" (#248)

* checks for RFD

* set status_type_code

* disabled Metrics/AbcSize
  • Loading branch information
Sjones352 authored Feb 5, 2020
1 parent 9e5128f commit 6cc4243
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/vbms/requests/establish_claim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def endpoint_url(base_url)

# More information on what the fields mean, see:
# https://github.com/department-of-veterans-affairs/dsva-vbms/issues/66#issuecomment-266098034
# rubocop:disable Metrics/AbcSize
def soap_doc
# Gender should only be included if it is differentiated
differentiated_gender = @veteran_record[:sex] ? { "gender" => @veteran_record[:sex] } : {}
Expand Down Expand Up @@ -70,7 +71,7 @@ def soap_doc

xml["cla"].claimToEstablish({
"benefitTypeCd" => @claim[:benefit_type_code], # C&P Live = '1', C&P Death = '2'
"claimLevelStatusCd" => "PEND",
"claimLevelStatusCd" => @claim[:status_type_code].present? ? @claim[:status_type_code] : "PEND",
"payeeCd" => @claim[:payee_code],
"label" => @claim[:end_product_label],
"modifiedEndProductCd" => @claim[:end_product_modifier],
Expand All @@ -94,6 +95,7 @@ def soap_doc
end
end
end
# rubocop:enable Metrics/AbcSize

def signed_elements
[["/soapenv:Envelope/soapenv:Body",
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/requests/establish_claim.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<env:Header>
</env:Header>
<S:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="id-462">
<establishClaimResponse xmlns="http://vbms.vba.va.gov/external/ClaimService/v4" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://vbms.vba.va.gov/cdm/claim/v4" xmlns:ns1="http://vbms.vba.va.gov/cdm/common/v4" xmlns:ns2="http://vbms.vba.va.gov/cdm/participant/v4"><establishedClaim benefitTypeCd="CPL" claimLevelStatusCd="PEND" currentStationOfJurisdiction="317" gulfWarRegistry="false" id="600091508" label="AMC-Cert to BVA" modifiedEndProductCd="071" participantPersonId="600113642" payeeCd="00" preDischarge="false" priority="unknown" sectionUnit="123725" stationOfJurisdiction="499" suspenseReasonCd="062" veteranPersonId="600113642"><ns0:endProductClaimType code="070CERT2AMC" name="AMC-Cert to BVA"/><ns0:claimDateDt>2016-12-10-05:00</ns0:claimDateDt><ns0:suspenseDate>2017-01-09-05:00</ns0:suspenseDate><ns0:suppressAckLetter>false</ns0:suppressAckLetter><ns0:futureReason>Pending Initial Development - Std 5103 Notice Not Required</ns0:futureReason></establishedClaim></establishClaimResponse>
<establishClaimResponse xmlns="http://vbms.vba.va.gov/external/ClaimService/v4" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://vbms.vba.va.gov/cdm/claim/v4" xmlns:ns1="http://vbms.vba.va.gov/cdm/common/v4" xmlns:ns2="http://vbms.vba.va.gov/cdm/participant/v4"><establishedClaim benefitTypeCd="CPL" claimLevelStatusCd="RFD" currentStationOfJurisdiction="317" gulfWarRegistry="false" id="600091508" label="AMC-Cert to BVA" modifiedEndProductCd="071" participantPersonId="600113642" payeeCd="00" preDischarge="false" priority="unknown" sectionUnit="123725" stationOfJurisdiction="499" suspenseReasonCd="062" veteranPersonId="600113642"><ns0:endProductClaimType code="070CERT2AMC" name="AMC-Cert to BVA"/><ns0:claimDateDt>2016-12-10-05:00</ns0:claimDateDt><ns0:suspenseDate>2017-01-09-05:00</ns0:suspenseDate><ns0:suppressAckLetter>false</ns0:suppressAckLetter><ns0:futureReason>Pending Initial Development - Std 5103 Notice Not Required</ns0:futureReason></establishedClaim></establishClaimResponse>
</S:Body>
</S:Envelope>
2 changes: 1 addition & 1 deletion spec/fixtures/requests/establish_claim_v5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<env:Header>
</env:Header>
<S:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="id-462">
<establishClaimResponse xmlns="http://vbms.vba.va.gov/external/ClaimService/v5" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://vbms.vba.va.gov/cdm/claim/v5" xmlns:ns1="http://vbms.vba.va.gov/cdm/common/v5" xmlns:ns2="http://vbms.vba.va.gov/cdm/participant/v5"><establishedClaim benefitTypeCd="CPL" claimLevelStatusCd="PEND" currentStationOfJurisdiction="317" gulfWarRegistry="false" id="600091508" label="AMC-Cert to BVA" modifiedEndProductCd="071" participantPersonId="600113642" payeeCd="00" preDischarge="false" priority="unknown" sectionUnit="123725" stationOfJurisdiction="499" suspenseReasonCd="062" veteranPersonId="600113642" limitedPoaAccess="true" limitedPoaCode="007"><ns0:endProductClaimType code="070CERT2AMC" name="AMC-Cert to BVA"/><ns0:claimDateDt>2016-12-10-05:00</ns0:claimDateDt><ns0:suspenseDate>2017-01-09-05:00</ns0:suspenseDate><ns0:suppressAckLetter>false</ns0:suppressAckLetter><ns0:futureReason>Pending Initial Development - Std 5103 Notice Not Required</ns0:futureReason></establishedClaim></establishClaimResponse>
<establishClaimResponse xmlns="http://vbms.vba.va.gov/external/ClaimService/v5" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://vbms.vba.va.gov/cdm/claim/v5" xmlns:ns1="http://vbms.vba.va.gov/cdm/common/v5" xmlns:ns2="http://vbms.vba.va.gov/cdm/participant/v5"><establishedClaim benefitTypeCd="CPL" claimLevelStatusCd="RFD" currentStationOfJurisdiction="317" gulfWarRegistry="false" id="600091508" label="AMC-Cert to BVA" modifiedEndProductCd="071" participantPersonId="600113642" payeeCd="00" preDischarge="false" priority="unknown" sectionUnit="123725" stationOfJurisdiction="499" suspenseReasonCd="062" veteranPersonId="600113642" limitedPoaAccess="true" limitedPoaCode="007"><ns0:endProductClaimType code="070CERT2AMC" name="AMC-Cert to BVA"/><ns0:claimDateDt>2016-12-10-05:00</ns0:claimDateDt><ns0:suspenseDate>2017-01-09-05:00</ns0:suspenseDate><ns0:suppressAckLetter>false</ns0:suppressAckLetter><ns0:futureReason>Pending Initial Development - Std 5103 Notice Not Required</ns0:futureReason></establishedClaim></establishClaimResponse>
</S:Body>
</S:Envelope>
3 changes: 2 additions & 1 deletion spec/requests/establish_claim_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
date: 20.days.ago.to_date,
suppress_acknowledgment_letter: false,
limited_poa_code: "007",
limited_poa_access: true
limited_poa_access: true,
status_type_code: "RFD"
}
end

Expand Down

0 comments on commit 6cc4243

Please sign in to comment.