Definition
Information
Section titled “Information”The Episodemanagement Rttstatuscodeoffer model links RTT-related MKB codes with recorded offer codes. Each entry holds the MKB code and MKB offer code together with source organisation information.
Soft-Deleted Records
Section titled “Soft-Deleted Records”_deleted indicates whether the record has been deleted in the source system.
Examples
Section titled “Examples”episodemanagement.rttstatuscodeoffer with episodemanagement.rttstatuscodes details
Section titled “episodemanagement.rttstatuscodeoffer with episodemanagement.rttstatuscodes details”Return records alongside descriptive values from the related episodemanagement.rttstatuscodes record.
:::caution[Unverified join] This join is inferred from matching column names and is not part of the documented relationships. Check the results before relying on it. :::
SELECT m."_primary_key", m."mkbcode", p1."impactonclock" AS "rttstatuscodes_impactonclock"FROM episodemanagement.rttstatuscodeoffer AS mLEFT JOIN episodemanagement.rttstatuscodes AS p1 ON p1."mkbcode" = m."mkbcode" AND p1."organisation" = m."organisation";Row count by episodemanagement.rttstatuscodes impactonclock
Section titled “Row count by episodemanagement.rttstatuscodes impactonclock”Count episodemanagement.rttstatuscodeoffer records for each episodemanagement.rttstatuscodes value, joined on mkbcode.
:::caution[Unverified join] This join is inferred from matching column names and is not part of the documented relationships. Check the results before relying on it. :::
SELECT p."impactonclock" AS "rttstatuscodes_impactonclock", COUNT(*) AS row_countFROM episodemanagement.rttstatuscodeoffer AS mINNER JOIN episodemanagement.rttstatuscodes AS p ON p."mkbcode" = m."mkbcode" AND p."organisation" = m."organisation"GROUP BY p."impactonclock"ORDER BY row_count DESC;Records without a matching episodemanagement.rttstatuscodes
Section titled “Records without a matching episodemanagement.rttstatuscodes”Find episodemanagement.rttstatuscodeoffer records whose mkbcode has no matching episodemanagement.rttstatuscodes record.
:::caution[Unverified join] This join is inferred from matching column names and is not part of the documented relationships. Check the results before relying on it. :::
SELECT COUNT(*) AS unmatched_countFROM episodemanagement.rttstatuscodeoffer AS mLEFT JOIN episodemanagement.rttstatuscodes AS p ON p."mkbcode" = m."mkbcode" AND p."organisation" = m."organisation"WHERE m."mkbcode" IS NOT NULL AND p."mkbcode" IS NULL;