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;