diff --git a/omod-2.5/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs2_5/OrderAttributeResource2_5.java b/omod-2.5/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs2_5/OrderAttributeResource2_5.java index b2edc0a00..16dd55c76 100644 --- a/omod-2.5/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs2_5/OrderAttributeResource2_5.java +++ b/omod-2.5/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs2_5/OrderAttributeResource2_5.java @@ -27,9 +27,9 @@ /** * {@link Resource} for OrderAttributes, supporting standard CRUD operations */ -@SubResource(parent = OrderResource2_2.class, path = "attribute", supportedClass = OrderAttribute.class, supportedOpenmrsVersions = { +@SubResource(parent = OrderResource2_5.class, path = "attribute", supportedClass = OrderAttribute.class, supportedOpenmrsVersions = { "2.5.* - 9.*"}) -public class OrderAttributeResource2_5 extends BaseAttributeCrudResource2_5 { +public class OrderAttributeResource2_5 extends BaseAttributeCrudResource2_5 { /** * Sets attributeType on the given OrderAttribute. diff --git a/omod-2.5/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs2_5/OrderAttributeController2_5Test.java b/omod-2.5/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs2_5/OrderAttributeController2_5Test.java index 3b2cb4e10..b1854312d 100644 --- a/omod-2.5/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs2_5/OrderAttributeController2_5Test.java +++ b/omod-2.5/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs2_5/OrderAttributeController2_5Test.java @@ -59,7 +59,7 @@ public void before() throws Exception { public void shouldCreateOrderWithAttribute() throws Exception { int before = service.getOrderByUuid(RestTestConstants2_5.ORDER_UUID).getAttributes().size(); - String json = "{\"encounter\":\"d2d69553-2247-414c-b0c5-46be893605af\",\"orderType\":\"2d3fb1d0-ae06-22e3-a5e2-0140211c9a66\",\"type\":\"order\",\"action\":\"NEW\",\"accessionNumber\":\"string\",\"patient\":\"5946f880-b197-400b-9caa-a3c661d23041\",\"concept\":\"d144d24f-6913-4b63-9660-a9108c2bebef\",\"careSetting\":\"6f0c9a92-6f24-11e3-af88-005056821db0\",\"orderer\":\"c2299800-cca9-11e0-9572-0800200c9a66\",\"previousOrder\":\"\",\"urgency\":\"ROUTINE\",\"orderReason\":\"\",\"orderReasonNonCoded\":\"for Test\",\"instructions\":\"string\",\"commentToFulfiller\":\"string\",\"attributes\":[{\"attributeType\":\"9516cc50-6f9f-132r-6556-001e378eb67f\",\"value\":\"EMR Pharmacy 1\",\"valueReference\":\"EMR Pharmacy 1\"}]}"; + String json = "{\"encounter\":\"d2d69553-2247-414c-b0c5-46be893605af\",\"orderType\":\"2d3fb1d0-ae06-22e3-a5e2-0140211c9a66\",\"type\":\"order\",\"action\":\"NEW\",\"accessionNumber\":\"string\",\"patient\":\"5946f880-b197-400b-9caa-a3c661d23041\",\"concept\":\"d144d24f-6913-4b63-9660-a9108c2bebef\",\"careSetting\":\"6f0c9a92-6f24-11e3-af88-005056821db0\",\"orderer\":\"c2299800-cca9-11e0-9572-0800200c9a66\",\"previousOrder\":\"\",\"urgency\":\"ROUTINE\",\"orderReason\":\"\",\"orderReasonNonCoded\":\"for Test\",\"instructions\":\"string\",\"commentToFulfiller\":\"string\",\"attributes\":[{\"attributeType\":\"c0de4f5c-6626-418e-9f4f-5396a31e68fb\",\"value\":\"2023-08-14 17:11:39\"}]}"; handle(newPostRequest(getURI(), json)); int after = service.getOrderByUuid(RestTestConstants2_5.ORDER_UUID).getAttributes().size(); Assert.assertEquals(before + 1, after); diff --git a/omod-2.5/src/test/resources/customTestDataset2_5.xml b/omod-2.5/src/test/resources/customTestDataset2_5.xml index a71316e0a..4e346e0c5 100644 --- a/omod-2.5/src/test/resources/customTestDataset2_5.xml +++ b/omod-2.5/src/test/resources/customTestDataset2_5.xml @@ -13,7 +13,8 @@ - + +