From a87323184300e9adbe8af9c18e37df38336ee203 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Auad Date: Thu, 30 Apr 2026 03:41:57 +0000 Subject: [PATCH] Renombrados metodos del controlador de Patient para mayor claridad --- bus-gateway/controllers/iti78.js | 6 +++--- bus-gateway/routes/iti78.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bus-gateway/controllers/iti78.js b/bus-gateway/controllers/iti78.js index 0983f63..5afc0bb 100644 --- a/bus-gateway/controllers/iti78.js +++ b/bus-gateway/controllers/iti78.js @@ -8,7 +8,7 @@ const { searchPatient, getPatientById } = require('../services/patient'); * GET /fhir/Patient * Forwards the raw FHIR query parameters to the Bus and returns the Bundle result. */ -async function queryPatientDemographics(req, res, next) { +async function listPatient(req, res, next) { try { const token = await getBusToken(config.bus.url, config.bus.jwtSecret, config.bus.issuer, config.bus.mpiScope); const response = await searchPatient(token, req.query); @@ -22,7 +22,7 @@ async function queryPatientDemographics(req, res, next) { * GET /fhir/Patient/:id * Forwards the request to the Bus and returns the Patient resource. */ -async function findPatientById(req, res, next) { +async function getPatientById(req, res, next) { try { const { id } = req.params; const token = await getBusToken(config.bus.url, config.bus.jwtSecret, config.bus.issuer, config.bus.mpiScope); @@ -33,4 +33,4 @@ async function findPatientById(req, res, next) { } } -module.exports = { queryPatientDemographics, getPatientById: findPatientById }; +module.exports = { listPatient, getPatientById }; diff --git a/bus-gateway/routes/iti78.js b/bus-gateway/routes/iti78.js index 70200cc..001093f 100644 --- a/bus-gateway/routes/iti78.js +++ b/bus-gateway/routes/iti78.js @@ -1,10 +1,10 @@ const express = require('express'); const router = express.Router(); -const { queryPatientDemographics, getPatientById } = require('../controllers/iti78'); +const { listPatient, getPatientById } = require('../controllers/iti78'); // ITI-78: Mobile Patient Demographics Query // TOOD: Cambiar ruta por ITI78 -router.get('/iti78', queryPatientDemographics); +router.get('/iti78', listPatient); router.get('/iti78/:id', getPatientById); module.exports = router;