Compare commits
No commits in common. "3287b9cde9b1f2596da6483ab122a86cf5d4c772" and "9f5dac1a30fc5b5679e351859f59351ab583e601" have entirely different histories.
3287b9cde9
...
9f5dac1a30
@ -11,8 +11,9 @@ const { getBusToken } = require('../utils/busAuth');
|
|||||||
async function createPatient(req, res, next) {
|
async function createPatient(req, res, next) {
|
||||||
try {
|
try {
|
||||||
const token = await getBusToken(config.bus.url, config.bus.jwtSecret, config.bus.issuer, config.bus.mpiScope);
|
const token = await getBusToken(config.bus.url, config.bus.jwtSecret, config.bus.issuer, config.bus.mpiScope);
|
||||||
const patient = await busCreatePatient(token, req.body)
|
const response = await busCreatePatient(token, req.body)
|
||||||
res.status(200).json(patient);
|
const patientResponse = await findPatientByUrl(token, response.headers['location']);
|
||||||
|
res.status(200).json(patientResponse.data);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
next(err);
|
next(err);
|
||||||
}
|
}
|
||||||
@ -25,8 +26,8 @@ async function createPatient(req, res, next) {
|
|||||||
async function updatePatient(req, res, next) {
|
async function updatePatient(req, res, next) {
|
||||||
try {
|
try {
|
||||||
const token = await getBusToken(config.bus.url, config.bus.jwtSecret, config.bus.issuer, config.bus.mpiScope);
|
const token = await getBusToken(config.bus.url, config.bus.jwtSecret, config.bus.issuer, config.bus.mpiScope);
|
||||||
const patient = await busUpdatePatient(token, req.body)
|
const response = await busUpdatePatient(token, req.body)
|
||||||
res.status(200).json(patient);
|
res.status(200).json(response.data);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
next(err);
|
next(err);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,10 +3,9 @@ const createError = require('http-errors');
|
|||||||
const config = require('../config');
|
const config = require('../config');
|
||||||
const { getBusToken, createBusRequest } = require('../utils/busAuth');
|
const { getBusToken, createBusRequest } = require('../utils/busAuth');
|
||||||
const { findPatient } = require('../services/patient');
|
const { findPatient } = require('../services/patient');
|
||||||
const { createDocumentReference, findDocumentReferenceById } = require('../services/documentReference');
|
const { createDocumentReference, findDocumentReferenceById, findDocumentReferenceByUrl } = require('../services/documentReference');
|
||||||
const { logger } = require('../utils/logger');
|
const { logger } = require('../utils/logger');
|
||||||
const { v4: uuidv4 } = require('uuid');
|
const { v4: uuidv4 } = require('uuid');
|
||||||
const { getResourceByUrl, processDocumentBundleTransaction } = require('../services/fhir');
|
|
||||||
|
|
||||||
|
|
||||||
const DOCUMENT_REFERENCE_RESOURCE_TYPE = "DocumentReference";
|
const DOCUMENT_REFERENCE_RESOURCE_TYPE = "DocumentReference";
|
||||||
@ -20,9 +19,30 @@ const DNI_SYSTEM = 'http://www.renaper.gob.ar/dni';
|
|||||||
const CUSTODIAN_ID_SYSTEM = 'http://federador.msal.gob.ar/uri';
|
const CUSTODIAN_ID_SYSTEM = 'http://federador.msal.gob.ar/uri';
|
||||||
const MASTER_ID_SYSTEM = 'urn:ietf:rfc:3986'
|
const MASTER_ID_SYSTEM = 'urn:ietf:rfc:3986'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Procesa una transacción y devuelve los recursos persistidos en el servidor HAPI FHIR
|
||||||
|
* @param {*} transactionBundle
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async function processTransaction(transactionBundle) {
|
||||||
|
const response = await axios.post(`${config.fhir.url}`, transactionBundle, {
|
||||||
|
headers: { 'Content-Type': 'application/fhir+json' },
|
||||||
|
});
|
||||||
|
if (response.status !== 200) {
|
||||||
|
throw createError(response.status, response.data.issue.diagnostics);
|
||||||
|
}
|
||||||
|
const processed = response.data;
|
||||||
|
const resources = [];
|
||||||
|
const responses = processed.entry.map(e => e.response);
|
||||||
|
for (i = 0; i < responses.length; i++) {
|
||||||
|
const resource = await axios.get(`${config.fhir.url}/${responses[i].location}`)
|
||||||
|
resources.push(resource);
|
||||||
|
}
|
||||||
|
return Promise.resolve(resources);
|
||||||
|
}
|
||||||
|
|
||||||
function extractResource(resources, resourceType) {
|
function extractResource(resources, resourceType) {
|
||||||
return resources.filter(r => r.resourceType === resourceType)[0];
|
return resources.map(r => r.data).filter(r => r.resourceType === resourceType)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractLocalIdentifier(patient) {
|
function extractLocalIdentifier(patient) {
|
||||||
@ -31,8 +51,43 @@ function extractLocalIdentifier(patient) {
|
|||||||
})[0];
|
})[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateDocumentReferenceResource(subjectReference, bundleUrl) {
|
/**
|
||||||
const documentRefernece = {
|
*
|
||||||
|
* @param {*} documentReference
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async function getBusCustodianIdentifier() {
|
||||||
|
return Promise.resolve({ system: CUSTODIAN_ID_SYSTEM, value: config.bus.issuer });
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getBusPatientReference(patient, token) {
|
||||||
|
const localIdentifier = extractLocalIdentifier(patient);
|
||||||
|
const nationalPatientResponse = await findPatient(token, { identifier: `${localIdentifier.system}|${localIdentifier.value}` });
|
||||||
|
const nationalPatientBundle = nationalPatientResponse.data;
|
||||||
|
if (nationalPatientBundle.total == 0) {
|
||||||
|
throw createError(404, 'Patient does not exists');
|
||||||
|
}
|
||||||
|
// NOTE:La siguiente consulta no debería traer mas de un resultado.
|
||||||
|
return Promise.resolve(nationalPatientBundle.entry[0].fullUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getLocalIPSDocumentReference(localIPSDocument) {
|
||||||
|
return Promise.resolve(`${config.baseURL}/fhir/Bundle/${localIPSDocument.id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Crea un nuevo document refrence en el bus
|
||||||
|
* @param {*} token
|
||||||
|
* @param {*} localIPSDocument
|
||||||
|
* @param {*} localPatient
|
||||||
|
* @param {*} localDocumentReference
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async function createBusDocumentReference(token, localIPSDocument, localPatient) {
|
||||||
|
const busCustodianIdentifier = await getBusCustodianIdentifier();
|
||||||
|
const busPatientReference = await getBusPatientReference(localPatient, token);
|
||||||
|
const localIPSDocumentReference = await getLocalIPSDocumentReference(localIPSDocument);
|
||||||
|
const busDocumentReference = {
|
||||||
resourceType: 'DocumentReference',
|
resourceType: 'DocumentReference',
|
||||||
status: 'current',
|
status: 'current',
|
||||||
masterIdentifier: {
|
masterIdentifier: {
|
||||||
@ -51,29 +106,23 @@ function generateDocumentReferenceResource(subjectReference, bundleUrl) {
|
|||||||
},
|
},
|
||||||
date: new Date().toISOString(),
|
date: new Date().toISOString(),
|
||||||
subject: {
|
subject: {
|
||||||
reference: subjectReference
|
reference: busPatientReference
|
||||||
},
|
},
|
||||||
custodian: {
|
custodian: {
|
||||||
identifier: { system: CUSTODIAN_ID_SYSTEM, value: config.bus.issuer },
|
identifier: busCustodianIdentifier,
|
||||||
},
|
},
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
attachment: {
|
attachment: {
|
||||||
url: bundleUrl,
|
url: localIPSDocumentReference,
|
||||||
contentType: 'application/fhir+json'
|
contentType: 'application/fhir+json'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
return documentRefernece;
|
const response = await createDocumentReference(token, busDocumentReference);
|
||||||
}
|
const created = await findDocumentReferenceByUrl(token, response.headers['location']);
|
||||||
|
return created.data;
|
||||||
async function getResourcesFromTransactionResponse(transactionResponse) {
|
|
||||||
const promises = transactionResponse.entry.map(async (e) => {
|
|
||||||
const resource = getResourceByUrl(`${config.fhir.url}/${e.response.location}`);
|
|
||||||
return resource;
|
|
||||||
});
|
|
||||||
return Promise.all(promises);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,30 +149,15 @@ async function provideDocumentBundle(req, res, next) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Paso 1: Ejecuto la transcción en el servidor hapi subyacente
|
// Paso 1: Ejecuto la transcción en el servidor hapi subyacente
|
||||||
const transactionResponse = await processDocumentBundleTransaction(transaction);
|
const resources = await processTransaction(transaction);
|
||||||
|
|
||||||
const resources = await getResourcesFromTransactionResponse(transactionResponse);
|
|
||||||
|
|
||||||
// Paso 2: Obtengo el paciente local (tal como se guardo en la trasnaccion)
|
// Paso 2: Obtengo el paciente local (tal como se guardo en la trasnaccion)
|
||||||
const localPatient = extractResource(resources, PATIENT_RESOURCE_TYPE);
|
const localPatient = extractResource(resources, PATIENT_RESOURCE_TYPE);
|
||||||
// Paso 3: Obtengo el documento IPS local (tal como se guardo en la transacción)
|
// Paso 3: Obtengo el documento IPS local (tal como se guardo en la transacción)
|
||||||
const localIPSDocument = extractResource(resources, IPS_DOCUMENT_RESOURCE_TYPE)
|
const localIPSDocument = extractResource(resources, IPS_DOCUMENT_RESOURCE_TYPE)
|
||||||
|
// Paso 4: Creo el document reference en el indice de atenciones
|
||||||
|
const busDocumentReference = await createBusDocumentReference(token, localIPSDocument, localPatient);
|
||||||
|
|
||||||
const localPatientIdentifier = extractLocalIdentifier(localPatient);
|
return res.status(200).json(busDocumentReference);
|
||||||
|
|
||||||
const patientSearchset = await findPatient(token, { identifier: `${localPatientIdentifier.system}|${localPatientIdentifier.value}` });
|
|
||||||
if (patientSearchset.total == 0) {
|
|
||||||
throw createError(404, 'Patient does not exists');
|
|
||||||
}
|
|
||||||
const nationalPatientId = patientSearchset.entry[0].fullUrl;
|
|
||||||
const bundleReference = `${config.baseURL}/fhir/Bundle/${localIPSDocument.id}`;
|
|
||||||
|
|
||||||
|
|
||||||
const documentReference = generateDocumentReferenceResource(nationalPatientId, bundleReference);
|
|
||||||
|
|
||||||
const createdDocumentReference = await createDocumentReference(token, documentReference);
|
|
||||||
|
|
||||||
return res.status(200).json(createdDocumentReference);
|
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
next(err);
|
next(err);
|
||||||
|
|||||||
@ -14,8 +14,15 @@ function extractNationalIdentifier(patient) {
|
|||||||
return identifiers.find(id => id.system === NATIONAL_ID_SYSTEM) || null;
|
return identifiers.find(id => id.system === NATIONAL_ID_SYSTEM) || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getPatient(token, identifier) {
|
||||||
|
const response = await findPatient(token, { identifier: identifier });
|
||||||
|
return Promise.resolve(response.data.entry[0].fullUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getDocumentReferencesForPatient(token, patient) {
|
||||||
|
const response = await findDocumentReferenceByPatient(token, patient)
|
||||||
|
return Promise.resolve(response.data);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* ITI-67: Find Document References (MHD)
|
* ITI-67: Find Document References (MHD)
|
||||||
*
|
*
|
||||||
@ -45,15 +52,14 @@ async function listDocumentReference(req, res, next) {
|
|||||||
].join(',')
|
].join(',')
|
||||||
);
|
);
|
||||||
// 1. Obtengo el identificador nacional del paciente en forma de referencia
|
// 1. Obtengo el identificador nacional del paciente en forma de referencia
|
||||||
const patientSearchset = await findPatient(token, { identifier: localPatientIdentifier });
|
const patientId = await getPatient(token, localPatientIdentifier);
|
||||||
if (!patientSearchset) {
|
if (!patientId) {
|
||||||
throw createError(422, 'Could not resolve national identifier for the given patient');
|
throw createError(422, 'Could not resolve national identifier for the given patient');
|
||||||
}
|
}
|
||||||
const patientNationalId = patientSearchset.entry[0].fullUrl
|
|
||||||
// 2. Obtengo el listado de entradas del indice de atenciones asociadada al id de paciente.
|
// 2. Obtengo el listado de entradas del indice de atenciones asociadada al id de paciente.
|
||||||
const documentReferenceSearchset = await findDocumentReferenceByPatient(token, patientNationalId)
|
const bundle = await getDocumentReferencesForPatient(token, patientId);
|
||||||
|
|
||||||
res.status(200).json(documentReferenceSearchset);
|
res.status(200).json(bundle);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
next(err);
|
next(err);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,15 @@ const createError = require('http-errors');
|
|||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
|
|
||||||
|
|
||||||
|
async function getRemoteDocument(url) {
|
||||||
|
const response = await axios.get(parsedUrl.toString(), {
|
||||||
|
responseType: 'arraybuffer',
|
||||||
|
headers: {
|
||||||
|
Accept: req.headers['accept'] || '*/*',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return response
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,7 +35,7 @@ async function getBundleById(req, res, next) {
|
|||||||
} catch {
|
} catch {
|
||||||
throw createError(400, 'Invalid document URL');
|
throw createError(400, 'Invalid document URL');
|
||||||
}
|
}
|
||||||
const response = await getDocumentBundleByUrl(url);
|
const response = await getRemoteDocument(url);
|
||||||
|
|
||||||
const contentType = response.headers['content-type'];
|
const contentType = response.headers['content-type'];
|
||||||
if (contentType) res.setHeader('Content-Type', contentType);
|
if (contentType) res.setHeader('Content-Type', contentType);
|
||||||
|
|||||||
@ -11,8 +11,8 @@ const { findPatient, findPatientById } = require('../services/patient');
|
|||||||
async function listPatient(req, res, next) {
|
async function listPatient(req, res, next) {
|
||||||
try {
|
try {
|
||||||
const token = await getBusToken(config.bus.url, config.bus.jwtSecret, config.bus.issuer, config.bus.mpiScope);
|
const token = await getBusToken(config.bus.url, config.bus.jwtSecret, config.bus.issuer, config.bus.mpiScope);
|
||||||
const searchset = await findPatient(token, req.query);
|
const response = await findPatient(token, req.query);
|
||||||
res.status(200).json(searchset);
|
res.status(200).json(response.data);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
next(err);
|
next(err);
|
||||||
}
|
}
|
||||||
@ -26,8 +26,8 @@ async function getPatientById(req, res, next) {
|
|||||||
try {
|
try {
|
||||||
const { id } = req.params;
|
const { id } = req.params;
|
||||||
const token = await getBusToken(config.bus.url, config.bus.jwtSecret, config.bus.issuer, config.bus.mpiScope);
|
const token = await getBusToken(config.bus.url, config.bus.jwtSecret, config.bus.issuer, config.bus.mpiScope);
|
||||||
const patient = await findPatientById(token, id)
|
const response = await findPatientById(token, id)
|
||||||
res.status(200).json(patient);
|
res.status(200).json(response.data);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
next(err);
|
next(err);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ async function findDocumentReferenceById(token, id) {
|
|||||||
const response = await request.get(
|
const response = await request.get(
|
||||||
URL.parse(`${INDICE_ATENCION_URL}/${id}`)
|
URL.parse(`${INDICE_ATENCION_URL}/${id}`)
|
||||||
);
|
);
|
||||||
return response.data;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ async function findDocumentReferenceByUrl(token, id) {
|
|||||||
const response = await request.get(
|
const response = await request.get(
|
||||||
URL.parse(id, INDICE_ATENCION_URL)
|
URL.parse(id, INDICE_ATENCION_URL)
|
||||||
);
|
);
|
||||||
return response.data;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,8 +45,8 @@ async function createDocumentReference(token, documentReference) {
|
|||||||
URL.parse(INDICE_ATENCION_URL),
|
URL.parse(INDICE_ATENCION_URL),
|
||||||
documentReference
|
documentReference
|
||||||
);
|
);
|
||||||
const location = maskPrivateURL(response.headers['location']);
|
response.headers['location'] = maskPrivateURL(response.headers['location']);
|
||||||
return findDocumentReferenceByUrl(token, location);
|
return response;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Searches DocumentReferences in the document registry by patient subject identifier
|
* Searches DocumentReferences in the document registry by patient subject identifier
|
||||||
@ -65,7 +65,7 @@ async function findDocumentReferenceBySubject(token, subjectSystem, subjectValue
|
|||||||
params: { subject: `${subjectSystem}|${subjectValue}` },
|
params: { subject: `${subjectSystem}|${subjectValue}` },
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return response.data;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,7 +84,7 @@ async function findDocumentReferenceByPatient(token, patientId) {
|
|||||||
params: { subject: patientId },
|
params: { subject: patientId },
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return response.data;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -108,7 +108,7 @@ async function searchDocumentReference(token, subject, custodian, type) {
|
|||||||
type: `${type.system}|${type.value}`,
|
type: `${type.system}|${type.value}`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return response.data;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -116,5 +116,6 @@ module.exports = {
|
|||||||
createDocumentReference,
|
createDocumentReference,
|
||||||
findDocumentReferenceBySubject,
|
findDocumentReferenceBySubject,
|
||||||
findDocumentReferenceByPatient,
|
findDocumentReferenceByPatient,
|
||||||
searchDocumentReference
|
searchDocumentReference,
|
||||||
|
findDocumentReferenceByUrl
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,43 +0,0 @@
|
|||||||
const config = require("../config");
|
|
||||||
const axios = require('axios');
|
|
||||||
|
|
||||||
|
|
||||||
const HAPI_FHIR_SERVER_URL = config.fhir.url;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Procesa una transacción y devuelve los recursos persistidos en el servidor HAPI FHIR
|
|
||||||
* @param {*} transactionBundle
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
async function processDocumentBundleTransaction(transactionBundle) {
|
|
||||||
const response = await axios.post(HAPI_FHIR_SERVER_URL, transactionBundle, {
|
|
||||||
headers: { 'Content-Type': 'application/fhir+json' },
|
|
||||||
});
|
|
||||||
return response.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async function getResourceByUrl(url) {
|
|
||||||
const response = await axios.get(
|
|
||||||
URL.parse(url, HAPI_FHIR_SERVER_URL)
|
|
||||||
);
|
|
||||||
return response.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async function getDocumentBundleByUrl(url) {
|
|
||||||
const response = await axios.get(parsedUrl.toString(), {
|
|
||||||
responseType: 'arraybuffer',
|
|
||||||
headers: {
|
|
||||||
Accept: req.headers['accept'] || '*/*',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
return response.data
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
processDocumentBundleTransaction,
|
|
||||||
getResourceByUrl
|
|
||||||
}
|
|
||||||
@ -24,8 +24,8 @@ async function createPatient(token, patient) {
|
|||||||
URL.parse(MPI_URL),
|
URL.parse(MPI_URL),
|
||||||
patient
|
patient
|
||||||
);
|
);
|
||||||
const location = maskPrivateURL(response.headers['location']);
|
response.headers['location'] = maskPrivateURL(response.headers['location']);
|
||||||
return findPatientByUrl(token, location);
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ async function updatePatient(token, patient, id) {
|
|||||||
URL.parse(`${MPI_URL}/${id}`),
|
URL.parse(`${MPI_URL}/${id}`),
|
||||||
patient
|
patient
|
||||||
);
|
);
|
||||||
return response.data;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -83,7 +83,7 @@ async function findPatient(token, criteria = {}) {
|
|||||||
return l;
|
return l;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return response.data;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function findPatientByUrl(token, url) {
|
async function findPatientByUrl(token, url) {
|
||||||
@ -91,7 +91,7 @@ async function findPatientByUrl(token, url) {
|
|||||||
const response = await request.get(
|
const response = await request.get(
|
||||||
URL.parse(url, MPI_URL)
|
URL.parse(url, MPI_URL)
|
||||||
);
|
);
|
||||||
return response.data;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -106,7 +106,7 @@ async function findPatientById(token, id) {
|
|||||||
const response = await request.get(
|
const response = await request.get(
|
||||||
URL.parse(`${MPI_URL}/${id}`)
|
URL.parse(`${MPI_URL}/${id}`)
|
||||||
);
|
);
|
||||||
return response.data;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -140,7 +140,7 @@ async function findPatientByMatch(token, patient, count) {
|
|||||||
URL.parse('$match', MPI_URL),
|
URL.parse('$match', MPI_URL),
|
||||||
parameters
|
parameters
|
||||||
);
|
);
|
||||||
return response.data;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { createPatient, findPatientById, findPatientByMatch, updatePatient, findPatient };
|
module.exports = { createPatient, findPatientById, findPatientByMatch, findPatientByUrl, updatePatient, findPatient };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user