glutenfree
Version:
A profiler/loganalyzer for nginx/Cetrea Aw.
48 lines (38 loc) • 1.72 kB
text/coffeescript
_ = require("underscore")
winston = require("winston")
util = require("util")
Mapper = require("../Mapper.js").mapper
###
/json/genericlists/genericListDataFromHints/{"Organizations":["Organization.Seng","Organization.OP","Organization.Opv"],"Tasks":["PatientLogisticsTask.PatientLogisticsActivity.InternalMove"],"GenericListType":"Activity","States":["NotBegun","Ongoing"]}/Name,MovePatient,SSN,Gender,Specialty,Diagnosis,Start,State,FromOrganization,Advis,ToOrganization,Receiver,Sender
###
class GenericListsMapper extends Mapper
constructor: ->
= "genericlists"
# schema will return a schema of arguments and types (and current values)
schema: (method, action, endpoint, fun, args) ->
switch fun.toLowerCase()
when "genericlistdata", "genericlistdatafromdefinition"
when "listdatabyid" # AKUT.printliste
# will return a usable path based on the function; fun, the given schema and the schema given
# (the schema must also contain values)
applySchema: (method, action, endpoint, fun, schema) ->
switch fun.toLowerCase()
when "genericlistdata", "genericlistdatafromdefinition", "listdatabyid"
else
winston.warn "no such fun", fun
exports.mapper = new GenericListsMapper()