"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extensionSchema = exports.basicExtension = exports.referredPharmacyExtension = exports.administrativeNoteExtension = exports.clinicalNoteExtension = exports.timezoneExtension = exports.raceExtension = exports.ethnicityExtension = exports.birthsexExtension = void 0;
const zod_1 = require("zod");
exports.birthsexExtension = zod_1.z.object({
    url: zod_1.z.string(),
    valueCode: zod_1.z.enum(['M', 'F', 'O', 'UNK']),
});
exports.ethnicityExtension = zod_1.z.object({
    url: zod_1.z.string(),
    extension: zod_1.z.array(zod_1.z.object({
        url: zod_1.z.string().optional(),
        valueCoding: zod_1.z.object({
            code: zod_1.z.string(),
            system: zod_1.z.string(),
        }),
        valueString: zod_1.z.string().optional(),
    })),
});
exports.raceExtension = zod_1.z.object({
    url: zod_1.z.string(),
    extension: zod_1.z.array(zod_1.z.object({
        url: zod_1.z.string().optional(),
        valueCoding: zod_1.z.object({
            system: zod_1.z.string(),
            code: zod_1.z.string(),
        }),
        valueString: zod_1.z.string().optional(),
    })),
});
exports.timezoneExtension = zod_1.z.object({
    url: zod_1.z.string(),
    valueCode: zod_1.z.string(),
});
exports.clinicalNoteExtension = zod_1.z.object({
    url: zod_1.z.string(),
    valueString: zod_1.z.string(),
});
exports.administrativeNoteExtension = zod_1.z.object({
    url: zod_1.z.string(),
    valueString: zod_1.z.string(),
});
exports.referredPharmacyExtension = zod_1.z.object({
    url: zod_1.z.string(),
    extension: zod_1.z.array(zod_1.z.object({
        url: zod_1.z.string(),
        valueIdentifier: zod_1.z.object({
            value: zod_1.z.string(),
            system: zod_1.z.string(),
        }),
        valueString: zod_1.z.string().optional(),
    })),
});
exports.basicExtension = zod_1.z.object({
    url: zod_1.z.string(),
    extension: zod_1.z.array(zod_1.z.object({
        url: zod_1.z.string(),
        valueString: zod_1.z.string(),
    })),
});
exports.extensionSchema = zod_1.z.union([
    exports.birthsexExtension,
    exports.ethnicityExtension,
    exports.raceExtension,
    exports.timezoneExtension,
    exports.clinicalNoteExtension,
    exports.administrativeNoteExtension,
    exports.referredPharmacyExtension,
    exports.basicExtension,
]);
//# sourceMappingURL=extension.zod.js.map