Ajustadas las rutas de los servicios
This commit is contained in:
parent
a7cce12679
commit
a40f5744c9
@ -6,7 +6,6 @@ var logger = require('morgan');
|
|||||||
|
|
||||||
var iti65Router = require('./routes/iti65');
|
var iti65Router = require('./routes/iti65');
|
||||||
var iti67Router = require('./routes/iti67');
|
var iti67Router = require('./routes/iti67');
|
||||||
var iti68Router = require('./routes/iti68');
|
|
||||||
var iti78Router = require('./routes/iti78');
|
var iti78Router = require('./routes/iti78');
|
||||||
var iti104Router = require('./routes/iti104');
|
var iti104Router = require('./routes/iti104');
|
||||||
var vhlRouter = require('./routes/vhl');
|
var vhlRouter = require('./routes/vhl');
|
||||||
@ -17,15 +16,12 @@ app.use(logger('dev'));
|
|||||||
app.use(express.json({ type: ['application/json', 'application/fhir+json'] }));
|
app.use(express.json({ type: ['application/json', 'application/fhir+json'] }));
|
||||||
|
|
||||||
// ITI-65: Provide Document Bundle → POST /fhir/IPSTransaction (transaction Bundle)
|
// ITI-65: Provide Document Bundle → POST /fhir/IPSTransaction (transaction Bundle)
|
||||||
// POST /fhir/Bundle (IPS document Bundle)
|
// POST /fhir/IPSDocument (IPS document Bundle)
|
||||||
app.use('/fhir', iti65Router);
|
app.use('/fhir', iti65Router);
|
||||||
|
|
||||||
// ITI-67: Find Document References → GET /fhir/DocumentReference
|
// ITI-67: Find Document References → GET /fhir/DocumentReference
|
||||||
app.use('/fhir', iti67Router);
|
app.use('/fhir', iti67Router);
|
||||||
|
|
||||||
// ITI-68: Retrieve Document → GET /fhir/Bundle?url=[URL_Directa]
|
|
||||||
app.use('/fhir', iti68Router);
|
|
||||||
|
|
||||||
// ITI-78: Patient Demographics → GET /fhir/Patient, GET /fhir/Patient/:id
|
// ITI-78: Patient Demographics → GET /fhir/Patient, GET /fhir/Patient/:id
|
||||||
app.use('/fhir', iti78Router);
|
app.use('/fhir', iti78Router);
|
||||||
|
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
const config = require('../config');
|
|
||||||
const { getResourceByUrl } = require('../services/fhir');
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ITI-68: Retrieve Document (MHD)
|
|
||||||
*
|
|
||||||
* GET /fhir/Bundle/:id
|
|
||||||
*
|
|
||||||
* Proxy transparente al servidor HAPI FHIR subyacente.
|
|
||||||
*/
|
|
||||||
async function getBundleById(req, res, next) {
|
|
||||||
try {
|
|
||||||
const bundle = await getResourceByUrl(`${config.fhir.url}/Bundle/${req.params.id}`);
|
|
||||||
res.status(200).json(bundle);
|
|
||||||
} catch (err) {
|
|
||||||
next(err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = { getBundleById };
|
|
||||||
@ -6,6 +6,6 @@ const { provideIPSTransaction, provideIPSDocumentBundle } = require('../controll
|
|||||||
router.post('/IPSTransaction', provideIPSTransaction);
|
router.post('/IPSTransaction', provideIPSTransaction);
|
||||||
|
|
||||||
// ITI-65: Provide Document Bundle — variante IPS document Bundle (type: document)
|
// ITI-65: Provide Document Bundle — variante IPS document Bundle (type: document)
|
||||||
router.post('/Bundle', provideIPSDocumentBundle);
|
router.post('/IPSDocument', provideIPSDocumentBundle);
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
const express = require('express');
|
|
||||||
const router = express.Router();
|
|
||||||
const { getBundleById } = require('../controllers/iti68');
|
|
||||||
|
|
||||||
// ITI-68: Retrieve Document → GET /fhir/Bundle/:id
|
|
||||||
router.get('/Bundle/:id', getBundleById);
|
|
||||||
|
|
||||||
module.exports = router;
|
|
||||||
@ -26,8 +26,7 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ITI-65: Provide Document Bundle — IPS document Bundle
|
# ITI-65: Provide Document Bundle — IPS document Bundle
|
||||||
# ITI-68: Retrieve Document
|
location /fhir/IPSDocument {
|
||||||
location /fhir/Bundle {
|
|
||||||
proxy_pass http://bus_gateway;
|
proxy_pass http://bus_gateway;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|||||||
@ -42,8 +42,7 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ITI-65: Provide Document Bundle — IPS document Bundle
|
# ITI-65: Provide Document Bundle — IPS document Bundle
|
||||||
# ITI-68: Retrieve Document
|
location /fhir/IPSDocument {
|
||||||
location /fhir/Bundle {
|
|
||||||
proxy_pass http://bus_gateway;
|
proxy_pass http://bus_gateway;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user