Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
linenumberstrue
{
"id" : "8c8026b8-0ae8-4adb-b2ca-bfb0dfb030a5",
    "orderable" : {
      "id" : "d602d0c6-4052-456c-8ccd-61b4ad77bece",
      "productCode" : "C100",
      "fullProductName" : "Levora",
      "netContent" : 84,
      "packRoundingThreshold" : 42,
      "roundToZero" : false,
      "programs" : [ {
        "programId" : "dce17f2e-af3e-40ad-8e00-3496adef44c3",
        "orderableDisplayCategoryId" : "15b8ef1f-a5d6-42dd-95bf-bb68a4504e82",
        "orderableCategoryDisplayName" : "Oral contraceptive",
        "orderableCategoryDisplayOrder" : 6,
        "fullSupply" : true,
        "displayOrder" : 1,
        "pricePerPack" : 5.23
      } ],
      "dispensable" : {
        "dispensingUnit" : "10 tab strip"
      }
    },
    "beginningBalance" : 50,
    "totalReceivedQuantity" : 0,
    "totalLossesAndAdjustments" : -5,
    "stockOnHand" : 45,
    "requestedQuantity" : 0,
    "totalConsumedQuantity" : 0,
    "requestedQuantityExplanation" : "we need more",
    "totalStockoutDays" : 0,
    "pricePerPack" : 5.23,
    "skipped" : false,
    "adjustedConsumption" : 0,
    "previousAdjustedConsumptions" : [ 50 ],
    "averageConsumption" : 25,
    "maxPeriodsOfStock" : 5.00,
    "stockAdjustments" : [ {
      "id" : "120557a7-1354-47b5-9579-8717324a3179",
      "reasonId" : "9e25fd93-d8a0-4d1d-8188-55dd3c408d24",
      "quantity" : 15
    }, {
      "id" : "ce50aa66-9465-4a0a-94c5-e389ecd97d45",
      "reasonId" : "71ee1dc3-5444-4a40-8b17-5676152e2ee1",
      "quantity" : 20
    } ]
  }

Minified this line item is 1.1KB.



Which could be further reduced:


Code Block
{
"id" : "8c8026b8-0ae8-4adb-b2ca-bfb0dfb030a5",
    "orderable" : {
      "id" : "d602d0c6-4052-456c-8ccd-61b4ad77bece",
      "productCode" : "C100",
      "fullProductName" : "Levora",
      "netContent" : 84,
      "packRoundingThreshold" : 42,
      "roundToZero" : false,
        "orderableCategoryDisplayName" : "Oral contraceptive",
        "orderableCategoryDisplayOrder" : 6,
        "displayOrder" : 1,
        "pricePerPack" : 5.23
        "dispensingUnit" : "10 tab strip"
    },
    "beginningBalance" : 50,
    "totalReceivedQuantity" : 0,
    "totalLossesAndAdjustments" : -5,
    "stockOnHand" : 45,
    "requestedQuantity" : 0,
    "totalConsumedQuantity" : 0,
    "requestedQuantityExplanation" : "we need more",
    "totalStockoutDays" : 0,
    "pricePerPack" : 5.23,
    "skipped" : false,
    "adjustedConsumption" : 0,
    "previousAdjustedConsumptions" : [ 50 ],
    "averageConsumption" : 25,
    "maxPeriodsOfStock" : 5.00,
    "stockAdjustments" : [ {
      "id" : "120557a7-1354-47b5-9579-8717324a3179",
      "reasonId" : "9e25fd93-d8a0-4d1d-8188-55dd3c408d24",
      "quantity" : 15
    }, {
      "id" : "ce50aa66-9465-4a0a-94c5-e389ecd97d45",
      "reasonId" : "71ee1dc3-5444-4a40-8b17-5676152e2ee1",
      "quantity" : 20
    } ]
  }


Minified this version is 964B






Option A: Reference Data is Immutable

...