"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 = exports.bulletCategory = exports.templateType = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const zod_1 = __importDefault(require("zod"));
/**
 * Available Templates
 *
 * The action currently supports only the "Complete H&P (1 col)" template.
 *
 * For a complete list of available templates and their descriptions, refer to the external documentation:
 * https://docs.elationhealth.com/reference/the-visit-note-object#allowed-values
 */
exports.templateType = zod_1.default.enum(['Complete H&P (1 col)']);
/**
 * Available Bullet Categories
 *
 * The action currently supports only the "ROS" (Review of Systems) bullet category.
 *
 * For a complete list of bullet categories and their descriptions, refer to the external documentation:
 * https://docs.elationhealth.com/reference/the-visit-note-object#allowed-values
 */
exports.bulletCategory = zod_1.default.enum(['ROS']);
exports.fields = {
    patientId: {
        id: 'patientId',
        label: 'Patient ID',
        description: '',
        type: extensions_core_1.FieldType.NUMERIC,
        required: true,
    },
    template: {
        id: 'template',
        label: 'Template',
        description: 'Visit note template. Currently we only support Complete H&P (1 col).',
        type: extensions_core_1.FieldType.STRING,
        required: true,
        options: {
            dropdownOptions: Object.values(exports.templateType.enum).map((template) => ({
                label: template,
                value: template,
            })),
        },
    },
    category: {
        id: 'category',
        label: 'Category',
        description: 'Bullet category. Currently we only support ROS.',
        type: extensions_core_1.FieldType.STRING,
        required: true,
        options: {
            dropdownOptions: Object.values(exports.bulletCategory.enum).map((category) => ({
                label: category,
                value: category,
            })),
        },
    },
    physicianId: {
        id: 'physicianId',
        label: 'Physician ID',
        description: 'Prescribing physician ID',
        type: extensions_core_1.FieldType.NUMERIC,
        required: true,
    },
    authorId: {
        id: 'authorId',
        label: 'Author',
        description: 'The author of a note. Should be the ID of a User in Elation.',
        type: extensions_core_1.FieldType.NUMERIC,
        required: true,
    },
    text: {
        id: 'text',
        label: 'Text',
        description: 'Text of a note',
        type: extensions_core_1.FieldType.TEXT,
        required: true,
    },
    type: {
        id: 'type',
        label: 'Type',
        description: 'Type of visit note. Defaults to Office Visit Note.',
        type: extensions_core_1.FieldType.STRING,
        required: false,
    },
    confidential: {
        id: 'confidential',
        label: 'Confidential',
        description: 'Whether this note is confidential to the practice and shouldn`t be shared automatically with third parties. Defaults to false.',
        type: extensions_core_1.FieldType.BOOLEAN,
        required: false,
    },
};
exports.FieldsValidationSchema = zod_1.default.object({
    patientId: extensions_core_1.NumericIdSchema,
    template: exports.templateType,
    category: exports.bulletCategory,
    physicianId: extensions_core_1.NumericIdSchema,
    authorId: extensions_core_1.NumericIdSchema,
    text: zod_1.default.string(),
    type: zod_1.default.string().optional(),
    confidential: zod_1.default.boolean().optional(),
});
//# sourceMappingURL=fields.js.map