Agrega proxy GET /fhir/Bundle/:id/$icvp hacia el nodo nacional

Sigue el mismo patrón que $ddcc, $dvc, $icvp2 y $meow: obtiene el
Bundle del HAPI FHIR local y delega la transformación al nodo
nacional, que ahora soporta POST /Bundle/$icvp.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Alejandro Gomez Auad 2026-07-23 14:59:06 +00:00
parent d32c802c48
commit 6fab08b12b
2 changed files with 15 additions and 2 deletions

View File

@ -42,6 +42,18 @@ async function getDVC(req, res, next) {
}
}
/**
* GET /fhir/Bundle/:id/$icvp
*/
async function getICVP(req, res, next) {
try {
const response = await transformBundle(req.params.id, 'icvp', req.query);
res.status(response.status).json(response.data);
} catch (err) {
next(err);
}
}
/**
* GET /fhir/Bundle/:id/$icvp2
*/
@ -67,5 +79,5 @@ async function getMeow(req, res, next) {
}
module.exports = {
getDDCC, getDVC, getICVP2, getMeow,
getDDCC, getDVC, getICVP, getICVP2, getMeow,
};

View File

@ -1,13 +1,14 @@
const express = require('express');
const router = express.Router();
const {
getDDCC, getDVC, getICVP2, getMeow,
getDDCC, getDVC, getICVP, getICVP2, getMeow,
} = require('../controllers/bundleSigner');
// Transformaciones IPS delegadas al nodo nacional (bundle-signer):
// obtienen el Bundle del HAPI FHIR local y postean al nodo nacional.
router.get('/Bundle/:id/([\$])ddcc', getDDCC);
router.get('/Bundle/:id/([\$])dvc', getDVC);
router.get('/Bundle/:id/([\$])icvp', getICVP);
router.get('/Bundle/:id/([\$])icvp2', getICVP2);
router.get('/Bundle/:id/([\$])meow', getMeow);