Circle V2 API Docs
    Preparing search index...

    Class ClassifyAndSummarizeChartPrompt

    Tags a chart from our own vocabulary, summarizes it, and pulls out its dates.

    Hierarchy

    Index

    Constructors

    Properties

    modelOverride?: PromptModelConfig
    outputSchema: ZodObject<
        {
            authoredAt: ZodNullable<ZodString>;
            dateOfService: ZodNullable<ZodString>;
            summary: ZodString;
            tags: ZodArray<
                ZodObject<
                    {
                        rationale: ZodString;
                        tag: ZodEnum<
                            {
                                admission: "admission";
                                alcohol_withdrawal_assessment: "alcohol_withdrawal_assessment";
                                appointment: "appointment";
                                asam_assessment: "asam_assessment";
                                benzodiazepine_withdrawal_assessment: "benzodiazepine_withdrawal_assessment";
                                biopsychosocial: "biopsychosocial";
                                case_management_note: "case_management_note";
                                clinical_orders: "clinical_orders";
                                consent_form: "consent_form";
                                continuing_care_plan: "continuing_care_plan";
                                diagnosis: "diagnosis";
                                discharge_instructions: "discharge_instructions";
                                discharge_summary: "discharge_summary";
                                family_session_note: "family_session_note";
                                glucose_log: "glucose_log";
                                group_note: "group_note";
                                history_and_physical: "history_and_physical";
                                individual_therapy_note: "individual_therapy_note";
                                insurance: "insurance";
                                lab_result: "lab_result";
                                level_of_care_determination: "level_of_care_determination";
                                medication_administration_record: "medication_administration_record";
                                medication_reconciliation: "medication_reconciliation";
                                nursing_intake: "nursing_intake";
                                opioid_withdrawal_assessment: "opioid_withdrawal_assessment";
                                other: "other";
                                program_history: "program_history";
                                progress_note: "progress_note";
                                psychiatric_evaluation: "psychiatric_evaluation";
                                restraint_seclusion: "restraint_seclusion";
                                safety_plan: "safety_plan";
                                screening_instrument: "screening_instrument";
                                transfer_note: "transfer_note";
                                treatment_plan: "treatment_plan";
                                utilization_review: "utilization_review";
                                vital_signs: "vital_signs";
                            },
                        >;
                    },
                    $strip,
                >,
            >;
        },
        $strict,
    > = chartClassificationSchema

    Structured shape the model must return. Stays in code (the hub resolves text + model).

    snapshot: {
        commitHash: string;
        description: string;
        inputVariables: string[];
        model: { model: string; temperature: number };
        name: string;
        syncedFrom: string;
        tags: string[];
        template: string;
        templateFormat: string;
    } = snapshot

    Committed cold-start snapshot (hub name, template, model).

    Accessors

    • get promptName(): string

      Hub identifier — derived from the committed snapshot.

      Returns string

    Methods

    • Build the ChatOpenAI instance from the already-resolved config — resolve has applied any override by this point. Tests override this to inject a fake.

      Parameters

      Returns ChatOpenAI

    • Pure: map typed input to the hub template's variables. Unit-testable without an LLM.

      Parameters

      Returns Record<string, unknown>

    • Parameters

      Returns Promise<
          {
              authoredAt: string
              | null;
              dateOfService: string | null;
              summary: string;
              tags: {
                  rationale: string;
                  tag:
                      | "admission"
                      | "diagnosis"
                      | "insurance"
                      | "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";
              }[];
          },
      >

    • Resolve + format the prompt text without invoking the model. Useful for inspection, tests, and tooling that only needs the rendered string.

      Parameters

      Returns Promise<string>

    • Non-PII only. fileName is excluded deliberately — form titles carry patient names.

      Parameters

      Returns Record<string, unknown>