From 34a80309950669fb2aeb1d01eacb858b1833bbb5 Mon Sep 17 00:00:00 2001 From: John Manack Date: Thu, 30 Nov 2023 17:05:13 -0500 Subject: [PATCH 1/2] fix: QPPA-8070 implement new yaml parser --- .../2023/clinical-clusters-schema.yaml | 6 +- index.js | 12 +-- measures/2017/measures-schema.yaml | 54 ++++++------ measures/2018/measures-schema.yaml | 62 ++++++------- measures/2019/measures-schema.yaml | 67 +++++++------- measures/2020/measures-schema.yaml | 74 ++++++++-------- measures/2021/measures-schema.yaml | 82 ++++++++--------- measures/2022/measures-schema.yaml | 70 ++++++++------- measures/2023/measures-schema.yaml | 12 ++- measures/2024/measures-schema.yaml | 12 ++- package-lock.json | 87 ++++++------------- package.json | 3 +- scripts/validate-data.js | 5 +- test/measures/measures-schema-spec.js | 5 +- 14 files changed, 273 insertions(+), 278 deletions(-) diff --git a/clinical-clusters/2023/clinical-clusters-schema.yaml b/clinical-clusters/2023/clinical-clusters-schema.yaml index a8f650ed..bf5c41cb 100644 --- a/clinical-clusters/2023/clinical-clusters-schema.yaml +++ b/clinical-clusters/2023/clinical-clusters-schema.yaml @@ -1,7 +1,7 @@ $id: https://github.com/CMSgov/qpp-measures-data/versions/0.0.1/clinical-clusters-schema.yaml $schema: http://json-schema.org/schema# type: array -items: { $ref: #/definitions/ClusterType } +items: { $ref: '#/definitions/ClusterType' } definitions: ClusterType: type: object @@ -19,10 +19,10 @@ definitions: default: 'null' clinicalClusters: type: array - items: { $ref: #/definitions/ClinicalClusterType } + items: { '$ref: #/definitions/ClinicalClusterType' } specialtySets: type: array - items: { $ref: #/definitions/ClinicalClusterType } + items: { '$ref: #/definitions/ClinicalClusterType' } ClinicalClusterType: type: object properties: diff --git a/index.js b/index.js index 12232b82..ca875e22 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ // Libraries const fs = require('fs'); const path = require('path'); -const YAML = require('yamljs'); +const YAML = require('yaml'); const _ = require('lodash'); const yearRegEx = /^[0-9]{4}/; @@ -99,7 +99,7 @@ exports.getBenchmarksYears = function() { * @return {{}} - Object representation of the Benchmarks Schema */ exports.getBenchmarksSchema = function(performanceYear = Constants.currentPerformanceYear) { - return YAML.load(path.join(__dirname, 'benchmarks', performanceYear.toString(), 'benchmarks-schema.yaml')); + return YAML.parse(fs.readFileSync(path.join(__dirname, 'benchmarks', performanceYear.toString(), 'benchmarks-schema.yaml'), 'utf8')); }; /** @@ -122,7 +122,7 @@ exports.getMeasuresData = function(performanceYear = 2017) { * @return {{}} - Object representation of the Measures Schema */ exports.getMeasuresSchema = function(performanceYear = 2017) { - return YAML.load(path.join(__dirname, 'measures', performanceYear.toString(), 'measures-schema.yaml')); + return YAML.parse(fs.readFileSync(path.join(__dirname, 'measures', performanceYear.toString(), 'measures-schema.yaml'), 'utf8')); }; /** @@ -142,8 +142,8 @@ exports.getClinicalClusterData = function(performanceYear = 2017) { /** * @return {{}} - Object representation of the Clinical Cluster Schema */ -exports.getClinicalClusterSchema = function(performanceYear = 2017) { - return YAML.load(path.join(__dirname, 'clinical-clusters', performanceYear.toString(), 'clinical-clusters-schema.yaml')); +exports.getClinicalClusterSchema = function(performanceYear = 2023) { + return YAML.parse(fs.readFileSync(path.join(__dirname, 'clinical-clusters', performanceYear.toString(), 'clinical-clusters-schema.yaml'), 'utf8')); }; /** @@ -245,7 +245,7 @@ exports.populateMeasuresforMVPs = function(currentMvp, allMvps, measuresData, me * @return {{}} - Object representation of the MVP Schema */ exports.getMVPSchema = function(performanceYear = 2023) { - return YAML.load(path.join(__dirname, 'mvp', performanceYear.toString(), 'mvp-schema.yaml')); + return YAML.parse(fs.readFileSync(path.join(__dirname, 'mvp', performanceYear.toString(), 'mvp-schema.yaml'), 'utf8')); }; /** diff --git a/measures/2017/measures-schema.yaml b/measures/2017/measures-schema.yaml index cd39a0e9..2df35650 100644 --- a/measures/2017/measures-schema.yaml +++ b/measures/2017/measures-schema.yaml @@ -1,7 +1,7 @@ $id: https://github.com/CMSgov/qpp-measures-data/blob/master/measures/2017/measures-schema.yaml $schema: http://json-schema.org/schema# type: array -items: { $ref: #/definitions/measure } +items: { $ref: '#/definitions/measure' } definitions: measure: @@ -13,7 +13,7 @@ definitions: title: { type: string } description: { type: string } category: - description: QPP scoring category to which the measure belongs: Improvement Activities, Quality, Advancing Care Information, and Cost. + description: 'QPP scoring category to which the measure belongs: Improvement Activities, Quality, Advancing Care Information, and Cost.' enum: [ia, quality, aci, cost] metricType: description: Type of measurement that the measure requires in order to attest. @@ -28,17 +28,17 @@ definitions: default: 'null' measureSpecification: description: URL link for Measure Specification PDF to download by Submission Method. - items: { $ref: #/definitions/measureSpecification } + items: { $ref: '#/definitions/measureSpecification' } measureSets: description: ACI measures can belong to the transition measure set. Quality measures can belong to multiple measure sets that represent different specialties. type: array - items: { $ref: #/definitions/measureSets } + items: { $ref: '#/definitions/measureSets' } required: [measureId, title, description, category, metricType, firstPerformanceYear, lastPerformanceYear] oneOf: - - { $ref: #/definitions/iaMeasure } - - { $ref: #/definitions/aciMeasure } - - { $ref: #/definitions/qualityMeasure } - - { $ref: #/definitions/aggregateCostMeasure } + - { $ref: '#/definitions/iaMeasure' } + - { $ref: '#/definitions/aciMeasure' } + - { $ref: '#/definitions/qualityMeasure' } + - { $ref: '#/definitions/aggregateCostMeasure' } iaMeasure: type: object @@ -50,7 +50,7 @@ definitions: default: medium subcategoryId: description: IA category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/subcategoryIds }] + oneOf: [{ $ref: '#/definitions/subcategoryIds' }] cehrtEligible: description: If true, attesting to the measure will qualify the provider for an ACI CEHRT bonus. type: boolean @@ -69,7 +69,7 @@ definitions: enum: [0, 5, 10, 20] objective: description: ACI category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/objectives }] + oneOf: [{ $ref: '#/definitions/objectives' }] isRequired: description: If true, attesting to the measure is required in order to receive a non-zero ACI score. type: boolean @@ -80,7 +80,7 @@ definitions: default: false substitutes: description: Identifiers of other ACI measure that can be used instead of the current meausre. - oneOf: [{ $ref: #/definitions/arrayOfStringIdentifiers}] + oneOf: [{ $ref: '#/definitions/arrayOfStringIdentifiers' }] required: [weight, objective, isRequired, isBonus, measureSets] aggregateCostMeasure: @@ -105,7 +105,7 @@ definitions: nationalQualityStrategyDomain: { type: ['null', string] } measureType: description: Quality category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/measureTypes }] + oneOf: [{ $ref: '#/definitions/measureTypes' }] eMeasureId: description: Identifier for Electronic Clinical Quality Measures (ECQM). type: ['null', string] @@ -132,22 +132,22 @@ definitions: strata: description: Population segments for which the measure requires reporting data. Only applicable to multiPerformanceRate measures. type: array - items: { $ref: #/definitions/performanceStrata } + items: { $ref: '#/definitions/performanceStrata' } primarySteward: description: Organization who submits and maintains the measure. type: string submissionMethods: description: Possible methods for submitting performance data for the measure. type: array - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } eligibilityOptions: description: Eligibility options mirror denominator options in QCDR measure specifications. Each option comprises a set of codes used to identify eligible instances of the associated measure. type: array - items: { $ref: #/definitions/eligibilityOption } + items: { $ref: '#/definitions/eligibilityOption' } performanceOptions: description: Performance options mirror numerator options in QCDR measure specifications. Each option comprises a set of codes used to identify instances of performance met, performance not met, performance exclusion or performance exception. type: array - items: { $ref: #/definitions/performanceOption } + items: { $ref: '#/definitions/performanceOption' } isRegistryMeasure: description: If true, this measure was authored by a QCDR (Qualified Clinical Data Registry). type: boolean @@ -288,7 +288,7 @@ definitions: eligibilityOption: type: object properties: - submissionMethods: { $ref: #/definitions/qualityCodesSubmissionMethods } + submissionMethods: { $ref: '#/definitions/qualityCodesSubmissionMethods' } sexCode: description: Gender identifier in the case of measures that apply to one gender only. enum: [M, F] @@ -298,16 +298,16 @@ definitions: maxAge: description: The maximum patient age required for eligibility. type: number - diagnosisCodes: { $ref: #/definitions/arrayOfStringIdentifiers } - additionalDiagnosisCodes: { $ref: #/definitions/arrayOfStringIdentifiers } + diagnosisCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } + additionalDiagnosisCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } procedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } additionalProcedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. If present, this field imposes a requirement in addition to the one from the procedureCodes field. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } required: [submissionMethods] anyOf: - required: ['procedureCodes'] @@ -316,14 +316,14 @@ definitions: performanceOption: type: object properties: - submissionMethods: { $ref: #/definitions/qualityCodesSubmissionMethods } + submissionMethods: { $ref: '#/definitions/qualityCodesSubmissionMethods' } optionType: description: The specific performance option corresponding to the quality codes (performance met, performance not met, etc.). enum: [performanceMet, performanceNotMet, eligiblePopulationExclusion, eligiblePopulationException] qualityCodes: description: A list of quality codes, all of which must be present to meet the performance option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } required: [submissionMethods, optionType, qualityCodes] codeObject: @@ -332,10 +332,10 @@ definitions: code: description: The HCPCS or CPT code represented as a string. type: string - modifiers: { $ref: #/definitions/arrayOfStringIdentifiers } - modifierExclusions: { $ref: #/definitions/arrayOfStringIdentifiers } - placesOfService: { $ref: #/definitions/arrayOfStringIdentifiers } - placesOfServiceExclusions: { $ref: #/definitions/arrayOfStringIdentifiers } + modifiers: { $ref: '#/definitions/arrayOfStringIdentifiers' } + modifierExclusions: { $ref: '#/definitions/arrayOfStringIdentifiers' } + placesOfService: { $ref: '#/definitions/arrayOfStringIdentifiers' } + placesOfServiceExclusions: { $ref: '#/definitions/arrayOfStringIdentifiers' } required: [code] qualityCodesSubmissionMethods: diff --git a/measures/2018/measures-schema.yaml b/measures/2018/measures-schema.yaml index c5e7d8d7..406290c6 100644 --- a/measures/2018/measures-schema.yaml +++ b/measures/2018/measures-schema.yaml @@ -1,7 +1,7 @@ $id: https://github.com/CMSgov/qpp-measures-data/blob/master/measures/2018/measures-schema.yaml $schema: http://json-schema.org/draft-07/schema type: array -items: { $ref: #/definitions/measure } +items: { $ref: '#/definitions/measure' } uniqueItemProperties: ['measureId'] # used by ajv-keywords definitions: @@ -14,7 +14,7 @@ definitions: title: { type: string } description: { type: string } category: - description: QPP scoring category to which the measure belongs: Improvement Activities, Quality, Promoting Interoperability (formerly Advancing Care Information), and Cost. + description: 'QPP scoring category to which the measure belongs: Improvement Activities, Quality, Promoting Interoperability (formerly Advancing Care Information), and Cost.' enum: [ia, quality, pi, cost] metricType: description: Type of measurement that the measure requires in order to attest. @@ -29,29 +29,30 @@ definitions: default: 'null' measureSpecification: description: URL link for Measure Specification PDF to download by Submission Method. - items: { $ref: #/definitions/measureSpecification } + items: { $ref: '#/definitions/measureSpecification' } measureSets: description: PI measures can belong to the transition measure set. Quality measures can belong to multiple measure sets that represent different specialties. type: array - items: { $ref: #/definitions/measureSets } + items: { $ref: '#/definitions/measureSets' } required: [measureId, title, description, category, metricType, firstPerformanceYear, lastPerformanceYear] anyOf: - - { $ref: #/definitions/iaMeasure } - - { $ref: #/definitions/piMeasure } - - { $ref: #/definitions/qualityMeasure } - - { $ref: #/definitions/aggregateCostMeasure } + - { $ref: '#/definitions/iaMeasure' } + - { $ref: '#/definitions/piMeasure' } + - { $ref: '#/definitions/qualityMeasure' } + - { $ref: '#/definitions/aggregateCostMeasure' } iaMeasure: type: object properties: - category: { const ia } + category: + enum: [ia] weight: description: Determines the points granted for attesting to the measure. enum: [null, medium, high] default: medium subcategoryId: description: IA category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/subcategoryIds }] + oneOf: [{ $ref: '#/definitions/subcategoryIds' }] cehrtEligible: description: If true, attesting to the measure will qualify the provider for an PI CEHRT bonus. type: boolean @@ -61,7 +62,8 @@ definitions: piMeasure: type: object properties: - category: { const pi } + category: + enum: [pi] reportingCategory: description: The reporting category of the PI measure. enum: [attestation, base, registryBonus, performanceBonus, cehrtBonus] @@ -70,7 +72,7 @@ definitions: enum: [0, 5, 10, 20] objective: description: PI category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/objectives }] + oneOf: [{ $ref: '#/definitions/objectives' }] isRequired: description: If true, attesting to the measure is required in order to receive a non-zero PI score. type: boolean @@ -81,13 +83,14 @@ definitions: default: false substitutes: description: Identifiers of other PI measure that can be used instead of the current meausre. - oneOf: [{ $ref: #/definitions/arrayOfStringIdentifiers}] + oneOf: [{ $ref: '#/definitions/arrayOfStringIdentifiers' }] required: [weight, objective, isRequired, isBonus, measureSets] aggregateCostMeasure: type: object properties: - category: { const cost } + category: + enum: [cost] isInverse: description: If true, a lower performance rate correlates with better performance. type: boolean @@ -102,11 +105,12 @@ definitions: qualityMeasure: type: object properties: - category: { const quality } + category: + enum: [quality] nationalQualityStrategyDomain: { type: ['null', string] } measureType: description: Quality category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/measureTypes }] + oneOf: [{ $ref: '#/definitions/measureTypes' }] eMeasureId: description: Identifier for Electronic Clinical Quality Measures (ECQM). type: ['null', string] @@ -133,22 +137,22 @@ definitions: strata: description: Population segments for which the measure requires reporting data. Only applicable to multiPerformanceRate measures. type: array - items: { $ref: #/definitions/performanceStrata } + items: { $ref: '#/definitions/performanceStrata' } primarySteward: description: Organization who submits and maintains the measure. type: string submissionMethods: description: Possible methods for submitting performance data for the measure. type: array - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } eligibilityOptions: description: Eligibility options mirror denominator options in QCDR measure specifications. Each option comprises a set of codes used to identify eligible instances of the associated measure. type: array - items: { $ref: #/definitions/eligibilityOption } + items: { $ref: '#/definitions/eligibilityOption' } performanceOptions: description: Performance options mirror numerator options in QCDR measure specifications. Each option comprises a set of codes used to identify instances of performance met, performance not met, performance exclusion or performance exception. type: array - items: { $ref: #/definitions/performanceOption } + items: { $ref: '#/definitions/performanceOption' } isRegistryMeasure: description: If true, this measure was authored by a QCDR (Qualified Clinical Data Registry). type: boolean @@ -309,16 +313,16 @@ definitions: maxAge: description: The maximum patient age required for eligibility. type: number - diagnosisCodes: { $ref: #/definitions/arrayOfStringIdentifiers } - additionalDiagnosisCodes: { $ref: #/definitions/arrayOfStringIdentifiers } + diagnosisCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } + additionalDiagnosisCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } procedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } additionalProcedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. If present, this field imposes a requirement in addition to the one from the procedureCodes field. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } anyOf: - required: ['procedureCodes'] - required: ['diagnosisCodes'] @@ -332,7 +336,7 @@ definitions: qualityCodes: description: A list of quality codes, all of which must be present to meet the performance option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } required: [optionType, qualityCodes] codeObject: @@ -341,10 +345,10 @@ definitions: code: description: The HCPCS or CPT code represented as a string. type: string - modifiers: { $ref: #/definitions/arrayOfStringIdentifiers } - modifierExclusions: { $ref: #/definitions/arrayOfStringIdentifiers } - placesOfService: { $ref: #/definitions/arrayOfStringIdentifiers } - placesOfServiceExclusions: { $ref: #/definitions/arrayOfStringIdentifiers } + modifiers: { $ref: '#/definitions/arrayOfStringIdentifiers' } + modifierExclusions: { $ref: '#/definitions/arrayOfStringIdentifiers' } + placesOfService: { $ref: '#/definitions/arrayOfStringIdentifiers' } + placesOfServiceExclusions: { $ref: '#/definitions/arrayOfStringIdentifiers' } required: [code] qualityCodesSubmissionMethods: diff --git a/measures/2019/measures-schema.yaml b/measures/2019/measures-schema.yaml index 8ebef4cc..15b8ee3d 100644 --- a/measures/2019/measures-schema.yaml +++ b/measures/2019/measures-schema.yaml @@ -1,7 +1,7 @@ $id: https://github.com/CMSgov/qpp-measures-data/blob/master/measures/2019/measures-schema.yaml $schema: http://json-schema.org/draft-07/schema type: array -items: { $ref: #/definitions/measure } +items: { $ref: '#/definitions/measure' } uniqueItemProperties: ['measureId'] # used by ajv-keywords definitions: @@ -9,10 +9,10 @@ definitions: title: 'Measure' type: object anyOf: - - { $ref: #/definitions/iaMeasure } - - { $ref: #/definitions/piMeasure } - - { $ref: #/definitions/qualityMeasure } - - { $ref: #/definitions/aggregateCostMeasure } + - { $ref: '#/definitions/iaMeasure' } + - { $ref: '#/definitions/piMeasure' } + - { $ref: '#/definitions/qualityMeasure' } + - { $ref: '#/definitions/aggregateCostMeasure' } baseMeasure: title: 'Base Measure' @@ -36,36 +36,37 @@ definitions: default: 'null' measureSpecification: description: URL link for Measure Specification PDF to download by Submission Method. - items: { $ref: #/definitions/measureSpecification } + items: { $ref: '#/definitions/measureSpecification' } measureSets: description: Quality measures can belong to multiple measure sets that represent different specialties. type: array - items: { $ref: #/definitions/measureSets } + items: { $ref: '#/definitions/measureSets' } required: [measureId, title, description, category, metricType, firstPerformanceYear, lastPerformanceYear] iaMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'IA Measure' type: object additionalProperties: false properties: - category: { const ia } + category: + enum: [ia] weight: description: Determines the points granted for attesting to the measure. enum: [null, medium, high] default: medium subcategoryId: description: IA category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/subcategoryIds }] + oneOf: [{ $ref: '#/definitions/subcategoryIds' }] required: [category, weight, subcategoryId] piMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'PI Measure' type: object @@ -80,7 +81,7 @@ definitions: enum: [null, 0, 5, 10, 20, 40] objective: description: PI category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/objectives }] + oneOf: [{ $ref: '#/definitions/objectives' }] isRequired: description: If true, attesting to the measure is required in order to receive a non-zero PI score. type: boolean @@ -91,7 +92,7 @@ definitions: default: false substitutes: description: Identifiers of other PI measures that can be used instead of the current measure. - oneOf: [{ $ref: #/definitions/arrayOfStringIdentifiers}] + oneOf: [{ $ref: '#/definitions/arrayOfStringIdentifiers' }] exclusion: description: Identifiers of other PI measures that can be submitted instead of current measure. Cannot submit both current measure and the exclusion measure. required: [category, weight, objective, isRequired, isBonus, measureSets] @@ -99,13 +100,14 @@ definitions: aggregateCostMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'Cost Measure' type: object additionalProperties: false properties: - category: { const cost } + category: + enum: [cost] isInverse: description: If true, a lower performance rate correlates with better performance. type: boolean @@ -122,17 +124,18 @@ definitions: qualityMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'Quality Measure' type: object additionalProperties: false properties: - category: { const quality } + category: + enum: [quality] nationalQualityStrategyDomain: { type: ['null', string] } measureType: description: Quality category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/measureTypes }] + oneOf: [{ $ref: '#/definitions/measureTypes' }] eMeasureId: description: Identifier for Electronic Clinical Quality Measures (ECQM). type: ['null', string] @@ -162,22 +165,22 @@ definitions: strata: description: Population segments for which the measure requires reporting data. Only applicable to multiPerformanceRate measures. type: array - items: { $ref: #/definitions/performanceStrata } + items: { $ref: '#/definitions/performanceStrata' } primarySteward: description: Organization who submits and maintains the measure. type: string submissionMethods: description: Possible methods for submitting performance data for the measure. type: array - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } eligibilityOptions: description: Eligibility options mirror denominator options in QCDR measure specifications. Each option comprises a set of codes used to identify eligible instances of the associated measure. type: array - items: { $ref: #/definitions/eligibilityOption } + items: { $ref: '#/definitions/eligibilityOption' } performanceOptions: description: Performance options mirror numerator options in QCDR measure specifications. Each option comprises a set of codes used to identify instances of performance met, performance not met, performance exclusion or performance exception. type: array - items: { $ref: #/definitions/performanceOption } + items: { $ref: '#/definitions/performanceOption' } isRegistryMeasure: description: If true, this measure was authored by a QCDR (Qualified Clinical Data Registry). type: boolean @@ -354,17 +357,17 @@ definitions: maxAge: description: The maximum patient age required for eligibility. type: number - diagnosisCodes: { $ref: #/definitions/arrayOfStringIdentifiers } - additionalDiagnosisCodes: { $ref: #/definitions/arrayOfStringIdentifiers } - diagnosisExclusionCodes: { $ref: #/definitions/arrayOfStringIdentifiers } + diagnosisCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } + additionalDiagnosisCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } + diagnosisExclusionCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } procedureCodes: type: array description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } additionalProcedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. If present, this field imposes a requirement in addition to the one from the procedureCodes field. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } anyOf: - required: ['procedureCodes'] - required: ['diagnosisCodes'] @@ -379,7 +382,7 @@ definitions: qualityCodes: description: A list of quality codes, all of which must be present to meet the performance option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } required: [optionType, qualityCodes] codeObject: @@ -389,10 +392,10 @@ definitions: code: description: The HCPCS or CPT code represented as a string. type: string - modifiers: { $ref: #/definitions/arrayOfStringIdentifiers } - modifierExclusions: { $ref: #/definitions/arrayOfStringIdentifiers } - placesOfService: { $ref: #/definitions/arrayOfStringIdentifiers } - placesOfServiceExclusions: { $ref: #/definitions/arrayOfStringIdentifiers } + modifiers: { $ref: '#/definitions/arrayOfStringIdentifiers' } + modifierExclusions: { $ref: '#/definitions/arrayOfStringIdentifiers' } + placesOfService: { $ref: '#/definitions/arrayOfStringIdentifiers' } + placesOfServiceExclusions: { $ref: '#/definitions/arrayOfStringIdentifiers' } required: [code] qualityCodesSubmissionMethods: diff --git a/measures/2020/measures-schema.yaml b/measures/2020/measures-schema.yaml index 80b7ff77..7cefe60e 100644 --- a/measures/2020/measures-schema.yaml +++ b/measures/2020/measures-schema.yaml @@ -1,7 +1,7 @@ $id: https://github.com/CMSgov/qpp-measures-data/blob/master/measures/2020/measures-schema.yaml $schema: http://json-schema.org/draft-07/schema type: array -items: { $ref: #/definitions/measure } +items: { $ref: '#/definitions/measure' } uniqueItemProperties: ['measureId'] # used by ajv-keywords definitions: @@ -9,10 +9,10 @@ definitions: title: 'Measure' type: object anyOf: - - { $ref: #/definitions/iaMeasure } - - { $ref: #/definitions/piMeasure } - - { $ref: #/definitions/qualityMeasure } - - { $ref: #/definitions/aggregateCostMeasure } + - { $ref: '#/definitions/iaMeasure' } + - { $ref: '#/definitions/piMeasure' } + - { $ref: '#/definitions/qualityMeasure' } + - { $ref: '#/definitions/aggregateCostMeasure' } baseMeasure: title: 'Base Measure' @@ -24,7 +24,7 @@ definitions: title: { type: string } description: { type: string } category: - description: QPP scoring category to which the measure belongs: Improvement Activities, Quality, Promoting Interoperability (formerly Advancing Care Information), and Cost. + description: 'QPP scoring category to which the measure belongs: Improvement Activities, Quality, Promoting Interoperability (formerly Advancing Care Information), and Cost.' enum: [ia, quality, pi, cost] metricType: description: Type of measurement that the measure requires in order to attest. @@ -40,49 +40,51 @@ definitions: measureSpecification: description: URL link for Measure Specification PDF to download by Submission Method. anyOf: - - { $ref: #/definitions/measureSpecification } + - { $ref: '#/definitions/measureSpecification' } - { type: 'null' } measureSets: description: Quality measures can belong to multiple measure sets that represent different specialties. type: array - items: { $ref: #/definitions/measureSets } + items: { $ref: '#/definitions/measureSets' } required: [measureId, title, description, category, metricType, firstPerformanceYear, lastPerformanceYear] iaMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'IA Measure' type: object additionalProperties: false properties: - category: { const ia } + category: + enum: [ia] weight: description: Determines the points granted for attesting to the measure. enum: [null, medium, high] default: medium subcategoryId: description: IA category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/subcategoryIds }] + oneOf: [{ $ref: '#/definitions/subcategoryIds' }] required: [weight, subcategoryId] piMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'PI Measure' type: object additionalProperties: false properties: - category: { const pi } + category: + enum: [pi] reportingCategory: description: The reporting category of the PI measure. enum: [required, bonus, exclusion, null] objective: description: PI category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/objectives }] + oneOf: [{ $ref: '#/definitions/objectives' }] isRequired: description: If true, attesting to the measure is required in order to receive a non-zero PI score. type: boolean @@ -93,7 +95,7 @@ definitions: default: false substitutes: description: Identifiers of other PI measures that can be used instead of the current measure. - oneOf: [{ $ref: #/definitions/arrayOfStringIdentifiers}] + oneOf: [{ $ref: '#/definitions/arrayOfStringIdentifiers' }] exclusion: description: Identifiers of other PI measures that can be submitted instead of current measure. Cannot submit both current measure and the exclusion measure. required: [objective, isRequired, isBonus, measureSets] @@ -101,13 +103,14 @@ definitions: aggregateCostMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'Cost Measure' type: object additionalProperties: false properties: - category: { const cost } + category: + enum: [cost] isInverse: description: If true, a lower performance rate correlates with better performance. type: boolean @@ -122,17 +125,18 @@ definitions: qualityMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'Quality Measure' type: object additionalProperties: false properties: - category: { const quality } + category: + enum: [quality] nationalQualityStrategyDomain: { type: ['null', string] } measureType: description: Quality category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/measureTypes }] + oneOf: [{ $ref: '#/definitions/measureTypes' }] eMeasureId: description: Identifier for Electronic Clinical Quality Measures (ECQM). type: ['null', string] @@ -150,7 +154,7 @@ definitions: type: boolean clinicalGuidelineChanged: type: array - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } isHighPriority: description: If true, can be used in the place of an outcome measure to satisfy quality category requirements. type: boolean @@ -165,22 +169,22 @@ definitions: strata: description: Population segments for which the measure requires reporting data. Only applicable to multiPerformanceRate measures. type: array - items: { $ref: #/definitions/performanceStrata } + items: { $ref: '#/definitions/performanceStrata' } primarySteward: description: Organization who submits and maintains the measure. type: string submissionMethods: description: Possible methods for submitting performance data for the measure. type: array - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } eligibilityOptions: description: Eligibility options mirror denominator options in QCDR measure specifications. Each option comprises a set of codes used to identify eligible instances of the associated measure. type: array - items: { $ref: #/definitions/eligibilityOption } + items: { $ref: '#/definitions/eligibilityOption' } performanceOptions: description: Performance options mirror numerator options in QCDR measure specifications. Each option comprises a set of codes used to identify instances of performance met, performance not met, performance exclusion or performance exception. type: array - items: { $ref: #/definitions/performanceOption } + items: { $ref: '#/definitions/performanceOption' } isRegistryMeasure: description: If true, this measure was authored by a QCDR (Qualified Clinical Data Registry). type: boolean @@ -196,7 +200,7 @@ definitions: default: false icdImpacted: type: array - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } # measures with metricType multiPerformanceRate must also have the properties overallAlgorithm and strata; other metricTypes do not # Note: Need to add back required: [overallAlgorithm, strata] for multiPerformanceRate, registryMultiPerformanceRate once strata data for 007 has been received oneOf: [ @@ -360,16 +364,16 @@ definitions: maxAge: description: The maximum patient age required for eligibility. type: number - diagnosisCodes: { $ref: #/definitions/arrayOfStringIdentifiers } - additionalDiagnosisCodes: { $ref: #/definitions/arrayOfStringIdentifiers } + diagnosisCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } + additionalDiagnosisCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } procedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } additionalProcedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. If present, this field imposes a requirement in addition to the one from the procedureCodes field. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } anyOf: - required: ['procedureCodes'] - required: ['diagnosisCodes'] @@ -383,7 +387,7 @@ definitions: qualityCodes: description: A list of quality codes, all of which must be present to meet the performance option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } required: [optionType, qualityCodes] codeObject: @@ -392,10 +396,10 @@ definitions: code: description: The HCPCS or CPT code represented as a string. type: string - modifiers: { $ref: #/definitions/arrayOfStringIdentifiers } - modifierExclusions: { $ref: #/definitions/arrayOfStringIdentifiers } - placesOfService: { $ref: #/definitions/arrayOfStringIdentifiers } - placesOfServiceExclusions: { $ref: #/definitions/arrayOfStringIdentifiers } + modifiers: { $ref: '#/definitions/arrayOfStringIdentifiers' } + modifierExclusions: { $ref: '#/definitions/arrayOfStringIdentifiers' } + placesOfService: { $ref: '#/definitions/arrayOfStringIdentifiers' } + placesOfServiceExclusions: { $ref: '#/definitions/arrayOfStringIdentifiers' } required: [code] qualityCodesSubmissionMethods: diff --git a/measures/2021/measures-schema.yaml b/measures/2021/measures-schema.yaml index 3afd2797..7f7e8757 100644 --- a/measures/2021/measures-schema.yaml +++ b/measures/2021/measures-schema.yaml @@ -1,7 +1,7 @@ $id: https://github.com/CMSgov/qpp-measures-data/blob/master/measures/2021/measures-schema.yaml $schema: http://json-schema.org/draft-07/schema type: array -items: { $ref: #/definitions/measure } +items: { $ref: '#/definitions/measure' } uniqueItemProperties: ['measureId'] # used by ajv-keywords definitions: @@ -9,10 +9,10 @@ definitions: title: 'Measure' type: object anyOf: - - { $ref: #/definitions/iaMeasure } - - { $ref: #/definitions/piMeasure } - - { $ref: #/definitions/qualityMeasure } - - { $ref: #/definitions/aggregateCostMeasure } + - { $ref: '#/definitions/iaMeasure' } + - { $ref: '#/definitions/piMeasure' } + - { $ref: '#/definitions/qualityMeasure' } + - { $ref: '#/definitions/aggregateCostMeasure' } baseMeasure: title: 'Base Measure' @@ -24,7 +24,7 @@ definitions: title: { type: string } description: { type: string } category: - description: QPP scoring category to which the measure belongs: Improvement Activities, Quality, Promoting Interoperability (formerly Advancing Care Information), and Cost. + description: 'QPP scoring category to which the measure belongs: Improvement Activities, Quality, Promoting Interoperability (formerly Advancing Care Information), and Cost.' enum: [ia, quality, pi, cost] metricType: description: Type of measurement that the measure requires in order to attest. @@ -40,49 +40,51 @@ definitions: measureSpecification: description: URL link for Measure Specification PDF to download by Submission Method. anyOf: - - { $ref: #/definitions/measureSpecification } + - { $ref: '#/definitions/measureSpecification' } - { type: 'null' } measureSets: description: Quality measures can belong to multiple measure sets that represent different specialties. type: array - items: { $ref: #/definitions/measureSets } + items: { $ref: '#/definitions/measureSets' } required: [measureId, title, description, category, metricType, firstPerformanceYear, lastPerformanceYear] iaMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'IA Measure' type: object additionalProperties: false properties: - category: { const ia } + category: + enum: [ia] weight: description: Determines the points granted for attesting to the measure. enum: [null, medium, high] default: medium subcategoryId: description: IA category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/subcategoryIds }] + oneOf: [{ $ref: '#/definitions/subcategoryIds' }] required: [weight, subcategoryId] piMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'PI Measure' type: object additionalProperties: false properties: - category: { const pi } + category: + enum: [pi] reportingCategory: description: The reporting category of the PI measure. enum: [required, bonus, exclusion, null] objective: description: PI category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/objectives }] + oneOf: [{ $ref: '#/definitions/objectives' }] isRequired: description: If true, attesting to the measure is required in order to receive a non-zero PI score. type: boolean @@ -93,7 +95,7 @@ definitions: default: false substitutes: description: Identifiers of other PI measures that can be used instead of the current measure. - oneOf: [{ $ref: #/definitions/arrayOfStringIdentifiers}] + oneOf: [{ $ref: '#/definitions/arrayOfStringIdentifiers' }] exclusion: description: Identifiers of other PI measures that can be submitted instead of current measure. Cannot submit both current measure and the exclusion measure. required: [objective, isRequired, isBonus, measureSets] @@ -101,13 +103,14 @@ definitions: aggregateCostMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'Cost Measure' type: object additionalProperties: false properties: - category: { const cost } + category: + enum: [cost] isInverse: description: If true, a lower performance rate correlates with better performance. type: boolean @@ -122,17 +125,18 @@ definitions: qualityMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'Quality Measure' type: object additionalProperties: false properties: - category: { const quality } + category: + enum: [quality] nationalQualityStrategyDomain: { type: ['null', string] } measureType: description: Quality category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/measureTypes }] + oneOf: [{ $ref: '#/definitions/measureTypes' }] eMeasureId: description: Identifier for Electronic Clinical Quality Measures (ECQM). type: ['null', string] @@ -150,7 +154,7 @@ definitions: type: boolean clinicalGuidelineChanged: type: array - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } isHighPriority: description: If true, can be used in the place of an outcome measure to satisfy quality category requirements. type: boolean @@ -165,30 +169,30 @@ definitions: strata: description: Population segments for which the measure requires reporting data. Only applicable to multiPerformanceRate measures. type: array - items: { $ref: #/definitions/performanceStrata } + items: { $ref: '#/definitions/performanceStrata' } primarySteward: description: Organization who submits and maintains the measure. type: string submissionMethods: description: Possible methods for submitting performance data for the measure. type: array - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } eligibilityOptions: description: Eligibility options mirror denominator options in QCDR measure specifications. Each option comprises a set of codes used to identify eligible instances of the associated measure. type: array - items: { $ref: #/definitions/eligibilityOption } + items: { $ref: '#/definitions/eligibilityOption' } performanceOptions: description: Performance options mirror numerator options in QCDR measure specifications. Each option comprises a set of codes used to identify instances of performance met, performance not met, performance exclusion or performance exception. type: array - items: { $ref: #/definitions/performanceOption } + items: { $ref: '#/definitions/performanceOption' } allowedPrograms: description: Programs that the measure can be submitted to type: array - items: { $ref: #/definitions/programs } + items: { $ref: '#/definitions/programs' } requiredForPrograms: description: Programs that the measure is required to be submitted to type: array - items: { $ref: #/definitions/programs } + items: { $ref: '#/definitions/programs' } allowedVendors: description: List of QCDR Registries that are allowed to submit the QCDR measure type: array @@ -208,10 +212,10 @@ definitions: default: false icdImpacted: type: array - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } benchmarks: type: object - propertyNames: { $ref: #/definitions/methods } + propertyNames: { $ref: '#/definitions/methods' } patternProperties: "": enum: [removed] @@ -225,7 +229,7 @@ definitions: strata: { type: 'array', minItems: 1, - items: { $ref: #/definitions/performanceStrata } + items: { $ref: '#/definitions/performanceStrata' } } }, required: [overallAlgorithm, strata] @@ -384,16 +388,16 @@ definitions: maxAge: description: The maximum patient age required for eligibility. type: number - diagnosisCodes: { $ref: #/definitions/arrayOfStringIdentifiers } - additionalDiagnosisCodes: { $ref: #/definitions/arrayOfStringIdentifiers } + diagnosisCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } + additionalDiagnosisCodes: { $ref: '#/definitions/arrayOfStringIdentifiers' } procedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } additionalProcedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. If present, this field imposes a requirement in addition to the one from the procedureCodes field. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } optionGroup: description: An identifier for grouping eligibility options together that need to be met together. type: string @@ -410,7 +414,7 @@ definitions: qualityCodes: description: A list of quality codes, all of which must be present to meet the performance option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } optionGroup: description: An identifier for grouping eligibility options together that need to be met together. type: string @@ -429,10 +433,10 @@ definitions: code: description: The HCPCS or CPT code represented as a string. type: string - modifiers: { $ref: #/definitions/arrayOfStringIdentifiers } - modifierExclusions: { $ref: #/definitions/arrayOfStringIdentifiers } - placesOfService: { $ref: #/definitions/arrayOfStringIdentifiers } - placesOfServiceExclusions: { $ref: #/definitions/arrayOfStringIdentifiers } + modifiers: { $ref: '#/definitions/arrayOfStringIdentifiers' } + modifierExclusions: { $ref: '#/definitions/arrayOfStringIdentifiers' } + placesOfService: { $ref: '#/definitions/arrayOfStringIdentifiers' } + placesOfServiceExclusions: { $ref: '#/definitions/arrayOfStringIdentifiers' } required: [code] qualityCodesSubmissionMethods: diff --git a/measures/2022/measures-schema.yaml b/measures/2022/measures-schema.yaml index c866e24d..25d83cbf 100644 --- a/measures/2022/measures-schema.yaml +++ b/measures/2022/measures-schema.yaml @@ -1,7 +1,7 @@ $id: https://github.com/CMSgov/qpp-measures-data/blob/master/measures/2022/measures-schema.yaml $schema: http://json-schema.org/draft-07/schema type: array -items: { $ref: #/definitions/measure } +items: { $ref: '#/definitions/measure' } uniqueItemProperties: ['measureId'] # used by ajv-keywords definitions: @@ -9,10 +9,10 @@ definitions: title: 'Measure' type: object anyOf: - - { $ref: #/definitions/iaMeasure } - - { $ref: #/definitions/piMeasure } - - { $ref: #/definitions/qualityMeasure } - - { $ref: #/definitions/aggregateCostMeasure } + - { $ref: '#/definitions/iaMeasure' } + - { $ref: '#/definitions/piMeasure' } + - { $ref: '#/definitions/qualityMeasure' } + - { $ref: '#/definitions/aggregateCostMeasure' } baseMeasure: title: 'Base Measure' @@ -28,7 +28,7 @@ definitions: type: string description: A description of the measure for more detail with key words/phrases. category: - description: QPP scoring category to which the measure belongs: Improvement Activities, Quality, Promoting Interoperability (formerly Advancing Care Information), and Cost. + description: 'QPP scoring category to which the measure belongs: Improvement Activities, Quality, Promoting Interoperability (formerly Advancing Care Information), and Cost.' enum: [ia, quality, pi, cost] metricType: description: Type of measurement that the measure requires in order to attest. @@ -44,49 +44,51 @@ definitions: measureSpecification: description: URL link for Measure Specification PDF to download by Submission Method. anyOf: - - { $ref: #/definitions/measureSpecification } + - { $ref: '#/definitions/measureSpecification' } - { type: 'null' } measureSets: description: Quality measures can belong to multiple measure sets that represent different specialties. type: array - items: { $ref: #/definitions/measureSets } + items: { $ref: '#/definitions/measureSets' } required: [measureId, title, description, category, metricType, firstPerformanceYear, lastPerformanceYear] iaMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'IA Measure' type: object additionalProperties: false properties: - category: { const ia } + category: + enum: [ia] weight: description: Determines the points granted for attesting to the measure. enum: [null, medium, high] default: medium subcategoryId: description: IA category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/subcategoryIds }] + oneOf: [{ $ref: '#/definitions/subcategoryIds' }] required: [weight, subcategoryId] piMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'PI Measure' type: object additionalProperties: false properties: - category: { const pi } + category: + enum: [pi] reportingCategory: description: The reporting category of the PI measure. enum: [required, bonus, exclusion, null] objective: description: PI category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/objectives }] + oneOf: [{ $ref: '#/definitions/objectives' }] isRequired: description: If true, attesting to the measure is required in order to receive a non-zero PI score. type: boolean @@ -97,7 +99,7 @@ definitions: default: false substitutes: description: Identifiers of other PI measures that can be used instead of the current measure. - oneOf: [{ $ref: #/definitions/arrayOfStringIdentifiers}] + oneOf: [{ $ref: '#/definitions/arrayOfStringIdentifiers' }] exclusion: description: Identifiers of other PI measures that can be submitted instead of current measure. Cannot submit both current measure and the exclusion measure. required: [objective, isRequired, isBonus, measureSets] @@ -105,13 +107,14 @@ definitions: aggregateCostMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'Cost Measure' type: object additionalProperties: false properties: - category: { const cost } + category: + enum: [cost] isInverse: description: If true, a lower performance rate correlates with better performance. type: boolean @@ -126,19 +129,20 @@ definitions: qualityMeasure: $merge: source: - { $ref: #/definitions/baseMeasure } + { $ref: '#/definitions/baseMeasure' } with: title: 'Quality Measure' type: object additionalProperties: false properties: - category: { const quality } + category: + enum: [quality] nationalQualityStrategyDomain: type: ['null', string] description: The area of health care quality (NQS Domain) which this measure improves. measureType: description: Quality category which the measure incentivizes. - oneOf: [{ $ref: #/definitions/measureTypes }] + oneOf: [{ $ref: '#/definitions/measureTypes' }] eMeasureId: description: Identifier for Electronic Clinical Quality Measures (ECQM). type: ['null', string] @@ -157,7 +161,7 @@ definitions: clinicalGuidelineChanged: type: array description: List of submissionMethods that have been suppressed for this year due to potentially no longer aligning with best practices or could lead to patient harm. - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } isHighPriority: description: If true, can be used in the place of an outcome measure to satisfy quality category requirements. type: boolean @@ -172,30 +176,30 @@ definitions: strata: description: Population segments for which the measure requires reporting data. Only applicable to multiPerformanceRate measures. type: array - items: { $ref: #/definitions/performanceStrata } + items: { $ref: '#/definitions/performanceStrata' } primarySteward: description: Organization who submits and maintains the measure. type: string submissionMethods: description: Possible methods for submitting performance data for the measure. type: array - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } eligibilityOptions: description: Eligibility options mirror denominator options in QCDR measure specifications. Each option comprises a set of codes used to identify eligible instances of the associated measure. type: array - items: { $ref: #/definitions/eligibilityOption } + items: { $ref: '#/definitions/eligibilityOption' } performanceOptions: description: Performance options mirror numerator options in QCDR measure specifications. Each option comprises a set of codes used to identify instances of performance met, performance not met, performance exclusion or performance exception. type: array - items: { $ref: #/definitions/performanceOption } + items: { $ref: '#/definitions/performanceOption' } allowedPrograms: description: Programs that the measure can be submitted to type: array - items: { $ref: #/definitions/programs } + items: { $ref: '#/definitions/programs' } requiredForPrograms: description: Programs that the measure is required to be submitted to type: array - items: { $ref: #/definitions/programs } + items: { $ref: '#/definitions/programs' } allowedVendors: description: List of QCDR Registries that are allowed to submit the QCDR measure type: array @@ -215,11 +219,11 @@ definitions: icdImpacted: type: array description: List of submissionMethods where ICD 10 codes for the measure changed during the submission year. Used to indicate that submissions data should be truncated to only the first nine months of the performance year when the ICD 10 codes were unchanged. Typically impacts claims submissionMethod. Does not impact registry submissionMethod. - items: { $ref: #/definitions/methods } + items: { $ref: '#/definitions/methods' } historic_benchmarks: type: object description: The submissionMethods of the measure which have had their benchmarks removed or flattened for the current year. A benchmark is marked as flat if the measure is determined to have the potential to result in inappropriate treatment of patients if the top decile is higher than 90%, or if inverse less than 10%. - propertyNames: { $ref: #/definitions/methods } + propertyNames: { $ref: '#/definitions/methods' } patternProperties: "": enum: [removed, flat] @@ -233,7 +237,7 @@ definitions: strata: { type: 'array', minItems: 1, - items: { $ref: #/definitions/performanceStrata } + items: { $ref: '#/definitions/performanceStrata' } } }, required: [overallAlgorithm, strata] @@ -414,11 +418,11 @@ definitions: procedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } additionalProcedureCodes: description: A list of HCPCS or CPT codes, at least one of which must be present to meet the eligibility option. If present, this field imposes a requirement in addition to the one from the procedureCodes field. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } anyOf: - required: ['procedureCodes'] - required: ['diagnosisCodes'] @@ -432,7 +436,7 @@ definitions: qualityCodes: description: A list of quality codes, all of which must be present to meet the performance option. type: array - items: { $ref: #/definitions/codeObject } + items: { $ref: '#/definitions/codeObject' } required: [optionType, qualityCodes] programs: diff --git a/measures/2023/measures-schema.yaml b/measures/2023/measures-schema.yaml index c58eac33..185bb8d5 100644 --- a/measures/2023/measures-schema.yaml +++ b/measures/2023/measures-schema.yaml @@ -66,7 +66,8 @@ definitions: type: object additionalProperties: false properties: - category: { const ia } + category: + enum: [ia] weight: description: Determines the points granted for attesting to the measure. enum: [null, medium, high] @@ -85,7 +86,8 @@ definitions: type: object additionalProperties: false properties: - category: { const pi } + category: + enum: [pi] reportingCategory: description: The reporting category of the PI measure. enum: [required, bonus, exclusion, null] @@ -118,7 +120,8 @@ definitions: type: object additionalProperties: false properties: - category: { const cost } + category: + enum: [cost] isInverse: description: If true, a lower performance rate correlates with better performance. type: boolean @@ -139,7 +142,8 @@ definitions: type: object additionalProperties: false properties: - category: { const quality } + category: + enum: [quality] measureType: description: Quality category which the measure incentivizes. oneOf: [{ $ref: '#/definitions/measureTypes' }] diff --git a/measures/2024/measures-schema.yaml b/measures/2024/measures-schema.yaml index 127128a4..64e29612 100644 --- a/measures/2024/measures-schema.yaml +++ b/measures/2024/measures-schema.yaml @@ -66,7 +66,8 @@ definitions: type: object additionalProperties: false properties: - category: { const ia } + category: + enum: [ia] weight: description: Determines the points granted for attesting to the measure. enum: [null, medium, high] @@ -85,7 +86,8 @@ definitions: type: object additionalProperties: false properties: - category: { const pi } + category: + enum: [pi] reportingCategory: description: The reporting category of the PI measure. enum: [required, bonus, exclusion, null] @@ -118,7 +120,8 @@ definitions: type: object additionalProperties: false properties: - category: { const cost } + category: + enum: [cost] isInverse: description: If true, a lower performance rate correlates with better performance. type: boolean @@ -139,7 +142,8 @@ definitions: type: object additionalProperties: false properties: - category: { const quality } + category: + enum: [quality] measureType: description: Quality category which the measure incentivizes. oneOf: [{ $ref: '#/definitions/measureTypes' }] diff --git a/package-lock.json b/package-lock.json index fafbbbed..93e7b55d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,15 +6,14 @@ "packages": { "": { "name": "qpp-measures-data", - "version": "6.0.18", + "version": "6.0.22", "license": "MIT", "dependencies": { "app-root-path": "^3.1.0", - "load-yaml-file": "^1.0.0", "papaparse": "^5.4.1", "pre-commit": "^1.2.2", "xregexp": "^5.1.1", - "yamljs": "^0.3.0" + "yaml": "^2.3.4" }, "devDependencies": { "@types/jest": "^29.0.3", @@ -2354,6 +2353,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "dependencies": { "sprintf-js": "~1.0.2" } @@ -2840,7 +2840,8 @@ "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", @@ -2870,6 +2871,7 @@ "version": "1.1.8", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3221,7 +3223,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "node_modules/concat-stream": { "version": "1.6.0", @@ -4718,7 +4721,8 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "node_modules/fsevents": { "version": "2.3.2", @@ -4855,6 +4859,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4921,7 +4926,8 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true }, "node_modules/graceful-readlink": { "version": "1.0.1", @@ -5175,6 +5181,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -7661,46 +7668,6 @@ "node": ">=4" } }, - "node_modules/load-yaml-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-1.0.0.tgz", - "integrity": "sha512-Xw+A/X4c5R6GWu7ZUQgw1rnbfUr1P/hAZbDTrreo+/fP/YSGgxAKoWe2IcT+bt4RHuyIca6S7SMGcWx+QI3WIw==", - "dependencies": { - "graceful-fs": "^4.2.8", - "js-yaml": "^4.1.0", - "strip-bom": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/load-yaml-file/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/load-yaml-file/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/load-yaml-file/node_modules/strip-bom": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-5.0.0.tgz", - "integrity": "sha512-p+byADHF7SzEcVnLvc/r3uognM1hUhObuHXxJcgLCfD194XAkaLbjq3Wzb0N5G2tgIjH0dgT708Z51QxMeu60A==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", @@ -7880,6 +7847,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -8520,6 +8488,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "dependencies": { "wrappy": "1" } @@ -8651,6 +8620,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -9426,7 +9396,8 @@ "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true }, "node_modules/sshpk": { "version": "1.15.2", @@ -10192,7 +10163,8 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "node_modules/write-file-atomic": { "version": "3.0.3", @@ -10247,17 +10219,12 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, - "node_modules/yamljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", - "integrity": "sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==", - "dependencies": { - "argparse": "^1.0.7", - "glob": "^7.0.5" - }, - "bin": { - "json2yaml": "bin/json2yaml", - "yaml2json": "bin/yaml2json" + "node_modules/yaml": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "engines": { + "node": ">= 14" } }, "node_modules/yargs": { diff --git a/package.json b/package.json index 75e11d8f..aaa9bfac 100644 --- a/package.json +++ b/package.json @@ -57,11 +57,10 @@ }, "dependencies": { "app-root-path": "^3.1.0", - "load-yaml-file": "^1.0.0", "papaparse": "^5.4.1", "pre-commit": "^1.2.2", "xregexp": "^5.1.1", - "yamljs": "^0.3.0" + "yaml": "^2.3.4" }, "pre-commit": [ "pre-commit" diff --git a/scripts/validate-data.js b/scripts/validate-data.js index 09d5ff8f..31335ccd 100755 --- a/scripts/validate-data.js +++ b/scripts/validate-data.js @@ -11,7 +11,8 @@ **/ const path = require('path'); -const YAML = require('yamljs'); +const YAML = require('yaml'); +const fs = require('fs'); const Constants = require('../constants.js'); const ValidateLib = require('./validate-json-data/validate-json-data-lib'); @@ -39,7 +40,7 @@ if (!schemaType) { } // Load the schema file -const schema = YAML.load(path.join(__dirname, '../', schemaType, performanceYear, schemaType + '-schema.yaml')); +const schema = YAML.parse(fs.readFileSync(path.join(__dirname, '../', schemaType, performanceYear, schemaType + '-schema.yaml'), 'utf8')); // Read stdin into a string let json = ''; diff --git a/test/measures/measures-schema-spec.js b/test/measures/measures-schema-spec.js index d3ccb6d2..fb1f39fa 100644 --- a/test/measures/measures-schema-spec.js +++ b/test/measures/measures-schema-spec.js @@ -1,7 +1,8 @@ const _ = require('lodash'); const chai = require('chai'); const path = require('path'); -const YAML = require('yamljs'); +const YAML = require('yaml'); +const fs = require('fs'); const assert = chai.assert; @@ -17,7 +18,7 @@ describe('measures schema validates json', function() { let data; before(() => { - schema = YAML.load(path.join(__dirname, '../../', 'measures', year.toString(), 'measures-schema.yaml')); + schema = YAML.parse(fs.readFileSync(path.join(__dirname, '../../', 'measures', year.toString(), 'measures-schema.yaml'), 'utf8')); data = require(path.join(__dirname, '../../', 'measures', year.toString(), 'measures-data.json')); }); From 8ae7922936f04d8c0e86eae253cff1a7720ea00e Mon Sep 17 00:00:00 2001 From: John Manack Date: Thu, 30 Nov 2023 17:09:10 -0500 Subject: [PATCH 2/2] fix: updates commented section with appropriate quotations --- clinical-clusters/2023/clinical-clusters-schema.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clinical-clusters/2023/clinical-clusters-schema.yaml b/clinical-clusters/2023/clinical-clusters-schema.yaml index bf5c41cb..5639f69d 100644 --- a/clinical-clusters/2023/clinical-clusters-schema.yaml +++ b/clinical-clusters/2023/clinical-clusters-schema.yaml @@ -19,10 +19,10 @@ definitions: default: 'null' clinicalClusters: type: array - items: { '$ref: #/definitions/ClinicalClusterType' } + items: { $ref: '#/definitions/ClinicalClusterType' } specialtySets: type: array - items: { '$ref: #/definitions/ClinicalClusterType' } + items: { $ref: '#/definitions/ClinicalClusterType' } ClinicalClusterType: type: object properties: