• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • Deduct supplies per visit

    I’m trying to create a CP that deducts supplies with each visit. Each visit is going to use a different set of supplies. I can’t figure out how to set the rules to deduct the supplies based on whether it’s the 1st visit, 2nd visit, and so on. Does anyone have an idea on how to do this?

    Sean Lyons

    Sean,

    I created a ticket for the same issue in September but haven’t gotten around to implementing it. Below is what I received from Support.


    There are 2 ways in which you can achieve this configuration, by restricting supplies based upon:

    1. Event labels (which are unique)
    2. Event time points (which are not unique)

    (1). Since event label is unique for a given CP, here is the code you can use to limit/restrict the supplies based on event label:
    [
    {
    “criteria”: “#visit.eventLabel == ‘Baseline’”,
    “supplyType”: “ChainSupply”,
    “consumeQty”: 1
    },
    {
    “criteria”: “#visit.eventLabel == ‘Surgery’”,
    “supplyType”: “ChainSupply”,
    “consumeQty”: 2
    }
    ]

    (2). In case you wish to apply the condition for all events at a certain timepoint (for example multiple events at T1W timepoint), you can apply the restriction as below:

    [
    {
    “criteria”: “#visit.eventPoint == 0 && #visit.eventPointUnit == #visit.eventPointUnit.WEEKS”,
    “supplyType”: “ChainSupply”,
    “consumeQty”: 1
    },
    {
    “criteria”: “#visit.eventPoint == 1 && #visit.eventPointUnit == #visit.eventPointUnit.WEEKS”,
    “supplyType”: “ChainSupply”,
    “consumeQty”: 2
    }
    ]

    You can refer to this page for the consumption of supplies for now. We will add the wiki link after updating the wiki page with some supply examples.


    Essandoh Abaidoo

    Thank you Essandoh. That’s exactly what I needed.