"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "createTriage", {
    enumerable: true,
    get: function() {
        return createTriage;
    }
});
const _randomRecord = require("../randomRecord.js");
const _index = require("../../fake/index.js");
const createTriage = async ({ models, encounterId, practitionerId })=>{
    const { Triage } = models;
    // Triage.create has business logic that creates an encounter as part of the
    // triage workflow — bypass it with build().save() for seeding.
    await Triage.build((0, _index.fake)(Triage, {
        encounterId: encounterId || await (0, _randomRecord.randomRecordId)(models, 'Encounter'),
        practitionerId: practitionerId || await (0, _randomRecord.randomRecordId)(models, 'User'),
        score: _index.chance.pickone([
            '1',
            '2',
            '3',
            '4',
            '5'
        ])
    })).save();
};

//# sourceMappingURL=triage.js.map