Module: WolfCore::Barton::Mappings
- Defined in:
- lib/wolf_core/application/barton/mappings.rb
Constant Summary collapse
- PROVIDER_TYPE_MAPPING =
{ 'MD' => ENV['MD_PRICING_ID'], 'DO' => ENV['DO_PRICING_ID'], 'PA' => ENV['PA_PRICING_ID'], 'DMD' => ENV['DMD_PRICING_ID'], 'NP' => ENV['NP_PRICING_ID'], 'DDS' => ENV['DDS_PRICING_ID'], 'GP' => ENV['GP_PRICING_ID'], }
- LOCUM_AVAILABILITY_MAP =
{ 'PT' => 'Part Time', 'FT' => 'Full Time', 'PFI' => 'Not Sure Yet', 'Interim Locum' => 'Between Permanent Positions', 'Perm Only' => 'Permanent', }
- ORDER_STATUS_MAP =
{ 'Listing Qualification' => 'pending', 'Pending' => 'pending', 'On Hold' => 'pending', 'Filled' => 'pending', 'Open' => 'live', 'Closed' => 'pending', }
- SUBMITTAL_STAGE_MAP =
{ 'Pre-Submission' => 'wait', 'Submittal' => 'wait', 'Send Out' => 'wait', 'On Hold' => 'wait', 'Offer' => 'wait', 'Applied Online' => 'wait', 'Declined Online' => 'declined', 'Withdraw' => 'declined', 'Reject' => 'rejected', }
- STATE_ABBREVIATIONS_MAP =
{ "Alabama" => "AL", "Alaska" => "AK", "American Samoa" => "AS", "Arizona" => "AZ", "Arkansas" => "AR", "California" => "CA", "Colorado" => "CO", "Connecticut" => "CT", "Delaware" => "DE", "District of Columbia" => "DC", "Florida" => "FL", "Georgia" => "GA", "Guam" => "GU", "Hawaii" => "HI", "Idaho" => "ID", "Illinois" => "IL", "Indiana" => "IN", "Iowa" => "IA", "Kansas" => "KS", "Kentucky" => "KY", "Louisiana" => "LA", "Maine" => "ME", "Marshall Islands" => "MH", "Maryland" => "MD", "Massachusetts" => "MA", "Michigan" => "MI", "Minnesota" => "MN", "Mississippi" => "MS", "Missouri" => "MO", "Montana" => "MT", "Nebraska" => "NE", "Nevada" => "NV", "New Hampshire" => "NH", "New Jersey" => "NJ", "New Mexico" => "NM", "New York" => "NY", "North Carolina" => "NC", "North Dakota" => "ND", "Northern Mariana Islands" => "MP", "Ohio" => "OH", "Oklahoma" => "OK", "Oregon" => "OR", "Palau" => "PW", "Pennsylvania" => "PA", "Puerto Rico" => "PR", 'Rhode Island' => 'RI', 'South Carolina' => 'SC', 'South Dakota' => 'SD', 'Tennessee' => 'TN', 'Texas' => 'TX', 'U.S. Virgin Islands' => 'VI', 'Utah' => 'UT', 'Vermont' => 'VT', 'Virginia' => 'VA', 'Washington' => 'WA', 'West Virginia' => 'WV', 'Wisconsin' => 'WI', 'Wyoming' => 'WY' }
- DISPLAY_PAY_RATE_UNIT_MAP =
{ 'hour' => 'Hourly', 'day' => 'Daily', 'week' => 'Weekly', 'month' => 'Monthly', }
Instance Method Summary collapse
- #map_display_pay_rate_unit(value) ⇒ Object
- #map_locum_availability(value) ⇒ Object
- #map_order_status(value) ⇒ Object
- #map_pricing_id_to_provider_type(pricing_id) ⇒ Object
- #map_provider_type_to_pricing_id(provider_type) ⇒ Object
- #map_state_to_abbreviation(value) ⇒ Object
- #map_submittal_stage_to_order_application_status(value) ⇒ Object
- #reverse_map_locum_availability(value) ⇒ Object
- #reverse_map_order_status(value) ⇒ Object
- #revert_map_display_pay_rate_unit(value) ⇒ Object
- #revert_map_state_to_abbreviation(value) ⇒ Object
- #revert_map_submittal_stage_to_order_application_status(value) ⇒ Object
Instance Method Details
#map_display_pay_rate_unit(value) ⇒ Object
155 156 157 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 155 def map_display_pay_rate_unit(value) DISPLAY_PAY_RATE_UNIT_MAP[value] || value end |
#map_locum_availability(value) ⇒ Object
123 124 125 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 123 def map_locum_availability(value) LOCUM_AVAILABILITY_MAP[value] || value end |
#map_order_status(value) ⇒ Object
131 132 133 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 131 def map_order_status(value) ORDER_STATUS_MAP[value] || value end |
#map_pricing_id_to_provider_type(pricing_id) ⇒ Object
116 117 118 119 120 121 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 116 def map_pricing_id_to_provider_type(pricing_id) return nil if pricing_id.blank? pricing_id = pricing_id.to_s provider_type = PROVIDER_TYPE_MAPPING.invert[pricing_id] provider_type || pricing_id end |
#map_provider_type_to_pricing_id(provider_type) ⇒ Object
111 112 113 114 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 111 def map_provider_type_to_pricing_id(provider_type) pricing_id = PROVIDER_TYPE_MAPPING[provider_type] pricing_id || provider_type end |
#map_state_to_abbreviation(value) ⇒ Object
147 148 149 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 147 def map_state_to_abbreviation(value) STATE_ABBREVIATIONS_MAP[value] || value end |
#map_submittal_stage_to_order_application_status(value) ⇒ Object
139 140 141 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 139 def map_submittal_stage_to_order_application_status(value) SUBMITTAL_STAGE_MAP[value] || value end |
#reverse_map_locum_availability(value) ⇒ Object
127 128 129 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 127 def reverse_map_locum_availability(value) LOCUM_AVAILABILITY_MAP.invert[value] || value end |
#reverse_map_order_status(value) ⇒ Object
135 136 137 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 135 def reverse_map_order_status(value) ORDER_STATUS_MAP.invert[value] || value end |
#revert_map_display_pay_rate_unit(value) ⇒ Object
159 160 161 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 159 def revert_map_display_pay_rate_unit(value) DISPLAY_PAY_RATE_UNIT_MAP.invert[value] || value end |
#revert_map_state_to_abbreviation(value) ⇒ Object
151 152 153 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 151 def revert_map_state_to_abbreviation(value) STATE_ABBREVIATIONS_MAP.invert[value] || value end |
#revert_map_submittal_stage_to_order_application_status(value) ⇒ Object
143 144 145 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 143 def revert_map_submittal_stage_to_order_application_status(value) SUBMITTAL_STAGE_MAP.invert[value] || value end |