Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 5x 5x 5x 22x 7x 7x 7x | const { VERSIONS } = require('../../constants');
const service = require('./metadata.service.js');
/**
* @name exports
* @summary Metadata controller
*/
module.exports.getCapabilityStatement = ({ profiles, security, statementGenerator }) => {
return (req, res, next) => {
// Use our service to generate the capability statement
const { base_version: fhirVersion } = req.sanitized_args;
return service
.generateCapabilityStatement({
fhirVersion: fhirVersion || VERSIONS['4_0_1'],
profiles,
security,
statementGenerator,
})
.then((statement) => res.status(200).json(statement))
.catch((err) => next(err));
};
};
|