Skip to content

Commit

Permalink
CMS_0085 and CMS_0086 removed from CMS IG
Browse files Browse the repository at this point in the history
  • Loading branch information
dczulada committed Sep 6, 2023
1 parent ee696ca commit ccb76b9
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions lib/validators/core_clinical_data_element_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ def validate(file, options = {})
case options.task._type
when 'CMSProgramTask'
verify_patient_ids(doc, options)
verify_ccde_program(doc, options)
when 'C3Cat1Task'
verify_patient_ids(doc, options)
end
verify_only_ccde_measures(doc, options)
verify_encounters(doc, options)
end

Expand All @@ -35,24 +33,6 @@ def verify_patient_ids(doc, options)
add_error(msg, file_name: options[:file_name])
end

def verify_ccde_program(doc, options)
prog = doc.at_xpath('//cda:informationRecipient/cda:intendedRecipient/cda:id/@extension')
# Prior to 2022 the program was HQR_IQR_VOL, now its HQR_IQR
required_program = options.task.bundle.major_version.to_i < 2022 ? 'HQR_IQR_VOL' : 'HQR_IQR'
return if prog.value == required_program

msg = "CMS_0085 - CMS program name for hybrid measure/CCDE submissions must be #{required_program}."
add_error(msg, file_name: options[:file_name])
end

def verify_only_ccde_measures(doc, options)
reported_measure_ids = measure_ids_from_cat_1_file(doc)
return if (reported_measure_ids - @ccde_measure_ids).empty?

msg = 'CMS_0086 - Files containing hybrid measure/CCDE submissions and eCQM cannot be submitted within the same batch'
add_error(msg, file_name: options[:file_name])
end

def verify_encounters(doc, options)
encounter_ids = encounter_ids_in_doc(doc)
# Get Entries related to Core Clinical Data Element (Laboraty Test, Performed (V5) and Physical Exam, Performed (V5)
Expand Down

0 comments on commit ccb76b9

Please sign in to comment.