Class: OpenehrRails::Fhir::FshGenerator
- Inherits:
-
Object
- Object
- OpenehrRails::Fhir::FshGenerator
- Defined in:
- lib/openehr_rails/fhir/fsh_generator.rb
Overview
Generates one FHIR Shorthand profile per openEHR ENTRY.
Constant Summary collapse
- ARCHETYPE_SYSTEM =
'http://openehr.org/ckm/archetypes'- TERMINOLOGY_ALIASES =
{ 'SNOMED-CT' => ['SNOMEDCT', 'http://snomed.info/sct'], 'LOINC' => ['LOINC', 'http://loinc.org'] }.freeze
Instance Method Summary collapse
-
#initialize(template) ⇒ FshGenerator
constructor
A new instance of FshGenerator.
- #to_fsh_files ⇒ Object
Constructor Details
#initialize(template) ⇒ FshGenerator
Returns a new instance of FshGenerator.
13 14 15 |
# File 'lib/openehr_rails/fhir/fsh_generator.rb', line 13 def initialize(template) @entries = OpenehrRails::Opt::FieldExtractor.new(template).entries end |
Instance Method Details
#to_fsh_files ⇒ Object
17 18 19 20 21 22 |
# File 'lib/openehr_rails/fhir/fsh_generator.rb', line 17 def to_fsh_files @entries.to_h do |entry| id = profile_id(entry[:archetype_id]) [id, build_profile(entry, id)] end end |