var express = require('express');
var router = express.Router();
var pipe = require('../transformers/pipe');

router.post('/\\$cds-hook', function(req, res, next) {

    var context = {
        requestParams: req.query || {},
        language: "fi",
        nation: "fi",
        cards: ["reminders", "guidelink", "cmrlink"]
    };

    pipe.execute(req, res, next, context);
});

router.get('/\\$cds-hook-metadata', function(req, res, next) {

    res.json({
        "resourceType" : "Parameters",
        "parameter" : [{
            "name" : "name",
            "valueString" : "EBMeDS patient view"
        }, {
            "name" : "description",
            "valueString" : "EBMeDS patient view"
        }, {
            "name" : "activity",
            "valueCoding" : {
                "system" : "http://cds-hooks.smarthealthit.org/activity",
                "code" : "patient-view"
            }
        }
        ]
    });
});

module.exports = router;
var express = require('express');
var router = express.Router();
var pipe = require('../transformers/pipe');

router.post('/\\$cds-hook', function(req, res, next) {

    var context = {
        requestParams: req.query || {},
        language: "en_US",
        nation: "US",
        cards: ["reminders", "guidelink", "cmrlink"]
    };

    pipe.execute(req, res, next, context);
});

router.get('/\\$cds-hook-metadata', function(req, res, next) {

    res.json({
        "resourceType" : "Parameters",
        "parameter" : [{
            "name" : "name",
            "valueString" : "EBMeDS patient view"
        }, {
            "name" : "description",
            "valueString" : "EBMeDS patient view"
        }, {
            "name" : "activity",
            "valueCoding" : {
                "system" : "http://cds-hooks.smarthealthit.org/activity",
                "code" : "patient-view"
            }
        }
        ]
    });
});

module.exports = router;
Change language to en_US for patient view API