Class: HQMF::Converter::SimpleDataCriteria

Inherits:
DataCriteria show all
Defined in:
lib/hqmf-parser/converter/pass1/simple_data_criteria.rb

Constant Summary

Constants inherited from DataCriteria

DataCriteria::FIELDS, DataCriteria::SOURCE_DATA_CRITERIA_TEMPLATE_ID, DataCriteria::SOURCE_DATA_CRITERIA_TEMPLATE_TITLE, DataCriteria::UNION, DataCriteria::VALUE_FIELDS, DataCriteria::XPRODUCT

Instance Attribute Summary collapse

Attributes inherited from DataCriteria

#children_criteria, #code_list_id, #definition, #derivation_operator, #description, #display_name, #effective_time, #field_values, #id, #inline_code_list, #negation, #negation_code_list_id, #source_data_criteria, #specific_occurrence, #specific_occurrence_const, #status, #subset_operators, #temporal_references, #title, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DataCriteria

#all_code_set_oids, #base_json, create_from_category, definition_for_template_id, from_json, get_settings_for_definition, get_template_id_map, #hard_status, #has_subset, #has_temporal, #initialize, #patient_api_function, #property, #qds_data_type, #referenced_data_criteria, #standard_category, statuses_by_definition, template_id_for_definition, title_for_template_id, #to_json, #type

Methods included from HQMF::Conversion::Utilities

#build_hash, #check_equality, #json_array, #openstruct_to_json

Constructor Details

This class inherits a constructor from HQMF::DataCriteria

Instance Attribute Details

#precondition_idObject

Returns the value of attribute precondition_id.



7
8
9
# File 'lib/hqmf-parser/converter/pass1/simple_data_criteria.rb', line 7

def precondition_id
  @precondition_id
end

Class Method Details

.from_data_criteria(data_criteria) ⇒ Object



9
10
11
12
13
# File 'lib/hqmf-parser/converter/pass1/simple_data_criteria.rb', line 9

def self.from_data_criteria(data_criteria)
  HQMF::Converter::SimpleDataCriteria.new(data_criteria.id, data_criteria.title, data_criteria.display_name, data_criteria.description, data_criteria.code_list_id, 
    data_criteria.children_criteria, data_criteria.derivation_operator, data_criteria.definition,data_criteria.status, data_criteria.value, data_criteria.field_values, 
    data_criteria.effective_time, data_criteria.inline_code_list,data_criteria.negation,data_criteria.negation_code_list_id,data_criteria.temporal_references, data_criteria.subset_operators, data_criteria.specific_occurrence,data_criteria.specific_occurrence_const)
end

Instance Method Details

#assign_precondition(precondtion_id) ⇒ Object



15
16
17
18
19
20
# File 'lib/hqmf-parser/converter/pass1/simple_data_criteria.rb', line 15

def assign_precondition(precondtion_id)
  return if (@precondtion_id == precondtion_id)
  raise "Cannot assign a second precondition to a data criteria" if @precondition_id
  @precondition_id = precondtion_id
  @id = "#{@id}_precondition_#{precondtion_id}"
end