Showing 4,231 of 14,884 total issues
Function Authentication
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Authentication() {
return (
<section data-testid="unauthenticated-verify-app" className="verify">
<div className="container">
<div className="row">
Function generateSEIPdf
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async () => {
try {
setSelfEnteredPdfRequested(true);
setSeiPdfGenerationError(false);
Function parseAccountSummary
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const parseAccountSummary = (records, index = 11) => {
// Generate the structured content
const accountSummaryContent = generateAccountSummaryContent(records || {});
// Initialize an array to hold the formatted text
Function generateTestEntriesContent
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateTestEntriesContent = record => {
return {
title: record.testName,
details: [
{
Function convertChemHemObservation
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const convertChemHemObservation = record => {
const results = isArrayAndHasItems(record.result)
? record.result.map(item =>
extractContainedResource(record, item.reference),
)
Function isDataFetched
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
() => {
// Map the recordFilter keys to the corresponding data domains
const dataMap = {
labTests: labsAndTests,
careSummaries: notes,
Function generateVaccinesContent
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateVaccinesContent = record => {
return {
title: record.vaccine,
details: [
{
Function generateHealthProvidersContent
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateHealthProvidersContent = record => {
return {
title: record.providerName,
details: [
{
Function parseMedications
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const parseMedications = (records, index = 7) => {
return `
${index}) Medications
This is a list of prescriptions and other medications in your VA medical records.
Function generateAllergiesContent
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateAllergiesContent = record => {
return {
title: record.allergyName,
details: [
{
Function DownloadingRecordsInfo
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DownloadingRecordsInfo = props => {
const { allowTxtDownloads, description } = props;
const publicSharedContent = () => {
return (
Function imagesReducer
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const imagesReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Images.REQUEST_IMAGE_STUDY: {
return {
...state,
Function fetchRepStatus
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fetchRepStatus = async () => {
const requestUrl = `${
environment.BASE_URL === 'http://localhost:3001'
? `https://staging-api.va.gov`
: `${environment.API_URL}`
Function sendNextStepsEmail
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default async function sendNextStepsEmail(body) {
const apiSettings = {
mode: 'cors',
method: 'POST',
credentials: 'include',
Function buildPrescriptionsTXT
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const buildPrescriptionsTXT = prescriptions => {
let result = `
---------------------------------------------------------------------------------
`;
Consider simplifying this complex logical expression. Open
Open
if (keys.address && requiredKeys.includes(keys.address)) {
const addressObject = data[keys.address] || {};
const isUS = addressObject.addressType !== ADDRESS_TYPES.international;
const hasRequiredAddressFields =
addressObject.countryName &&
Consider simplifying this complex logical expression. Open
Open
if (
(!fetchedPersonalInfo &&
meb160630Automation &&
formData?.chosenBenefit) ||
(!fetchedContactInfo &&
Consider simplifying this complex logical expression. Open
Open
if (facilityType) {
return selectorFiltered.filter(
hsdatum =>
(hsdatum.hsdatum[5] && facilityType === 'vet_center') ||
(hsdatum.hsdatum[6] && facilityType === 'vba') ||
Consider simplifying this complex logical expression. Open
Open
if (keys.address && requiredKeys.includes(keys.address)) {
const addressObject = data[keys.address] || {};
const isUS = addressObject.addressType !== ADDRESS_TYPES.international;
const hasRequiredAddressFields =
addressObject.countryName &&
Consider simplifying this complex logical expression. Open
Open
if (keys.address && requiredKeys.includes(keys.address)) {
const addressObject = data[keys.address] || {};
const isUS = addressObject.addressType !== ADDRESS_TYPES.international;
const hasRequiredAddressFields =
addressObject.countryName &&