Skip to content

Commit 67b90a2

Browse files
committed
make changes to test data
1 parent 8bb76d2 commit 67b90a2

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

omod-2.5/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs2_5/OrderAttributeResource2_5.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
/**
2828
* {@link Resource} for OrderAttributes, supporting standard CRUD operations
2929
*/
30-
@SubResource(parent = OrderResource2_2.class, path = "attribute", supportedClass = OrderAttribute.class, supportedOpenmrsVersions = {
30+
@SubResource(parent = OrderResource2_5.class, path = "attribute", supportedClass = OrderAttribute.class, supportedOpenmrsVersions = {
3131
"2.5.* - 9.*"})
32-
public class OrderAttributeResource2_5 extends BaseAttributeCrudResource2_5<OrderAttribute, Order, OrderResource2_2> {
32+
public class OrderAttributeResource2_5 extends BaseAttributeCrudResource2_5<OrderAttribute, Order, OrderResource2_5> {
3333

3434
/**
3535
* Sets attributeType on the given OrderAttribute.

omod-2.5/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs2_5/OrderAttributeController2_5Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void before() throws Exception {
5959
public void shouldCreateOrderWithAttribute() throws Exception {
6060
int before = service.getOrderByUuid(RestTestConstants2_5.ORDER_UUID).getAttributes().size();
6161

62-
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\"}]}";
62+
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\"}]}";
6363
handle(newPostRequest(getURI(), json));
6464
int after = service.getOrderByUuid(RestTestConstants2_5.ORDER_UUID).getAttributes().size();
6565
Assert.assertEquals(before + 1, after);

omod-2.5/src/test/resources/customTestDataset2_5.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<concept_reference_term concept_reference_term_id="70" concept_source_id="100" name="Day" code="258703001" creator="1" date_created="2020-02-20 10:36:02" retired="0" uuid="f05afff4-26f9-4fe6-9eaa-ed4a506da5bb"/>
1414
<concept_reference_map concept_map_id="70" concept_reference_term_id="70" concept_map_type_id="2" creator="1" date_created="2020-02-20 10:36:02" concept_id="28" uuid="371ad2c8-290e-421a-93d9-1282cdfd0901"/>
1515

16-
<order_attribute_type order_attribute_type_id="1" name="Dispensing Date" datatype="org.openmrs.customdatatype.datatype.DateDatatype" uuid="c0de4f5c-6626-418e-9f4f-5396a31e68fb" creator="1" date_created="2005-01-01 00:00:00.0" min_occurs="0" max_occurs="1" retired="false" /> <order_attribute_type order_attribute_type_id="2" name="Dispensing Unit" datatype="org.openmrs.customdatatype.datatype.DateDatatype" uuid="9516cc50-6f9f-11e0-8414-001e378eb67f" creator="1" date_created="2005-01-01 00:00:00.0" min_occurs="0" max_occurs="1" retired="true" retired_by="1" date_retired="2005-01-01 02:00:00.0" retire_reason="for fun and profit" />
16+
<order_attribute_type order_attribute_type_id="1" name="Dispensing Date" datatype="org.openmrs.customdatatype.datatype.DateDatatype" uuid="c0de4f5c-6626-418e-9f4f-5396a31e68fb" creator="1" date_created="2005-01-01 00:00:00.0" min_occurs="0" max_occurs="1" retired="false" />
17+
<order_attribute_type order_attribute_type_id="2" name="Dispensing Unit" datatype="org.openmrs.customdatatype.datatype.DateDatatype" uuid="9516cc50-6f9f-11e0-8414-001e378eb67f" creator="1" date_created="2005-01-01 00:00:00.0" min_occurs="0" max_occurs="1" retired="true" retired_by="1" date_retired="2005-01-01 02:00:00.0" retire_reason="for fun and profit" />
1718
<order_attribute_type order_attribute_type_id="3" name="Dispensing Personnel" datatype="org.openmrs.customdatatype.datatype.DateDatatype" uuid="9516cc50-6f9f-132r-5433-001e378eb67f" creator="1" date_created="2005-01-01 00:00:00.0" min_occurs="0" max_occurs="1" retired="false"/>
1819
<order_attribute_type order_attribute_type_id="4" name="Dispensing Organization" datatype="org.openmrs.customdatatype.datatype.FreeTextDatatype" uuid="9516cc50-6f9f-132r-6556-001e378eb67f" creator="1" date_created="2005-01-01 00:00:00.0" min_occurs="0" max_occurs="1" retired="false"/>
1920

0 commit comments

Comments
 (0)