1387: Skip a product lineItem

1387: Skip a product lineItem



Test Case #:1387

Test Case Name:   Skip a product lineItem

System: OpenLMIS

Subsystem: blue

Test case designed by: Paulina Borowa

Design Date:10.01.2017

Short description

Description
As a storeroom manage, who is a submitter or an authorizer, I should have the ability to skip or unskip selected products in an R&R. Skipping a product makes the product visibly greyed out and non editable, where as unskipping it would turn it back to life and editable. Once the R&R which has skipped products is authorized then all the data values of the skipped products have to be nulled.

Same behavior for both Regular and Emergency R&R

Also, this impacts printing create a new story Mary Jo Kochendorfer to clean up so that a user can either print all products or hide the skipped ones.
Also, we need to address adding products back if skipped previously.

This ticket is an API ticket for implementing the ability to skip product line items in the Requisition API. The corresponding UI task is

OLMIS-1084 In Progress .

Acceptance criteria for API part

  • Skipping/Unskipping line items is possible only when requisition is INITIATED or SUBMITTED

  • Skipping line item is indicated by the "skipped" flag on the requisition line item

  • When authorizing the requisition with skipped line items, all the values of the skipped line item must be nulled

  • Skipping is only possible if the skip column is enabled in the requisition template

  • This works the same way for regular and emergency requisitions

  • Skipped line item can be submitted/authorized/approved with empty user input fields

  • Calculations are not performed on skipped line items

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

Requisition Temp0ate with skipped part: 

    {
  "id": "5a268780-fafd-4243-9551-5c7daa824913",
  "createdDate": [
    2016,
    6,
    14,
    12,
    0
  ],
  "programId": "dce17f2e-af3e-40ad-8e00-3496adef44c3",
  "columnsMap": {
    "adjustedConsumption": {
      "name": "adjustedConsumption",
      "label": "Adjusted Consumption",
      "indicator": "N",
      "displayOrder": 20,
      "isDisplayed": true,
      "source": "CALCULATED",
      "columnDefinition": {
        "id": "720dd95b-b765-4afb-b7f2-7b22261c32f3",
        "name": "adjustedConsumption",
        "sources": [
          "CALCULATED"
        ],
        "options": [],
        "label": "adjustedConsumption",
        "indicator": "N",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "numberOfNewPatientsAdded": {
      "name": "numberOfNewPatientsAdded",
      "label": "Number Of New Patients Added",
      "indicator": "F",
      "displayOrder": 18,
      "isDisplayed": true,
      "source": "USER_INPUT",
      "columnDefinition": {
        "id": "5708ebf9-9317-4420-85aa-71b2ae92643d",
        "name": "numberOfNewPatientsAdded",
        "sources": [
          "USER_INPUT"
        ],
        "options": [
          {
            "id": "34b8e763-71a0-41f1-86b4-1829963f0704",
            "optionName": "newPatientCount",
            "optionLabel": "New Patient Count"
          },
          {
            "id": "4957ebb4-297c-459e-a291-812e72286eff",
            "optionName": "dispensingUnitsForNewPatients",
            "optionLabel": "Dispensing units for new patients"
          }
        ],
        "label": "Number Of New Patients Added",
        "indicator": "F",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": {
        "id": "34b8e763-71a0-41f1-86b4-1829963f0704",
        "optionName": "newPatientCount",
        "optionLabel": "New Patient Count"
      }
    },
    "beginningBalance": {
      "name": "beginningBalance",
      "label": "Beginning Balance",
      "indicator": "A",
      "displayOrder": 4,
      "isDisplayed": true,
      "source": "USER_INPUT",
      "columnDefinition": {
        "id": "33b2d2e9-3167-46b0-95d4-1295be9afc22",
        "name": "beginningBalance",
        "sources": [
          "USER_INPUT"
        ],
        "options": [],
        "label": "Beginning Balance",
        "indicator": "A",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "dispensingUnit": {
      "name": "orderableProduct.dispensable.dispensingUnit",
      "label": "Unit/Unit of Issue",
      "indicator": "U",
      "displayOrder": 15,
      "isDisplayed": true,
      "source": "REFERENCE_DATA",
      "columnDefinition": {
        "id": "61e6d059-10ef-40c4-a6e3-fa7b9ad741ec",
        "name": "dispensingUnit",
        "sources": [
          "REFERENCE_DATA"
        ],
        "options": [],
        "label": "Unit/Unit of Issue",
        "indicator": "U",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "TEXT"
      },
      "option": null
    },
    "totalLossesAndAdjustments": {
      "name": "totalLossesAndAdjustments",
      "label": "Total Losses And Adjustments",
      "indicator": "D",
      "displayOrder": 7,
      "isDisplayed": true,
      "source": "USER_INPUT",
      "columnDefinition": {
        "id": "cd57f329-f549-4717-882e-ecbf98122c38",
        "name": "totalLossesAndAdjustments",
        "sources": [
          "USER_INPUT"
        ],
        "options": [],
        "label": "Total Losses And Adjustments",
        "indicator": "D",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "totalStockoutDays": {
      "name": "totalStockoutDays",
      "label": "Total Stockout Days",
      "indicator": "X",
      "displayOrder": 13,
      "isDisplayed": true,
      "source": "USER_INPUT",
      "columnDefinition": {
        "id": "750b9359-c097-4612-8328-d21671f88920",
        "name": "totalStockoutDays",
        "sources": [
          "USER_INPUT"
        ],
        "options": [],
        "label": "Total Stockout Days",
        "indicator": "X",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "packsToShip": {
      "name": "packsToShip",
      "label": "Packs To Ship",
      "indicator": "V",
      "displayOrder": 16,
      "isDisplayed": true,
      "source": "CALCULATED",
      "columnDefinition": {
        "id": "dc9dde56-593d-4929-81be-d1faec7025a8",
        "name": "packsToShip",
        "sources": [
          "CALCULATED"
        ],
        "options": [],
        "label": "Packs To Ship",
        "indicator": "V",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "productName": {
      "name": "orderableProduct.name",
      "label": "Product",
      "indicator": "N",
      "displayOrder": 3,
      "isDisplayed": true,
      "source": "REFERENCE_DATA",
      "columnDefinition": {
        "id": "e53e80de-fc63-4ecb-b6b2-ef376b34c926",
        "name": "productName",
        "sources": [
          "REFERENCE_DATA"
        ],
        "options": [],
        "label": "Product",
        "indicator": "N",
        "mandatory": false,
        "isDisplayRequired": true,
        "canChangeOrder": false,
        "canBeChangedByUser": false,
        "columnType": "TEXT"
      },
      "option": null
    },
    "approvedQuantity": {
      "name": "approvedQuantity",
      "label": "Approved Quantity",
      "indicator": "K",
      "displayOrder": 11,
      "isDisplayed": true,
      "source": "USER_INPUT",
      "columnDefinition": {
        "id": "a62a5fed-c0b6-4d49-8a96-c631da0d0113",
        "name": "approvedQuantity",
        "sources": [
          "USER_INPUT"
        ],
        "options": [],
        "label": "Approved Quantity",
        "indicator": "K",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "skipped": {
      "name": "skipped",
      "label": "Skip",
      "indicator": "S",
      "displayOrder": 1,
      "isDisplayed": true,
      "source": "USER_INPUT",
      "columnDefinition": {
        "id": "c6dffdee-3813-40d9-8737-f531d5adf420",
        "name": "skipped",
        "sources": [
          "USER_INPUT"
        ],
        "options": [],
        "label": "skipped",
        "indicator": "S",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": false,
        "canBeChangedByUser": false,
        "columnType": "BOOLEAN"
      },
      "option": null
    },
    "totalReceivedQuantity": {
      "name": "totalReceivedQuantity",
      "label": "Total Received Quantity",
      "indicator": "B",
      "displayOrder": 5,
      "isDisplayed": true,
      "source": "USER_INPUT",
      "columnDefinition": {
        "id": "5ba8b72d-277a-4da8-b10a-23f0cda23cb4",
        "name": "totalReceivedQuantity",
        "sources": [
          "USER_INPUT"
        ],
        "options": [],
        "label": "Total Received Quantity",
        "indicator": "B",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "total": {
      "name": "total",
      "label": "Total",
      "indicator": "Y",
      "displayOrder": 14,
      "isDisplayed": true,
      "source": "CALCULATED",
      "columnDefinition": {
        "id": "ef524868-9d0a-11e6-80f5-76304dec7eb7",
        "name": "total",
        "sources": [
          "CALCULATED"
        ],
        "options": [],
        "label": "Total",
        "indicator": "Y",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "productCode": {
      "name": "orderableProduct.productCode",
      "label": "Product Code",
      "indicator": "O",
      "displayOrder": 2,
      "isDisplayed": true,
      "source": "REFERENCE_DATA",
      "columnDefinition": {
        "id": "bde01507-3837-47b7-ae08-cec92c0c3cd2",
        "name": "productCode",
        "sources": [
          "REFERENCE_DATA"
        ],
        "options": [],
        "label": "Product Code",
        "indicator": "O",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": false,
        "canBeChangedByUser": false,
        "columnType": "TEXT"
      },
      "option": null
    },
    "totalConsumedQuantity": {
      "name": "totalConsumedQuantity",
      "label": "Total Consumed Quantity",
      "indicator": "C",
      "displayOrder": 6,
      "isDisplayed": true,
      "source": "USER_INPUT",
      "columnDefinition": {
        "id": "9e825396-269d-4873-baa4-89054e2722f4",
        "name": "totalConsumedQuantity",
        "sources": [
          "CALCULATED",
          "USER_INPUT"
        ],
        "options": [],
        "label": "Total Consumed Quantity",
        "indicator": "C",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "pricePerPack": {
      "name": "pricePerPack",
      "label": "Price Per Pack",
      "indicator": "T",
      "displayOrder": 17,
      "isDisplayed": true,
      "source": "REFERENCE_DATA",
      "columnDefinition": {
        "id": "df524868-9d0a-18e6-80f5-76304ded7ab9",
        "name": "pricePerPack",
        "sources": [
          "REFERENCE_DATA"
        ],
        "options": [],
        "label": "Price Per Pack",
        "indicator": "T",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "requestedQuantity": {
      "name": "requestedQuantity",
      "label": "Requested Quantity",
      "indicator": "J",
      "displayOrder": 9,
      "isDisplayed": true,
      "source": "USER_INPUT",
      "columnDefinition": {
        "id": "4a2e9fd3-1127-4b68-9912-84a5c00f6999",
        "name": "requestedQuantity",
        "sources": [
          "USER_INPUT"
        ],
        "options": [],
        "label": "Requested Quantity",
        "indicator": "J",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "NUMERIC"
      },
      "option": null
    },
    "requestedQuantityExplanation": {
      "name": "requestedQuantityExplanation",
      "label": "Requested Quantity Explanation",
      "indicator": "W",
      "displayOrder": 10,
      "isDisplayed": true,
      "source": "USER_INPUT",
      "columnDefinition": {
        "id": "6b8d331b-a0dd-4a1f-aafb-40e6a72ab9f5",
        "name": "requestedQuantityExplanation",
        "sources": [
          "USER_INPUT"
        ],
        "options": [],
        "label": "Requested Quantity Explanation",
        "indicator": "W",
        "mandatory": false,
        "isDisplayRequired": false,
        "canChangeOrder": true,
        "canBeChangedByUser": false,
        "columnType": "TEXT"
      },
      "option": null
    },    "stockOnHand": {      "name": "stockOnHand",      "label": "Stock On Hand",      "indicator": "E",      "displayOrder": 8,      "isDisplayed": true,      "source": "CALCULATED",      "columnDefinition": {        "id": "752cda76-0db5-4b6e-bb79-0f531ab78e2c",        "name": "stockOnHand",        "sources": [          "CALCULATED",          "USER_INPUT"        ],        "options": [],        "label": "Stock On Hand",        "indicator": "E",        "mandatory": false,        "isDisplayRequired": false,        "canChangeOrder": true,        "canBeChangedByUser": false,        "columnType": "NUMERIC"      },      "option": null    },    "remarks": {      "name": "remarks",      "label": "Remarks",      "indicator": "L",      "displayOrder": 12,      "isDisplayed": true,      "source": "USER_INPUT",      "columnDefinition": {        "id": "2ed8c74a-f424-4742-bd14-cfbe67b6e7be",        "name": "remarks",        "sources": [          "USER_INPUT"        ],        "options": [],        "label": "Remarks",        "indicator": "L",        "mandatory": false,        "isDisplayRequired": false,        "canChangeOrder": true,        "canBeChangedByUser": false,        "columnType": "TEXT"      },      "option": null    },    "totalCost": {      "name": "totalCost",      "label": "Total Cost",      "indicator": "Q",      "displayOrder": 19,      "isDisplayed": true,      "source": "CALCULATED",      "columnDefinition": {        "id": "e3a0c1fc-c2d5-11e6-af2d-3417eb83144e",        "name": "pricePerPack",        "sources": [          "CALCULATED"        ],        "options": [],        "label": "Total Cost",        "indicator": "Q",        "mandatory": false,        "isDisplayRequired": false,        "canChangeOrder": true,        "canBeChangedByUser": false,        "columnType": "NUMERIC"      },      "option": null    }  }}

OpenLMIS: the global initiative for powerful LMIS software