import { type InitOptions, type Models } from '../types/model';
import type { Encounter } from './Encounter';
import type { Facility } from './Facility';
import { Model } from './Model';
import type { Patient } from './Patient';
import type { PatientIssue } from './PatientIssue';
import type { ProgramDataElement } from './ProgramDataElement';
import type { Survey } from './Survey';
import type { User } from './User';
/** @internal Use {@link SurveyResponse.createPatientIssues} instead. */
declare function _createPatientIssues(models: Models, questions: any[], patientId: Patient['id'], recordedDate?: PatientIssue['recordedDate']): Promise<void>;
/**
 * @internal Use {@link SurveyResponse.writeToPatientFields} instead
 * @privateRemarks DUPLICATED IN mobile/App/models/SurveyResponse.ts. Please keep in sync.
 */
declare function _writeToPatientFields(models: Models, facilityId: Facility['id'], questions: any[], answers: Record<ProgramDataElement['id'], any>, patientId: Patient['id'], surveyId: Survey['id'], userId: User['id'], submittedTime: string): Promise<void>;
export declare class SurveyResponse extends Model {
    id: string;
    startTime?: string;
    endTime?: string;
    result?: number;
    resultText?: string;
    /**
     * Not to be confused with metadata attribute `updated_at`. `edited_time` is non-NULL if and only if
     * this survey response has been meaningfully edited by a user via `PATCH /surveyResponse`.
     */
    editedTime?: string;
    notified?: boolean;
    metadata?: Record<string, any>;
    userId?: User['id'];
    surveyId?: Survey['id'];
    encounterId?: Encounter['id'];
    static initModel({ primaryKey, ...options }: InitOptions): void;
    static initRelations(models: Models): void;
    static buildPatientSyncFilter(patientCount: number, markedForSyncPatientsTable: string): string | null;
    static buildSyncLookupQueryDetails(): Promise<{
        select: string;
        joins: string;
    }>;
    static getSurveyEncounter({ encounterId, patientId, forceNewEncounter, reasonForEncounter, answers, ...responseData }: {
        encounterId: string | null;
        patientId: string;
        forceNewEncounter: boolean;
        reasonForEncounter: string;
        answers?: Record<string, any>;
        [key: string]: any;
    }): Promise<any>;
    static createWithAnswers(data: {
        answers: any[];
        surveyId: string;
        patientId: string;
        encounterId: string | null;
        forceNewEncounter: boolean;
        facilityId: string;
        [key: string]: any;
    }): Promise<SurveyResponse>;
    /**
     * Special case for answers that depend on creating a new record in the database and store the ID
     * of the new record in the answer body. Currently only used for photos.
     */
    static getBodyForAnswer(dataElementType: ProgramDataElement['type'], value: any, models: Models): Promise<string | null>;
    static createPatientIssues(...args: Parameters<typeof _createPatientIssues>): Promise<void>;
    static writeToPatientFields(...args: Parameters<typeof _writeToPatientFields>): Promise<void>;
    static handleSurveyResponseActions(models: Models, facilityId: Facility['id'], questions: any[], answers: Record<ProgramDataElement['id'], any>, patientId: Patient['id'], surveyId: Survey['id'], userId: User['id'], submittedTime: string): Promise<void>;
}
export {};
//# sourceMappingURL=SurveyResponse.d.ts.map