Skip to content

Commit

Permalink
QPPA-856: Add isTopped Out flag to all years (#176)
Browse files Browse the repository at this point in the history
This PR adds an "isToppedOut" boolean property to benchmarks and parses the historical benchmark data to populate the field when generating json files.
  • Loading branch information
shebryant authored Nov 8, 2018
1 parent e980adf commit 575034e
Show file tree
Hide file tree
Showing 10 changed files with 867 additions and 2 deletions.
291 changes: 291 additions & 0 deletions benchmarks/2018.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions benchmarks/2018/benchmarks-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ definitions:
performanceYear:
description: The performanceYear four digit integer corresponds to the time period of the performance data that was submitted for scoring.
type: number
isToppedOut:
description: isToppedOut is a boolean value that describes whether a benchmark's latter deciles repeat a value of 100 or, in the case of inverse measures, a value of 0.
type: boolean
benchmarkYear:
description: The benchmarkYear four digit integer corresponds to the time period of the performance data that was used to generate this benchmark. The submitted performance data will be compared against the benchmarkYear's results.
type: number
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qpp-measures-data",
"version": "1.8.14",
"version": "1.9.0",
"description": "Quality Payment Program Measures Data Repository",
"repository": {
"type": "git",
Expand Down
8 changes: 8 additions & 0 deletions scripts/benchmarks/format-benchmark-record.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ const formatSubmissionMethod = function(submissionMethod) {
return SUBMISSION_METHOD_MAP[submissionMethod.replace(/\s/g, '').toLowerCase()];
};

const formatIsToppedOut = function(isToppedOut) {
if (isToppedOut.trim().toLowerCase() === 'yes') {
return true;
}
return false;
};

const floatRegex = /([0-9]*[.]?[0-9]+)/g;

/**
Expand Down Expand Up @@ -208,6 +215,7 @@ const formatBenchmarkRecord = function(record, options) {
benchmarkYear: parseInt(options.benchmarkYear),
performanceYear: parseInt(options.performanceYear),
submissionMethod: formatSubmissionMethod(record.submissionMethod),
isToppedOut: formatIsToppedOut(record.isToppedOut),
deciles: [
record.decile1,
record.decile2,
Expand Down
Loading

0 comments on commit 575034e

Please sign in to comment.