"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.pathwayStart = void 0;
const lodash_1 = require("lodash");
const dataPoints = {};
exports.pathwayStart = {
    key: 'pathwayStart',
    description: 'Start a pathway via webhook. No data points are expected nor required.',
    dataPoints,
    onWebhookReceived: async ({ payload }, onSuccess) => {
        if (!(0, lodash_1.isNil)(payload.patient_id)) {
            const { patient_id } = payload;
            await onSuccess({
                data_points: {},
                patient_id,
            });
        }
        else {
            await onSuccess({
                data_points: {},
            });
        }
    },
};
//# sourceMappingURL=pathwayStart.js.map