From 342f5128c4af6f658bcb5d02c5ace8fcf2a39712 Mon Sep 17 00:00:00 2001 From: Ole <12736698+ole4ryb@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:46:03 +0000 Subject: [PATCH] updating a log message to be more clear (#1017) --- .../java/uk/nhs/adaptors/gp2gp/ehr/EhrResendController.java | 4 +++- .../uk/nhs/adaptors/gp2gp/ehr/EhrResendControllerTest.java | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/EhrResendController.java b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/EhrResendController.java index 5e2e7c2a2..22bfa2e2d 100644 --- a/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/EhrResendController.java +++ b/service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/EhrResendController.java @@ -59,7 +59,9 @@ public ResponseEntity scheduleEhrExtractResend(@PathVariable String conv if (hasNoErrorsInEhrReceivedAcknowledgement(ehrExtractStatus) && ehrExtractStatus.getError() == null) { var details = getCodeableConcept(PRECONDITION_FAILED); - var diagnostics = "The current resend operation is still in progress. Please wait for it to complete before retrying"; + var diagnostics = "The current patient transfer operation is still in progress. " + + "The conversation can only be resent after a negative acknowledgement is sent/received, " + + "or no acknowledgement is received from the requesting side 8 days after sending the EHR."; var operationOutcome = createOperationOutcome(OperationOutcome.IssueType.BUSINESSRULE, OperationOutcome.IssueSeverity.ERROR, details, diff --git a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/EhrResendControllerTest.java b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/EhrResendControllerTest.java index 44afbd7c6..5a02cbf60 100644 --- a/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/EhrResendControllerTest.java +++ b/service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/EhrResendControllerTest.java @@ -39,8 +39,10 @@ @ExtendWith(MockitoExtension.class) class EhrResendControllerTest { - public static final String DIAGNOSTICS_MSG = - "The current resend operation is still in progress. Please wait for it to complete before retrying"; + public static final String DIAGNOSTICS_MSG + = "The current patient transfer operation is still in progress. " + + "The conversation can only be resent after a negative acknowledgement is sent/received, " + + "or no acknowledgement is received from the requesting side 8 days after sending the EHR."; private static final Instant NOW = Instant.parse("2024-01-01T10:00:00Z"); private static final Instant FIVE_DAYS_AGO = NOW.minus(Duration.ofDays(5)); private static final String URI_TYPE = "https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1";