Circle V2 API Docs
    Preparing search index...

    Variable patientChartPreprocessingRepoConst

    patientChartPreprocessingRepo: DbRepo<
        {
            getByChartId: (
                patientChartId: PatientChartId,
            ) => Promise<
                | {
                    created_at: DbDate;
                    entity_id: EntityId
                    | null;
                    error_message: string | null;
                    id: ChartPreprocessingId;
                    metadata:
                        | {
                            authorship: {
                                authoredAt: string
                                | null;
                                signatures: { role: ...; signedAt: ...; signer: ... }[];
                                signatureSource: "extractor" | "unavailable";
                            };
                            externalFormId?: string
                            | null;
                            structure: { characterCount: number; sectionHeadings: string[] };
                            tagRationales: Partial<
                                Record<
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...),
                                    string,
                                >,
                            >;
                            tags: (
                                | "admission"
                                | "insurance"
                                | "diagnosis"
                                | "biopsychosocial"
                                | "asam_assessment"
                                | "level_of_care_determination"
                                | "history_and_physical"
                                | "psychiatric_evaluation"
                                | "nursing_intake"
                                | "screening_instrument"
                                | "alcohol_withdrawal_assessment"
                                | "benzodiazepine_withdrawal_assessment"
                                | "opioid_withdrawal_assessment"
                                | "treatment_plan"
                                | "safety_plan"
                                | "continuing_care_plan"
                                | "progress_note"
                                | "group_note"
                                | "individual_therapy_note"
                                | "family_session_note"
                                | "case_management_note"
                                | "restraint_seclusion"
                                | "consent_form"
                                | "discharge_summary"
                                | "discharge_instructions"
                                | "transfer_note"
                                | "program_history"
                                | "appointment"
                                | "utilization_review"
                                | "vital_signs"
                                | "lab_result"
                                | "glucose_log"
                                | "clinical_orders"
                                | "medication_administration_record"
                                | "medication_reconciliation"
                                | "other"
                            )[];
                            units?: | {
                                charEnd: ...;
                                charStart: ...;
                                index: ...;
                                serviceDate: ...;
                                title: ...;
                            }[]
                            | null;
                        }
                        | null;
                    model: string
                    | null;
                    patient_chart_id: string & { __brand: "PatientChartId" };
                    patient_id: string & { __brand: "PatientId" };
                    processed_at: DbDate | null;
                    prompt_commit_hash: string | null;
                    prompt_name: string | null;
                    schema_version: number;
                    service_date: DbDate | null;
                    source_hash: string | null;
                    status: "processing" | "failed" | "completed" | "skipped";
                    summary: string | null;
                    text_source:
                        | "formatter"
                        | "extraction"
                        | "notes_fields"
                        | "parsed_content"
                        | "formatter_error"
                        | "no_content"
                        | null;
                    updated_at: DbDate;
                }
                | null,
            >;
            getByChartIds: (
                patientChartIds: PatientChartId[],
            ) => Promise<
                {
                    created_at: DbDate;
                    entity_id: EntityId
                    | null;
                    error_message: string | null;
                    id: ChartPreprocessingId;
                    metadata:
                        | {
                            authorship: {
                                authoredAt: string
                                | null;
                                signatures: { role: ...; signedAt: ...; signer: ... }[];
                                signatureSource: "extractor" | "unavailable";
                            };
                            externalFormId?: string
                            | null;
                            structure: { characterCount: number; sectionHeadings: string[] };
                            tagRationales: Partial<
                                Record<
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...)
                                    | (...),
                                    string,
                                >,
                            >;
                            tags: (
                                | "admission"
                                | "insurance"
                                | "diagnosis"
                                | "biopsychosocial"
                                | "asam_assessment"
                                | "level_of_care_determination"
                                | "history_and_physical"
                                | "psychiatric_evaluation"
                                | "nursing_intake"
                                | "screening_instrument"
                                | "alcohol_withdrawal_assessment"
                                | "benzodiazepine_withdrawal_assessment"
                                | "opioid_withdrawal_assessment"
                                | "treatment_plan"
                                | "safety_plan"
                                | "continuing_care_plan"
                                | "progress_note"
                                | "group_note"
                                | "individual_therapy_note"
                                | "family_session_note"
                                | "case_management_note"
                                | "restraint_seclusion"
                                | "consent_form"
                                | "discharge_summary"
                                | "discharge_instructions"
                                | "transfer_note"
                                | "program_history"
                                | "appointment"
                                | "utilization_review"
                                | "vital_signs"
                                | "lab_result"
                                | "glucose_log"
                                | "clinical_orders"
                                | "medication_administration_record"
                                | "medication_reconciliation"
                                | "other"
                            )[];
                            units?: | {
                                charEnd: ...;
                                charStart: ...;
                                index: ...;
                                serviceDate: ...;
                                title: ...;
                            }[]
                            | null;
                        }
                        | null;
                    model: string
                    | null;
                    patient_chart_id: string & { __brand: "PatientChartId" };
                    patient_id: string & { __brand: "PatientId" };
                    processed_at: DbDate | null;
                    prompt_commit_hash: string | null;
                    prompt_name: string | null;
                    schema_version: number;
                    service_date: DbDate | null;
                    source_hash: string | null;
                    status: "processing" | "failed" | "completed" | "skipped";
                    summary: string | null;
                    text_source:
                        | "formatter"
                        | "extraction"
                        | "notes_fields"
                        | "parsed_content"
                        | "formatter_error"
                        | "no_content"
                        | null;
                    updated_at: DbDate;
                }[],
            >;
            markFailed: (
                params: MarkChartPreprocessingFailedParams,
            ) => Promise<
                {
                    created_at: DbDate;
                    entity_id: EntityId
                    | null;
                    error_message: string | null;
                    id: ChartPreprocessingId;
                    metadata:
                        | {
                            authorship: {
                                authoredAt: string
                                | null;
                                signatures: {
                                    role: (...) | (...);
                                    signedAt: (...) | (...);
                                    signer: (...) | (...);
                                }[];
                                signatureSource: "extractor"
                                | "unavailable";
                            };
                            externalFormId?: string
                            | null;
                            structure: { characterCount: number; sectionHeadings: string[] };
                            tagRationales: Partial<
                                Record<
                                    | "admission"
                                    | "insurance"
                                    | "diagnosis"
                                    | "biopsychosocial"
                                    | "asam_assessment"
                                    | "level_of_care_determination"
                                    | "history_and_physical"
                                    | "psychiatric_evaluation"
                                    | "nursing_intake"
                                    | "screening_instrument"
                                    | "alcohol_withdrawal_assessment"
                                    | "benzodiazepine_withdrawal_assessment"
                                    | "opioid_withdrawal_assessment"
                                    | "treatment_plan"
                                    | "safety_plan"
                                    | "continuing_care_plan"
                                    | "progress_note"
                                    | "group_note"
                                    | "individual_therapy_note"
                                    | "family_session_note"
                                    | "case_management_note"
                                    | "restraint_seclusion"
                                    | "consent_form"
                                    | "discharge_summary"
                                    | "discharge_instructions"
                                    | "transfer_note"
                                    | "program_history"
                                    | "appointment"
                                    | "utilization_review"
                                    | "vital_signs"
                                    | "lab_result"
                                    | "glucose_log"
                                    | "clinical_orders"
                                    | "medication_administration_record"
                                    | "medication_reconciliation"
                                    | "other",
                                    string,
                                >,
                            >;
                            tags: (
                                | "admission"
                                | "insurance"
                                | "diagnosis"
                                | "biopsychosocial"
                                | "asam_assessment"
                                | "level_of_care_determination"
                                | "history_and_physical"
                                | "psychiatric_evaluation"
                                | "nursing_intake"
                                | "screening_instrument"
                                | "alcohol_withdrawal_assessment"
                                | "benzodiazepine_withdrawal_assessment"
                                | "opioid_withdrawal_assessment"
                                | "treatment_plan"
                                | "safety_plan"
                                | "continuing_care_plan"
                                | "progress_note"
                                | "group_note"
                                | "individual_therapy_note"
                                | "family_session_note"
                                | "case_management_note"
                                | "restraint_seclusion"
                                | "consent_form"
                                | "discharge_summary"
                                | "discharge_instructions"
                                | "transfer_note"
                                | "program_history"
                                | "appointment"
                                | "utilization_review"
                                | "vital_signs"
                                | "lab_result"
                                | "glucose_log"
                                | "clinical_orders"
                                | "medication_administration_record"
                                | "medication_reconciliation"
                                | "other"
                            )[];
                            units?: | {
                                charEnd: number;
                                charStart: number;
                                index: number;
                                serviceDate: (...)
                                | (...);
                                title: string;
                            }[]
                            | null;
                        }
                        | null;
                    model: string
                    | null;
                    patient_chart_id: string & { __brand: "PatientChartId" };
                    patient_id: string & { __brand: "PatientId" };
                    processed_at: DbDate | null;
                    prompt_commit_hash: string | null;
                    prompt_name: string | null;
                    schema_version: number;
                    service_date: DbDate | null;
                    source_hash: string | null;
                    status: "processing" | "failed" | "completed" | "skipped";
                    summary: string | null;
                    text_source:
                        | "formatter"
                        | "extraction"
                        | "notes_fields"
                        | "parsed_content"
                        | "formatter_error"
                        | "no_content"
                        | null;
                    updated_at: DbDate;
                },
            >;
            markProcessing: (
                key: ChartPreprocessingKey,
            ) => Promise<
                {
                    created_at: DbDate;
                    entity_id: EntityId
                    | null;
                    error_message: string | null;
                    id: ChartPreprocessingId;
                    metadata:
                        | {
                            authorship: {
                                authoredAt: string
                                | null;
                                signatures: {
                                    role: (...) | (...);
                                    signedAt: (...) | (...);
                                    signer: (...) | (...);
                                }[];
                                signatureSource: "extractor"
                                | "unavailable";
                            };
                            externalFormId?: string
                            | null;
                            structure: { characterCount: number; sectionHeadings: string[] };
                            tagRationales: Partial<
                                Record<
                                    | "admission"
                                    | "insurance"
                                    | "diagnosis"
                                    | "biopsychosocial"
                                    | "asam_assessment"
                                    | "level_of_care_determination"
                                    | "history_and_physical"
                                    | "psychiatric_evaluation"
                                    | "nursing_intake"
                                    | "screening_instrument"
                                    | "alcohol_withdrawal_assessment"
                                    | "benzodiazepine_withdrawal_assessment"
                                    | "opioid_withdrawal_assessment"
                                    | "treatment_plan"
                                    | "safety_plan"
                                    | "continuing_care_plan"
                                    | "progress_note"
                                    | "group_note"
                                    | "individual_therapy_note"
                                    | "family_session_note"
                                    | "case_management_note"
                                    | "restraint_seclusion"
                                    | "consent_form"
                                    | "discharge_summary"
                                    | "discharge_instructions"
                                    | "transfer_note"
                                    | "program_history"
                                    | "appointment"
                                    | "utilization_review"
                                    | "vital_signs"
                                    | "lab_result"
                                    | "glucose_log"
                                    | "clinical_orders"
                                    | "medication_administration_record"
                                    | "medication_reconciliation"
                                    | "other",
                                    string,
                                >,
                            >;
                            tags: (
                                | "admission"
                                | "insurance"
                                | "diagnosis"
                                | "biopsychosocial"
                                | "asam_assessment"
                                | "level_of_care_determination"
                                | "history_and_physical"
                                | "psychiatric_evaluation"
                                | "nursing_intake"
                                | "screening_instrument"
                                | "alcohol_withdrawal_assessment"
                                | "benzodiazepine_withdrawal_assessment"
                                | "opioid_withdrawal_assessment"
                                | "treatment_plan"
                                | "safety_plan"
                                | "continuing_care_plan"
                                | "progress_note"
                                | "group_note"
                                | "individual_therapy_note"
                                | "family_session_note"
                                | "case_management_note"
                                | "restraint_seclusion"
                                | "consent_form"
                                | "discharge_summary"
                                | "discharge_instructions"
                                | "transfer_note"
                                | "program_history"
                                | "appointment"
                                | "utilization_review"
                                | "vital_signs"
                                | "lab_result"
                                | "glucose_log"
                                | "clinical_orders"
                                | "medication_administration_record"
                                | "medication_reconciliation"
                                | "other"
                            )[];
                            units?: | {
                                charEnd: number;
                                charStart: number;
                                index: number;
                                serviceDate: (...)
                                | (...);
                                title: string;
                            }[]
                            | null;
                        }
                        | null;
                    model: string
                    | null;
                    patient_chart_id: string & { __brand: "PatientChartId" };
                    patient_id: string & { __brand: "PatientId" };
                    processed_at: DbDate | null;
                    prompt_commit_hash: string | null;
                    prompt_name: string | null;
                    schema_version: number;
                    service_date: DbDate | null;
                    source_hash: string | null;
                    status: "processing" | "failed" | "completed" | "skipped";
                    summary: string | null;
                    text_source:
                        | "formatter"
                        | "extraction"
                        | "notes_fields"
                        | "parsed_content"
                        | "formatter_error"
                        | "no_content"
                        | null;
                    updated_at: DbDate;
                },
            >;
            markSkipped: (
                params: MarkChartPreprocessingSkippedParams,
            ) => Promise<
                {
                    created_at: DbDate;
                    entity_id: EntityId
                    | null;
                    error_message: string | null;
                    id: ChartPreprocessingId;
                    metadata:
                        | {
                            authorship: {
                                authoredAt: string
                                | null;
                                signatures: {
                                    role: (...) | (...);
                                    signedAt: (...) | (...);
                                    signer: (...) | (...);
                                }[];
                                signatureSource: "extractor"
                                | "unavailable";
                            };
                            externalFormId?: string
                            | null;
                            structure: { characterCount: number; sectionHeadings: string[] };
                            tagRationales: Partial<
                                Record<
                                    | "admission"
                                    | "insurance"
                                    | "diagnosis"
                                    | "biopsychosocial"
                                    | "asam_assessment"
                                    | "level_of_care_determination"
                                    | "history_and_physical"
                                    | "psychiatric_evaluation"
                                    | "nursing_intake"
                                    | "screening_instrument"
                                    | "alcohol_withdrawal_assessment"
                                    | "benzodiazepine_withdrawal_assessment"
                                    | "opioid_withdrawal_assessment"
                                    | "treatment_plan"
                                    | "safety_plan"
                                    | "continuing_care_plan"
                                    | "progress_note"
                                    | "group_note"
                                    | "individual_therapy_note"
                                    | "family_session_note"
                                    | "case_management_note"
                                    | "restraint_seclusion"
                                    | "consent_form"
                                    | "discharge_summary"
                                    | "discharge_instructions"
                                    | "transfer_note"
                                    | "program_history"
                                    | "appointment"
                                    | "utilization_review"
                                    | "vital_signs"
                                    | "lab_result"
                                    | "glucose_log"
                                    | "clinical_orders"
                                    | "medication_administration_record"
                                    | "medication_reconciliation"
                                    | "other",
                                    string,
                                >,
                            >;
                            tags: (
                                | "admission"
                                | "insurance"
                                | "diagnosis"
                                | "biopsychosocial"
                                | "asam_assessment"
                                | "level_of_care_determination"
                                | "history_and_physical"
                                | "psychiatric_evaluation"
                                | "nursing_intake"
                                | "screening_instrument"
                                | "alcohol_withdrawal_assessment"
                                | "benzodiazepine_withdrawal_assessment"
                                | "opioid_withdrawal_assessment"
                                | "treatment_plan"
                                | "safety_plan"
                                | "continuing_care_plan"
                                | "progress_note"
                                | "group_note"
                                | "individual_therapy_note"
                                | "family_session_note"
                                | "case_management_note"
                                | "restraint_seclusion"
                                | "consent_form"
                                | "discharge_summary"
                                | "discharge_instructions"
                                | "transfer_note"
                                | "program_history"
                                | "appointment"
                                | "utilization_review"
                                | "vital_signs"
                                | "lab_result"
                                | "glucose_log"
                                | "clinical_orders"
                                | "medication_administration_record"
                                | "medication_reconciliation"
                                | "other"
                            )[];
                            units?: | {
                                charEnd: number;
                                charStart: number;
                                index: number;
                                serviceDate: (...)
                                | (...);
                                title: string;
                            }[]
                            | null;
                        }
                        | null;
                    model: string
                    | null;
                    patient_chart_id: string & { __brand: "PatientChartId" };
                    patient_id: string & { __brand: "PatientId" };
                    processed_at: DbDate | null;
                    prompt_commit_hash: string | null;
                    prompt_name: string | null;
                    schema_version: number;
                    service_date: DbDate | null;
                    source_hash: string | null;
                    status: "processing" | "failed" | "completed" | "skipped";
                    summary: string | null;
                    text_source:
                        | "formatter"
                        | "extraction"
                        | "notes_fields"
                        | "parsed_content"
                        | "formatter_error"
                        | "no_content"
                        | null;
                    updated_at: DbDate;
                },
            >;
            upsertCompleted: (
                params: UpsertCompletedChartPreprocessingParams,
            ) => Promise<
                {
                    created_at: DbDate;
                    entity_id: EntityId
                    | null;
                    error_message: string | null;
                    id: ChartPreprocessingId;
                    metadata:
                        | {
                            authorship: {
                                authoredAt: string
                                | null;
                                signatures: {
                                    role: (...) | (...);
                                    signedAt: (...) | (...);
                                    signer: (...) | (...);
                                }[];
                                signatureSource: "extractor"
                                | "unavailable";
                            };
                            externalFormId?: string
                            | null;
                            structure: { characterCount: number; sectionHeadings: string[] };
                            tagRationales: Partial<
                                Record<
                                    | "admission"
                                    | "insurance"
                                    | "diagnosis"
                                    | "biopsychosocial"
                                    | "asam_assessment"
                                    | "level_of_care_determination"
                                    | "history_and_physical"
                                    | "psychiatric_evaluation"
                                    | "nursing_intake"
                                    | "screening_instrument"
                                    | "alcohol_withdrawal_assessment"
                                    | "benzodiazepine_withdrawal_assessment"
                                    | "opioid_withdrawal_assessment"
                                    | "treatment_plan"
                                    | "safety_plan"
                                    | "continuing_care_plan"
                                    | "progress_note"
                                    | "group_note"
                                    | "individual_therapy_note"
                                    | "family_session_note"
                                    | "case_management_note"
                                    | "restraint_seclusion"
                                    | "consent_form"
                                    | "discharge_summary"
                                    | "discharge_instructions"
                                    | "transfer_note"
                                    | "program_history"
                                    | "appointment"
                                    | "utilization_review"
                                    | "vital_signs"
                                    | "lab_result"
                                    | "glucose_log"
                                    | "clinical_orders"
                                    | "medication_administration_record"
                                    | "medication_reconciliation"
                                    | "other",
                                    string,
                                >,
                            >;
                            tags: (
                                | "admission"
                                | "insurance"
                                | "diagnosis"
                                | "biopsychosocial"
                                | "asam_assessment"
                                | "level_of_care_determination"
                                | "history_and_physical"
                                | "psychiatric_evaluation"
                                | "nursing_intake"
                                | "screening_instrument"
                                | "alcohol_withdrawal_assessment"
                                | "benzodiazepine_withdrawal_assessment"
                                | "opioid_withdrawal_assessment"
                                | "treatment_plan"
                                | "safety_plan"
                                | "continuing_care_plan"
                                | "progress_note"
                                | "group_note"
                                | "individual_therapy_note"
                                | "family_session_note"
                                | "case_management_note"
                                | "restraint_seclusion"
                                | "consent_form"
                                | "discharge_summary"
                                | "discharge_instructions"
                                | "transfer_note"
                                | "program_history"
                                | "appointment"
                                | "utilization_review"
                                | "vital_signs"
                                | "lab_result"
                                | "glucose_log"
                                | "clinical_orders"
                                | "medication_administration_record"
                                | "medication_reconciliation"
                                | "other"
                            )[];
                            units?: | {
                                charEnd: number;
                                charStart: number;
                                index: number;
                                serviceDate: (...)
                                | (...);
                                title: string;
                            }[]
                            | null;
                        }
                        | null;
                    model: string
                    | null;
                    patient_chart_id: string & { __brand: "PatientChartId" };
                    patient_id: string & { __brand: "PatientId" };
                    processed_at: DbDate | null;
                    prompt_commit_hash: string | null;
                    prompt_name: string | null;
                    schema_version: number;
                    service_date: DbDate | null;
                    source_hash: string | null;
                    status: "processing" | "failed" | "completed" | "skipped";
                    summary: string | null;
                    text_source:
                        | "formatter"
                        | "extraction"
                        | "notes_fields"
                        | "parsed_content"
                        | "formatter_error"
                        | "no_content"
                        | null;
                    updated_at: DbDate;
                },
            >;
        },
    > = ...