From b459e5aa86742597852aac99e0f24d34f426ca47 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Auad Date: Thu, 30 Apr 2026 18:09:16 +0000 Subject: [PATCH] Se agrega el parametro patient.identifier al iti67 --- bus-gateway/controllers/iti67.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bus-gateway/controllers/iti67.js b/bus-gateway/controllers/iti67.js index 68c1c6b..2f24cd0 100644 --- a/bus-gateway/controllers/iti67.js +++ b/bus-gateway/controllers/iti67.js @@ -20,20 +20,22 @@ function extractNationalIdentifier(patient) { * ITI-67: Find Document References (MHD) * * GET /fhir/DocumentReference?subject=:localId + * GET /fhir/DocumentReference?patient.identifier=:localId * * Flow: * 1. Fetch the Patient from the Bus by local ID to obtain the national identifier. * 2. Search DocumentReferences in the Bus by that national identifier. * 3. Return the resulting Bundle. * - * Required query parameter: - * subject — local Patient ID in the Bus. + * Required query parameter (one of): + * subject — local Patient ID in the Bus. + * patient.identifier — same semantics, alternate FHIR parameter name. */ async function listDocumentReference(req, res, next) { try { - const localPatientIdentifier = req.query.subject; + const localPatientIdentifier = req.query.subject ?? req.query['patient.identifier']; if (!localPatientIdentifier) { - throw createError(400, 'Missing required query parameter: subject'); + throw createError(400, 'Missing required query parameter: subject or patient.identifier'); } const token = await getBusToken( config.bus.url,