Definition
Information
Section titled “Information”The Prescribing Issuemethod model holds descriptions of medication issue methods. Each entry records an issue-method identifier, descriptive text and 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”prescribing.drugrecord count per prescribing.issuemethod
Section titled “prescribing.drugrecord count per prescribing.issuemethod”Count related prescribing.drugrecord records for each prescribing.issuemethod record, joined on mostrecentissuemethod.
:::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."issuemethodid", m."description", COUNT(c."mostrecentissuemethod") AS drugrecord_countFROM prescribing.issuemethod AS mLEFT JOIN prescribing.drugrecord AS c ON m."issuemethodid" = c."mostrecentissuemethod" AND m."organisation" = c."organisation"GROUP BY m."issuemethodid", m."description"ORDER BY drugrecord_count DESC;prescribing.drugrecord records with prescribing.issuemethod details
Section titled “prescribing.drugrecord records with prescribing.issuemethod details”List prescribing.drugrecord records with the prescribing.issuemethod values they reference through mostrecentissuemethod.
:::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 c."drugrecordid", c."authorisedcoursedate", m."issuemethodid", m."description" AS "issuemethod_description"FROM prescribing.drugrecord AS cINNER JOIN prescribing.issuemethod AS m ON m."issuemethodid" = c."mostrecentissuemethod" AND m."organisation" = c."organisation";prescribing.issuerecord count per prescribing.issuemethod
Section titled “prescribing.issuerecord count per prescribing.issuemethod”Count related prescribing.issuerecord records for each prescribing.issuemethod record, joined on issuemethod.
:::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."issuemethodid", m."description", COUNT(c."issuemethod") AS issuerecord_countFROM prescribing.issuemethod AS mLEFT JOIN prescribing.issuerecord AS c ON m."issuemethodid" = c."issuemethod" AND m."organisation" = c."organisation"GROUP BY m."issuemethodid", m."description"ORDER BY issuerecord_count DESC;