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