Class: HealthDataStandards::Import::GreenC32::CareGoalImporter
- Inherits:
-
Object
- Object
- HealthDataStandards::Import::GreenC32::CareGoalImporter
- Includes:
- Singleton
- Defined in:
- lib/health-data-standards/import/green_c32/care_goal_importer.rb
Instance Method Summary collapse
- #import(care_goal_xml) ⇒ Object
-
#initialize ⇒ CareGoalImporter
constructor
A new instance of CareGoalImporter.
Constructor Details
#initialize ⇒ CareGoalImporter
Returns a new instance of CareGoalImporter.
7 8 |
# File 'lib/health-data-standards/import/green_c32/care_goal_importer.rb', line 7 def initialize end |
Instance Method Details
#import(care_goal_xml) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/health-data-standards/import/green_c32/care_goal_importer.rb', line 10 def import(care_goal_xml) importer = case care_goal_xml.at_xpath("/*").try(:name) when "medication" then MedicationImporter.instance when "immunization" then ImmunizationImporter.instance when "procedure" then ProcedureImporter.instance when "encounter" then EncounterImporter.instance when "medicalEquipment" then MedicalEquipmentImporter.instance else SectionImporter.new end return importer.import(care_goal_xml) end |