From 6fab08b12bc0e6c638e9b0ec58fd8c1aac783251 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Auad Date: Thu, 23 Jul 2026 14:59:06 +0000 Subject: [PATCH] Agrega proxy GET /fhir/Bundle/:id/$icvp hacia el nodo nacional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- bus-gateway/controllers/bundleSigner.js | 14 +++++++++++++- bus-gateway/routes/bundleSigner.js | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/bus-gateway/controllers/bundleSigner.js b/bus-gateway/controllers/bundleSigner.js index 70cb9de..2fc1085 100644 --- a/bus-gateway/controllers/bundleSigner.js +++ b/bus-gateway/controllers/bundleSigner.js @@ -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, }; diff --git a/bus-gateway/routes/bundleSigner.js b/bus-gateway/routes/bundleSigner.js index ea80891..f193130 100644 --- a/bus-gateway/routes/bundleSigner.js +++ b/bus-gateway/routes/bundleSigner.js @@ -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);