Se agrega el parametro patient.identifier al iti67
This commit is contained in:
parent
49c0485f96
commit
b459e5aa86
@ -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:
|
||||
* 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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user