Circle V2 API Docs
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    supabase: SupabaseClient<Database>

    Methods

    • Parameters

      • runIds: number[]

      Returns Promise<Safe<void>>

    • Find the most recent completed audit run for a given case + template. Returns null when no completed run exists.

      Parameters

      • caseId: number
      • templateId: number

      Returns Promise<
          | {
              archived: boolean;
              audit_template_id: number
              | null;
              case_id: number | null;
              created_at: string;
              created_by: string | null;
              hidden: boolean;
              id: number;
              ran_against_charts_at: string | null;
              run_context: Json;
              session_id: number | null;
              status: string | null;
              summary: string | null;
              treatment_episode_id: string | null;
              trigger: string | null;
              triggered_at: string | null;
          }
          | null,
      >

    • Parameters

      • params: {
            auditRunId?: number;
            caseId: number;
            createdBy?: string;
            ranAgainstChartsAt?: string | null;
            runContext?: {
                scopedCharts: { fileName: string | null; id: PatientChartId }[] | null;
            };
            templateId: number;
        }

      Returns Promise<
          {
              archived: boolean;
              audit_template_id: number
              | null;
              case_id: number | null;
              created_at: string;
              created_by: string | null;
              hidden: boolean;
              id: number;
              ran_against_charts_at: string | null;
              run_context: Json;
              session_id: number | null;
              status: string | null;
              summary: string | null;
              treatment_episode_id: string | null;
              trigger: string | null;
              triggered_at: string | null;
          },
      >

    • Parameters

      • runId: number
      • summary: string | null

      Returns Promise<
          {
              archived: boolean;
              audit_template_id: number
              | null;
              case_id: number | null;
              created_at: string;
              created_by: string | null;
              hidden: boolean;
              id: number;
              ran_against_charts_at: string | null;
              run_context: Json;
              session_id: number | null;
              status: string | null;
              summary: string | null;
              treatment_episode_id: string | null;
              trigger: string | null;
              triggered_at: string | null;
          },
      >

    • Parameters

      • runId: number

      Returns Promise<void>

    • Parameters

      • params: {
            caseId: number;
            createdBy?: string;
            ranAgainstChartsAt?: string | null;
            runContext?: {
                scopedCharts: { fileName: string | null; id: PatientChartId }[] | null;
            };
            templateId: number;
        }

      Returns Promise<
          {
              archived: boolean;
              audit_template_id: number
              | null;
              case_id: number | null;
              created_at: string;
              created_by: string | null;
              hidden: boolean;
              id: number;
              ran_against_charts_at: string | null;
              run_context: Json;
              session_id: number | null;
              status: string | null;
              summary: string | null;
              treatment_episode_id: string | null;
              trigger: string | null;
              triggered_at: string | null;
          },
      >

    • Parameters

      • auditRunIds: number[]
      • targetCaseId: number

      Returns Promise<number[]>

    • Parameters

      • options: { supabase: SupabaseClient<Database> }

      Returns this