/
OLMIS-214 : Define Non-Full Supply (/Additional drugs and Medical Supplies) attributes.

OLMIS-214 : Define Non-Full Supply (/Additional drugs and Medical Supplies) attributes.

Test Case #:214

Test Case Name: Define Non-Full Supply (/Additional drugs and Medical Supplies) attributes.

System: OpenLMIS

Subsystem:Requisition

Test case designed by: Piotr Żurawski

Design Date:25.07.2016

Short description: Check possibility to create Product and modify maxMonthsStock attribute.

                                                                                                                                                   

Pre – conditions:

Create product category:

URL:

Method: Post

Body:

{
"code":"categoryCode",
"name":"categoryName",
"displayOrder":50
}

 

 

Step

Action

Expected system response

Comment

1

Create Product:

URL: http://localhost:8080/api/products

Method: Post

Body:

{
"code":"TemplateCode",
"primaryName":"TemplateName",
"dispensingUnit":"test",
"dosesPerDispensingUnit":"4",
"packSize":"5",
"packRoundingThreshold":"2",
"maxMonthsStock":"6",
"roundToZero":true,
"active":true,
"fullSupply":true,
"tracer":true,
"productCategory":"http://localhost:8080/api/productCategories/cafa993f-8b29-44ba-a70c-59d0bb9f33b7"
}

 

{
"code": "TemplateCode",
"primaryName": "TemplateName",
"dispensingUnit": "test",
"dosesPerDispensingUnit": 4,
"packSize": 5,
"packRoundingThreshold": 2,
"roundToZero": true,
"active": true,
"fullSupply": true,
"tracer": true,
"_links": {
"self": {
"href": "http://localhost:8080/api/products/d5a05147-a1c9-4935-91b5-8fceecbfb286"
},
"product": {
"href": "http://localhost:8080/api/products/d5a05147-a1c9-4935-91b5-8fceecbfb286"
},
"productCategory": {
"href": "http://localhost:8080/api/products/d5a05147-a1c9-4935-91b5-8fceecbfb286/productCategory"
}
}
}

 

2

Modify maxMonthsStock attribute of Product entity.

URL: http://localhost:8080/api/products

Method: Post

Body:

{
"id":"d5a05147-a1c9-4935-91b5-8fceecbfb286",
"code":"TemplateCode",
"primaryName":"TemplateName",
"dispensingUnit":"test",
"dosesPerDispensingUnit":"4",
"packSize":"5",
"packRoundingThreshold":"2",
"maxMonthsStock":"50",
"roundToZero":true,
"active":true,
"fullSupply":true,
"tracer":true,
"productCategory":"http://localhost:8080/api/productCategories/cafa993f-8b29-44ba-a70c-59d0bb9f33b7"
}

{
"code": "TemplateCode",
"primaryName": "TemplateName",
"dispensingUnit": "test",
"dosesPerDispensingUnit": 4,
"packSize": 5,
"packRoundingThreshold": 2,
"roundToZero": true,
"active": true,
"fullSupply": true,
"tracer": true,
"_links": {
"self": {
"href": "http://localhost:8080/api/products/d5a05147-a1c9-4935-91b5-8fceecbfb286"
},
"product": {
"href": "http://localhost:8080/api/products/d5a05147-a1c9-4935-91b5-8fceecbfb286"
},
"productCategory": {
"href": "http://localhost:8080/api/products/d5a05147-a1c9-4935-91b5-8fceecbfb286/productCategory"
}
}
}

 

 

Post – conditions:

Related content

OpenLMIS: the global initiative for powerful LMIS software