Versions Compared

Key

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

...

Expand
titleClick here for steps
  • Create a query with condition as mentioned below. For more details, refer to the wiki page

  • Create a bar type dashlet with cumulative count of specimen ID as the metrics (Y axis) and the collection date(X axis) as category. See the attached image below. For more details, refer to the wiki page.

  • Create a query with the below conditions.

  • Create a bar type dashlet with cumulative count of specimen ID as the metrics (Y axis) and the order execution date(X axis) as category. See the attached image below. For more details, refer to the wiki page.

  • Refer to the export section below and download both the dashlet definition files.
  • Combine the two definition files. See the attached example
Code Block
titleJSON File
collapsetrue
{
  "name" : "dash-sys-coll-dist-lastquat",
  "title" : "Specimen Collected and Distributed in last quarter",
  "type" : "CHART",
  "dataSource" : {
    "options" : {
      "dataSources" : [ {
        "type" : "AQL",
        "options" : {
          "category" : {
            "expr" : "Specimen.createdOn",
            "title" : "Creation Time"
          },
          "metrics" : [ {
            "expr" : "c_count(Specimen.id)",
            "title" : "Collected Specimens"
          } ],
          "criteria" : "Specimen.createdOn exists and Specimen.collectionStatus = \"Collected\" and date_range(Specimen.createdOn, last_cal_qtr)"
        }
      }, {
        "type" : "AQL",
        "options" : {
          "category" : {
            "expr" : "Specimen.specimenOrders.executionDate",
            "title" : "Distribution Time"
          },
          "metrics" : [ {
            "expr" : "c_count(Specimen.id)",
            "title" : "Distributed Specimens"
          } ],
          "criteria" : "Specimen.specimenOrders.executionDate exists and   Specimen.specimenOrders.orderStatus = \"EXECUTED\" and   date_range(Specimen.specimenOrders.executionDate, last_cal_qtr)"
        }
      } ],
      "categoryType" : "date"
    },
    "type" : "SERIES_MIXER"
  },
  "chartOpts" : { },
  "activityStatus" : "Active"
}

  • The dashlets with both conditions of specimens collected and distributed will be created. See the image below



...