Sha256: 2f913f4210687f5745e9408b48505f600e82a3cb24c9453ae6f9e8f2c691864d

Contents?: true

Size: 1.3 KB

Versions: 55

Compression:

Stored size: 1.3 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

55 entries across 55 versions & 1 rubygems

Version Path
renalware-core-2.0.77 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.76 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.75 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.74 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.73 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.72 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.71 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.70 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.69 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.68 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.67 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.64 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.63 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.62 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.61 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.60 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.58 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.57 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.56 app/documents/renalware/transplants/donor_operation_document.rb
renalware-core-2.0.55 app/documents/renalware/transplants/donor_operation_document.rb