projectcypress/health-data-standards

View on GitHub

Showing 318 of 318 total issues

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def test_comm_prov_to_patient
    patient = build_record_from_xml('test/fixtures/cat1_fragments/comm_prov_to_patient_fragment.xml')
    communication = patient.communications.first
    expected_start = HealthDataStandards::Util::HL7Helper.timestamp_to_integer('20100605220000')
    assert communication.codes['LOINC'].include?('69981-9')
Severity: Minor
Found in test/unit/import/cat1/patient_importer_test.rb and 6 other locations - About 15 mins to fix
test/unit/import/cat1/patient_importer_test.rb on lines 74..79
test/unit/import/cat1/patient_importer_test.rb on lines 82..87
test/unit/import/cat1/patient_importer_test.rb on lines 120..125
test/unit/import/cat1/patient_importer_test.rb on lines 138..143
test/unit/import/cat1/patient_importer_test.rb on lines 146..151
test/unit/import/cat1/patient_importer_test.rb on lines 154..159

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

    def test_medication_adverse
    patient = build_record_from_xml('test/fixtures/cat1_fragments/medication_adverse_fragment.xml')
    med_adverse = patient.allergies.first
    expected_start = HealthDataStandards::Util::HL7Helper.timestamp_to_integer('20070520173120')
    assert med_adverse.codes['RxNorm'].include?('998695')
Severity: Minor
Found in test/unit/import/cat1/patient_importer_test.rb and 6 other locations - About 15 mins to fix
test/unit/import/cat1/patient_importer_test.rb on lines 66..71
test/unit/import/cat1/patient_importer_test.rb on lines 74..79
test/unit/import/cat1/patient_importer_test.rb on lines 82..87
test/unit/import/cat1/patient_importer_test.rb on lines 120..125
test/unit/import/cat1/patient_importer_test.rb on lines 138..143
test/unit/import/cat1/patient_importer_test.rb on lines 146..151

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  module Export
    class C32
      def initialize
        template_helper = TemplateHelper.new('c32', 'c32')
        @rendering_context = RenderingContext.new
Severity: Minor
Found in lib/health-data-standards/export/c32.rb and 1 other location - About 15 mins to fix
lib/health-data-standards/export/ccda.rb on lines 2..11

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def test_comm_prov_to_prov
    patient = build_record_from_xml('test/fixtures/cat1_fragments/comm_provider_to_provider_fragment.xml')
    communication = patient.communications.first
    expected_start = HealthDataStandards::Util::HL7Helper.timestamp_to_integer('19810627142601')
    assert communication.codes['SNOMED-CT'].include?('371545006')
Severity: Minor
Found in test/unit/import/cat1/patient_importer_test.rb and 6 other locations - About 15 mins to fix
test/unit/import/cat1/patient_importer_test.rb on lines 66..71
test/unit/import/cat1/patient_importer_test.rb on lines 74..79
test/unit/import/cat1/patient_importer_test.rb on lines 82..87
test/unit/import/cat1/patient_importer_test.rb on lines 138..143
test/unit/import/cat1/patient_importer_test.rb on lines 146..151
test/unit/import/cat1/patient_importer_test.rb on lines 154..159

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

  def test_medication_intolerance
    patient = build_record_from_xml('test/fixtures/cat1_fragments/medication_intolerance_fragment.xml')
    med_intolerance = patient.allergies.first
    expected_start = HealthDataStandards::Util::HL7Helper.timestamp_to_integer('20061203201716')
    assert med_intolerance.codes['RxNorm'].include?('998695')
Severity: Minor
Found in test/unit/import/cat1/patient_importer_test.rb and 6 other locations - About 15 mins to fix
test/unit/import/cat1/patient_importer_test.rb on lines 66..71
test/unit/import/cat1/patient_importer_test.rb on lines 74..79
test/unit/import/cat1/patient_importer_test.rb on lines 82..87
test/unit/import/cat1/patient_importer_test.rb on lines 120..125
test/unit/import/cat1/patient_importer_test.rb on lines 146..151
test/unit/import/cat1/patient_importer_test.rb on lines 154..159

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      def xml_for_subsets(data_criteria)
        subsets_xml = []
        if data_criteria.subset_operators
          subsets_xml = data_criteria.subset_operators.collect do |operator|
            HQMF2::Generator.render_template('subset', {'doc' => doc, 'subset' => operator, 'criteria' => data_criteria})
Severity: Minor
Found in lib/hqmf-generator/hqmf-generator.rb and 1 other location - About 15 mins to fix
lib/hqmf-generator/hqmf-generator.rb on lines 178..185

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  module Export
    class CCDA
      def initialize
        template_helper = TemplateHelper.new('ccda', 'ccda')
        @rendering_context = RenderingContext.new
Severity: Minor
Found in lib/health-data-standards/export/ccda.rb and 1 other location - About 15 mins to fix
lib/health-data-standards/export/c32.rb on lines 2..11

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def test_procedure_result
    patient = build_record_from_xml('test/fixtures/cat1_fragments/procedure_result_fragment.xml')
    procedure_result = patient.procedures.first
    assert procedure_result.codes['SNOMED-CT'].include?('116783008')
    expected_start = HealthDataStandards::Util::HL7Helper.timestamp_to_integer('20011202034746')
Severity: Minor
Found in test/unit/import/cat1/patient_importer_test.rb and 1 other location - About 15 mins to fix
test/unit/import/cat1/patient_importer_test.rb on lines 32..37

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      def xml_for_temporal_references(criteria)
        refs = []
        if criteria.temporal_references
          refs = criteria.temporal_references.collect do |reference|
            HQMF2::Generator.render_template('temporal_relationship', {'doc' => doc, 'relationship' => reference, 'criteria' => criteria})
Severity: Minor
Found in lib/hqmf-generator/hqmf-generator.rb and 1 other location - About 15 mins to fix
lib/hqmf-generator/hqmf-generator.rb on lines 147..154

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def test_procedure_performed
    patient = build_record_from_xml('test/fixtures/cat1_fragments/procedure_performed_fragment.xml')
    procedure_performed = patient.procedures.first
    assert procedure_performed.codes['CPT'].include?('55876')
    expected_start = HealthDataStandards::Util::HL7Helper.timestamp_to_integer('19860117151405')
Severity: Minor
Found in test/unit/import/cat1/patient_importer_test.rb and 1 other location - About 15 mins to fix
test/unit/import/cat1/patient_importer_test.rb on lines 40..45

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  module Import
    module Cat1
      class MedicationDispensedActImporter < MedicationDispensedImporter

        def initialize
lib/health-data-standards/import/cat1/encounter_order_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/encounter_performed_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/transfer_from_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/transfer_to_act_importer.rb on lines 2..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

expected_dc[:PatientCharacteristicRaceRace] = [
  {:title=>"Race",
   :description=>"Patient Characteristic Race: Race",
   :code_list_id=>"2.16.840.1.114222.4.11.836",
   :property=>:race,
Severity: Minor
Found in test/unit/hqmf/model/nqf_0002_test.rb and 2 other locations - About 15 mins to fix
test/unit/hqmf/model/nqf_0002_test.rb on lines 188..198
test/unit/hqmf/model/nqf_0002_test.rb on lines 200..210

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  module Import
    module Cat1
      class EncounterOrderActImporter < EncounterOrderImporter

        def initialize
lib/health-data-standards/import/cat1/encounter_performed_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/medication_dispensed_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/transfer_from_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/transfer_to_act_importer.rb on lines 2..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  module Import
    module Cat1
      class TransferToActImporter < TransferToImporter

        def initialize
lib/health-data-standards/import/cat1/encounter_order_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/encounter_performed_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/medication_dispensed_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/transfer_from_act_importer.rb on lines 2..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

expected_dc[:PatientCharacteristicPayerPayer] = [
  {:title=>"Payer",
   :description=>"Patient Characteristic Payer: Payer",
   :code_list_id=>"2.16.840.1.113883.221.5",
   :property=>:payer,
Severity: Minor
Found in test/unit/hqmf/model/nqf_0002_test.rb and 2 other locations - About 15 mins to fix
test/unit/hqmf/model/nqf_0002_test.rb on lines 176..186
test/unit/hqmf/model/nqf_0002_test.rb on lines 188..198

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  module Import
    module Cat1
      class EncounterPerformedActImporter < EncounterPerformedImporter

        def initialize
lib/health-data-standards/import/cat1/encounter_order_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/medication_dispensed_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/transfer_from_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/transfer_to_act_importer.rb on lines 2..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  module Import
    module Cat1
      class TransferFromActImporter < TransferFromImporter

        def initialize
lib/health-data-standards/import/cat1/encounter_order_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/encounter_performed_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/medication_dispensed_act_importer.rb on lines 2..13
lib/health-data-standards/import/cat1/transfer_to_act_importer.rb on lines 2..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

expected_dc[:PatientCharacteristicEthnicityEthnicity] = [
  {:title=>"Ethnicity",
   :description=>"Patient Characteristic Ethnicity: Ethnicity",
   :code_list_id=>"2.16.840.1.114222.4.11.837",
   :property=>:ethnicity,
Severity: Minor
Found in test/unit/hqmf/model/nqf_0002_test.rb and 2 other locations - About 15 mins to fix
test/unit/hqmf/model/nqf_0002_test.rb on lines 176..186
test/unit/hqmf/model/nqf_0002_test.rb on lines 200..210

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language