Class: Openehr::Generators::FhirProfileGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Openehr::Generators::FhirProfileGenerator
- Defined in:
- lib/generators/openehr/fhir_profile/fhir_profile_generator.rb
Overview
Writes HL7 FHIR R5 StructureDefinition profiles (one per OPT entry)
into app/fhir/profiles/
Instance Method Summary collapse
Instance Method Details
#generate_profiles ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/generators/openehr/fhir_profile/fhir_profile_generator.rb', line 16 def generate_profiles source = remote_url? ? fetch_remote_opt : opt_file template = OpenehrRails::Opt.parse(source) OpenehrRails::Fhir::ProfileGenerator.new(template).to_json_files.each do |id, json| create_file "app/fhir/profiles/#{id}.json", json end end |