Sha256: 5abddb8e9d689537c97c20cf04e906283a8c1c3885fcb59036b177499f072e26

Contents?: true

Size: 1.17 KB

Versions: 68

Compression:

Stored size: 1.17 KB

Contents

class CreateAdmissionAdmissions < ActiveRecord::Migration[5.1]
  def change
    create_table :admission_admissions do |t|
      t.references :hospital_ward, foreign_key: true, index: true, null: false
      t.references :patient, foreign_key: true, index: true, null: false
      t.date :admitted_on, null: false, index: true
      t.string :admission_type, null: false
      t.string :consultant
      t.references :modality_at_admission,
                   foreign_key: { to_table: :modality_modalities },
                   index: true
      t.text :reason_for_admission, null: false
      t.text :notes
      t.date :transferred_on
      t.string :transferred_to
      t.date :discharged_on, index: true
      t.string :discharge_destination
      t.string :destination_notes
      t.text :discharge_summary
      t.date :summarised_on
      t.references :summarised_by, foreign_key: { to_table: :users }, index: true
      t.references :updated_by, foreign_key: { to_table: :users }, index: true, null: false
      t.references :created_by, foreign_key: { to_table: :users }, index: true, null: false
      t.datetime :deleted_at, index: true
      t.timestamps null: false
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
renalware-core-2.0.64 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.63 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.62 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.61 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.60 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.58 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.57 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.56 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.55 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.54 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.53 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.52 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.51 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.50 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.48 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.47 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.46 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.45 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.44 db/migrate/20171219154529_create_admission_admissions.rb
renalware-core-2.0.43 db/migrate/20171219154529_create_admission_admissions.rb