Circle V2 API Docs
    Preparing search index...
    • Maps an active admission to the TriggerData evaluation payload. Shared by the sync jobbable and the Check Triggers dry-run so both evaluate identically.

      "Current" = latest by start date: a patient has one UR LOC and is in one program at a time, so the newest review / newest ongoing stay wins.

      projectedDischargeDate comes from the episode (the authoritative source going forward), not the admission — patient_admissions has no projected_discharge_date column at all.

      Parameters

      • admission: {
            admitted_at: string;
            discharged_at: string | null;
            entity_id: number & { __brand: "EntityId" } | null;
            external_admission_id: string | null;
            facility_id: string & { __brand: "FacilityId" } | null;
            id: PatientAdmissionId;
            integration_id: string | null;
            level_of_care_id: number | null;
            ongoing_program_stays: {
                facility_program_id: string & { __brand: "FacilityProgramId" } | null;
                id: ProgramStayId;
                start_date: string;
            }[];
            patient_id: string & { __brand: "PatientId" }
            | null;
            utilization_reviews: {
                end_date: string | null;
                facility_level_of_care_id:
                    | string & { __brand: "FacilityLevelOfCareId" }
                    | null;
                id: PatientUtilizationReviewId;
                start_date: string | null;
            }[];
        }
      • projectedDischargeDate: string | null

      Returns TriggerData