fct_chsp_service_transactions


Description

From 1 July 2025, changes were made to way CHSP services were described, regulated, and delivered. As part of these changes, the current CHSP services were mapped to new service IDs. Here is a list of the new service IDs: https://github.com/thelookoutway/lookout/blob/main/db/static/chsp_service_types.csv.

While some of the old service IDs were automatically mapped to new service IDs, some were not. E.g. 58 is the old nursing service ID which can’t be mapped automatically, so any CHSP products with an external_id of 58 are no good for claims and require manual mapping to a new service ID.

This table combines purchase orders and invoices for CHSP services into a single table for CHSP services related transactions. It includes all the relevant details about Invoices and Purchase Orders when the users in the Lookout portal enable the Override flag.

Using this model, you can track: - Track all Invoices and Purchase Orders raised for CHSP services after the 1st July 2025. - Identify which Invoices and Purchase Orders raised are not mapped to the new service codes. - Identify which Invoices and Purchase Orders raised are mapped to the new service codes. - Join this table with fct_invoices by using source_type = ‘Invoice’ to get more Invoice details. - Join this table with fct_purchase_orders by using source_type = ‘PurchaseOrder’ to get more Purchase Order details.

Columns

Column Type Children Parents Comments
chsp_session_override_id int8

The unique ID of the CHSP session override. E.g. 123.

chsp_service_type_id int4
dim_sah_service_ids.id Implied Constraint R

The unique ID of the CHSP service type. E.g. 456.

company_id int8
dim_companies.company_id Implied Constraint R

The company ID. E.g. 345.

source_id int8

The unique ID of the Invoice or PurchaseOrder. E.g. 781234569.

chsp_outlet_name varchar

The name of the CHSP outlet where the service was provided. E.g. “Community and Home Support”.

community_names text

The names of the communities linked with the membership. E.g. “Anita,Clients,Wellbeing Team”.

source_type varchar

The type of source. E.g. “PurchaseOrder” or “Invoice”.

is_mapped_to_new_service_code bool

Whether the service is mapped to new CHSP service codes. True or False. E.g. True.

created_at_in_company_tz timestamp

The date and time the CHSP session override was created (in the company timezone). E.g. 2021-03-02 00:12:59.996101.

Indexes

Constraint Name Type Sort Column(s)
fct_chsp_service_transactions_pkey Primary key Asc chsp_session_override_id
fct_chsp_service_transactions_chsp_service_type_id_idx Performance Asc chsp_service_type_id
fct_chsp_service_transactions_company_id_idx Performance Asc company_id
fct_chsp_service_transactions_source_type_idx Performance Asc source_type

Relationships