Class: EVSS::DisabilityCompensationForm::Form8940Document
- Inherits:
-
EVSSDocument
- Object
- EVSSDocument
- EVSS::DisabilityCompensationForm::Form8940Document
- Defined in:
- app/sidekiq/evss/disability_compensation_form/form8940_document.rb
Overview
Document generator for the 8940 form
Constant Summary collapse
- FORM_ID =
form id for PTSD IU
'21-8940'
- DOC_TYPE =
'L149'
Instance Attribute Summary
Attributes inherited from EVSSDocument
Instance Method Summary collapse
-
#initialize(submission) ⇒ Form8940Document
constructor
A new instance of Form8940Document.
- #parse_8940(parsed_form) ⇒ Object private
Methods inherited from EVSSDocument
#create_document_data, #data, #file_body, #generate_stamp_pdf, #get_evss_claim_metadata
Constructor Details
#initialize(submission) ⇒ Form8940Document
Returns a new instance of Form8940Document.
13 14 15 16 17 18 19 |
# File 'app/sidekiq/evss/disability_compensation_form/form8940_document.rb', line 13 def initialize(submission) form_content = parse_8940(submission.form[Form526Submission::FORM_8940]) @pdf_path = generate_stamp_pdf(form_content, submission.submitted_claim_id, FORM_ID) if form_content.present? upload_data = (@pdf_path, DOC_TYPE) @document_data = create_document_data(submission.submitted_claim_id, upload_data, DOC_TYPE) end |
Instance Method Details
#parse_8940(parsed_form) ⇒ Object (private)
23 24 25 26 27 |
# File 'app/sidekiq/evss/disability_compensation_form/form8940_document.rb', line 23 def parse_8940(parsed_form) return '' if parsed_form['unemployability'].empty? parsed_form.deep_dup end |