Skip to content

Commit

Permalink
Fixing MultipleDemographics on export
Browse files Browse the repository at this point in the history
  • Loading branch information
raj209 committed Dec 16, 2020
1 parent 621e235 commit b0b7b41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/c4_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def pluck(outfilepath, patients)
Zip::OutputStream.open(outfilepath) do |zout|
patients.each do |patient_hash|
patient=patient_hash[:record]
patient_scoop_and_filter.scoop_and_filter(patient)
sf_patient = patient.clone
patient_scoop_and_filter.scoop_and_filter(sf_patient)
#Including Provider Details In a way CQM-Report wants it
provider = Provider.where('_id' => patient.provider_ids[0]).first
@options[:provider] = provider
Expand All @@ -123,7 +124,7 @@ def pluck(outfilepath, patients)
@options[:provider]['ids'].push( {"namingSystem" => "2.16.840.1.113883.4.2", "value" => "#{provider.tin}"}) if provider.tin
@options[:provider]['ids'].push( {"namingSystem" => "2.16.840.1.113883.4.336", "value" => "#{provider.ccn}"}) if provider.ccn
zout.put_next_entry(make_name(patient)+'.xml')
zout << Qrda1R5.new(patient, @measures, @options).render
zout << Qrda1R5.new(sf_patient, @measures, @options).render
end
zout.close
end
Expand Down

0 comments on commit b0b7b41

Please sign in to comment.