Ajustadas las rutas de los servicios

This commit is contained in:
Alejandro Gomez Auad 2026-04-30 16:24:13 +00:00
parent a7cce12679
commit a40f5744c9
6 changed files with 4 additions and 39 deletions

View File

@ -6,7 +6,6 @@ var logger = require('morgan');
var iti65Router = require('./routes/iti65');
var iti67Router = require('./routes/iti67');
var iti68Router = require('./routes/iti68');
var iti78Router = require('./routes/iti78');
var iti104Router = require('./routes/iti104');
var vhlRouter = require('./routes/vhl');
@ -17,15 +16,12 @@ app.use(logger('dev'));
app.use(express.json({ type: ['application/json', 'application/fhir+json'] }));
// 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);
// ITI-67: Find Document References → GET /fhir/DocumentReference
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
app.use('/fhir', iti78Router);

View File

@ -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 };

View File

@ -6,6 +6,6 @@ const { provideIPSTransaction, provideIPSDocumentBundle } = require('../controll
router.post('/IPSTransaction', provideIPSTransaction);
// ITI-65: Provide Document Bundle — variante IPS document Bundle (type: document)
router.post('/Bundle', provideIPSDocumentBundle);
router.post('/IPSDocument', provideIPSDocumentBundle);
module.exports = router;

View File

@ -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;

View File

@ -26,8 +26,7 @@ http {
}
# ITI-65: Provide Document Bundle — IPS document Bundle
# ITI-68: Retrieve Document
location /fhir/Bundle {
location /fhir/IPSDocument {
proxy_pass http://bus_gateway;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;

View File

@ -42,8 +42,7 @@ http {
}
# ITI-65: Provide Document Bundle — IPS document Bundle
# ITI-68: Retrieve Document
location /fhir/Bundle {
location /fhir/IPSDocument {
proxy_pass http://bus_gateway;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;