"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.FieldsValidationSchema = exports.fields = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const DocumentReference_1 = require("../../../lib/api/customFhirSchemas/DocumentReference");
const lodash_1 = require("lodash");
const zod_1 = __importDefault(require("zod"));
exports.fields = {
    patientResourceId: {
        id: 'patientResourceId',
        label: 'Patient resource ID',
        type: extensions_core_1.FieldType.STRING,
        description: 'The patient’s FHIR resource ID.',
        required: true,
    },
    encounterResourceId: {
        id: 'encounterResourceId',
        label: 'Encounter resource ID',
        description: 'The FHIR resource ID of the related encounter.',
        type: extensions_core_1.FieldType.STRING,
        required: true,
    },
    status: {
        id: 'status',
        label: 'Document status',
        type: extensions_core_1.FieldType.STRING,
        required: true,
        options: {
            dropdownOptions: DocumentReference_1.StatusSchema._def.values.map((value) => ({
                value,
                label: (0, lodash_1.startCase)(value),
            })),
        },
    },
    type: {
        id: 'type',
        label: 'Document type',
        type: extensions_core_1.FieldType.STRING,
        required: true,
        options: {
            dropdownOptions: DocumentReference_1.TypeSchema._def.values.map((value) => ({
                value,
                label: (0, lodash_1.startCase)(value),
            })),
        },
    },
    note: {
        id: 'note',
        label: 'Note',
        type: extensions_core_1.FieldType.TEXT,
        required: true,
    },
};
exports.FieldsValidationSchema = zod_1.default.object({
    patientResourceId: zod_1.default.string().min(1),
    encounterResourceId: zod_1.default.string().min(1),
    status: DocumentReference_1.StatusSchema,
    type: DocumentReference_1.TypeSchema,
    note: zod_1.default.string().min(1),
});
//# sourceMappingURL=fields.js.map