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'], }
- LOCUM_AVAILABILITY_MAP =
{ "PT" => "Part Time", "FT" => "Full Time", "PFI" => "Not Sure Yet", "Interim Locum" => "Between Permanent Positions", "Perm Only" => "Permanent", }
Instance Method Summary collapse
- #map_locum_availability(value) ⇒ Object
- #map_pricing_id_to_provider_type(pricing_id) ⇒ Object
- #map_provider_type_to_pricing_id(provider_type) ⇒ Object
- #reverse_map_locum_availability(value) ⇒ Object
Instance Method Details
#map_locum_availability(value) ⇒ Object
32 33 34 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 32 def map_locum_availability(value) LOCUM_AVAILABILITY_MAP[value] || value end |
#map_pricing_id_to_provider_type(pricing_id) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 25 def map_pricing_id_to_provider_type(pricing_id) return 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
20 21 22 23 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 20 def map_provider_type_to_pricing_id(provider_type) pricing_id = PROVIDER_TYPE_MAPPING[provider_type] pricing_id || provider_type end |
#reverse_map_locum_availability(value) ⇒ Object
36 37 38 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 36 def reverse_map_locum_availability(value) LOCUM_AVAILABILITY_MAP.invert[value] || value end |