Proof of Concept Create Nifi API Interactions
This document includes the API calls that will be used to create an order based on Ideal Stock Amounts in OpenLMIS. This information will be used to generate the flows in Nifi for the demo.
Steps
This section defines the steps for creating an order in OpenLMIS from the API, converting the order to a shipment in the OpenLMIS UI and querying OpenLMIS for the shipment information. All transactions are made against the OpenLMIS UAT server at https://uat.openlmis.org These steps are triggered after Nifi has identified that there is a new order from a facility in OpenSRP server. After that business logic is complete, we perform the following:
Get an access token for the divo1 user
Credentials: divo1/password
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic dXNlci1jbGllbnQ6Y2hhbmdlbWU=' 'https://uat.openlmis.org/api/oauth/token?grant_type=password&username=divo1&password=password'
Store the access_token that's returned and use it in other requests
Response{ "access_token" : "1dfd46c9-c2d0-480d-9640-17ae1437833f", "token_type" : "bearer", "expires_in" : 1799, "scope" : "read write", "referenceDataUserId" : "560be32a-ea2e-4d12-ae00-1f69376ad535", "username" : "divo1" }
- Update the Order File with the appropriate information
- Sample File: test_order.json
- Fields:
- externalId - This should come from the OpenSRP event_ID
Post the order to the /api/orders/ endpoint (Make sure to update the access_token)
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d @test_order.json 'https://uat.openlmis.org/api/orders?access_token=1dfd46c9-c2d0-480d-9640-17ae1437833f'
- Sample Response: test_order_response.json
Store the entire response. The returned "id" (i.e "id" = "1c4887a4-28d8-4984-ab5d-af008f9ca2b3") is used to query for the shipment. The response will be used later to map the shipped quantities against the order to peform business logic. - Wait for the demonstrator to perform the following actions in OpenLMIS:
- View order
- Start Fulfillment
- Fulfill order and "Confirm Shipment"
- View Order again and show status = SHIPPED
- View order
- On a regular schedule every 30 seconds during the demo, Nifi will kick off a job to query for shipments
Check if the access token has expired.
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic dXNlci1jbGllbnQ6Y2hhbmdlbWU=' 'https://demo-v3.openlmis.org/api/oauth/check_token?token=1dfd46c9-c2d0-480d-9640-17ae1437833f'
If it has expired, (Response Code 400) get another access token using the steps in step 1 above
400 Response body{ "error": "invalid_token", "error_description": "Token was not recognised" }
Search for Shipments by orderId
curl -X GET --header 'Content-Type: application/json' --header 'Accept: application/json' 'https://uat.openlmis.org/api/shipments?orderId=83080768-7df2-4c54-a4fe-66961d9c327d&access_token=1dfd46c9-c2d0-480d-9640-17ae1437833f'
- If there aren't any results returned, stop the process.
Extract the "id"
Query for the shipment with the "expand=order" request parameter to get the order and shipment details in a single response
curl -X GET --header 'Content-Type: application/json' --header 'Accept: application/json' 'https://uat.openlmis.org/api/shipments/{shipmentId}?access_token=1dfd46c9-c2d0-480d-9640-17ae1437833f&expand=order'
Perform business logic on the response
We need to perform business logic in Nifi to map the Shipment to list of orderables in OpenLMIS and then map the quantityShipped to the OpenSRP antigen Type. The flow should go:
Business Logic:
OpenLMIS Shipment Line Item → Order line item details → OpenSRP AntigenType- For each line item in the shipment:
- Query the order by orderable "id"
- Extract the following information:
- productCode
- netContent
- orderedQuantity
- Append the shippedQuantity to this line item so we know how much was shipped
- Map the productCode against the OpenSRP AntigenType (mapping table below)
Here's a mapping file by orderable name.
OpenLMIS Orderable ProductCode | OpenSRP AntigenType Map"openlmisOrderableProductCode","opensrpAntigenType" "MRK-MEASLESDIL-10-1234","M/MR" "IVX-BCG-20-1234","BCG" "SII-PENTA-10-1234","Penta" "GSK-PCV10-2-1234","PCV" "MRK-ROTA-1-1234","Rota"
This means that all orderables that are received in the shipment should be mapped to the associated opensrpAntigenType. We will use this information to post
Note: We do not currently have demo data for the "OPV" antigenType in OpenLMIS and have excluded it from the order.
- Calculate total orderedQuantity by opensrpAntigenType
- The OpenLMIS order has the ability to define lot numbers and to have multiple orderables of the same product code. In this instance, there are multiple BCG line items in the shipment, totaling 3 shipped line items of two different lot numbers. In order to do this, we need to map add the quantityShipped from the shipment by opensrpAntigen type.
- Calculations:
- For Each opensrpAntigenType
- shippedQuantity = shippedQuantity lineItem1 + shippedQuantity lineItem2...shippedQuantity lineItemn
- For Each opensrpAntigenType
- Generate the JSON to post to OpenSRP
Here's the template to be posted to OpenSRP
- Source information:
- orderedDate - This comes from the order's createdDate ("createdDate" : "2018-02-23T23:43:27.982Z")
- orderCode - This comes from the order's orderCode ("orderCode" : "ORDER-CVRNFHVWR",)
- shippedDate - This comes from the shipment's shippedDate ("shippedDate" : "2018-02-23T23:47:47.311Z")
receivingFacility - This comes from the order's receivingFacility
Order ReceivingFacility"receivingFacility" : { "code" : "N007", "name" : "Lurio, Cuamba"
supplyingFacility - This comes from the order's supplyingFacility
Order supplyingFacility"supplyingFacility" : { "code" : "D001", "name" : "Dep—sito Distrital Cuamba"
processingPeriod - This comes from the order's processingPeriod
order processingPeriod"processingPeriod" : { "processingSchedule" : { "code" : "SCH001", "description" : null, "modifiedDate" : null, "name" : "Monthly", "id" : "9c15bd6e-3f6b-4b91-b53a-36c199d35eac" }, "name" : "Jan2017", "description" : null, "startDate" : "2017-01-01", "endDate" : "2017-01-31"
- lineItems - Each of these line items are derrived from the order and shipment as previously mentioned.
- Link to completed sample: sample_opensrp_shipment.json
Sample: Linking order information to shipment information
The first block below is from the Order that was posted to OpenLMIS in the previous steps. The second block is from the Shipment. The shipment doesn't store information about the line items, so we need to extract specific information from the order to generate the information that needs to be posted to OpenSRP server. The link is the "id" field from the shipment (second code block below). That orderable id (line#4) "7c58f053-0ca5-46ad-8209-98cff0c79b42" directly relates to the order line item (first clode block line#24)orderLineItem{ "id" : "b103fc4c-c81f-4a92-abe7-724f85d5ed9e", "orderable" : { "productCode" : "MRK-MEASLESDIL-10-1234", "fullProductName" : "MMR II Diluent (10 dose)", "netContent" : 10, "packRoundingThreshold" : 1, "roundToZero" : true, "programs" : [ { "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", "orderableCategoryDisplayName" : "Vaccines", "orderableCategoryDisplayOrder" : 5, "active" : true, "fullSupply" : true, "displayOrder" : 5, "dosesPerPatient" : 1, "pricePerPack" : 20.00 } ], "dispensable" : { "dispensingUnit" : null }, "extraData" : null, "id" : "7c58f053-0ca5-46ad-8209-98cff0c79b42" }, "orderedQuantity" : 10, "totalDispensingUnits" : 100 },
Shipment lineItem{ "id" : "bbe3c2f8-99ce-4e92-a35b-0be39b796f39", "orderable" : { "id" : "7c58f053-0ca5-46ad-8209-98cff0c79b42", "href" : "https://uat.openlmis.org/api/orderables/7c58f053-0ca5-46ad-8209-98cff0c79b42" }, "lot" : null, "quantityShipped" : 1 }
- For each line item in the shipment:
Post this JSON to OpenSRP Server
Sample POST Shipment{ "orderedDate": "2018-02-23T23:43:27.982Z", "orderCode": "ORDER-CVRNFHVWR", "shippedDate": "2018-02-23T23:47:47.311Z", "receivingFacility": { "code": "N007", "name": "Lurio, Cuamba" }, "supplyingFacility": { "code": "D001", "name": "Dep—sito Distrital Cuamba" }, "processingPeriod": { "name": "Jan2017", "startDate": "2017-01-01", "endDate": "2017-01-31" }, "lineItems": [ { "antigenType": "M/MR", "orderedQuantity": 10, "shippedQuantity": 2, "numDoses": 10 }, { "antigenType": "BCG", "orderedQuantity": 10, "shippedQuantity": 3, "numDoses": 20 }, { "antigenType": "Penta", "orderedQuantity": 10, "shippedQuantity": 2, "numDoses": 10 }, { "antigenType": "PCV", "orderedQuantity": 10, "shippedQuantity": 23, "numDoses": 2 }, { "antigenType": "Rota", "orderedQuantity": 10, "shippedQuantity": 190, "numDoses": 1 } ] }
OpenLMIS Setup
The OpenLMIS UAT server has been setup with demo data. This section defines what was setup so it can be replicated on demo-v3.openlmis.org.
Target Facility: Lurio, Cuamba Facility Code N007
Target Program: EPI
Fulfilling Facility: Dep—sito Distrital Cuamba
Immunization products have been created in the EPI program with available stock on hand at the fulfilling facility
OpenLMIS API Details
We will interact with the OpenLMIS UAT server. (NOTE: This server's database refreshes every hour on the hour, so any changes need to be done regularly.)
URL: uat.openlmis.org
Credentials: divo1/password
Program: EPI
Program Code: PRG004
Program ID: 418bdc1d-c303-4bd0-b2d3-d8901150a983
Other API Endpoints and Sample Curl Statements (You have to get your own access_token
Authenticate
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic dXNlci1jbGllbnQ6Y2hhbmdlbWU=' 'https://uat.openlmis.org/api/oauth/token?grant_type=password&username=administrator&password=password'
Get the Facility information:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"name":"Dep—sito Distrital Cuamba"}' 'https://uat.openlmis.org/api/facilities/search?access_token=8b34302b-6c11-4207-b3cb-ccf6314a4077'
Result:
{ "content": [ { "code": "D001", "name": "Dep—sito Distrital Cuamba", "active": true, "enabled": true, "type": { "code": "dist_store", "name": "District Store", "displayOrder": 4, "active": true, "id": "5fc213c6-1bd7-46f0-9883-57c05250ca90" }, "geographicZone": { "code": "cuamba", "name": "Cuamba", "level": { "code": "District", "levelNumber": 3, "id": "93c05138-4550-4461-9e8a-79d5f050c223" }, "latitude": 36.545, "longitude": -14.747, "parent": { "code": "niassa", "name": "Niassa", "level": { "code": "Region", "levelNumber": 2, "id": "9b497d87-cdd9-400e-bb04-fae0bf6a9491" }, "latitude": 36.20455, "longitude": -13.17497, "parent": { "code": "moz", "name": "Mozambique", "level": { "code": "Country", "levelNumber": 1, "id": "6b78e6c6-292e-4733-bb9c-3d802ad61206" }, "latitude": 35.83495, "longitude": -18.77371, "id": "d22d86fb-9123-437a-9eae-da2b31b77e34" }, "id": "0d4eb5ee-ae7f-42e7-89e1-d0f276090755" }, "id": "9b8cfb5a-217a-4261-a64f-16ca06ae79fa" }, "id": "c62dea9b-6974-4101-ba39-b09914165967" } ], "last": true, "totalElements": 1, "totalPages": 1, "sort": null, "numberOfElements": 1, "first": true, "size": 2000, "number": 0 }
Get the Program Information:
curl -X GET --header 'Accept: application/json' 'https://uat.openlmis.org/api/programs/search?access_token=8b34302b-6c11-4207-b3cb-ccf6314a4077&name=EPI'
Result:
[ { "code": "PRG004", "name": "EPI", "description": null, "active": true, "periodsSkippable": false, "showNonFullSupplyTab": null, "enableDatePhysicalStockCountCompleted": false, "id": "418bdc1d-c303-4bd0-b2d3-d8901150a983" } ]
Get Order Information
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ "externalId" : "d9999999-89a6-4973-a47b-cee0d1bf7e36", \ "emergency" : false, \ "facility" : { \ "code" : "N007", \ "name" : "Lurio, Cuamba", \ "description" : null, \ "active" : true, \ "goLiveDate" : "2010-09-01", \ "goDownDate" : null, \ "comment" : null, \ "enabled" : true, \ "openLmisAccessible" : true, \ "supportedPrograms" : [ { \ "code" : "PRG004", \ "name" : "EPI", \ "description" : null, \ "active" : null, \ "periodsSkippable" : false, \ "showNonFullSupplyTab" : false, \ "supportLocallyFulfilled" : true, \ "id" : "418bdc1d-c303-4bd0-b2d3-d8901150a983" \ } ], \ "geographicZone" : { \ "code" : "cuamba", \ "name" : "Cuamba", \ "level" : { \ "code" : "District", \ "name" : null, \ "levelNumber" : 3, \ "id" : "93c05138-4550-4461-9e8a-79d5f050c223" \ }, \ "parent" : { \ "code" : "niassa", \ "name" : "Niassa", \ "level" : { \ "code" : "Region", \ "name" : null, \ "levelNumber" : 2, \ "id" : "9b497d87-cdd9-400e-bb04-fae0bf6a9491" \ }, \ "parent" : { \ "code" : "moz", \ "name" : "Mozambique", \ "level" : { \ "code" : "Country", \ "name" : null, \ "levelNumber" : 1, \ "id" : "6b78e6c6-292e-4733-bb9c-3d802ad61206" \ }, \ "parent" : null, \ "id" : "d22d86fb-9123-437a-9eae-da2b31b77e34" \ }, \ "id" : "0d4eb5ee-ae7f-42e7-89e1-d0f276090755" \ }, \ "id" : "9b8cfb5a-217a-4261-a64f-16ca06ae79fa" \ }, \ "operator" : { \ "code" : "moh", \ "name" : "Ministry of Health", \ "id" : "9456c3e9-c4a6-4a28-9e08-47ceb16a4121" \ }, \ "type" : { \ "code" : "health_center", \ "name" : "Health Center", \ "description" : null, \ "displayOrder" : 2, \ "active" : true, \ "id" : "ac1d268b-ce10-455f-bf87-9c667da8f060" \ }, \ "id" : "4774fc63-a0c8-4a29-a01d-5b6b48632175" \ }, \ "processingPeriod" : { \ "processingSchedule" : { \ "code" : "SCH001", \ "description" : null, \ "modifiedDate" : null, \ "name" : "Monthly", \ "id" : "9c15bd6e-3f6b-4b91-b53a-36c199d35eac" \ }, \ "name" : "Jan2017", \ "description" : null, \ "startDate" : "2017-01-01", \ "endDate" : "2017-01-31", \ "id" : "516ac930-0d28-49f5-a178-64764e22b236" \ }, \ "createdBy" : { \ "username" : "divo1", \ "firstName" : "Alan", \ "lastName" : "Ehrenfreund", \ "email" : "divo1%40openlmis.org", \ "verified" : true, \ "active" : true, \ "loginRestricted" : false, \ "homeFacilityId" : "c62dea9b-6974-4101-ba39-b09914165967", \ "roleAssignments" : [ { \ "role" : null, \ "user" : null, \ "id" : null \ }, { \ "role" : null, \ "user" : null, \ "id" : null \ }, { \ "role" : null, \ "user" : null, \ "id" : null \ }, { \ "role" : null, \ "user" : null, \ "id" : null \ }, { \ "role" : null, \ "user" : null, \ "id" : null \ }, { \ "role" : null, \ "user" : null, \ "id" : null \ }, { \ "role" : null, \ "user" : null, \ "id" : null \ } ], \ "id" : "560be32a-ea2e-4d12-ae00-1f69376ad535" \ }, \ "program" : { \ "code" : "PRG004", \ "name" : "EPI", \ "description" : null, \ "active" : true, \ "periodsSkippable" : false, \ "showNonFullSupplyTab" : null, \ "supportLocallyFulfilled" : false, \ "id" : "418bdc1d-c303-4bd0-b2d3-d8901150a983" \ }, \ "requestingFacility" : { \ "code" : "N007", \ "name" : "Lurio, Cuamba", \ "description" : null, \ "active" : true, \ "goLiveDate" : "2010-09-01", \ "goDownDate" : null, \ "comment" : null, \ "enabled" : true, \ "openLmisAccessible" : true, \ "supportedPrograms" : [ { \ "code" : "PRG004", \ "name" : "EPI", \ "description" : null, \ "active" : null, \ "periodsSkippable" : false, \ "showNonFullSupplyTab" : false, \ "supportLocallyFulfilled" : true, \ "id" : "418bdc1d-c303-4bd0-b2d3-d8901150a983" \ } ], \ "geographicZone" : { \ "code" : "cuamba", \ "name" : "Cuamba", \ "level" : { \ "code" : "District", \ "name" : null, \ "levelNumber" : 3, \ "id" : "93c05138-4550-4461-9e8a-79d5f050c223" \ }, \ "parent" : { \ "code" : "niassa", \ "name" : "Niassa", \ "level" : { \ "code" : "Region", \ "name" : null, \ "levelNumber" : 2, \ "id" : "9b497d87-cdd9-400e-bb04-fae0bf6a9491" \ }, \ "parent" : { \ "code" : "moz", \ "name" : "Mozambique", \ "level" : { \ "code" : "Country", \ "name" : null, \ "levelNumber" : 1, \ "id" : "6b78e6c6-292e-4733-bb9c-3d802ad61206" \ }, \ "parent" : null, \ "id" : "d22d86fb-9123-437a-9eae-da2b31b77e34" \ }, \ "id" : "0d4eb5ee-ae7f-42e7-89e1-d0f276090755" \ }, \ "id" : "9b8cfb5a-217a-4261-a64f-16ca06ae79fa" \ }, \ "operator" : { \ "code" : "moh", \ "name" : "Ministry of Health", \ "id" : "9456c3e9-c4a6-4a28-9e08-47ceb16a4121" \ }, \ "type" : { \ "code" : "health_center", \ "name" : "Health Center", \ "description" : null, \ "displayOrder" : 2, \ "active" : true, \ "id" : "ac1d268b-ce10-455f-bf87-9c667da8f060" \ }, \ "id" : "4774fc63-a0c8-4a29-a01d-5b6b48632175" \ }, \ "receivingFacility" : { \ "code" : "N007", \ "name" : "Lurio, Cuamba", \ "description" : null, \ "active" : true, \ "goLiveDate" : "2010-09-01", \ "goDownDate" : null, \ "comment" : null, \ "enabled" : true, \ "openLmisAccessible" : true, \ "supportedPrograms" : [ { \ "code" : "PRG004", \ "name" : "EPI", \ "description" : null, \ "active" : null, \ "periodsSkippable" : false, \ "showNonFullSupplyTab" : false, \ "supportLocallyFulfilled" : true, \ "id" : "418bdc1d-c303-4bd0-b2d3-d8901150a983" \ } ], \ "geographicZone" : { \ "code" : "cuamba", \ "name" : "Cuamba", \ "level" : { \ "code" : "District", \ "name" : null, \ "levelNumber" : 3, \ "id" : "93c05138-4550-4461-9e8a-79d5f050c223" \ }, \ "parent" : { \ "code" : "niassa", \ "name" : "Niassa", \ "level" : { \ "code" : "Region", \ "name" : null, \ "levelNumber" : 2, \ "id" : "9b497d87-cdd9-400e-bb04-fae0bf6a9491" \ }, \ "parent" : { \ "code" : "moz", \ "name" : "Mozambique", \ "level" : { \ "code" : "Country", \ "name" : null, \ "levelNumber" : 1, \ "id" : "6b78e6c6-292e-4733-bb9c-3d802ad61206" \ }, \ "parent" : null, \ "id" : "d22d86fb-9123-437a-9eae-da2b31b77e34" \ }, \ "id" : "0d4eb5ee-ae7f-42e7-89e1-d0f276090755" \ }, \ "id" : "9b8cfb5a-217a-4261-a64f-16ca06ae79fa" \ }, \ "operator" : { \ "code" : "moh", \ "name" : "Ministry of Health", \ "id" : "9456c3e9-c4a6-4a28-9e08-47ceb16a4121" \ }, \ "type" : { \ "code" : "health_center", \ "name" : "Health Center", \ "description" : null, \ "displayOrder" : 2, \ "active" : true, \ "id" : "ac1d268b-ce10-455f-bf87-9c667da8f060" \ }, \ "id" : "4774fc63-a0c8-4a29-a01d-5b6b48632175" \ }, \ "supplyingFacility" : { \ "code" : "D001", \ "name" : "Dep—sito Distrital Cuamba", \ "description" : null, \ "active" : true, \ "goLiveDate" : "2010-09-01", \ "goDownDate" : null, \ "comment" : null, \ "enabled" : true, \ "openLmisAccessible" : true, \ "supportedPrograms" : [ { \ "code" : "PRG004", \ "name" : "EPI", \ "description" : null, \ "active" : null, \ "periodsSkippable" : false, \ "showNonFullSupplyTab" : false, \ "supportLocallyFulfilled" : true, \ "id" : "418bdc1d-c303-4bd0-b2d3-d8901150a983" \ } ], \ "geographicZone" : { \ "code" : "cuamba", \ "name" : "Cuamba", \ "level" : { \ "code" : "District", \ "name" : null, \ "levelNumber" : 3, \ "id" : "93c05138-4550-4461-9e8a-79d5f050c223" \ }, \ "parent" : { \ "code" : "niassa", \ "name" : "Niassa", \ "level" : { \ "code" : "Region", \ "name" : null, \ "levelNumber" : 2, \ "id" : "9b497d87-cdd9-400e-bb04-fae0bf6a9491" \ }, \ "parent" : { \ "code" : "moz", \ "name" : "Mozambique", \ "level" : { \ "code" : "Country", \ "name" : null, \ "levelNumber" : 1, \ "id" : "6b78e6c6-292e-4733-bb9c-3d802ad61206" \ }, \ "parent" : null, \ "id" : "d22d86fb-9123-437a-9eae-da2b31b77e34" \ }, \ "id" : "0d4eb5ee-ae7f-42e7-89e1-d0f276090755" \ }, \ "id" : "9b8cfb5a-217a-4261-a64f-16ca06ae79fa" \ }, \ "operator" : { \ "code" : "moh", \ "name" : "Ministry of Health", \ "id" : "9456c3e9-c4a6-4a28-9e08-47ceb16a4121" \ }, \ "type" : { \ "code" : "dist_store", \ "name" : "District Store", \ "description" : null, \ "displayOrder" : 4, \ "active" : true, \ "id" : "5fc213c6-1bd7-46f0-9883-57c05250ca90" \ }, \ "id" : "c62dea9b-6974-4101-ba39-b09914165967" \ }, \ "quotedCost" : 0.00, \ "orderLineItems" : [ { \ "id" : "12441d3c-3be6-43d1-bb2d-169369d83c71", \ "orderable" : { \ "productCode" : "bcg20", \ "fullProductName" : "BCG", \ "netContent" : 20, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 12.00 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : { \ "useVVM" : "true" \ }, \ "id" : "8ef9d4da-b6e5-401c-b433-765a5fd8a0cc" \ }, \ "orderedQuantity" : 5, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "c3f04d37-6f90-4792-996c-880d005c7a9e", \ "orderable" : { \ "productCode" : "IVX-BCGDIL-20-1234", \ "fullProductName" : "Intervax BCG Diluent (20 dose)", \ "netContent" : 20, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 15.00 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : null, \ "id" : "c75152ee-ebed-47ed-bb87-0930aee18320" \ }, \ "orderedQuantity" : 5, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "28fd83ef-70e9-4745-977a-73179ccda857", \ "orderable" : { \ "productCode" : "ACM-GAS-1234", \ "fullProductName" : "Acme Gas (Cylinder)", \ "netContent" : 1, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 4.80 \ } ], \ "dispensable" : { \ "dispensingUnit" : "each" \ }, \ "extraData" : null, \ "id" : "4a05482a-68b8-4064-979f-6bfadf464481" \ }, \ "orderedQuantity" : 100, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "7a872650-4a46-4781-ac6b-6e04e823fbfe", \ "orderable" : { \ "productCode" : "rota1", \ "fullProductName" : "Rotavirus", \ "netContent" : 1, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 8.50 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : { \ "useVVM" : "true" \ }, \ "id" : "b61c652d-2259-41d7-8bb6-fc5fcdd95626" \ }, \ "orderedQuantity" : 50, \ "totalDispensingUnits" : 50 \ }, { \ "id" : "7da98901-65a5-487d-aa86-7a4eb2310f99", \ "orderable" : { \ "productCode" : "measles10", \ "fullProductName" : "Measles", \ "netContent" : 10, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 12.50 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : { \ "useVVM" : "true" \ }, \ "id" : "b918c3a4-7d12-4be3-854d-d1792cf3b33b" \ }, \ "orderedQuantity" : 10, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "b29c4c0f-8291-4772-b7a5-a4687cdf6aad", \ "orderable" : { \ "productCode" : "MRK-MEASLESDIL-10-1234", \ "fullProductName" : "MMR II Diluent (10 dose)", \ "netContent" : 10, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 20.00 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : null, \ "id" : "7c58f053-0ca5-46ad-8209-98cff0c79b42" \ }, \ "orderedQuantity" : 10, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "bee95eea-9bd2-4242-8cfc-8c46eacfdef5", \ "orderable" : { \ "productCode" : "pcv10", \ "fullProductName" : "PCV10", \ "netContent" : 2, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 4.60 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : { \ "useVVM" : "true" \ }, \ "id" : "72971f1d-dd20-4373-aa94-f9615777581b" \ }, \ "orderedQuantity" : 50, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "554fe21c-bcb8-471b-936b-45e05be889f8", \ "orderable" : { \ "productCode" : "penta1", \ "fullProductName" : "Pentavalent (1 dose)", \ "netContent" : 1, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 2.00 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : { \ "useVVM" : "true" \ }, \ "id" : "5f0dd194-aae1-490c-8b51-3cf0c87af983" \ }, \ "orderedQuantity" : 100, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "dbd4943b-2a59-4869-b9d5-90f9386af0fb", \ "orderable" : { \ "productCode" : "penta10", \ "fullProductName" : "Pentavalent (10 dose)", \ "netContent" : 10, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 3.13 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : { \ "useVVM" : "true" \ }, \ "id" : "c0d41166-01fd-4a28-ae2f-46f867ffb368" \ }, \ "orderedQuantity" : 10, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "a489ac50-412d-4391-8523-f2a72f1c6cb2", \ "orderable" : { \ "productCode" : "ipv5", \ "fullProductName" : "IPV", \ "netContent" : 5, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 13.00 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : { \ "useVVM" : "true" \ }, \ "id" : "b8ff7c36-2003-46d6-a687-551bdd521a9e" \ }, \ "orderedQuantity" : 10, \ "totalDispensingUnits" : 50 \ }, { \ "id" : "0c8cb97c-b653-4f1c-bf76-301acc8a1b8f", \ "orderable" : { \ "productCode" : "polio20", \ "fullProductName" : "Polio (20 dose)", \ "netContent" : 20, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 5.00 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : { \ "useVVM" : "true" \ }, \ "id" : "f8e6ea34-0ad8-43d5-96d7-a6f8b14ff210" \ }, \ "orderedQuantity" : 5, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "73a021f3-8023-47fe-9f52-8edd5ae9d7f4", \ "orderable" : { \ "productCode" : "ACM-SAFETYBOX-1234", \ "fullProductName" : "Acme Safety Box", \ "netContent" : 1, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 1.35 \ } ], \ "dispensable" : { \ "dispensingUnit" : "each" \ }, \ "extraData" : null, \ "id" : "7d5a1795-b219-465c-ba78-f5187b65d7f9" \ }, \ "orderedQuantity" : 100, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "f0d71690-7898-487b-8212-c25e688f1d8d", \ "orderable" : { \ "productCode" : "ACM-SYRINGE005ML-1234", \ "fullProductName" : "Acme Syringe 0.05ml", \ "netContent" : 1, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 4.20 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : null, \ "id" : "4457d688-9617-4594-bb54-03f98cabf84d" \ }, \ "orderedQuantity" : 100, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "f082e931-499e-417a-a68a-bb1e14f6575a", \ "orderable" : { \ "productCode" : "ACM-SYRINGE05ML-1234", \ "fullProductName" : "Acme Syringe 0.5ml", \ "netContent" : 1, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 4.00 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : null, \ "id" : "bfc1bfee-d6bb-4254-8bc9-5a0d962fce97" \ }, \ "orderedQuantity" : 100, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "ab2adc6e-5097-4239-af96-05232b31da56", \ "orderable" : { \ "productCode" : "ACM-SYRINGE5ML-1234", \ "fullProductName" : "Acme Syringe 5ml", \ "netContent" : 1, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 9.00 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : null, \ "id" : "170738eb-6364-4d2a-98cf-1ea54cc5a61a" \ }, \ "orderedQuantity" : 100, \ "totalDispensingUnits" : 100 \ }, { \ "id" : "c3b8c3e7-5877-4bd8-9486-a74cc61a4e22", \ "orderable" : { \ "productCode" : "tetanus10", \ "fullProductName" : "VAT", \ "netContent" : 10, \ "packRoundingThreshold" : 1, \ "roundToZero" : true, \ "programs" : [ { \ "programId" : "418bdc1d-c303-4bd0-b2d3-d8901150a983", \ "orderableDisplayCategoryId" : "16173fd0-f439-4222-931e-91c413a495c3", \ "orderableCategoryDisplayName" : "Vaccines", \ "orderableCategoryDisplayOrder" : 5, \ "active" : true, \ "fullSupply" : true, \ "displayOrder" : 5, \ "dosesPerPatient" : 1, \ "pricePerPack" : 6.00 \ } ], \ "dispensable" : { \ "dispensingUnit" : null \ }, \ "extraData" : { \ "useVVM" : "true" \ }, \ "id" : "e217910c-3364-46b3-92cd-8dd8acf0c557" \ }, \ "orderedQuantity" : 10, \ "totalDispensingUnits" : 100 \ } ] \ }' 'https://demo-v3.openlmis.org/api/orders?access_token=50565042-ace0-408c-ba1b-fda74bcd8353'
OpenLMIS: the global initiative for powerful LMIS software