Module: Canql::Nodes::Anomaly::AdditionalCodeNode

Defined in:
lib/canql/nodes/anomaly.rb

Instance Method Summary collapse

Instance Method Details

#code_typeObject



103
104
105
106
107
108
# File 'lib/canql/nodes/anomaly.rb', line 103

def code_type
  return :icd_code if anomalies_icd_code.respond_to?(:to_code)
  return :code_group if anomalies_icd_code.respond_to?(:to_code_group)

  :fasp_rating
end

#to_codeObject



110
111
112
# File 'lib/canql/nodes/anomaly.rb', line 110

def to_code
  anomalies_icd_code.to_code if :icd_code == code_type
end

#to_code_groupObject



114
115
116
# File 'lib/canql/nodes/anomaly.rb', line 114

def to_code_group
  anomalies_icd_code.to_code_group if :code_group == code_type
end

#to_fasp_ratingObject



118
119
120
# File 'lib/canql/nodes/anomaly.rb', line 118

def to_fasp_rating
  anomalies_icd_code.to_fasp_rating if :fasp_rating == code_type
end