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:
parent
d32c802c48
commit
6fab08b12b
@ -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
|
* GET /fhir/Bundle/:id/$icvp2
|
||||||
*/
|
*/
|
||||||
@ -67,5 +79,5 @@ async function getMeow(req, res, next) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
getDDCC, getDVC, getICVP2, getMeow,
|
getDDCC, getDVC, getICVP, getICVP2, getMeow,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
const express = require('express');
|
const express = require('express');
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
const {
|
const {
|
||||||
getDDCC, getDVC, getICVP2, getMeow,
|
getDDCC, getDVC, getICVP, getICVP2, getMeow,
|
||||||
} = require('../controllers/bundleSigner');
|
} = require('../controllers/bundleSigner');
|
||||||
|
|
||||||
// Transformaciones IPS delegadas al nodo nacional (bundle-signer):
|
// Transformaciones IPS delegadas al nodo nacional (bundle-signer):
|
||||||
// obtienen el Bundle del HAPI FHIR local y postean al nodo nacional.
|
// obtienen el Bundle del HAPI FHIR local y postean al nodo nacional.
|
||||||
router.get('/Bundle/:id/([\$])ddcc', getDDCC);
|
router.get('/Bundle/:id/([\$])ddcc', getDDCC);
|
||||||
router.get('/Bundle/:id/([\$])dvc', getDVC);
|
router.get('/Bundle/:id/([\$])dvc', getDVC);
|
||||||
|
router.get('/Bundle/:id/([\$])icvp', getICVP);
|
||||||
router.get('/Bundle/:id/([\$])icvp2', getICVP2);
|
router.get('/Bundle/:id/([\$])icvp2', getICVP2);
|
||||||
router.get('/Bundle/:id/([\$])meow', getMeow);
|
router.get('/Bundle/:id/([\$])meow', getMeow);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user