Renombrado el metodo download de iti68.js por getBundleById

This commit is contained in:
Alejandro Gomez Auad 2026-04-30 03:40:33 +00:00
parent 28acb2b130
commit d2a6132f11
2 changed files with 9 additions and 9 deletions

View File

@ -2,7 +2,7 @@ const createError = require('http-errors');
const axios = require('axios'); const axios = require('axios');
async function getRemoteDocument(url){ async function getRemoteDocument(url) {
const response = await axios.get(parsedUrl.toString(), { const response = await axios.get(parsedUrl.toString(), {
responseType: 'arraybuffer', responseType: 'arraybuffer',
headers: { headers: {
@ -23,7 +23,7 @@ async function getRemoteDocument(url){
* 2. This gateway performs a P2P GET to that URL, bypassing the Bus. * 2. This gateway performs a P2P GET to that URL, bypassing the Bus.
* 3. The raw document (PDF, XML, etc.) is forwarded back to HIS_A. * 3. The raw document (PDF, XML, etc.) is forwarded back to HIS_A.
*/ */
async function download(req, res, next) { async function getBundleById(req, res, next) {
try { try {
const url = req.query.url; const url = req.query.url;
if (!url) { if (!url) {
@ -52,4 +52,4 @@ async function download(req, res, next) {
} }
} }
module.exports = { download }; module.exports = { getBundleById };

View File

@ -1,8 +1,8 @@
const express = require('express'); const express = require('express');
const router = express.Router(); const router = express.Router();
const { download } = require('../controllers/iti68'); const { getBundleById } = require('../controllers/iti68');
// ITI-68: Retrieve Document → GET /fhir/Binary?url=[URL_Directa] // ITI-68: Retrieve Document → GET /fhir/Binary?url=[URL_Directa]
router.get('/Binary', download); router.get('/Bundle', getBundleById);
module.exports = router; module.exports = router;