Sha256: 73e2ca86947c6fa9a860c1ba936c48901ee539b6eceea00468e59df5c070769a
Contents?: true
Size: 884 Bytes
Versions: 11
Compression:
Stored size: 884 Bytes
Contents
module HealthDataStandards module Util # General helpers for working with codes and code systems class HQMFTemplateHelper def self.definition_for_template_id(template_id) template_id_map[template_id] end def self.template_id_map if @id_map.blank? template_id_file = File.expand_path('../hqmf_template_oid_map.json', __FILE__) @id_map = JSON.parse(File.read(template_id_file)) end @id_map end def self.template_id_by_definition_and_status(definition, status, negation=false) pairs = template_id_map.select {|k, v| v['definition'] == definition && v['status'] == status && v['negation'] == negation} pairs.keys.first if pairs.present? end end end end
Version data entries
11 entries across 11 versions & 1 rubygems