packages/optimise-core/src/controllers/availableFieldController.js
Function getFields
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static getFields({ params, query }, res) { //bound to GETclinicalEvents and GETtestTypes too
const tableMap = {
visitFields: 'AVAILABLE_FIELDS_VISITS',
visitSections: 'AVAILABLE_VISIT_SECTIONS',
testFields: 'AVAILABLE_FIELDS_TESTS',