-
Notifications
You must be signed in to change notification settings - Fork 4
/
routes.js
37 lines (31 loc) · 1.45 KB
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const fs = require("fs");
const { Plugin, pluginGroup } = require("./plugins/plugin.class");
let pluginsConfig;
if (fs.existsSync("./plugins/config.js")) {
pluginsConfig = require("./plugins/config").pluginsConfig;
} else {
pluginsConfig = require("./plugins/config.template").pluginsConfig;
}
function loadAllPlugin() {
for (let pluginName in pluginsConfig) {
let plugin = new Plugin(pluginName, pluginsConfig[pluginName]);
plugin.load();
pluginGroup.add(plugin);
}
}
module.exports = function (app) {
loadAllPlugin();
app.use("/dicom-web", require("./api/dicom-web/stow-rs.route"));
app.use("/dicom-web", require("./api/dicom-web/qido-rs.route"));
app.use("/dicom-web", require("./api/dicom-web/wado-rs-instance.route"));
app.use("/dicom-web", require("./api/dicom-web/wado-rs-metadata.route"));
app.use("/dicom-web", require("./api/dicom-web/wado-rs-rendered.route"));
app.use("/dicom-web", require("./api/dicom-web/wado-rs-bulkdata.route"));
app.use("/dicom-web", require("./api/dicom-web/wado-rs-thumbnail.route"));
app.use("/dicom-web", require("./api/dicom-web/delete.route"));
app.use("/dicom-web", require("./api/dicom-web/ups-rs.route"));
app.use("/dicom-web", require("./api/dicom-web/mwl-rs.route"));
app.use("/dicom-web", require("./api/dicom-web/pam-rs.route"));
app.use("/wado", require("./api/WADO-URI"));
app.use("/fhir-convert", require("./api/fhir-convert"));
};