Corregido erorres de tipeo en iti65
This commit is contained in:
parent
d3f3471f9f
commit
b939be580e
@ -16,8 +16,8 @@ const LIST_RESOURCE_TYPE = 'List';
|
||||
|
||||
const NATIONAL_ID_SYSTEM = 'https://federador.msal.gob.ar/patient-id';
|
||||
const DNI_SYSTEM = 'http://www.renaper.gob.ar/dni';
|
||||
const CUSTODIAN_ID_SYSTEM = 'https://federador.msal.gob.ar/uri';
|
||||
const MASTER_ID_SYSTEM = ''
|
||||
const CUSTODIAN_ID_SYSTEM = 'http://federador.msal.gob.ar/uri';
|
||||
const MASTER_ID_SYSTEM = 'urn:ietf:rfc:3986'
|
||||
|
||||
/**
|
||||
* Procesa una transacción y devuelve los recursos persistidos en el servidor HAPI FHIR
|
||||
@ -91,7 +91,8 @@ async function createBusDocumentReference(token, localIPSDocument, localPatient)
|
||||
resourceType: 'DocumentReference',
|
||||
status: 'current',
|
||||
masterIdentifier: {
|
||||
system: 'urn:ietf:rfc:3986',
|
||||
use: 'usual',
|
||||
system: MASTER_ID_SYSTEM,
|
||||
value: `urn:uuid:${uuidv4()}`
|
||||
},
|
||||
type: {
|
||||
@ -103,6 +104,7 @@ async function createBusDocumentReference(token, localIPSDocument, localPatient)
|
||||
},
|
||||
],
|
||||
},
|
||||
date: "2026-04-28T10:00:00-03:00",
|
||||
subject: {
|
||||
reference: busPatientReference
|
||||
},
|
||||
@ -113,6 +115,7 @@ async function createBusDocumentReference(token, localIPSDocument, localPatient)
|
||||
{
|
||||
attachment: {
|
||||
url: localIPSDocumentReference,
|
||||
contentType: 'application/fhir+json'
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -154,7 +157,7 @@ async function provideDocumentBundle(req, res, next) {
|
||||
// Paso 4: Creo el document reference en el indice de atenciones
|
||||
const busDocumentReference = await createBusDocumentReference(token, localIPSDocument, localPatient);
|
||||
|
||||
return status(200).json(busDocumentReference);
|
||||
return res.status(200).json(busDocumentReference);
|
||||
|
||||
} catch (err) {
|
||||
next(err);
|
||||
|
||||
@ -101,7 +101,7 @@ async function searchDocumentReference(token, subject, custodian, type) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
fetchDocumentRefernce: fetchDocumentReference,
|
||||
fetchDocumentReference,
|
||||
postDocumentReference,
|
||||
searchDocumentReferenceBySubject,
|
||||
searchDocumentReferenceByPatient,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user