"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetPatientInputSchema = exports.PatientSchema = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const zod_1 = require("zod");
exports.PatientSchema = zod_1.z.object({
    id: zod_1.z.string(),
    identifier: zod_1.z.string().optional(),
    externalIdentifiers: zod_1.z
        .array(zod_1.z.object({
        combined: zod_1.z.string(),
        id: zod_1.z.string(),
        type: zod_1.z.string(),
    }))
        .optional(),
    active: zod_1.z.boolean().optional(),
    age: zod_1.z.string().optional(),
    dob: extensions_core_1.DateOnlySchema.optional(),
    email: zod_1.z.string().optional(),
    firstName: zod_1.z.string(), // required when creating a patient
    gender: zod_1.z.string().optional(),
    genderIdentity: zod_1.z
        .enum([
        'MALE',
        'FEMALE',
        'TRANS_MAN',
        'TRANS_WOMAN',
        'NON_CONFORMING',
        'DECLINE',
    ])
        .optional(),
    lastName: zod_1.z.string(), // required when creating a patient
    middleName: zod_1.z.string().optional(),
    mrn: zod_1.z.string().optional(),
    patientMetaData: zod_1.z
        .array(zod_1.z.object({
        contextType: zod_1.z.enum(['PREDEFINED', 'CUSTOM']),
        customFieldIdentifier: zod_1.z.string(),
        customFieldName: zod_1.z.string(),
        displayName: zod_1.z.string(),
        displayNames: zod_1.z.array(zod_1.z.string()),
        displayOptions: zod_1.z.enum([
            'PATIENT_LIST',
            'PATIENT_SEARCH',
            'PATIENT_HEADER',
            'PROVIDER_LIST',
            'PROVIDER_HEADER',
            'TASK_REQUIRED',
            'PROFILE_NAME',
            'PROFILE_HEADER',
        ]),
        fieldType: zod_1.z.enum([
            'TEXT',
            'LONG_TEXT',
            'NUMBER',
            'DATE',
            'DATE_TIME',
            'PICK_LIST',
            'BOOLEAN',
            'MULTI_SELECT',
            'HYPERLINK',
            'RELATIONSHIP',
        ]),
        sortIndex: zod_1.z.number(),
        value: zod_1.z.string(),
        values: zod_1.z.array(zod_1.z.string()),
    }))
        .optional(),
    patientStatus: zod_1.z.string().optional(),
    phoneHome: zod_1.z.string().optional(),
    phoneMobile: zod_1.z.string().optional(),
});
exports.GetPatientInputSchema = exports.PatientSchema.pick({
    id: true,
});
//# sourceMappingURL=patient.schema.js.map