Class: Mindee::Product::US::HealthcareCard::HealthcareCardV1Document
- Inherits:
-
Mindee::Parsing::Common::Prediction
- Object
- Mindee::Parsing::Common::Prediction
- Mindee::Product::US::HealthcareCard::HealthcareCardV1Document
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb
Overview
Healthcare Card API version 1.1 document data.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#company_name ⇒ Mindee::Parsing::Standard::StringField
readonly
The name of the company that provides the healthcare plan.
-
#copays ⇒ Mindee::Product::US::HealthcareCard::HealthcareCardV1Copays
readonly
Is a fixed amount for a covered service.
-
#dependents ⇒ Array<Mindee::Parsing::Standard::StringField>
readonly
The list of dependents covered by the healthcare plan.
-
#enrollment_date ⇒ Mindee::Parsing::Standard::DateField
readonly
The date when the member enrolled in the healthcare plan.
-
#group_number ⇒ Mindee::Parsing::Standard::StringField
readonly
The group number associated with the healthcare plan.
-
#issuer80840 ⇒ Mindee::Parsing::Standard::StringField
readonly
The organization that issued the healthcare plan.
-
#member_id ⇒ Mindee::Parsing::Standard::StringField
readonly
The unique identifier for the member in the healthcare system.
-
#member_name ⇒ Mindee::Parsing::Standard::StringField
readonly
The name of the member covered by the healthcare plan.
-
#payer_id ⇒ Mindee::Parsing::Standard::StringField
readonly
The unique identifier for the payer in the healthcare system.
-
#rx_bin ⇒ Mindee::Parsing::Standard::StringField
readonly
The BIN number for prescription drug coverage.
-
#rx_grp ⇒ Mindee::Parsing::Standard::StringField
readonly
The group number for prescription drug coverage.
-
#rx_pcn ⇒ Mindee::Parsing::Standard::StringField
readonly
The PCN number for prescription drug coverage.
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ HealthcareCardV1Document
constructor
A new instance of HealthcareCardV1Document.
- #to_s ⇒ String
Constructor Details
#initialize(prediction, page_id) ⇒ HealthcareCardV1Document
Returns a new instance of HealthcareCardV1Document.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 52 def initialize(prediction, page_id) super @company_name = Parsing::Standard::StringField.new( prediction['company_name'], page_id ) @copays = Product::US::HealthcareCard::HealthcareCardV1Copays.new(prediction['copays'], page_id) @dependents = [] # : Array[Parsing::Standard::StringField] prediction['dependents'].each do |item| @dependents.push(Parsing::Standard::StringField.new(item, page_id)) end @enrollment_date = Parsing::Standard::DateField.new( prediction['enrollment_date'], page_id ) @group_number = Parsing::Standard::StringField.new( prediction['group_number'], page_id ) @issuer80840 = Parsing::Standard::StringField.new( prediction['issuer_80840'], page_id ) @member_id = Parsing::Standard::StringField.new( prediction['member_id'], page_id ) @member_name = Parsing::Standard::StringField.new( prediction['member_name'], page_id ) @payer_id = Parsing::Standard::StringField.new( prediction['payer_id'], page_id ) @rx_bin = Parsing::Standard::StringField.new( prediction['rx_bin'], page_id ) @rx_grp = Parsing::Standard::StringField.new( prediction['rx_grp'], page_id ) @rx_pcn = Parsing::Standard::StringField.new( prediction['rx_pcn'], page_id ) end |
Instance Attribute Details
#company_name ⇒ Mindee::Parsing::Standard::StringField (readonly)
The name of the company that provides the healthcare plan.
15 16 17 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 15 def company_name @company_name end |
#copays ⇒ Mindee::Product::US::HealthcareCard::HealthcareCardV1Copays (readonly)
Is a fixed amount for a covered service.
18 19 20 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 18 def copays @copays end |
#dependents ⇒ Array<Mindee::Parsing::Standard::StringField> (readonly)
The list of dependents covered by the healthcare plan.
21 22 23 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 21 def dependents @dependents end |
#enrollment_date ⇒ Mindee::Parsing::Standard::DateField (readonly)
The date when the member enrolled in the healthcare plan.
24 25 26 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 24 def enrollment_date @enrollment_date end |
#group_number ⇒ Mindee::Parsing::Standard::StringField (readonly)
The group number associated with the healthcare plan.
27 28 29 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 27 def group_number @group_number end |
#issuer80840 ⇒ Mindee::Parsing::Standard::StringField (readonly)
The organization that issued the healthcare plan.
30 31 32 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 30 def issuer80840 @issuer80840 end |
#member_id ⇒ Mindee::Parsing::Standard::StringField (readonly)
The unique identifier for the member in the healthcare system.
33 34 35 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 33 def member_id @member_id end |
#member_name ⇒ Mindee::Parsing::Standard::StringField (readonly)
The name of the member covered by the healthcare plan.
36 37 38 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 36 def member_name @member_name end |
#payer_id ⇒ Mindee::Parsing::Standard::StringField (readonly)
The unique identifier for the payer in the healthcare system.
39 40 41 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 39 def payer_id @payer_id end |
#rx_bin ⇒ Mindee::Parsing::Standard::StringField (readonly)
The BIN number for prescription drug coverage.
42 43 44 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 42 def rx_bin @rx_bin end |
#rx_grp ⇒ Mindee::Parsing::Standard::StringField (readonly)
The group number for prescription drug coverage.
45 46 47 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 45 def rx_grp @rx_grp end |
#rx_pcn ⇒ Mindee::Parsing::Standard::StringField (readonly)
The PCN number for prescription drug coverage.
48 49 50 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 48 def rx_pcn @rx_pcn end |
Instance Method Details
#to_s ⇒ String
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb', line 102 def to_s dependents = @dependents.join("\n #{' ' * 12}") copays = copays_to_s out_str = String.new out_str << "\n:Company Name: #{@company_name}".rstrip out_str << "\n:Member Name: #{@member_name}".rstrip out_str << "\n:Member ID: #{@member_id}".rstrip out_str << "\n:Issuer 80840: #{@issuer80840}".rstrip out_str << "\n:Dependents: #{dependents}".rstrip out_str << "\n:Group Number: #{@group_number}".rstrip out_str << "\n:Payer ID: #{@payer_id}".rstrip out_str << "\n:RX BIN: #{@rx_bin}".rstrip out_str << "\n:RX GRP: #{@rx_grp}".rstrip out_str << "\n:RX PCN: #{@rx_pcn}".rstrip out_str << "\n:copays:" out_str << copays out_str << "\n:Enrollment Date: #{@enrollment_date}".rstrip out_str[1..].to_s end |