app/models/medivo/lab.rb in medivo-0.0.12 vs app/models/medivo/lab.rb in medivo-0.0.13
- old
+ new
@@ -1,15 +1,17 @@
-require_relative 'resource'
+require_relative 'lab_resource'
module Medivo
- class Lab < Resource
- LAB_CORP_ID = 129
- QUEST_ID = 119
- LAB_CORP_NAME = :lab_corp
- QUEST_NAME = :quest
- LAB_ID_TO_NAME = {LAB_CORP_ID => LAB_CORP_NAME, QUEST_ID => QUEST_NAME}
- LAB_ID_TO_SHORT_NAME = {LAB_CORP_ID => 'LC', QUEST_ID => 'QD'}
- LAB_ID_TO_PRETTY_NAME = {LAB_CORP_ID => 'Lab Corp', QUEST_ID => 'Quest Diagnostics'}
+ class Lab < LabResource
+ unless defined? LAB_CORP_ID
+ LAB_CORP_ID = 129
+ QUEST_ID = 119
+ LAB_CORP_NAME = :lab_corp
+ QUEST_NAME = :quest
+ LAB_ID_TO_NAME = {LAB_CORP_ID => LAB_CORP_NAME, QUEST_ID => QUEST_NAME}
+ LAB_ID_TO_SHORT_NAME = {LAB_CORP_ID => 'LC', QUEST_ID => 'QD'}
+ LAB_ID_TO_PRETTY_NAME = {LAB_CORP_ID => 'Lab Corp', QUEST_ID => 'Quest Diagnostics'}
+ end
def self.findLabs(zip_code, radius = 15)
find(:all, :from => "/find_psc/#{zip_code}", :params=>{:radius=>radius}).sort_by(&:distance)
end