Sha256: 9ee20790114d058940620e7bb018d57a5acf256afd29e272414823fbc783e7ad
Contents?: true
Size: 923 Bytes
Versions: 27
Compression:
Stored size: 923 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) kv_pair = template_id_map.find {|k, v| v['definition'] == definition && v['status'] == status && v['negation'] == negation} if kv_pair kv_pair.first else nil end end end end end
Version data entries
27 entries across 27 versions & 1 rubygems