dsi-icl/optimise

View on GitHub

Showing 1,390 of 1,390 total issues

Function getDemographicFields has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static getDemographicFields({ query }, res) {
        const action = {
            gender: DemographicCore.getGenderFields,
            dominant_hand: DemographicCore.getDominantHandsFields,
            ethnicity: DemographicCore.getEthnicityFields,
Severity: Minor
Found in packages/optimise-core/src/controllers/demographicDataController.js - About 1 hr to fix

    Function componentDidMount has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        componentDidMount() {
            const that = this;
            const socket = new WebSocket(that.props.wsEndpoint);
            socket.onopen = function() {
                that.setState(prev => ({
    Severity: Minor
    Found in packages/optimise-ui/src/components/remoteControl/remoteControl.jsx - About 1 hr to fix

      Function render has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          render() {
              let _style = style;
              if (this.props.override_style) {
                  _style = { ...style, ...this.props.override_style };
              }

        Function render has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            render() {
                const { startDate, reasonForVisit, error, wannaUpdate } = this.state;
                const { match: { params }, visits } = this.props;
        
                if (!visits)

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

                          <div className={style.ariane}>
                              <h2>Performance Measure</h2>
                              <BackButton to={`/patientProfile/${params.patientId}`} />
                          </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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 12 locations. Consider refactoring.
          Open

                          <div className={_style.ariane}>
                              <h2>Edit Clinical Event</h2>
                              <BackButton to={`/patientProfile/${params.patientId}`} />
                          </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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 12 locations. Consider refactoring.
          Open

                          <div className={style.ariane}>
                              <h2>Patient information</h2>
                              <BackButton to={`/patientProfile/${params.patientId}`} />
                          </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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 12 locations. Consider refactoring.
          Open

                              <div className={_style.ariane}>
                                  <h2>Creating a new Treatment</h2>
                                  <BackButton to={`/patientProfile/${params.patientId}`} />
                              </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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 12 locations. Consider refactoring.
          Open

                          <div className={style.ariane}>
                              <h2>Edit visit</h2>
                              <BackButton to={`/patientProfile/${params.patientId}`} />
                          </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72

          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 64.

          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 12 locations. Consider refactoring.
          Open

                              <div className={_style.ariane}>
                                  <h2>Creating a New Event</h2>
                                  <BackButton to={`/patientProfile/${params.patientId}`} />
                              </div>
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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 12 locations. Consider refactoring.
          Open

                              <div className={_style.ariane}>
                                  <h2>Creating a new Test</h2>
                                  <BackButton to={`/patientProfile/${params.patientId}`} />
                              </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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

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

                                          {this.state.error ? <><div className={style.error}> {this.state.error} </div><br /></> : null}
          packages/optimise-ui/src/components/editMedicalElements/editPrimaryDiagnosis.jsx on lines 249..249

          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 64.

          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 12 locations. Consider refactoring.
          Open

                          <div className={style.ariane}>
                              <h2>Create a new Visit</h2>
                              <BackButton to={`/patientProfile/${params.patientId}`} />
                          </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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 12 locations. Consider refactoring.
          Open

                          <div className={_style.ariane}>
                              <h2>Communication</h2>
                              <BackButton to={`/patientProfile/${params.patientId}`} />
                          </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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 12 locations. Consider refactoring.
          Open

                          <div className={_style.ariane}>
                              <h2>Communication</h2>
                              <BackButton to={`/patientProfile/${params.patientId}`} />
                          </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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

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

                                      {this.state.error ? <><div className={style.error}> {this.state.error} </div><br /></> : null}
          packages/optimise-ui/src/components/editMedicalElements/editPrimaryDiagnosis.jsx on lines 122..122

          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 64.

          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 12 locations. Consider refactoring.
          Open

                          <div className={_style.ariane}>
                              <h2>Edit test</h2>
                              <BackButton to={`/patientProfile/${params.patientId}`} />
                          </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editMedication.jsx on lines 75..78
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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 12 locations. Consider refactoring.
          Open

                          <div className={_style.ariane}>
                              <h2>Edit Treatment</h2>
                              <BackButton to={`/patientProfile/${params.patientId}`} />
                          </div>
          packages/optimise-ui/src/components/createMedicalElements/createCE.jsx on lines 133..136
          packages/optimise-ui/src/components/createMedicalElements/createTest.jsx on lines 112..115
          packages/optimise-ui/src/components/createMedicalElements/createTreatment.jsx on lines 143..146
          packages/optimise-ui/src/components/createMedicalElements/createVisit.jsx on lines 94..97
          packages/optimise-ui/src/components/editMedicalElements/editClinicalEvent.jsx on lines 70..73
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 41..44
          packages/optimise-ui/src/components/editMedicalElements/editCommunication.jsx on lines 78..81
          packages/optimise-ui/src/components/editMedicalElements/editDemographic.jsx on lines 20..23
          packages/optimise-ui/src/components/editMedicalElements/editEdss.jsx on lines 87..90
          packages/optimise-ui/src/components/editMedicalElements/editTest.jsx on lines 69..72
          packages/optimise-ui/src/components/editMedicalElements/editVisit.jsx on lines 161..164

          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 64.

          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

                          <NavLink to={`/patientProfile/${patientId}/visitFrontPage/${visitId}/page/${currentPage}${this.props.location.search}`}> <button>Record another entry</button></NavLink>
          packages/optimise-ui/src/components/createVisitFrontPage/componentWrappers/treatment/treatmentWrapper.jsx on lines 129..129

          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 64.

          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

                          <NavLink to={`/patientProfile/${patientId}/visitFrontPage/${visitId}/page/${currentPage}${this.props.location.search}`}> <button>Record another treatment</button></NavLink>
          packages/optimise-ui/src/components/createVisitFrontPage/componentWrappers/ce/common.jsx on lines 94..94

          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 64.

          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