Class: Renalware::PatientDocument::History

Inherits:
Document::Embedded show all
Defined in:
app/documents/renalware/patient_document.rb

Constant Summary collapse

SMOKING_SNOMED_MAP =
{
  "yes" => { code: 77176002, description: "Current" },
  "no" => { code: 8392000, description: "Non" },
  "ex" => { code: 8517006, description: "Ex" }
}.freeze

Constants inherited from Document::Embedded

Document::Embedded::STRIPPABLE_TYPES

Instance Method Summary collapse

Methods inherited from Document::Embedded

attribute, attributes_list, #method_missing, old_attribute, old_attributes, #strip_leading_trailing_whitespace_from_numbers

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Document::Embedded

Instance Method Details

#smoking_rrObject



44
45
46
# File 'app/documents/renalware/patient_document.rb', line 44

def smoking_rr
  @smoking&.upcase
end

#smoking_snomedObject



40
41
42
# File 'app/documents/renalware/patient_document.rb', line 40

def smoking_snomed
  SMOKING_SNOMED_MAP[@smoking]
end