Catchment Feed
Catchment Mapping CF
CREATE TABLE catchment_mapping (
catchment_id varchar,
last_updated timeuuid,
health_id varchar,
PRIMARY KEY (catchment_id, last_updated, health_id)
)WITH CLUSTERING ORDER BY (last_updated ASC);
Create Patient
- Records in catchment_mapping CF are created. One record for each catchment. So catchment 10203040 will create 3 records - 1020, 102030, 10203040. last_updated is set as the patient's updated_at timeuuid.
Update Patient
- (If catchment is updated) Records in catchment_mapping CF are updated - deleted and created.
Feed Query
- Since - gte last_updated
- last_marker - gt last_udpated