:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(warehouse): add cliniko concession, supplier, referral type and availability tables (#119539)
Tom Owersea4c23381fcd
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.mdindex 0fad9194d5e9..60e2c763104b 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md@@ -2718,11 +2718,11 @@ Diffed against: <https://docs.api.cliniko.com/_bundle/openapi.json?download>- [x] `Billable items (GET /v1/billable_items)` — resolve invoice item links to service codes, catalog prices, and item categories (high)- [x] `Patient cases (GET /v1/patient_cases)` — resolve appointment case links and analyze treatment episodes, session limits, and case closure (high)- [x] `Contacts (GET /v1/contacts)` — resolve patient referring doctor links and compare referral performance (high)-- [ ] `Concession types (GET /v1/concession_types)` — resolve patient concession links to discount categories (high)-- [ ] `Product suppliers (GET /v1/product_suppliers)` — resolve product supplier IDs and analyze stock by supplier (high)+- [x] `Concession types (GET /v1/concession_types)` — resolve patient concession links to discount categories (high)+- [x] `Product suppliers (GET /v1/product_suppliers)` — resolve product supplier IDs and analyze stock by supplier (high)- [x] `Users (GET /v1/users)` — resolve practitioner user links and identify staff responsible for clinic activity (high)-- [ ] `Referral source types (GET /v1/referral_source_types)` — resolve referral source type links to named acquisition categories (high)-- [ ] `Daily availabilities (GET /v1/daily_availabilities)` — compare recurring practitioner capacity with booked appointments to measure utilization (high)+- [x] `Referral source types (GET /v1/referral_source_types)` — resolve referral source type links to named acquisition categories (high)+- [x] `Daily availabilities (GET /v1/daily_availabilities)` — compare recurring practitioner capacity with booked appointments to measure utilization (high)- [ ] `Stock adjustments (GET /v1/stock_adjustments)` — explain stock changes through sales, corrections, and replenishment activity (medium)- [ ] `Communications (GET /v1/communications)` — analyze patient messages, reminders, and communication outcomes (medium)diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/cliniko/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/cliniko/canonical_descriptions.pyindex 3ce8f6091123..60125b24b7f7 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/cliniko/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/cliniko/canonical_descriptions.py@@ -281,4 +281,41 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {active="Whether the user is active.",),},+ "concession_types": {+ "description": "A concession (discount) category that can be assigned to patients, such as pensioner or student.",+ "docs_url": "https://docs.api.cliniko.com/openapi/concession-type",+ "columns": _columns(+ name="Name of the concession type.",+ concession_prices="Link to the concession prices set for this concession type.",+ ),+ },+ "product_suppliers": {+ "description": "A supplier that the practice buys stocked products from.",+ "docs_url": "https://docs.api.cliniko.com/openapi/product-supplier",+ "columns": _columns(+ name="Name of the supplier.",+ ),+ },+ "referral_source_types": {+ "description": "A category of referral source used to record how patients found the practice.",+ "docs_url": "https://docs.api.cliniko.com/openapi/referral-source-type",+ "columns": _columns(+ name="Name of the referral source type.",+ referrer_type="Type of record that can be selected as the referrer for this type, if any.",+ referrers="Link to the records that can be selected as referrers for this type.",+ subcategories="List of subcategory names a referral of this type can use.",+ ),+ },+ "daily_availabilities": {+ "description": "A practitioner's recurring working hours at a business on one day of the week.",+ "docs_url": "https://docs.api.cliniko.com/openapi/daily-availability",+ "columns": _columns(+ day_of_week="Day of the week the availability applies to, as an integer from 0 to 6.",+ availabilities="List of time ranges, each with a start and end time, when the practitioner is available.",+ business="Link to the business the availability applies to.",+ practitioner="Link to the practitioner the availability belongs to.",+ time_zone="Time zone the availability times are in.",+ time_zone_identifier="IANA time zone identifier the availability times are in.",+ ),+ },}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/cliniko/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/cliniko/settings.pyindex 9ccca3f662cc..409e9df1c74e 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/cliniko/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/cliniko/settings.py@@ -11,7 +11,9 @@ ENDPOINTS = ("attendees","billable_items","businesses",+ "concession_types","contacts",+ "daily_availabilities","group_appointments","individual_appointments","invoice_items",@@ -19,7 +21,9 @@ ENDPOINTS = ("patient_cases","patients","practitioners",+ "product_suppliers","products",+ "referral_source_types","referral_sources","treatment_notes","users",