Skip to content

Commit

Permalink
make changes to test data
Browse files Browse the repository at this point in the history
  • Loading branch information
slubwama committed Jun 13, 2024
1 parent 8bb76d2 commit 67b90a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<OrderAttribute, Order, OrderResource2_2> {
public class OrderAttributeResource2_5 extends BaseAttributeCrudResource2_5<OrderAttribute, Order, OrderResource2_5> {

/**
* Sets attributeType on the given OrderAttribute.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion omod-2.5/src/test/resources/customTestDataset2_5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
<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"/>
<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"/>

<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" />
<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" />
<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"/>
<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"/>

Expand Down

0 comments on commit 67b90a2

Please sign in to comment.