eligible 2.3 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/test/test_helper.rb CHANGED
@@ -12,9 +12,12 @@ module Eligible
12
12
  get_params = (opts[:headers] || {})[:params]
13
13
  post_params = opts[:payload]
14
14
  case opts[:method]
15
- when :get then @mock_rest_client.get opts[:url], get_params, post_params
16
- when :post then @mock_rest_client.post opts[:url], get_params, post_params
17
- when :delete then @mock_rest_client.delete opts[:url], get_params, post_params
15
+ when :get then
16
+ @mock_rest_client.get opts[:url], get_params, post_params
17
+ when :post then
18
+ @mock_rest_client.post opts[:url], get_params, post_params
19
+ when :delete then
20
+ @mock_rest_client.delete opts[:url], get_params, post_params
18
21
  end
19
22
  end
20
23
  end
@@ -25,63 +28,70 @@ def test_response(body, code=200)
25
28
  body = MultiJson.dump(body) if !(body.kind_of? String)
26
29
  m = mock
27
30
  m.instance_variable_set('@eligible_values', { :body => body, :code => code })
28
- def m.body; @eligible_values[:body]; end
29
- def m.code; @eligible_values[:code]; end
31
+
32
+ def m.body
33
+ @eligible_values[:body]
34
+ end
35
+
36
+ def m.code
37
+ @eligible_values[:code]
38
+ end
39
+
30
40
  m
31
- end
41
+ end
32
42
 
33
43
  def test_invalid_api_key_error
34
- { "error" => [ { "message" => "Could not authenticate you. Please re-try with a valid API key.", "code" => 1 }] }
44
+ { "error" => [{ "message" => "Could not authenticate you. Please re-try with a valid API key.", "code" => 1 }] }
35
45
  end
36
46
 
37
47
  def test_plan_missing_params
38
- {"timestamp"=>"2013-02-01T13:25:58", "eligible_id"=>"A4F4E1D6-7DC3-4B20-87CE-B59F48811290", "mapping_version"=>"plan/all$Revision:6$$Date:13-01-110:18$", "error"=>{"response_code"=>"Y", "response_description"=>"Yes", "agency_qualifier_code"=>"", "agency_qualifier_description"=>"", "reject_reason_code"=>"41", "reject_reason_description"=>"Authorization/AccessRestrictions", "follow-up_action_code"=>"C", "follow-up_action_description"=>"PleaseCorrectandResubmit"}}
48
+ { "timestamp" => "2013-02-01T13:25:58", "eligible_id" => "A4F4E1D6-7DC3-4B20-87CE-B59F48811290", "mapping_version" => "plan/all$Revision:6$$Date:13-01-110:18$", "error" => { "response_code" => "Y", "response_description" => "Yes", "agency_qualifier_code" => "", "agency_qualifier_description" => "", "reject_reason_code" => "41", "reject_reason_description" => "Authorization/AccessRestrictions", "follow-up_action_code" => "C", "follow-up_action_description" => "PleaseCorrectandResubmit" } }
39
49
  end
40
50
 
41
51
  def test_plan
42
- {"timestamp"=>"2013-01-14T20:39:57", "eligible_id"=>"B97BC91A-3E84-40A9-AA5C-D416CAE5CDB1", "mapping_version"=>"plan/all$Revision:6$$Date:13-01-110:18$", "primary_insurance"=>{"name"=>"Aetna", "id"=>"00002", "group_name"=>"TOWERGROUPCOMPANIES", "plan_begins"=>"2010-01-01", "plan_ends"=>"", "comments"=>["AetnaChoicePOSII"]}, "type"=>"30", "coverage_status"=>"1", "precertification_needed"=>"", "exclusions"=>"", "deductible_in_network"=>{"individual"=>{"base_period"=>"500", "remaining"=>"500", "comments"=>["MedDent", "MedDent"]}, "family"=>{"base_period"=>"1000", "remaining"=>"1000", "comments"=>["MedDent", "MedDent"]}}, "deductible_out_network"=>{"individual"=>{"base_period"=>"1250", "remaining"=>"1250", "comments"=>["MedDent", "MedDent"]}, "family"=>{"base_period"=>"3750", "remaining"=>"3750", "comments"=>["MedDent", "MedDent"]}}, "stop_loss_in_network"=>{"individual"=>{"base_period"=>"", "remaining"=>"2000", "comments"=>[]}, "family"=>{"base_period"=>"", "remaining"=>"4000", "comments"=>[]}}, "stop_loss_out_network"=>{"individual"=>{"base_period"=>"", "remaining"=>"3000", "comments"=>[]}, "family"=>{"base_period"=>"", "remaining"=>"6000", "comments"=>[]}}, "balance"=>"", "comments"=>[], "additional_insurance"=>{"comments"=>[]}}
52
+ { "timestamp" => "2013-01-14T20:39:57", "eligible_id" => "B97BC91A-3E84-40A9-AA5C-D416CAE5CDB1", "mapping_version" => "plan/all$Revision:6$$Date:13-01-110:18$", "primary_insurance" => { "name" => "Aetna", "id" => "00002", "group_name" => "TOWERGROUPCOMPANIES", "plan_begins" => "2010-01-01", "plan_ends" => "", "comments" => ["AetnaChoicePOSII"] }, "type" => "30", "coverage_status" => "1", "precertification_needed" => "", "exclusions" => "", "deductible_in_network" => { "individual" => { "base_period" => "500", "remaining" => "500", "comments" => ["MedDent", "MedDent"] }, "family" => { "base_period" => "1000", "remaining" => "1000", "comments" => ["MedDent", "MedDent"] } }, "deductible_out_network" => { "individual" => { "base_period" => "1250", "remaining" => "1250", "comments" => ["MedDent", "MedDent"] }, "family" => { "base_period" => "3750", "remaining" => "3750", "comments" => ["MedDent", "MedDent"] } }, "stop_loss_in_network" => { "individual" => { "base_period" => "", "remaining" => "2000", "comments" => [] }, "family" => { "base_period" => "", "remaining" => "4000", "comments" => [] } }, "stop_loss_out_network" => { "individual" => { "base_period" => "", "remaining" => "3000", "comments" => [] }, "family" => { "base_period" => "", "remaining" => "6000", "comments" => [] } }, "balance" => "", "comments" => [], "additional_insurance" => { "comments" => [] } }
43
53
  end
44
54
 
45
55
  def test_service_missing_params
46
- {"timestamp"=>"2013-02-04T17:23:12", "eligible_id"=>"7EEA40A7-58C5-4EBC-A450-10C37CA2D252", "mapping_version"=>"service/all$Revision:4$$Date:12-12-280:13$", "error"=>{"response_code"=>"Y", "response_description"=>"Yes", "agency_qualifier_code"=>"", "agency_qualifier_description"=>"", "reject_reason_code"=>"41", "reject_reason_description"=>"Authorization/AccessRestrictions", "follow-up_action_code"=>"C", "follow-up_action_description"=>"PleaseCorrectandResubmit"}}
56
+ { "timestamp" => "2013-02-04T17:23:12", "eligible_id" => "7EEA40A7-58C5-4EBC-A450-10C37CA2D252", "mapping_version" => "service/all$Revision:4$$Date:12-12-280:13$", "error" => { "response_code" => "Y", "response_description" => "Yes", "agency_qualifier_code" => "", "agency_qualifier_description" => "", "reject_reason_code" => "41", "reject_reason_description" => "Authorization/AccessRestrictions", "follow-up_action_code" => "C", "follow-up_action_description" => "PleaseCorrectandResubmit" } }
47
57
  end
48
58
 
49
59
  def test_service
50
- {"timestamp"=>"2013-02-01T15:28:16", "eligible_id"=>"FD8994B1-F977-459A-81AC-D182EA8FE66D", "mapping_version"=>"service/all$Revision:4$$Date:12-12-280:13$", "type"=>"33", "coverage_status"=>"1", "service_begins"=>"", "service_ends"=>"", "not_covered"=>[], "comments"=>["AetnaChoicePOSII"], "precertification_needed"=>"", "visits_in_network"=>{"individual"=>{"total"=>"", "remaining"=>"", "comments"=>[]}, "family"=>{"total"=>"", "remaining"=>"", "comments"=>[]}}, "visits_out_network"=>{"individual"=>{"total"=>"", "remaining"=>"", "comments"=>[]}, "family"=>{"total"=>"", "remaining"=>"", "comments"=>[]}}, "copayment_in_network"=>{"individual"=>{"amount"=>"", "comments"=>[]}, "family"=>{"amount"=>"35", "comments"=>["OFFCHIROVISI", "COPAYNOTINCLUDEDINOOP", "MANPULATNCHRO"]}}, "copayment_out_network"=>{"individual"=>{"amount"=>"", "comments"=>[]}, "family"=>{"amount"=>"0", "comments"=>["MANPULATNCHRO"]}}, "coinsurance_in_network"=>{"individual"=>{"percent"=>"", "comments"=>[]}, "family"=>{"percent"=>"0", "comments"=>["OFFCHIROVISI", "MANPULATNCHRO"]}}, "coinsurance_out_network"=>{"individual"=>{"percent"=>"", "comments"=>[]}, "family"=>{"percent"=>"30", "comments"=>["CHIROVSTEVAL", "COINSAPPLIESTOOUTOFPOCKET", "MANPULATNCHRO"]}}, "deductible_in_network"=>{"individual"=>{"base_period"=>"", "remaining"=>"", "comments"=>[]}, "family"=>{"base_period"=>"", "remaining"=>"", "comments"=>[]}}, "deductible_out_network"=>{"individual"=>{"base_period"=>"", "remaining"=>"", "comments"=>[]}, "family"=>{"base_period"=>"", "remaining"=>"", "comments"=>[]}}, "additional_insurance"=>{"comments"=>[]}}
60
+ { "timestamp" => "2013-02-01T15:28:16", "eligible_id" => "FD8994B1-F977-459A-81AC-D182EA8FE66D", "mapping_version" => "service/all$Revision:4$$Date:12-12-280:13$", "type" => "33", "coverage_status" => "1", "service_begins" => "", "service_ends" => "", "not_covered" => [], "comments" => ["AetnaChoicePOSII"], "precertification_needed" => "", "visits_in_network" => { "individual" => { "total" => "", "remaining" => "", "comments" => [] }, "family" => { "total" => "", "remaining" => "", "comments" => [] } }, "visits_out_network" => { "individual" => { "total" => "", "remaining" => "", "comments" => [] }, "family" => { "total" => "", "remaining" => "", "comments" => [] } }, "copayment_in_network" => { "individual" => { "amount" => "", "comments" => [] }, "family" => { "amount" => "35", "comments" => ["OFFCHIROVISI", "COPAYNOTINCLUDEDINOOP", "MANPULATNCHRO"] } }, "copayment_out_network" => { "individual" => { "amount" => "", "comments" => [] }, "family" => { "amount" => "0", "comments" => ["MANPULATNCHRO"] } }, "coinsurance_in_network" => { "individual" => { "percent" => "", "comments" => [] }, "family" => { "percent" => "0", "comments" => ["OFFCHIROVISI", "MANPULATNCHRO"] } }, "coinsurance_out_network" => { "individual" => { "percent" => "", "comments" => [] }, "family" => { "percent" => "30", "comments" => ["CHIROVSTEVAL", "COINSAPPLIESTOOUTOFPOCKET", "MANPULATNCHRO"] } }, "deductible_in_network" => { "individual" => { "base_period" => "", "remaining" => "", "comments" => [] }, "family" => { "base_period" => "", "remaining" => "", "comments" => [] } }, "deductible_out_network" => { "individual" => { "base_period" => "", "remaining" => "", "comments" => [] }, "family" => { "base_period" => "", "remaining" => "", "comments" => [] } }, "additional_insurance" => { "comments" => [] } }
51
61
  end
52
62
 
53
63
  def test_demographic_missing_params
54
- {"timestamp"=>"2013-02-05T13:21:38", "eligible_id"=>"AE9F5EB3-B4BF-4B2E-92C5-6307CE91DB81", "mapping_version"=>"demographic/dob$Revision:1$$Date:12-12-2619:01$", "error"=>{"response_code"=>"Y", "response_description"=>"Yes", "agency_qualifier_code"=>"", "agency_qualifier_description"=>"", "reject_reason_code"=>"41", "reject_reason_description"=>"Authorization/AccessRestrictions", "follow-up_action_code"=>"C", "follow-up_action_description"=>"PleaseCorrectandResubmit"}}
64
+ { "timestamp" => "2013-02-05T13:21:38", "eligible_id" => "AE9F5EB3-B4BF-4B2E-92C5-6307CE91DB81", "mapping_version" => "demographic/dob$Revision:1$$Date:12-12-2619:01$", "error" => { "response_code" => "Y", "response_description" => "Yes", "agency_qualifier_code" => "", "agency_qualifier_description" => "", "reject_reason_code" => "41", "reject_reason_description" => "Authorization/AccessRestrictions", "follow-up_action_code" => "C", "follow-up_action_description" => "PleaseCorrectandResubmit" } }
55
65
  end
56
66
 
57
67
  def test_demographic
58
- {"timestamp"=>"2013-02-05T13:14:36", "eligible_id"=>"DCE2FFB3-179A-4825-ADA6-B8108FB5FB90", "mapping_version"=>"demographic/all$Revision:4$$Date:12-12-2622:25$", "last_name"=>"AUSTEN", "first_name"=>"JANE", "member_id"=>"R112114321", "group_id"=>"060801203300001", "group_name"=>"TOWERGROUPCOMPANIES", "dob"=>"1955-12-14", "gender"=>"M", "address"=>{"street_line_1"=>"123SOUTH7THSTREET", "street_line_2"=>"", "city"=>"CHICAGO", "state"=>"CA", "zip"=>"89701"}}
68
+ { "timestamp" => "2013-02-05T13:14:36", "eligible_id" => "DCE2FFB3-179A-4825-ADA6-B8108FB5FB90", "mapping_version" => "demographic/all$Revision:4$$Date:12-12-2622:25$", "last_name" => "AUSTEN", "first_name" => "JANE", "member_id" => "R112114321", "group_id" => "060801203300001", "group_name" => "TOWERGROUPCOMPANIES", "dob" => "1955-12-14", "gender" => "M", "address" => { "street_line_1" => "123SOUTH7THSTREET", "street_line_2" => "", "city" => "CHICAGO", "state" => "CA", "zip" => "89701" } }
59
69
  end
60
70
 
61
71
  def test_claim_missing_params
62
- {"success"=>"false", "created_at"=>"2013-06-03T23:53:39Z", "error"=>{"type"=>"scrub", "message"=>"you forgot to include gender"}}
72
+ { "success" => "false", "created_at" => "2013-06-03T23:53:39Z", "error" => { "type" => "scrub", "message" => "you forgot to include gender" } }
63
73
  end
64
74
 
65
75
  def test_post_claim
66
- {"timestamp"=>"2012-12-30T22:41:10", "eligible_id"=>"DCE2FFB3-179A-4825-ADA6-B8108FB5FB90", "mapping_version"=>"claim/status$Revision:1$$Date:12-12-3022:10$", "referenced_transaction_trace_number"=>"970779644", "claim_status_category_code"=>"F0", "claim_status_category_description"=>"Finalized-Theclaim/encounterhascompletedtheadjudicationcycleandnomoreactionwillbetaken.", "claim_status_code"=>"1", "claim_status_description"=>"Formoredetailedinformation,seeremittanceadvice.", "status_information_effective_date"=>"2007-03-13", "total_claim_charge_amount"=>"172", "claim_payment_amount"=>"126.9", "adjudication_finalized_date"=>"2007-03-18", "remittance_date"=>"2007-03-19", "remittance_trace_number"=>"458787", "payer_claim_control_number"=>"4121476181852", "claim_service_begin_date"=>"2007-02-23", "claim_service_end_date"=>"2007-02-28"}
76
+ { "timestamp" => "2012-12-30T22:41:10", "eligible_id" => "DCE2FFB3-179A-4825-ADA6-B8108FB5FB90", "mapping_version" => "claim/status$Revision:1$$Date:12-12-3022:10$", "referenced_transaction_trace_number" => "970779644", "claim_status_category_code" => "F0", "claim_status_category_description" => "Finalized-Theclaim/encounterhascompletedtheadjudicationcycleandnomoreactionwillbetaken.", "claim_status_code" => "1", "claim_status_description" => "Formoredetailedinformation,seeremittanceadvice.", "status_information_effective_date" => "2007-03-13", "total_claim_charge_amount" => "172", "claim_payment_amount" => "126.9", "adjudication_finalized_date" => "2007-03-18", "remittance_date" => "2007-03-19", "remittance_trace_number" => "458787", "payer_claim_control_number" => "4121476181852", "claim_service_begin_date" => "2007-02-23", "claim_service_end_date" => "2007-02-28" }
67
77
  end
68
78
 
69
79
  def test_coverage_missing_params
70
- {"created_at"=>"2013-06-11T12:21:47Z", "eligible_id"=>"57c320d8-2e14-68ed-73d0-41c3b23c0f43", "error"=>{"response_code"=>"Y", "response_description"=>"Yes", "agency_qualifier_code"=>"", "agency_qualifier_description"=>"", "reject_reason_code"=>"41", "reject_reason_description"=>"Authorization/Access Restrictions", "follow-up_action_code"=>"C", "follow-up_action_description"=>"Please Correct and Resubmit", "details"=>""}}
80
+ { "created_at" => "2013-06-11T12:21:47Z", "eligible_id" => "57c320d8-2e14-68ed-73d0-41c3b23c0f43", "error" => { "response_code" => "Y", "response_description" => "Yes", "agency_qualifier_code" => "", "agency_qualifier_description" => "", "reject_reason_code" => "41", "reject_reason_description" => "Authorization/Access Restrictions", "follow-up_action_code" => "C", "follow-up_action_description" => "Please Correct and Resubmit", "details" => "" } }
71
81
  end
72
82
 
73
83
  def test_coverage
74
- {"created_at"=>"2013-05-09T22:42:40Z", "eligible_id"=>"3233a9a1-a286-2896-ba3d-9f171303428b", "demographics"=>{"subscriber"=>{"last_name"=>"FRANKLIN", "first_name"=>"BENJAMIN", "member_id"=>"TYA445554301", "group_id"=>"3207524", "group_name"=>"FOUNDING FATHERS", "dob"=>"1701-10-17", "gender"=>"M", "address"=>{"street_line_1"=>"2 FRANKLIN STREET", "street_line_2"=>"", "city"=>"SAN FRANCISCO", "state"=>"CA", "zip"=>"94102"}}, "dependent"=>{"last_name"=>"FRANKLIN", "first_name"=>"IDA", "member_id"=>"ZZZ445554301", "group_id"=>"3207524", "group_name"=>"FOUNDING FATHERS", "dob"=>"1701-12-12", "gender"=>"F", "address"=>{"street_line_1"=>"2 FRANKLIN STREET", "street_line_2"=>"", "city"=>"SAN FRANCISCO", "state"=>"CA", "zip"=>"94102"}}}, "primary_insurance"=>{"name"=>"CIGNA", "id"=>"00001", "contacts"=>[{"contact_type"=>"url", "contact_value"=>"cignaforhcp.cigna.com"}], "service_providers"=>{"physicians"=>[{"insurance_type"=>"HN", "insurance_type_label"=>"Health Maintenance Organization (HMO)", "primary_care"=>"true", "restricted"=>"TRUE", "contact_details"=>[{"last_name"=>"JEFFERSON", "first_name"=>"THOMAS", "indentification_type"=>"Centers for Medicare and Medicaid Services National Provider Identifier", "identification_code"=>"2222222222", "contacts"=>[], "address"=>{"street_line_1"=>"PO BOX 2222222", "street_line_2"=>"", "city"=>"SAN FRANCISCO", "state"=>"CA", "zip"=>"94105"}}], "dates"=>[{"date_type"=>"eligibility", "date_value"=>"2010-01-01"}], "comments"=>["HRA BALANCE"]}]}}, "plan"=>{"type"=>"30", "coverage_status"=>"1", "coverage_status_label"=>"ACTIVE COVERAGE", "coverage_basis"=>[], "plan_number"=>"43", "plan_name"=>"TRADITIONAL BLUE PPO 813 $15/ $15 COPAY", "group_name"=>"FOUNDING FATHERS", "dates"=>[{"date_type"=>"plan_begin", "date_value"=>"2010-01-01"}, {"date_type"=>"service", "date_value"=>"2013-05-24"}, {"date_type"=>"eligibility_begin", "date_value"=>"2007-02-01"}], "exclusions"=>{"noncovered"=>[{"type"=>"BZ", "type_label"=>"Physician Visit - Well", "time_period"=>"32", "time_period_label"=>"lifetime", "level"=>"INDIVIDUAL", "network"=>"OUT", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "dates"=>[], "contact_details"=>[], "comments"=>[]}], "pre_exisiting_condition"=>{"waiting_period"=>[]}}, "financials"=>{"deductible"=>{"remainings"=>{"in_network"=>[{"amount"=>"0", "level"=>"FAMILY", "insurance_type"=>"", "insurance_type_label"=>"", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}, {"amount"=>"0", "level"=>"INDIVIDUAL", "insurance_type"=>"", "insurance_type_label"=>"", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}], "out_network"=>[]}, "totals"=>{"in_network"=>[{"amount"=>"0", "time_period"=>"24", "time_period_label"=>"year_to_date", "level"=>"INDIVIDUAL", "insurance_type"=>"", "insurance_type_label"=>"", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}, {"amount"=>"0", "time_period"=>"23", "time_period_label"=>"calendar_year", "level"=>"INDIVIDUAL", "insurance_type"=>"", "insurance_type_label"=>"", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}, {"amount"=>"0", "time_period"=>"24", "time_period_label"=>"year_to_date", "level"=>"FAMILY", "insurance_type"=>"", "insurance_type_label"=>"", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}, {"amount"=>"0", "time_period"=>"23", "time_period_label"=>"calendar_year", "level"=>"FAMILY", "insurance_type"=>"", "insurance_type_label"=>"", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}], "out_network"=>[]}}, "stop_loss"=>{"remainings"=>{"in_network"=>[{"amount"=>"6490", "level"=>"INDIVIDUAL", "insurance_type"=>"HN", "insurance_type_label"=>"Health Maintenance Organization (HMO) - Medicare Risk", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}, {"amount"=>"0", "level"=>"FAMILY", "insurance_type"=>"HN", "insurance_type_label"=>"Health Maintenance Organization (HMO) - Medicare Risk", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}], "out_network"=>[]}, "totals"=>{"in_network"=>[{"amount"=>"210", "time_period"=>"24", "time_period_label"=>"year_to_date", "level"=>"INDIVIDUAL", "insurance_type"=>"HN", "insurance_type_label"=>"Health Maintenance Organization (HMO) - Medicare Risk", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}, {"amount"=>"210", "time_period"=>"24", "time_period_label"=>"year_to_date", "level"=>"FAMILY", "insurance_type"=>"HN", "insurance_type_label"=>"Health Maintenance Organization (HMO) - Medicare Risk", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}, {"amount"=>"0", "time_period"=>"23", "time_period_label"=>"calendar_year", "level"=>"FAMILY", "insurance_type"=>"HN", "insurance_type_label"=>"Health Maintenance Organization (HMO) - Medicare Risk", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}, {"amount"=>"6700", "time_period"=>"23", "time_period_label"=>"calendar_year", "level"=>"INDIVIDUAL", "insurance_type"=>"HN", "insurance_type_label"=>"Health Maintenance Organization (HMO) - Medicare Risk", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[], "comments"=>[]}], "out_network"=>[]}}, "spending_account"=>{"remaining"=>[]}, "coinsurance"=>{"percents"=>{"in_network"=>[], "out_network"=>[]}}, "copayment"=>{"amounts"=>{"in_network"=>[{"amount"=>"20", "time_period"=>"", "time_period_label"=>"", "level"=>"INDIVIDUAL", "insurance_type"=>"", "insurance_type_label"=>"", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "dates"=>[], "contact_details"=>[], "comments"=>[]}], "out_network"=>[{"amount"=>"40", "time_period"=>"", "time_period_label"=>"", "level"=>"INDIVIDUAL", "insurance_type"=>"", "insurance_type_label"=>"", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "dates"=>[], "contact_details"=>[], "comments"=>[]}]}}, "cost_containment"=>{"remainings"=>{"in_network"=>[], "out_network"=>[]}, "totals"=>{"in_network"=>[], "out_network"=>[]}}, "spend_down"=>{"remainings"=>{"in_network"=>[], "out_network"=>[]}, "totals"=>{"in_network"=>[], "out_network"=>[]}}, "limitations"=>{"amounts"=>[]}, "disclaimer"=>[], "other_sources"=>{"amounts"=>[]}}, "benefit_details"=>{"benefit_type_label"=>{"amounts"=>[]}, "managed_care"=>{"amounts"=>[]}, "unlimited"=>{"amounts"=>[]}}, "additional_insurance_policies"=>[{"insurance_type"=>"47", "insurance_type_label"=>"Medicare Secondary, Other Liability Insurance is Primary", "coverage_description"=>"", "reference"=>[{"reference_code"=>"IG", "reference_label"=>"Insurance Policy Number", "reference_number"=>"1232004008"}], "contact_details"=>[{"last_name"=>"CLAIMS MANAGEMENT INC", "first_name"=>"", "indentification_type"=>"", "identification_code"=>"", "contacts"=>[], "address"=>{"street_line_1"=>"PO BOX 2210", "street_line_2"=>"ATTN JANE AUSTEN", "city"=>"SAN FRANCISCO", "state"=>"CA", "zip"=>"941052312"}}], "dates"=>[{"date_type"=>"coordination_of_benefits", "date_value"=>"2005-02-12"}], "comments"=>[]}]}, "services"=>[{"type"=>"96", "type_label"=>"Physician Professional", "coverage_status"=>"11", "coverage_status_label"=>"generic inquiry provided no information for this service type. Retry by including service_type_code=96 for an explicit inquiry for this service type."}, {"type"=>"98", "type_label"=>"Professional Physician Visit - Office", "coverage_status"=>"1", "coverage_status_label"=>"active coverage", "authorization_required"=>"", "noncovered"=>[], "facility"=>{"amounts"=>[{"amount"=>"", "time_period"=>"26", "time_period_label"=>"EPISODE", "level"=>"INDIVIDUAL", "network"=>"Y", "insurance_type"=>"MA", "insurance_type_label"=>"MEDICARE PART A", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "contact_details"=>[], "dates"=>[{"date_type"=>"benefit_begin", "date_value"=>"2013-05-20"}], "comments"=>["Revocation Code - 0"]}]}, "benefit_details"=>{"benefit_type_label"=>{"amounts"=>[]}, "managed_care"=>{"amounts"=>[]}, "unlimited"=>{"amounts"=>[]}}, "financials"=>{"deductible"=>{}, "stop_loss"=>{}, "spending_account"=>{}, "coinsurance"=>{}, "copayment"=>{}, "cost_containment"=>{}, "spend_down"=>{}, "limitations"=>{}, "other_sources"=>{}}, "visits"=>{"amounts"=>{"in_network"=>[{"amount"=>"20", "time_period"=>"", "time_period_label"=>"", "level"=>"INDIVIDUAL", "insurance_type"=>"", "insurance_type_label"=>"", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "dates"=>[], "contact_details"=>[], "comments"=>[]}], "out_network"=>[{"amount"=>"40", "time_period"=>"", "time_period_label"=>"", "level"=>"INDIVIDUAL", "insurance_type"=>"", "insurance_type_label"=>"", "pos"=>"", "pos_label"=>"", "authorization_required"=>"", "dates"=>[], "contact_details"=>[], "comments"=>[]}]}}, "additional_insurance_policies"=>[{"insurance_type"=>"47", "insurance_type_label"=>"Medicare Secondary, Other Liability Insurance is Primary", "coverage_description"=>"", "reference"=>[{"reference_code"=>"IG", "reference_label"=>"Insurance Policy Number", "reference_number"=>"1232004008"}], "contact_details"=>[{"last_name"=>"CLAIMS MANAGEMENT INC", "first_name"=>"", "indentification_type"=>"", "identification_code"=>"", "contacts"=>[], "address"=>{"street_line_1"=>"PO BOX 2210", "street_line_2"=>"ATTN JANE AUSTEN", "city"=>"SAN FRANCISCO", "state"=>"CA", "zip"=>"941052312"}}], "dates"=>[{"date_type"=>"coordination_of_benefits", "date_value"=>"2005-02-12"}], "comments"=>[]}]}]}
84
+ { "created_at" => "2013-05-09T22:42:40Z", "eligible_id" => "3233a9a1-a286-2896-ba3d-9f171303428b", "demographics" => { "subscriber" => { "last_name" => "FRANKLIN", "first_name" => "BENJAMIN", "member_id" => "TYA445554301", "group_id" => "3207524", "group_name" => "FOUNDING FATHERS", "dob" => "1701-10-17", "gender" => "M", "address" => { "street_line_1" => "2 FRANKLIN STREET", "street_line_2" => "", "city" => "SAN FRANCISCO", "state" => "CA", "zip" => "94102" } }, "dependent" => { "last_name" => "FRANKLIN", "first_name" => "IDA", "member_id" => "ZZZ445554301", "group_id" => "3207524", "group_name" => "FOUNDING FATHERS", "dob" => "1701-12-12", "gender" => "F", "address" => { "street_line_1" => "2 FRANKLIN STREET", "street_line_2" => "", "city" => "SAN FRANCISCO", "state" => "CA", "zip" => "94102" } } }, "primary_insurance" => { "name" => "CIGNA", "id" => "00001", "contacts" => [{ "contact_type" => "url", "contact_value" => "cignaforhcp.cigna.com" }], "service_providers" => { "physicians" => [{ "insurance_type" => "HN", "insurance_type_label" => "Health Maintenance Organization (HMO)", "primary_care" => "true", "restricted" => "TRUE", "contact_details" => [{ "last_name" => "JEFFERSON", "first_name" => "THOMAS", "indentification_type" => "Centers for Medicare and Medicaid Services National Provider Identifier", "identification_code" => "2222222222", "contacts" => [], "address" => { "street_line_1" => "PO BOX 2222222", "street_line_2" => "", "city" => "SAN FRANCISCO", "state" => "CA", "zip" => "94105" } }], "dates" => [{ "date_type" => "eligibility", "date_value" => "2010-01-01" }], "comments" => ["HRA BALANCE"] }] } }, "plan" => { "type" => "30", "coverage_status" => "1", "coverage_status_label" => "ACTIVE COVERAGE", "coverage_basis" => [], "plan_number" => "43", "plan_name" => "TRADITIONAL BLUE PPO 813 $15/ $15 COPAY", "group_name" => "FOUNDING FATHERS", "dates" => [{ "date_type" => "plan_begin", "date_value" => "2010-01-01" }, { "date_type" => "service", "date_value" => "2013-05-24" }, { "date_type" => "eligibility_begin", "date_value" => "2007-02-01" }], "exclusions" => { "noncovered" => [{ "type" => "BZ", "type_label" => "Physician Visit - Well", "time_period" => "32", "time_period_label" => "lifetime", "level" => "INDIVIDUAL", "network" => "OUT", "pos" => "", "pos_label" => "", "authorization_required" => "", "dates" => [], "contact_details" => [], "comments" => [] }], "pre_exisiting_condition" => { "waiting_period" => [] } }, "financials" => { "deductible" => { "remainings" => { "in_network" => [{ "amount" => "0", "level" => "FAMILY", "insurance_type" => "", "insurance_type_label" => "", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }, { "amount" => "0", "level" => "INDIVIDUAL", "insurance_type" => "", "insurance_type_label" => "", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }], "out_network" => [] }, "totals" => { "in_network" => [{ "amount" => "0", "time_period" => "24", "time_period_label" => "year_to_date", "level" => "INDIVIDUAL", "insurance_type" => "", "insurance_type_label" => "", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }, { "amount" => "0", "time_period" => "23", "time_period_label" => "calendar_year", "level" => "INDIVIDUAL", "insurance_type" => "", "insurance_type_label" => "", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }, { "amount" => "0", "time_period" => "24", "time_period_label" => "year_to_date", "level" => "FAMILY", "insurance_type" => "", "insurance_type_label" => "", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }, { "amount" => "0", "time_period" => "23", "time_period_label" => "calendar_year", "level" => "FAMILY", "insurance_type" => "", "insurance_type_label" => "", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }], "out_network" => [] } }, "stop_loss" => { "remainings" => { "in_network" => [{ "amount" => "6490", "level" => "INDIVIDUAL", "insurance_type" => "HN", "insurance_type_label" => "Health Maintenance Organization (HMO) - Medicare Risk", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }, { "amount" => "0", "level" => "FAMILY", "insurance_type" => "HN", "insurance_type_label" => "Health Maintenance Organization (HMO) - Medicare Risk", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }], "out_network" => [] }, "totals" => { "in_network" => [{ "amount" => "210", "time_period" => "24", "time_period_label" => "year_to_date", "level" => "INDIVIDUAL", "insurance_type" => "HN", "insurance_type_label" => "Health Maintenance Organization (HMO) - Medicare Risk", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }, { "amount" => "210", "time_period" => "24", "time_period_label" => "year_to_date", "level" => "FAMILY", "insurance_type" => "HN", "insurance_type_label" => "Health Maintenance Organization (HMO) - Medicare Risk", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }, { "amount" => "0", "time_period" => "23", "time_period_label" => "calendar_year", "level" => "FAMILY", "insurance_type" => "HN", "insurance_type_label" => "Health Maintenance Organization (HMO) - Medicare Risk", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }, { "amount" => "6700", "time_period" => "23", "time_period_label" => "calendar_year", "level" => "INDIVIDUAL", "insurance_type" => "HN", "insurance_type_label" => "Health Maintenance Organization (HMO) - Medicare Risk", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [], "comments" => [] }], "out_network" => [] } }, "spending_account" => { "remaining" => [] }, "coinsurance" => { "percents" => { "in_network" => [], "out_network" => [] } }, "copayment" => { "amounts" => { "in_network" => [{ "amount" => "20", "time_period" => "", "time_period_label" => "", "level" => "INDIVIDUAL", "insurance_type" => "", "insurance_type_label" => "", "pos" => "", "pos_label" => "", "authorization_required" => "", "dates" => [], "contact_details" => [], "comments" => [] }], "out_network" => [{ "amount" => "40", "time_period" => "", "time_period_label" => "", "level" => "INDIVIDUAL", "insurance_type" => "", "insurance_type_label" => "", "pos" => "", "pos_label" => "", "authorization_required" => "", "dates" => [], "contact_details" => [], "comments" => [] }] } }, "cost_containment" => { "remainings" => { "in_network" => [], "out_network" => [] }, "totals" => { "in_network" => [], "out_network" => [] } }, "spend_down" => { "remainings" => { "in_network" => [], "out_network" => [] }, "totals" => { "in_network" => [], "out_network" => [] } }, "limitations" => { "amounts" => [] }, "disclaimer" => [], "other_sources" => { "amounts" => [] } }, "benefit_details" => { "benefit_type_label" => { "amounts" => [] }, "managed_care" => { "amounts" => [] }, "unlimited" => { "amounts" => [] } }, "additional_insurance_policies" => [{ "insurance_type" => "47", "insurance_type_label" => "Medicare Secondary, Other Liability Insurance is Primary", "coverage_description" => "", "reference" => [{ "reference_code" => "IG", "reference_label" => "Insurance Policy Number", "reference_number" => "1232004008" }], "contact_details" => [{ "last_name" => "CLAIMS MANAGEMENT INC", "first_name" => "", "indentification_type" => "", "identification_code" => "", "contacts" => [], "address" => { "street_line_1" => "PO BOX 2210", "street_line_2" => "ATTN JANE AUSTEN", "city" => "SAN FRANCISCO", "state" => "CA", "zip" => "941052312" } }], "dates" => [{ "date_type" => "coordination_of_benefits", "date_value" => "2005-02-12" }], "comments" => [] }] }, "services" => [{ "type" => "96", "type_label" => "Physician Professional", "coverage_status" => "11", "coverage_status_label" => "generic inquiry provided no information for this service type. Retry by including service_type_code=96 for an explicit inquiry for this service type." }, { "type" => "98", "type_label" => "Professional Physician Visit - Office", "coverage_status" => "1", "coverage_status_label" => "active coverage", "authorization_required" => "", "noncovered" => [], "facility" => { "amounts" => [{ "amount" => "", "time_period" => "26", "time_period_label" => "EPISODE", "level" => "INDIVIDUAL", "network" => "Y", "insurance_type" => "MA", "insurance_type_label" => "MEDICARE PART A", "pos" => "", "pos_label" => "", "authorization_required" => "", "contact_details" => [], "dates" => [{ "date_type" => "benefit_begin", "date_value" => "2013-05-20" }], "comments" => ["Revocation Code - 0"] }] }, "benefit_details" => { "benefit_type_label" => { "amounts" => [] }, "managed_care" => { "amounts" => [] }, "unlimited" => { "amounts" => [] } }, "financials" => { "deductible" => {}, "stop_loss" => {}, "spending_account" => {}, "coinsurance" => {}, "copayment" => {}, "cost_containment" => {}, "spend_down" => {}, "limitations" => {}, "other_sources" => {} }, "visits" => { "amounts" => { "in_network" => [{ "amount" => "20", "time_period" => "", "time_period_label" => "", "level" => "INDIVIDUAL", "insurance_type" => "", "insurance_type_label" => "", "pos" => "", "pos_label" => "", "authorization_required" => "", "dates" => [], "contact_details" => [], "comments" => [] }], "out_network" => [{ "amount" => "40", "time_period" => "", "time_period_label" => "", "level" => "INDIVIDUAL", "insurance_type" => "", "insurance_type_label" => "", "pos" => "", "pos_label" => "", "authorization_required" => "", "dates" => [], "contact_details" => [], "comments" => [] }] } }, "additional_insurance_policies" => [{ "insurance_type" => "47", "insurance_type_label" => "Medicare Secondary, Other Liability Insurance is Primary", "coverage_description" => "", "reference" => [{ "reference_code" => "IG", "reference_label" => "Insurance Policy Number", "reference_number" => "1232004008" }], "contact_details" => [{ "last_name" => "CLAIMS MANAGEMENT INC", "first_name" => "", "indentification_type" => "", "identification_code" => "", "contacts" => [], "address" => { "street_line_1" => "PO BOX 2210", "street_line_2" => "ATTN JANE AUSTEN", "city" => "SAN FRANCISCO", "state" => "CA", "zip" => "941052312" } }], "dates" => [{ "date_type" => "coordination_of_benefits", "date_value" => "2005-02-12" }], "comments" => [] }] }] }
75
85
  end
76
86
 
77
87
  def test_enrollment_missing_params
78
- {"error" =>"Expeting enrollment_request_id or npis"}
88
+ { "error" => "Expeting enrollment_request_id or npis" }
79
89
  end
80
90
 
81
91
  def test_get_enrollment
82
- [{"enrollment_npi"=>{"address"=>"985 Snow Shoe Road", "city"=>"Sacramento", "created_at"=>"2013-04-24T21:47:31+00:00", "facility_name"=>"Quality", "npi"=>"987654321", "provider_name"=>"Jack Austen", "ptan"=>"54321", "state"=>"CA", "status"=>"rejected", "tax_id"=>"12345678", "updated_at"=>"2013-04-28T17:10:00+00:00", "zip"=>"94107", "enrollment_insurance_company"=>{"name"=>"Medicare", "payer_id"=>"00431"}}}, {"enrollment_npi"=>{"address"=>"985 Snow Shoe Road", "city"=>"Sacramento", "created_at"=>"2013-04-24T21:47:31+00:00", "facility_name"=>"Quality", "npi"=>"987654321", "provider_name"=>"Jack Austen", "ptan"=>"54321", "state"=>"CA", "status"=>"accepted", "tax_id"=>"12345678", "updated_at"=>"2013-04-28T22:51:43+00:00", "zip"=>"94107", "enrollment_insurance_company"=>{"name"=>"Kaiser North", "payer_id"=>"00282"}}}]
92
+ [{ "enrollment_npi" => { "address" => "985 Snow Shoe Road", "city" => "Sacramento", "created_at" => "2013-04-24T21:47:31+00:00", "facility_name" => "Quality", "npi" => "987654321", "provider_name" => "Jack Austen", "ptan" => "54321", "state" => "CA", "status" => "rejected", "tax_id" => "12345678", "updated_at" => "2013-04-28T17:10:00+00:00", "zip" => "94107", "enrollment_insurance_company" => { "name" => "Medicare", "payer_id" => "00431" } } }, { "enrollment_npi" => { "address" => "985 Snow Shoe Road", "city" => "Sacramento", "created_at" => "2013-04-24T21:47:31+00:00", "facility_name" => "Quality", "npi" => "987654321", "provider_name" => "Jack Austen", "ptan" => "54321", "state" => "CA", "status" => "accepted", "tax_id" => "12345678", "updated_at" => "2013-04-28T22:51:43+00:00", "zip" => "94107", "enrollment_insurance_company" => { "name" => "Kaiser North", "payer_id" => "00282" } } }]
83
93
  end
84
94
 
85
95
  def test_post_enrollment
86
- {"enrollment_request"=>{"created_at"=>"2013-04-14T07:29:09-07:00", "id"=>5, "status"=>"pending", "updated_at"=>"2013-04-14T07:29:09-07:00", "enrollment_npis"=>[{"address"=>"125 Snow Shoe Road", "city"=>"Sacramento", "created_at"=>"2013-04-14T07:29:09-07:00", "facility_name"=>"Quality", "npi"=>"987654321", "provider_name"=>"Jane Austen", "ptan"=>"54321", "state"=>"CA", "status"=>"submitted", "tax_id"=>"12345678", "updated_at"=>"2013-04-14T07:29:09-07:00", "zip"=>"94107", "enrollment_insurance_company"=>{"name"=>"Medicare", "payer_id"=>"00431"}}, {"address"=>"125 Snow Shoe Road", "city"=>"Sacramento", "created_at"=>"2013-04-14T07:29:09-07:00", "facility_name"=>"Quality", "npi"=>"987654321", "provider_name"=>"Jane Austen", "ptan"=>"54321", "state"=>"CA", "status"=>"submitted", "tax_id"=>"12345678", "updated_at"=>"2013-04-14T07:29:09-07:00", "zip"=>"94107", "enrollment_insurance_company"=>{"name"=>"Medicare", "payer_id"=>"00431"}}, {"address"=>"125 Snow Shoe Road", "city"=>"Sacramento", "created_at"=>"2013-04-14T07:29:09-07:00", "facility_name"=>"Quality", "npi"=>"987654321", "provider_name"=>"Jane Austen", "ptan"=>"54321", "state"=>"CA", "status"=>"submitted", "tax_id"=>"12345678", "updated_at"=>"2013-04-14T07:29:09-07:00", "zip"=>"94107", "enrollment_insurance_company"=>{"name"=>"Kaiser Nort", "payer_id"=>"00282"}}, {"address"=>"125 Snow Shoe Road", "city"=>"Sacramento", "created_at"=>"2013-04-14T07:29:09-07:00", "facility_name"=>"Quality", "npi"=>"987654321", "provider_name"=>"Jane Austen", "ptan"=>"54321", "state"=>"CA", "status"=>"submitted", "tax_id"=>"12345678", "updated_at"=>"2013-04-14T07:29:09-07:00", "zip"=>"94107", "enrollment_insurance_company"=>{"name"=>"Kaiser Nort", "payer_id"=>"00282"}}]}}
96
+ { "enrollment_request" => { "created_at" => "2013-04-14T07:29:09-07:00", "id" => 5, "status" => "pending", "updated_at" => "2013-04-14T07:29:09-07:00", "enrollment_npis" => [{ "address" => "125 Snow Shoe Road", "city" => "Sacramento", "created_at" => "2013-04-14T07:29:09-07:00", "facility_name" => "Quality", "npi" => "987654321", "provider_name" => "Jane Austen", "ptan" => "54321", "state" => "CA", "status" => "submitted", "tax_id" => "12345678", "updated_at" => "2013-04-14T07:29:09-07:00", "zip" => "94107", "enrollment_insurance_company" => { "name" => "Medicare", "payer_id" => "00431" } }, { "address" => "125 Snow Shoe Road", "city" => "Sacramento", "created_at" => "2013-04-14T07:29:09-07:00", "facility_name" => "Quality", "npi" => "987654321", "provider_name" => "Jane Austen", "ptan" => "54321", "state" => "CA", "status" => "submitted", "tax_id" => "12345678", "updated_at" => "2013-04-14T07:29:09-07:00", "zip" => "94107", "enrollment_insurance_company" => { "name" => "Medicare", "payer_id" => "00431" } }, { "address" => "125 Snow Shoe Road", "city" => "Sacramento", "created_at" => "2013-04-14T07:29:09-07:00", "facility_name" => "Quality", "npi" => "987654321", "provider_name" => "Jane Austen", "ptan" => "54321", "state" => "CA", "status" => "submitted", "tax_id" => "12345678", "updated_at" => "2013-04-14T07:29:09-07:00", "zip" => "94107", "enrollment_insurance_company" => { "name" => "Kaiser Nort", "payer_id" => "00282" } }, { "address" => "125 Snow Shoe Road", "city" => "Sacramento", "created_at" => "2013-04-14T07:29:09-07:00", "facility_name" => "Quality", "npi" => "987654321", "provider_name" => "Jane Austen", "ptan" => "54321", "state" => "CA", "status" => "submitted", "tax_id" => "12345678", "updated_at" => "2013-04-14T07:29:09-07:00", "zip" => "94107", "enrollment_insurance_company" => { "name" => "Kaiser Nort", "payer_id" => "00282" } }] } }
87
97
  end
metadata CHANGED
@@ -1,14 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eligible
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.3'
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
- - Andy Brett
7
+ - Katelyn Gleaon
8
+ - Rodrigo Dominguez
9
+ - Andry Brett
8
10
  autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
- date: 2013-08-18 00:00:00.000000000 Z
13
+ date: 2013-08-28 00:00:00.000000000 Z
12
14
  dependencies:
13
15
  - !ruby/object:Gem::Dependency
14
16
  name: mocha
@@ -72,37 +74,33 @@ dependencies:
72
74
  requirements:
73
75
  - - ~>
74
76
  - !ruby/object:Gem::Version
75
- version: '1.4'
77
+ version: 1.6.7
76
78
  type: :runtime
77
79
  prerelease: false
78
80
  version_requirements: !ruby/object:Gem::Requirement
79
81
  requirements:
80
82
  - - ~>
81
83
  - !ruby/object:Gem::Version
82
- version: '1.4'
84
+ version: 1.6.7
83
85
  - !ruby/object:Gem::Dependency
84
86
  name: multi_json
85
87
  requirement: !ruby/object:Gem::Requirement
86
88
  requirements:
87
- - - '>='
88
- - !ruby/object:Gem::Version
89
- version: 1.0.4
90
- - - <
89
+ - - ~>
91
90
  - !ruby/object:Gem::Version
92
- version: '2'
91
+ version: 1.7.9
93
92
  type: :runtime
94
93
  prerelease: false
95
94
  version_requirements: !ruby/object:Gem::Requirement
96
95
  requirements:
97
- - - '>='
98
- - !ruby/object:Gem::Version
99
- version: 1.0.4
100
- - - <
96
+ - - ~>
101
97
  - !ruby/object:Gem::Version
102
- version: '2'
98
+ version: 1.7.9
103
99
  description: Eligible is a developer-friendly way to process health care eligibility
104
- checks. Learn more at https://eligibleapi.com
100
+ checks. Learn more at https://www.eligibleapi.com
105
101
  email:
102
+ - k@eligibleapi.com
103
+ - rod@eligibleapi.com
106
104
  - andy@andybrett.com
107
105
  executables: []
108
106
  extensions: []
@@ -128,16 +126,15 @@ files:
128
126
  - lib/eligible/errors/eligible_error.rb
129
127
  - lib/eligible/errors/invalid_request_error.rb
130
128
  - lib/eligible/json.rb
129
+ - lib/eligible/medicare.rb
131
130
  - lib/eligible/payment.rb
132
- - lib/eligible/plan.rb
133
- - lib/eligible/service.rb
131
+ - lib/eligible/ticket.rb
134
132
  - lib/eligible/util.rb
135
133
  - lib/eligible/version.rb
136
- - lib/eligible/webhook.rb
137
134
  - lib/eligible/x12.rb
138
135
  - test/test_eligible.rb
139
136
  - test/test_helper.rb
140
- homepage: https://eligibleapi.com/
137
+ homepage: https://www.eligibleapi.com/
141
138
  licenses:
142
139
  - MIT
143
140
  metadata: {}
@@ -157,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
154
  version: '0'
158
155
  requirements: []
159
156
  rubyforge_project:
160
- rubygems_version: 2.0.3
157
+ rubygems_version: 2.0.6
161
158
  signing_key:
162
159
  specification_version: 4
163
160
  summary: Ruby wrapper for the Eligible API
data/lib/eligible/plan.rb DELETED
@@ -1,42 +0,0 @@
1
- module Eligible
2
- COMMON_ATTRIBUTES = [:timestamp, :eligible_id, :mapping_version, :primary_insurance, :additional_insurance]
3
- STATUS_ATTRIBUTES = [:type, :coverage_status]
4
- BALANCE_ATTRIBUTES = [:balance, :comments]
5
- STOP_LOSS_ATTRIBUTES = [:stop_loss_in_network, :stop_loss_out_network]
6
-
7
- class Plan < APIResource
8
- def self.get(params, api_key=nil)
9
- response, api_key = Eligible.request(:get, url, api_key, params)
10
- Util.convert_to_eligible_object(response, api_key)
11
- end
12
-
13
- def all
14
- error ? nil : to_hash
15
- end
16
-
17
- def status
18
- keys = COMMON_ATTRIBUTES + STATUS_ATTRIBUTES
19
- error ? nil : to_hash.select { |k, v| keys.include?(k) }
20
- end
21
-
22
- def deductible
23
- keys = COMMON_ATTRIBUTES + STATUS_ATTRIBUTES + [:deductible_in_network, :deductible_out_network]
24
- error ? nil : to_hash.select { |k, v| keys.include?(k) }
25
- end
26
-
27
- def dates
28
- keys = COMMON_ATTRIBUTES
29
- error ? nil : to_hash.select { |k, v| keys.include?(k) }
30
- end
31
-
32
- def balance
33
- keys = COMMON_ATTRIBUTES + BALANCE_ATTRIBUTES
34
- error ? nil : to_hash.select { |k, v| keys.include?(k) }
35
- end
36
-
37
- def stop_loss
38
- keys = COMMON_ATTRIBUTES + STOP_LOSS_ATTRIBUTES
39
- error ? nil : to_hash.select { |k, v| keys.include?(k) }
40
- end
41
- end
42
- end
@@ -1,59 +0,0 @@
1
- module Eligible
2
- class Service < APIResource
3
- COMMON_ATTRIBUTES = [:timestamp, :eligible_id, :mapping_version, :additional_insurance]
4
- STATUS_ATTRIBUTES = [:type, :coverage_status]
5
- VISITS_ATTRIBUTES = [:not_covered, :comments, :precertification_needed, :visits_in_network, :visits_out_network]
6
- COPAYMENT_ATTRIBUTES = [:copayment_in_network, :copayment_out_network]
7
- COINSURANCE_ATTRIBUTES = [:coinsurance_in_network, :coinsurance_out_network]
8
- DEDUCTIBLE_ATTRIBUTES = [:deductible_in_network, :deductible_out_network]
9
-
10
- def self.get(params, api_key=nil)
11
- response, api_key = Eligible.request(:get, url, api_key, params)
12
- Util.convert_to_eligible_object(response, api_key)
13
- end
14
-
15
- def all
16
- error ? nil : to_hash
17
- end
18
-
19
- def visits
20
- keys = COMMON_ATTRIBUTES + STATUS_ATTRIBUTES + VISITS_ATTRIBUTES
21
- k_to_hash(keys)
22
- end
23
-
24
- def copayment
25
- keys = COMMON_ATTRIBUTES + STATUS_ATTRIBUTES + COPAYMENT_ATTRIBUTES
26
- k_to_hash(keys)
27
- end
28
-
29
- def coinsurance
30
- keys = COMMON_ATTRIBUTES + STATUS_ATTRIBUTES + COINSURANCE_ATTRIBUTES
31
- k_to_hash(keys)
32
- end
33
-
34
- def deductible
35
- keys = COMMON_ATTRIBUTES + STATUS_ATTRIBUTES + DEDUCTIBLE_ATTRIBUTES
36
- k_to_hash(keys)
37
- end
38
-
39
- def self.general(params, api_key=nil)
40
- response, api_key = Eligible.request(:get, "/service/general.json", api_key, params)
41
- response = Util.convert_to_eligible_object(response, api_key)
42
- response = response.to_hash if response.is_a? Hash
43
- response
44
- end
45
-
46
- def self.list(params, api_key=nil)
47
- response, api_key = Eligible.request(:get, "/service/list.json", api_key, params)
48
- response = Util.convert_to_eligible_object(response, api_key)
49
- response = response.to_hash if response.is_a? Hash
50
- response
51
- end
52
-
53
- private
54
-
55
- def k_to_hash(keys)
56
- error ? nil : to_hash.select { |k, v| keys.include?(k) }
57
- end
58
- end
59
- end
@@ -1,16 +0,0 @@
1
- module Eligible
2
- class Webhook < APIResource
3
-
4
- def self.all(api_key=nil)
5
- response, api_key = Eligible.request(:get, url, api_key, params)
6
- Util.convert_to_eligible_object(response, api_key)
7
- end
8
-
9
- def self.post(params, api_key=nil)
10
- response, api_key = Eligible.request(:get, url, api_key, params)
11
- Util.convert_to_eligible_object(response, api_key)
12
- end
13
-
14
- end
15
-
16
- end