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', 'Withdraw' => 'declined', 'Reject' => 'rejected', }
Instance Method Summary collapse
- #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_submittal_stage_to_order_application_status(value) ⇒ Object
- #reverse_map_locum_availability(value) ⇒ Object
- #reverse_map_order_status(value) ⇒ Object
- #revert_map_submittal_stage_to_order_application_status(value) ⇒ Object
Instance Method Details
#map_locum_availability(value) ⇒ Object
54 55 56 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 54 def map_locum_availability(value) LOCUM_AVAILABILITY_MAP[value] || value end |
#map_order_status(value) ⇒ Object
62 63 64 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 62 def map_order_status(value) ORDER_STATUS_MAP[value] || value end |
#map_pricing_id_to_provider_type(pricing_id) ⇒ Object
47 48 49 50 51 52 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 47 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
42 43 44 45 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 42 def map_provider_type_to_pricing_id(provider_type) pricing_id = PROVIDER_TYPE_MAPPING[provider_type] pricing_id || provider_type end |
#map_submittal_stage_to_order_application_status(value) ⇒ Object
70 71 72 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 70 def map_submittal_stage_to_order_application_status(value) SUBMITTAL_STAGE_MAP[value] || value end |
#reverse_map_locum_availability(value) ⇒ Object
58 59 60 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 58 def reverse_map_locum_availability(value) LOCUM_AVAILABILITY_MAP.invert[value] || value end |
#reverse_map_order_status(value) ⇒ Object
66 67 68 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 66 def reverse_map_order_status(value) ORDER_STATUS_MAP.invert[value] || value end |
#revert_map_submittal_stage_to_order_application_status(value) ⇒ Object
74 75 76 |
# File 'lib/wolf_core/application/barton/mappings.rb', line 74 def revert_map_submittal_stage_to_order_application_status(value) SUBMITTAL_STAGE_MAP.invert[value] || value end |