Skip to content
Partner Developer Portal byOptum

Definition

Sharing agreements is a reference model designed to provide a comprehensive view of data sharing agreements, including detailed information about both requester and sharer organisations, agreement status, user assignments, and organisation metrics.

Due to the complex nature of data sharing agreements the sharing organisation model has been designed to allow for a single view per user based on their access configuration. An example of this could be user one has access to three sharing agreements which consists of 25 organisations.

Each organisation can activate (or deactivate) the agreement at any time. The model provides comprehensive details including:

  • User assignments and access configuration
  • Requester organisation details (name, CDB, status)
  • Sharer organisation details (name, ODS code, CDB, status, environment)
  • Agreement information (type, purpose, status, processing capabilities)
  • Temporal tracking (last modified dates, transform_datetime)

As the model is driven from user configuration, when querying the model, you will only ever see organisations that belong to the agreements linked to your accounts.

flowchart TD
    DSA_01["Agreement 01"]
    DSA_02["Agreement 02"]
    EX_DSA_01["Explorer Agreement 01"]
    EX_DSA_02["Explorer Agreement 02"]

    org_01["Organisation 1001"]
    org_02["Organisation 1002"]
    org_03["Organisation 1003"]
    org_04["Organisation 1004"]
    EMIS_INDEX([EMIS INDEX])
    DSA[Data Sharing Agreements]
    ACCESS_GUARD([AccessGuard])
    usr_01["Explorer User 1"]
    usr_02["Explorer User 2"]
    Sharing_model[["Sharing Organisation Model"]]

    org_01 --> DSA_01
    org_02 --> DSA_01
    org_03 --> DSA_01
    org_03 --> DSA_02
    org_04 --> DSA_02

    DSA_01 --> EMIS_INDEX
    DSA_02 --> EMIS_INDEX

    EMIS_INDEX --> DSA
    DSA --> ACCESS_GUARD
    ACCESS_GUARD --> EX_DSA_01
    ACCESS_GUARD --> EX_DSA_02
    ACCESS_GUARD --> usr_01
    ACCESS_GUARD --> usr_02
    usr_01 --> EX_DSA_01
    usr_02 --> EX_DSA_02
    EX_DSA_01 --> Sharing_model
    EX_DSA_02 --> Sharing_model

    classDef nodeStyle stroke:#9961a4;
    class DSA_01,DSA_02,EX_DSA_01,EX_DSA_02,org_01,org_02,org_03,org_04,EMIS_WEB,DSA,ACCESS_GUARD,usr_01,usr_02,Sharing_model nodeStyle;

    linkStyle default stroke:#117abf,fill:none

Get active sharer organisations (non-deleted)

Section titled “Get active sharer organisations (non-deleted)”
SELECT
agreement_name,
sharer_name,
sharer_ods,
sharer_status
FROM explorer_open_safely.sharing_agreement
WHERE is_deleted = FALSE
AND sharer_status = '02. Activated'
SELECT
agreement_name,
sharer_name,
sharer_status,
last_modified_datetime
FROM explorer_open_safely.sharing_agreement
WHERE is_deleted = FALSE
AND last_modified_datetime >= CURRENT_TIMESTAMP - INTERVAL '30' DAY
ORDER BY last_modified_datetime DESC
SELECT
agreement_name,
sharer_name,
sharer_ods,
sharer_status
FROM explorer_open_safely.sharing_agreement
WHERE is_deleted = FALSE
AND sharer_status IN ('03. Deactivated', '05. Closed Site')