Sha256: b0e584e37470f7f3ac7fc403809ffdf129b4dc82cf44bdc1339bbf9a2014ec61

Contents?: true

Size: 1.33 KB

Versions: 87

Compression:

Stored size: 1.33 KB

Contents

# frozen_string_literal: true

require "document/embedded"
require "document/enum"

module Renalware
  module Transplants
    class DonorOperationDocument < Document::Embedded
      class Complications < Document::Embedded
        attribute :wound_infection, DatedConfirmation
        attribute :deep_vein_thrombosis, DatedConfirmation
        attribute :donor_pneumothorax_peri_or_post_operative, DatedConfirmation
        attribute :pneumonia, DatedConfirmation
        attribute :pulmonary_thrombo_embolism, DatedConfirmation
        attribute :prescribed_medication_indicator, Document::Enum, enums: %i(yes no unknown)
        attribute :other_peri_or_post_operative_complications, Document::Enum,
                  enums: %i(yes no unknown)
      end
      attribute :diagnosis, Complications

      class Outcome < Document::Embedded
        attribute :subsequent_operation_indicator, Document::Enum, enums: %i(yes no unknown)
        attribute :donor_returned_to_previous_general_activity_level, Document::Enum,
                  enums: %i(yes no unknown)
        attribute :nb_months_to_return_to_previous_general_activity_level, Integer

        validates :nb_months_to_return_to_previous_general_activity_level,
                  numericality: { allow_blank: true, only_integer: true }
      end
      attribute :outcome, Outcome
    end
  end
end

Version data entries

87 entries across 87 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.1.0 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.167 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.166 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.165 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.164 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.163 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.162 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.161 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.160 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.159 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.158 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.157 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.156 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.155 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.153 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.152 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.151 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.149 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.148 app/documents/renalware/transplants/donor_operation_document.rb