Skip to main content

Columns

ColumnDescriptionAPI Field Name
care_plan_idPrimary key and care plan unique identifier.id
createdThe timestamp when the care plan record was created.
modifiedThe timestamp when the care plan record was last modified.
is_deletedIndicates whether the care plan record is deleted.
nameThe name of the care plan.name
statusThe current status of the care plan (e.g., ACTIVE, INACTIVE).status
kindThe type of care plan (e.g., CORE, ADD_ON, SERVICE_PACKAGE), indicating whether it is a base plan or an add-on to another plan.kind
speciesThe species this care plan is designed for (e.g., CANINE, FELINE).species
min_age_valueThe minimum patient age required to enroll in this care plan.min_age_value
min_age_unitThe unit of measure for min_age_value (e.g., DAY, WEEK, MONTH, YEAR).min_age_unit
max_age_valueThe maximum patient age allowed for enrollment in this care plan.max_age_value
max_age_unitThe unit of measure for max_age_value (e.g., DAY, WEEK, MONTH, YEAR).max_age_unit
default_duration_valueThe default duration value for this care plan.default_duration_value
default_duration_unitThe unit of measure for default_duration_value (e.g., DAY, WEEK, MONTH, YEAR).default_duration_unit
next_plan_idForeign key to the care_plan & care_plan_enriched table. The identifier of the next care plan that a patient is automatically transitioned to after this plan ends.next_plan_id
last_updatedThe timestamp when the care plan record was last updated. This is the most recent timestamp from all related tables.
vetcove_corporate_idThe identifier of the corporate group associated with the care plan.

SQL Definition

/*
    This model provides a business-ready, denormalized view of care plan data,
    mirroring the /care-plans/ API endpoint.
*/

"
    )
}}

with care_plans as (
    select * from {{ ref('care_plan') }}
)

select
    care_plans.id as care_plan_id
    , care_plans.created
    , care_plans.modified
    , care_plans.is_deleted
    , care_plans.name
    , care_plans.status
    , care_plans.kind
    , care_plans.species
    , care_plans.min_age_value
    , care_plans.min_age_unit
    , care_plans.max_age_value
    , care_plans.max_age_unit
    , care_plans.default_duration_value
    , care_plans.default_duration_unit
    , care_plans.next_plan_id
    , care_plans.last_updated
    , care_plans.vetcove_corporate_id
from care_plans