erDiagram
recall {
diary_id BIGINT PK
organisation VARCHAR PK
patient_id BIGINT FK
consultation_id BIGINT FK
code_id BIGINT FK
authorising_user_in_role_id BIGINT FK
entered_by_user_in_role_id BIGINT FK
}
patient {
patient_id BIGINT PK
organisation VARCHAR PK
}
consultation {
consultation_id BIGINT PK
organisation VARCHAR PK
}
clinical_code {
code_id BIGINT PK
organisation VARCHAR PK
}
user_in_role {
user_in_role_id BIGINT PK
organisation VARCHAR PK
}
recall }|--|| patient : patient_id
recall }|--o| consultation : consultation_id
recall }|--o| clinical_code : code_id
recall }|--o| user_in_role : authorising_user_in_role_id
recall }|--o| user_in_role : entered_by_user_in_role_id