diff --git a/sanitas_backend/src/handlers/GetLinkedPatient/get-linked-patient.integration.test.mjs b/sanitas_backend/src/handlers/GetLinkedPatient/get-linked-patient.integration.test.mjs index 9c5c63de..c8706d65 100644 --- a/sanitas_backend/src/handlers/GetLinkedPatient/get-linked-patient.integration.test.mjs +++ b/sanitas_backend/src/handlers/GetLinkedPatient/get-linked-patient.integration.test.mjs @@ -33,7 +33,8 @@ describe("Get linked patient integration tests", () => { expect(response.status).toBe(200); const { linkedPatientId } = response.data; - expect(linkedPatientId).toEqual(patientData.idPatient); + expect(linkedPatientId).toBeDefined(); + expect(linkedPatientId).toEqual(patientData.patientId); }); test("Get null for patient with no linked patient", async () => { diff --git a/sanitas_backend/src/handlers/GetLinkedPatient/get-linked-patient.mjs b/sanitas_backend/src/handlers/GetLinkedPatient/get-linked-patient.mjs index 643df1d8..fa0b0e7d 100644 --- a/sanitas_backend/src/handlers/GetLinkedPatient/get-linked-patient.mjs +++ b/sanitas_backend/src/handlers/GetLinkedPatient/get-linked-patient.mjs @@ -59,7 +59,7 @@ export const handler = async (event, context) => { .build(); } - const linkedPatientId = dbResponse.rows[0].id_paciente; + const linkedPatientId = dbResponse.rows[0].id; return responseBuilder .setStatusCode(200) .setBody({ linkedPatientId })