1465: Newly created requisitions are not associated with a supervisory node

Test Case #:1465


Test Case Name: Newly created requisitions are not associated with a supervisory node

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:17.01.2017

Short description

  • After authorizing a requisition, the requisition is assigned a supervisory node
  • The supervisory node matches the requisition group (based on the chosen program and facility)
  • The update requisition endpoint must not allow changing the supervisory node freely at any time of the requisition lifetime

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

             Navigate to Requisitions → Create/Authorize and select the facility: Comfort Health Clinic and program: Family Planning.

Initiate the requisition.

                                                                                                                            

                                                 

2

 Submit the requisition

 

 

3

 Authorize the requisition.


 

 

4

 Check using API if supervisoryNodeID is assigned to requisition.

URL: http://test.openlmis.org/api/requisitions/6167e65c-6f56-4aeb-bff5-fdfe84e01a21?access_token=14f8eab9-5115-4b79-8e60-1797d6e7c904

Method: GET

 

After rejection the requisition, the ID of supervisoryNode is removed.


5

Navigate to Requisitions → Create/Authorize and select the facility: Comfort Health Clinic and program: Essential Meds. 

Initiate the requisition.


 


 After initiating the requisition. the ID of supervisoryNode is not assigned yet.


7

 Submit the requisition 

 

 

8

                      Authorize the requisition.                           

 

 

9

Check using API if supervisoryNodeID is assigned to requisition.

URL: http://test.openlmis.org/api/requisitions/2807b00a-36d8-4921-ada1-4f861d1e8219?access_token=14f8eab9-5115-4b79-8e60-1797d6e7c904

Method: GET


10

Try to update the SN assigned to requisition.

URL: http://test.openlmis.org/api/requisitions/6167e65c-6f56-4aeb-bff5-fdfe84e01a21?access_token=2069ef43-f57b-4d33-b5cb-f6ef8dfa8fd7

Method: PUT

Body:

{

  "id": "6167e65c-6f56-4aeb-bff5-fdfe84e01a21",

  "createdDate": [

    2016,

    5,

    10,

    15,

    43,

    16

  ],

  "creatorId": "a337ec45-31a0-4f2b-9b2e-a105c4b669bb",

  "requisitionLineItems": [

    {

      "id": "8c8026b8-0ae8-4adb-b2ca-bfb0dfb030a5",

      "orderableProduct": {

        "id": "d602d0c6-4052-456c-8ccd-61b4ad77bece",

        "productCode": "C100",

        "name": "Levora",

        "packSize": 84,

        "packRoundingThreshold": 42,

        "roundToZero": false,

        "programs": [

          {

            "programId": "dce17f2e-af3e-40ad-8e00-3496adef44c3",

            "productId": "d602d0c6-4052-456c-8ccd-61b4ad77bece",

            "productCategoryId": "15b8ef1f-a5d6-42dd-95bf-bb68a4504e82",

            "productCategoryDisplayName": "Oral Contraceptive",

            "productCategoryDisplayOrder": 6,

            "active": true,

            "fullSupply": true,

            "displayOrder": 1,

            "maxMonthsOfStock": 1000,

            "dosesPerMonth": 1,

            "pricePerPack": null

          }

        ],

        "dispensable": {

          "dispensingUnit": "10 tab strip"

        }

      },

      "beginningBalance": 50,

      "totalReceivedQuantity": 0,

      "totalLossesAndAdjustments": 0,

      "stockOnHand": null,

      "requestedQuantity": 0,

      "totalConsumedQuantity": 0,

      "requestedQuantityExplanation": "",

      "remarks": null,

      "approvedQuantity": null,

      "totalStockoutDays": 0,

      "total": 50,

      "packsToShip": 0,

      "pricePerPack": null,

      "numberOfNewPatientsAdded": 0,

      "totalCost": "0.00",

      "skipped": false,

      "adjustedConsumption": 0,

      "previousAdjustedConsumptions": [

        0,

        0,

        0,

        0

      ],

      "averageConsumption": 0,

      "maxMonthsOfStock": 1000,

      "maximumStockQuantity": 0,

      "calculatedOrderQuantity": 0,

      "stockAdjustments": []

    },

    {

      "id": "bcbd9a7c-6068-40d9-90ab-cb090fd6ed8c",

      "orderableProduct": {

        "id": "bfde33c3-83f1-4feb-a27c-842852f66b71",

        "productCode": "C400",

        "name": "Male Condom",

        "packSize": 1,

        "packRoundingThreshold": 0,

        "roundToZero": false,

        "programs": [

          {

            "programId": "dce17f2e-af3e-40ad-8e00-3496adef44c3",

            "productId": "bfde33c3-83f1-4feb-a27c-842852f66b71",

            "productCategoryId": "3bfe0282-732b-4ce8-b4f9-aa7ffb297758",

            "productCategoryDisplayName": "Barrier Method",

            "productCategoryDisplayOrder": 7,

            "active": true,

            "fullSupply": true,

            "displayOrder": 3,

            "maxMonthsOfStock": 20,

            "dosesPerMonth": 1,

            "pricePerPack": "25.46"

          }

        ],

        "dispensable": {

          "dispensingUnit": "each"

        }

      },

      "beginningBalance": 90,

      "totalReceivedQuantity": 0,

      "totalLossesAndAdjustments": 0,

      "stockOnHand": null,

      "requestedQuantity": 0,

      "totalConsumedQuantity": 0,

      "requestedQuantityExplanation": "",

      "remarks": null,

      "approvedQuantity": null,

      "totalStockoutDays": 0,

      "total": 90,

      "packsToShip": 0,

      "pricePerPack": null,

      "numberOfNewPatientsAdded": 0,

      "totalCost": "0.00",

      "skipped": false,

      "adjustedConsumption": 0,

      "previousAdjustedConsumptions": [

        0,

        0,

        0,

        0

      ],

      "averageConsumption": 0,

      "maxMonthsOfStock": 20,

      "maximumStockQuantity": 0,

      "calculatedOrderQuantity": 0,

      "stockAdjustments": []

    },

    {

      "id": "502eb011-27bc-4f7f-bb1f-6425ae66a5d5",

      "orderableProduct": {

        "id": "880cf2eb-7b68-4450-a037-a0dec1a17987",

        "productCode": "C500",

        "name": "Implanon",

        "packSize": 1,

        "packRoundingThreshold": 0,

        "roundToZero": false,

        "programs": [

          {

            "programId": "dce17f2e-af3e-40ad-8e00-3496adef44c3",

            "productId": "880cf2eb-7b68-4450-a037-a0dec1a17987",

            "productCategoryId": "06606981-67cc-42d1-87ed-21f22fb0ea58",

            "productCategoryDisplayName": "Implantable Contraceptive",

            "productCategoryDisplayOrder": 8,

            "active": true,

            "fullSupply": false,

            "displayOrder": 4,

            "maxMonthsOfStock": 20,

            "dosesPerMonth": 1,

            "pricePerPack": "30.98"

          }

        ],

        "dispensable": {

          "dispensingUnit": "10 tab strip"

        }

      },

      "beginningBalance": 0,

      "totalReceivedQuantity": 0,

      "totalLossesAndAdjustments": 0,

      "stockOnHand": null,

      "requestedQuantity": 0,

      "totalConsumedQuantity": 0,

      "requestedQuantityExplanation": "",

      "remarks": null,

      "approvedQuantity": null,

      "totalStockoutDays": 0,

      "total": 0,

      "packsToShip": 0,

      "pricePerPack": null,

      "numberOfNewPatientsAdded": 0,

      "totalCost": "0.00",

      "skipped": false,

      "adjustedConsumption": 0,

      "previousAdjustedConsumptions": [

        0,

        0,

        0,

        0

      ],

      "averageConsumption": 0,

      "maxMonthsOfStock": 20,

      "maximumStockQuantity": 0,

      "calculatedOrderQuantity": 0,

      "stockAdjustments": []

    },

    {

      "id": "5b449a32-aedf-4a8b-a9d7-c3b665ad76e2",

      "orderableProduct": {

        "id": "7b9b66e0-f008-4c38-93ec-7a5f4868cca9",

        "productCode": "C600",

        "name": "Levonorgestrel ",

        "packSize": 1,

        "packRoundingThreshold": 0,

        "roundToZero": false,

        "programs": [

          {

            "programId": "dce17f2e-af3e-40ad-8e00-3496adef44c3",

            "productId": "7b9b66e0-f008-4c38-93ec-7a5f4868cca9",

            "productCategoryId": "06606981-67cc-42d1-87ed-21f22fb0ea58",

            "productCategoryDisplayName": "Implantable Contraceptive",

            "productCategoryDisplayOrder": 8,

            "active": true,

            "fullSupply": true,

            "displayOrder": 5,

            "maxMonthsOfStock": 20,

            "dosesPerMonth": 1,

            "pricePerPack": "5.10"

          }

        ],

        "dispensable": {

          "dispensingUnit": "10 tab strip"

        }

      },

      "beginningBalance": 50,

      "totalReceivedQuantity": 0,

      "totalLossesAndAdjustments": 0,

      "stockOnHand": null,

      "requestedQuantity": 0,

      "totalConsumedQuantity": 0,

      "requestedQuantityExplanation": "",

      "remarks": null,

      "approvedQuantity": null,

      "totalStockoutDays": 0,

      "total": 50,

      "packsToShip": 0,

      "pricePerPack": null,

      "numberOfNewPatientsAdded": 0,

      "totalCost": "0.00",

      "skipped": false,

      "adjustedConsumption": 0,

      "previousAdjustedConsumptions": [

        0,

        0,

        0,

        0

      ],

      "averageConsumption": 0,

      "maxMonthsOfStock": 20,

      "maximumStockQuantity": 0,

      "calculatedOrderQuantity": 0,

      "stockAdjustments": []

    },

    {

      "id": "89e46600-aa5a-4cc9-8bfd-67be8e907778",

      "orderableProduct": {

        "id": "7f7b83db-580d-4269-88d2-7f9c80a591a9",

        "productCode": "C300",

        "name": "Depo-Estradiol",

        "packSize": 5,

        "packRoundingThreshold": 2,

        "roundToZero": false,

        "programs": [

          {

            "programId": "66032ea8-b69b-4102-a1eb-844e57143187",

            "productId": "7f7b83db-580d-4269-88d2-7f9c80a591a9",

            "productCategoryId": "74f39ab7-b5ce-4087-a6ea-65799a35e79b",

            "productCategoryDisplayName": "Injectable Hormonal Contraceptive",

            "productCategoryDisplayOrder": 9,

            "active": true,

            "fullSupply": true,

            "displayOrder": 6,

            "maxMonthsOfStock": 20,

            "dosesPerMonth": 1,

            "pricePerPack": "4.34"

          },

          {

            "programId": "dce17f2e-af3e-40ad-8e00-3496adef44c3",

            "productId": "7f7b83db-580d-4269-88d2-7f9c80a591a9",

            "productCategoryId": "74f39ab7-b5ce-4087-a6ea-65799a35e79b",

            "productCategoryDisplayName": "Injectable Hormonal Contraceptive",

            "productCategoryDisplayOrder": 9,

            "active": true,

            "fullSupply": false,

            "displayOrder": 6,

            "maxMonthsOfStock": 20,

            "dosesPerMonth": 1,

            "pricePerPack": "20.77"

          }

        ],

        "dispensable": {

          "dispensingUnit": "each"

        }

      },

      "beginningBalance": 0,

      "totalReceivedQuantity": 0,

      "totalLossesAndAdjustments": 0,

      "stockOnHand": null,

      "requestedQuantity": 0,

      "totalConsumedQuantity": 0,

      "requestedQuantityExplanation": "",

      "remarks": null,

      "approvedQuantity": null,

      "totalStockoutDays": 0,

      "total": 0,

      "packsToShip": 0,

      "pricePerPack": null,

      "numberOfNewPatientsAdded": 0,

      "totalCost": "0.00",

      "skipped": false,

      "adjustedConsumption": 0,

      "previousAdjustedConsumptions": [

        0,

        0,

        0,

        0

      ],

      "averageConsumption": 0,

      "maxMonthsOfStock": 20,

      "maximumStockQuantity": 0,

      "calculatedOrderQuantity": 0,

      "stockAdjustments": []

    },

    {

      "id": "552eb0f7-fc57-4916-bb54-0c3c9540420a",

      "orderableProduct": {

        "id": "23819693-0670-4c4b-b400-28e009b86b51",

        "productCode": "C200",

        "name": "Ortho-Novum",

        "packSize": 63,

        "packRoundingThreshold": 31,

        "roundToZero": false,

        "programs": [

          {

            "programId": "dce17f2e-af3e-40ad-8e00-3496adef44c3",

            "productId": "23819693-0670-4c4b-b400-28e009b86b51",

            "productCategoryId": "15b8ef1f-a5d6-42dd-95bf-bb68a4504e82",

            "productCategoryDisplayName": "Oral Contraceptive",

            "productCategoryDisplayOrder": 6,

            "active": true,

            "fullSupply": true,

            "displayOrder": 2,

            "maxMonthsOfStock": 1000,

            "dosesPerMonth": 1,

            "pricePerPack": "15.94"

          }

        ],

        "dispensable": {

          "dispensingUnit": "each"

        }

      },

      "beginningBalance": null,

      "totalReceivedQuantity": null,

      "totalLossesAndAdjustments": null,

      "stockOnHand": null,

      "requestedQuantity": null,

      "totalConsumedQuantity": null,

      "requestedQuantityExplanation": null,

      "remarks": null,

      "approvedQuantity": null,

      "totalStockoutDays": null,

      "total": null,

      "packsToShip": null,

      "pricePerPack": null,

      "numberOfNewPatientsAdded": null,

      "totalCost": null,

      "skipped": true,

      "adjustedConsumption": null,

      "previousAdjustedConsumptions": [],

      "averageConsumption": null,

      "maxMonthsOfStock": 1000,

      "maximumStockQuantity": null,

      "calculatedOrderQuantity": null,

      "stockAdjustments": []

    }

  ],

  "draftStatusMessage": null,

  "facility": {

    "id": "e6799d64-d10d-4011-b8c2-0e4d4a3f65ce",

    "code": "HC01",

    "name": "Comfort Health Clinic",

    "description": null,

    "active": true,

    "goLiveDate": null,

    "goDownDate": null,

    "comment": null,

    "enabled": true,

    "openLmisAccessible": true,

    "supportedPrograms": [

      {

        "id": "dce17f2e-af3e-40ad-8e00-3496adef44c3",

        "code": "PRG001",

        "name": "Family Planning",

        "description": null,

        "programActive": true,

        "periodsSkippable": true,

        "showNonFullSupplyTab": true,

        "supportActive": true,

        "supportStartDate": null

      },

      {

        "id": "10845cb9-d365-4aaa-badd-b4fa39c6a26a",

        "code": "PRG002",

        "name": "Essential Meds",

        "description": null,

        "programActive": true,

        "periodsSkippable": false,

        "showNonFullSupplyTab": false,

        "supportActive": true,

        "supportStartDate": null

      }

    ],

    "geographicZone": {

      "id": "bf2b810b-cdbf-48b2-b569-149b3cf42387",

      "code": "M-So-Bal-Bal",

      "name": "Balaka",

      "level": {

        "id": "90e35999-a64f-4312-ba8f-bc13a1311c75",

        "code": "City",

        "name": null,

        "levelNumber": 4

      },

      "parent": null

    },

    "operator": {

      "id": "9456c3e9-c4a6-4a28-9e08-47ceb16a4121",

      "code": "moh",

      "name": "Ministry of Health"

    },

    "type": {

      "id": "ac1d268b-ce10-455f-bf87-9c667da8f060",

      "code": "health_center",

      "name": "Health Center",

      "description": null,

      "displayOrder": 1,

      "active": true

    }

  },

  "program": {

    "id": "dce17f2e-af3e-40ad-8e00-3496adef44c3",

    "code": "PRG001",

    "name": "Family Planning",

    "description": null,

    "active": true,

    "periodsSkippable": true,

    "showNonFullSupplyTab": true

  },

  "processingPeriod": {

    "id": "c9287c65-67fa-4958-adb6-52069f2b1379",

    "processingSchedule": {

      "id": "9c15bd6e-3f6b-4b91-b53a-36c199d35eac",

      "code": "SCH001",

      "description": null,

      "modifiedDate": [

        2015,

        12,

        31,

        23,

        59,

        59

      ],

      "name": "Monthly"

    },

    "name": "Apr2017",

    "description": null,

    "startDate": [

      2017,

      4,

      1

    ],

    "endDate": [

      2017,

      4,

      30

    ],

    "durationInMonths": 1

  },

  "status": "AUTHORIZED",

  "emergency": false,

  "supplyingFacility": "e6799d64-d10d-4011-b8c2-0e4d4a3f65ce",

  "supervisoryNode": "e6799d64-d10d-4011-b8c2-0e4d4a3f65ce",

  "template": "5a268780-fafd-4243-9551-5c7daa824913"

}


 Changing the supervisory node is not allowed at any time of the requisition lifetime


 

 

Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software