glutenfree
Version:
A profiler/loganalyzer for nginx/Cetrea Aw.
39 lines (30 loc) • 1.27 kB
JavaScript
// Generated by CoffeeScript 1.6.3
var Mapper, PatientsMapper,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Mapper = require("../Mapper.js").mapper;
PatientsMapper = (function(_super) {
__extends(PatientsMapper, _super);
function PatientsMapper() {
this.identifier = "patients";
}
PatientsMapper.prototype.schema = function(method, action, endpoint, fun, args) {
switch (fun.toLowerCase()) {
case "listtasksforinboundpt":
return this.map(["Organization.Id"], args);
case "ptlistbyorgandtask":
return this.map(["Organization.Id", "Task.Id"], args);
}
};
PatientsMapper.prototype.applySchema = function(method, action, endpoint, fun, schema) {
switch (fun.toLowerCase()) {
case "listtasksforinboundpt":
case "ptlistbyorgandtask":
return this.unmap(schema);
default:
return winston.warn("no such fun", fun);
}
};
return PatientsMapper;
})(Mapper);
exports.mapper = new PatientsMapper();