API: Performance Measures

The API enables the following interactions with performance measures:

Explanation of Performance Measure Parameters

  • calculationType [int]* - The ID of the calculation type (available on create only)
  • calendarID [int]* - The ID of the reporting frequency (available on create only). When using a custom frequency, you will need to run a report to export the correct frequencyID's.
  • colorBands [bool]* - Whether or not to enable color bands
  • dataSource [string] - A text string that defines the performance measure data source, such as "CDC Monthly Report"
  • isBestPractice [bool]* - Whether or not to share this performance measure in the best practices library (should be false for most newly created performance measures)
  • polarityType [int]* - The ID of the polarity type
  • primaryTag[string] - The tag used for categorizing this object, between 1-15 characters. You can enter a tag that already exists, or enter a new tag and it will be created.
  • scale [int]* - A value between 0-6 specifying how many decimals this performance measure will include
  • title [string]* - Performance measure name
  • unitOfMeasure [string] - Unit of measure, such as $, %, or #
  • uoMisPrefix [bool]* - Whether or not the unit of measure should be displayed before or after the numerical value. For example, a TRUE value will place a dollar symbol before the number, while FALSE will place a % symbol after the number.
  • resultID [int] (optional - parent value) - When retrieving a list of performance measures, including a scorecard ID narrows the list of performance measures to only those related to that scorecard.

Optional Graph Settings

  • graphType [short] - Type of graph: 1 for line chart, 2 for bar chart
  • graphComparison [boolean] - Whether or not to display the graph in presentation mode by default (default: FALSE)
  • displayTargetValues [boolean] - Whether or not target values display on the graph by default (default: TRUE)
  • displayDataLabels [boolean] - Whether or not data labels display on the graph by default (default: TRUE)
  • displayForecastValues [boolean] - Whether or not forecast values display on the graph by default (default: TRUE)
  • displayTrendline [boolean] - Whether or not the trendline displays on the graph by default (default: FALSE)
  • previousTimePeriods [int] - Determines how many past time periods display on the graph when it loads (default: 7)

Reporting Frequencies

  • 1 - Monthly
  • 2 - Quarterly
  • 3 - Annually
  • 4 - Half Year

Polarity Types

  • 1 - Higher is Better
  • 2 - Lower is Better
  • 3 - Target Range
  • 4 - Do Not Display
  • 5 - No Polarity

Calculation Types

  • 1 - Not Calculated
  • 2 - Sum
  • 3 - Average
  • 4 - Ratio
  • 5 - Ratio x 100
  • 6 - Custom Equation
  • 7 - Accumulate Total Sum
  • 8 - Accumulate Year-To-Date Sum
  • 9 - Accumulate Total Average
  • 10 - Accumulate Year-To-Date Average
  • 11 - Sub-Annual Child Year-To-Date Sum
  • 12 - Sub-Annual Child Year-To-Date Average

Get List of Performance Measures

URL

https://api.resultsscorecard.com/api/perfmeasures/list

XML Input

<?xml version="1.0"?>
<Parameters>
<apiKey>eEIzvy0kCu017+D1VjjjI1f52Vmbm+VF2FvO</apiKey>
<siteCode>abc</siteCode>
<programID>555</programID>
</Parameters>

XML Output

<ArrayOfPerfMeasure xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<PerfMeasure>
<aggregationTypeId>1</aggregationTypeId>
<calculationTypeId>1</calculationTypeId>
<calendarId>1</calendarId>
<colorBands>true</colorBands>
<createDate>2013-10-11T00:00:00</createDate>
<createdBy>email@domain.org</createdBy>
<dataSource>data-source</dataSource>
<ID>1</ID>
<isBestPractice>true</isBestPractice>
<modifiedBy>email@domain.org</modifiedBy>
<modifyDate>2013-10-13T00:00:00</modifyDate>
<polarityId>1</polarityId>
<primaryTag>ThisIsATag</primaryTag>
<scale>1</scale>
<title>New Perf Measure</title>
<unitOfMeasure>1</unitOfMeasure>
<uoMisPrefix>true</uoMisPrefix>
</PerfMeasure>
</ArrayOfPerfMeasure>

JSON Input

{
siteCode: "abc",
apiKey: "eEIzvy0kCu017+D1VjjjI1f52Vmbm+VF2FvO",
programID: 555
}

JSON Output

[
{
"ID": 1,
"calendarId": 1,
"polarityId": 1,
"calculationTypeId": 1,
"aggregationTypeId": 1,
"title": "New Perf Measure",
"unitOfMeasure": "1",
"uoMisPrefix": true,
"scale": 1,
"colorBands": true,
"isBestPractice": true,
"primaryTag": "ThisIsATag",
"dataSource": "data-source",
"createDate": "2013-10-11T00:00:00",
"createdBy": "email@domain.org",
"modifyDate": "2013-10-13T00:00:00",
"modifiedBy": "email@domain.org"
}
]

Add a Performance Measure

URL

https://api.resultsscorecard.com/api/perfmeasures/add

XML Input

<PerfMeasure>
<apiKey>eEIzvy0kCu017+D1VjjjI1f52Vmbm+VF2FvO</apiKey>
<siteCode>abc</siteCode>
<aggregationTypeId>1</aggregationTypeId>
<calculationTypeId>1</calculationTypeId>
<calendarId>1</calendarId>
<colorBands>true</colorBands>
<dataSource>data-source</dataSource>
<isBestPractice>true</isBestPractice>
<polarityId>1</polarityId>
<primaryTag>ThisIsATag</primaryTag>
<scale>1</scale>
<title>New Perf Measure</title>
<unitOfMeasure>1</unitOfMeasure>
<uoMisPrefix>true</uoMisPrefix>
</PerfMeasure>

XML Output

<PerfMeasure xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<aggregationTypeId>1</aggregationTypeId>
<calculationTypeId>1</calculationTypeId>
<calendarId>1</calendarId>
<colorBands>true</colorBands>
<createDate>2013-11-14T09:12:10.0777421-08:00</createDate>
<createdBy>email@domain.org</createdBy>
<dataSource>data-source</dataSource>
<ID>2</ID>
<isBestPractice>true</isBestPractice>
<modifiedBy>email@domain.org</modifiedBy>
<modifyDate>2013-11-14T09:12:10.0777421-08:00</modifyDate>
<polarityId>1</polarityId>
<primaryTag>ThisIsATag</primaryTag>
<scale>1</scale>
<title>New Perf Measure</title>
<unitOfMeasure>1</unitOfMeasure>
<uoMisPrefix>true</uoMisPrefix>
</PerfMeasure>

JSON Input

{
"siteCode": "abc",
"apiKey": "eEIzvy0kCu017+D1VjjjI1f52Vmbm+VF2FvO",
"aggregationTypeId": 1,
"calculationTypeId": 1,
"calendarId": 1,
"colorBands": true,
"dataSource": "data-source",
"isBestPractice": true,
"polarityId": 1,
"primaryTag": "ThisIsATag",
"scale": 1,
"title": "New Perf Measure",
"unitOfMeasure": "1",
"uoMisPrefix": true
}

JSON Output

{
"ID": 3,
"calendarId": 1,
"polarityId": 1,
"calculationTypeId": 1,
"aggregationTypeId": 1,
"title": "New Perf Measure",
"unitOfMeasure": "1",
"uoMisPrefix": true,
"scale": 1,
"colorBands": true,
"isBestPractice": true,
"primaryTag": "ThisIsATag",
"dataSource": "data-source",
"createDate": "2013-11-14T09:13:47.7496297-08:00",
"createdBy": "email@domain.org",
"modifyDate": "2013-11-14T09:13:47.7496297-08:00",
"modifiedBy": "email@domain.org"
}

Get Performance Measure Details

URL

https://api.resultsscorecard.com/api/perfmeasures/details

XML Input

<?xml version="1.0"?>
<Parameters>
<apiKey>eEIzvy0kCu017+D1VjjjI1f52Vmbm+VF2FvO</apiKey>
<siteCode>abc</siteCode>
<ID>2</ID>
</Parameters>

XML Output

<PerfMeasure xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<aggregationTypeId>1</aggregationTypeId>
<calculationTypeId>1</calculationTypeId>
<calendarId>1</calendarId>
<colorBands>true</colorBands>
<createDate>2013-11-14T09:12:10.077</createDate>
<createdBy>email@domain.org</createdBy>
<dataSource>data-source</dataSource>
<ID>2</ID>
<isBestPractice>true</isBestPractice>
<modifiedBy>email@domain.org</modifiedBy>
<modifyDate>2013-11-14T09:12:10.077</modifyDate>
<polarityId>1</polarityId>
<primaryTag>ThisIsATag</primaryTag>
<scale>1</scale>
<title>New Perf Measure</title>
<unitOfMeasure>1</unitOfMeasure>
<uoMisPrefix>true</uoMisPrefix>
</PerfMeasure>

JSON Input

{
siteCode: "abc",
apiKey: "eEIzvy0kCu017+D1VjjjI1f52Vmbm+VF2FvO",
id:1
}

JSON Output

{
"ID": 1,
"calendarId": 1,
"polarityId": 1,
"calculationTypeId": 1,
"aggregationTypeId": 1,
"title": "New Perf Measure",
"unitOfMeasure": "1",
"uoMisPrefix": true,
"scale": 1,
"colorBands": true,
"isBestPractice": true,
"primaryTag": "ThisIsATag",
"dataSource": "data-source",
"createDate": "2013-10-11T00:00:00",
"createdBy": "email@domain.org",
"modifyDate": "2013-10-13T00:00:00",
"modifiedBy": "email@domain.org"
}

Update a Performance Measure

Note: calendarId and calculationId cannot be updated after a performance measure is created. These can only be updated through the UI.

URL

https://api.resultsscorecard.com/api/perfmeasures/update

XML Input

<PerfMeasure> 
<apiKey>eEIzvy0kCu017+D1VjjjI1f52Vmbm+VF2FvO</apiKey>
<siteCode>abc</siteCode>
<aggregationTypeId>1</aggregationTypeId>
<colorBands>true</colorBands>
<dataSource>data-source</dataSource>
<ID>2</ID>
<isBestPractice>true</isBestPractice>
<polarityId>1</polarityId>
<primaryTag>ThisIsATag</primaryTag>
<scale>1</scale>
<title>Updated PM</title>
<unitOfMeasure>1</unitOfMeasure>
<uoMisPrefix>true</uoMisPrefix>
</PerfMeasure>

XML Output

<PerfMeasure xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<aggregationTypeId>1</aggregationTypeId>
<calculationTypeId>1</calculationTypeId>
<calendarId>1</calendarId>
<colorBands>true</colorBands>
<createDate>2013-11-14T09:12:10.077</createDate>
<createdBy>email@domain.org</createdBy>
<dataSource>data-source</dataSource>
<ID>2</ID>
<isBestPractice>true</isBestPractice>
<modifiedBy>email@domain.org</modifiedBy>
<modifyDate>2013-11-14T09:22:28.471954-08:00</modifyDate>
<polarityId>1</polarityId>
<primaryTag>ThisIsATag</primaryTag>
<scale>1</scale>
<title>Updated PM</title>
<unitOfMeasure>1</unitOfMeasure>
<uoMisPrefix>true</uoMisPrefix>
</PerfMeasure>

JSON Input

{
"siteCode": "abc",
"apiKey": "eEIzvy0kCu017+D1VjjjI1f52Vmbm+VF2FvO",
"aggregationTypeId": 1,
"colorBands": true,
"dataSource": "data-source",
"ID": 71436,
"isBestPractice": true,
"polarityId": 1,
"primaryTag": "ThisIsATag",
"scale": 1,
"title": "Updtd Perf Measure",
"unitOfMeasure": "1",
"uoMisPrefix": true
}

JSON Output

{
"ID": 1,
"calendarId": 1,
"polarityId": 1,
"calculationTypeId": 1,
"aggregationTypeId": 1,
"title": "Updtd Perf Measure",
"unitOfMeasure": "1",
"uoMisPrefix": true,
"scale": 1,
"colorBands": true,
"isBestPractice": true,
"primaryTag": "ThisIsATag",
"dataSource": "data-source",
"createDate": "2013-10-11T00:00:00",
"createdBy": "email@domain.org",
"modifyDate": "2013-11-14T09:26:21.7183618-08:00",
"modifiedBy": "email@domain.org"
}

Delete a Performance Measure

URL

https://api.resultsscorecard.com/api/perfmeasures/delete

XML Input

<?xml version="1.0"?>
<PerfMeasure>
<apiKey>eEIzvy0kCu017+D1VjjjI1f52Vmbm+VF2FvO</apiKey>
<siteCode>abc</siteCode>
<ID>1</ID>
</PerfMeasure>

XML Output

Successfully deleted perfmeasure [id].

JSON Input

{
siteCode: "abc",
apiKey: "eEIzvy0kCu017+D1VjjjI1f52Vmbm+VF2FvO",
id:2
}

JSON Output

Successfully deleted perfmeasure [id].