Sha256: f7a80a326dd2b344a4d5a1411201cf39f48b87f4d4407a247cd9bb3c046c6fe3

Contents?: true

Size: 1.27 KB

Versions: 35

Compression:

Stored size: 1.27 KB

Contents

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

35 entries across 35 versions & 1 rubygems

Version Path
renalware-core-2.0.16 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.15 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.14 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.13 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.12 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.11 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.9 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.8 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.7 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.5 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.4 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.3 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.2 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.1 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.0 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.0.pre.rc13 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.0.pre.rc11 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.0.pre.rc10 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.0.pre.rc9 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.0.pre.rc8 app/documents/renalware/transplants/donor_operation_document.rb