Skip to content
Partner Developer Portal

ERD

erDiagram
    appointment_session ||--o{ appointment_session_user : "has users"
    user_in_role ||--o{ appointment_session_user : "participates in sessions"
    organisation ||--o{ appointment_session_user : "provides context for"
    location ||--o{ appointment_session : "hosts"

    appointment_session_user {
        bigint session_id PK
        bigint user_in_role_id PK
        VARCHAR organisation
        VARCHAR session_guid
        VARCHAR user_in_role_guid
        timestamp transform_datetime
        timestamp extract_datetime
        VARCHAR _execution_date
    }

    appointment_session {
        bigint session_id PK
        VARCHAR organisation
        VARCHAR session_description
        timestamp session_start_datetime
        timestamp session_end_datetime
        VARCHAR location_guid FK
        VARCHAR session_type_description
        boolean is_private
    }

    user_in_role {
        bigint user_in_role_id PK
        VARCHAR organisation
        VARCHAR given_name
        VARCHAR surname
        VARCHAR healthcare_practitioner_type
        date contract_start_date
        date contract_end_date
    }

    organisation {
        bigint organisation_id PK
        VARCHAR organisation
        VARCHAR name
        VARCHAR ods_code
        boolean is_open
    }

    location {
        bigint location_id PK
        VARCHAR organisation
        VARCHAR location_guid
        VARCHAR location_name
    }