Class: QRDA::Util::QRDATemplateHelper
- Inherits:
-
Object
- Object
- QRDA::Util::QRDATemplateHelper
- Defined in:
- lib/util/qrda_template_helper.rb
Overview
General helpers for working with codes and code systems
Class Method Summary collapse
- .definition_for_template_id(hqmf_template_id, qrda_version = "r5") ⇒ Object
- .template_id_map(version) ⇒ Object
Class Method Details
.definition_for_template_id(hqmf_template_id, qrda_version = "r5") ⇒ Object
6 7 8 |
# File 'lib/util/qrda_template_helper.rb', line 6 def self.definition_for_template_id(hqmf_template_id, qrda_version = "r5") template_id_map(qrda_version)[hqmf_template_id] end |
.template_id_map(version) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/util/qrda_template_helper.rb', line 10 def self.template_id_map(version) if @id_map.blank? @id_map = { 'r5_1' => JSON.parse(File.read(File.('qrdar5_1_template_oid_map.json', __dir__))) } end @id_map[version] end |