class PatientChangeset

Schema Information

Table name: patient_changesets

id                    :bigint           not null, primary key
data                  :jsonb
import_type           :string           not null
matched_on_nhs_number :boolean
pds_nhs_number        :string
processed_at          :datetime
record_type           :integer          default("new_patient"), not null
row_number            :integer
status                :integer          default("pending"), not null
uploaded_nhs_number   :string
created_at            :datetime         not null
updated_at            :datetime         not null
import_id             :bigint           not null
patient_id            :bigint
school_id             :bigint

Indexes

index_patient_changesets_on_import      (import_type,import_id)
index_patient_changesets_on_patient_id  (patient_id)
index_patient_changesets_on_status      (status)

Foreign Keys

fk_rails_...  (patient_id => patients.id)
fk_rails_...  (school_id => locations.id)