From 8cf56551d17f403b53f4ed8512f63576c8def93d Mon Sep 17 00:00:00 2001 From: IamMujuziMoses Date: Mon, 4 Sep 2023 20:13:24 +0300 Subject: [PATCH] RESTWS-716: Orders resource returns no results when only status is specified --- .../rest/web/v1_0/resource/openmrs1_10/OrderResource1_10.java | 2 +- .../v1_0/controller/openmrs1_10/OrderController1_10Test.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/OrderResource1_10.java b/omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/OrderResource1_10.java index 7aa36d0a6..6ce57c38d 100644 --- a/omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/OrderResource1_10.java +++ b/omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/OrderResource1_10.java @@ -275,7 +275,7 @@ protected PageableResult doSearch(RequestContext context) throws ResponseExcepti return new NeedsPaging(orders, context); } } else { - throw new InvalidSearchException("Please specify patient parameter with valid patientUuid"); + throw new InvalidSearchException("Please provide patientUuid in the patient parameter"); } } diff --git a/omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_10/OrderController1_10Test.java b/omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_10/OrderController1_10Test.java index 53462086f..323a4265c 100644 --- a/omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_10/OrderController1_10Test.java +++ b/omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_10/OrderController1_10Test.java @@ -592,7 +592,7 @@ public void invalidCareCenterShouldThrowException() throws Exception { } @Test(expected = InvalidSearchException.class) - public void doSearch_shouldThrowExceptionIfNoPatientUuidIsSpecified() throws Exception { + public void doSearch_shouldReturnExceptionIfNoPatientUuidIsSpecified() throws Exception { MockHttpServletRequest req = newGetRequest(getURI(), new Parameter("status", "active") );