Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update mock load configuration logic #252

Conversation

MatthewErispe
Copy link
Collaborator

@MatthewErispe MatthewErispe commented May 25, 2024

Summary by CodeRabbit

  • New Features

    • Updated configuration fetching method to use HTTP GET instead of POST for improved efficiency.
  • Refactor

    • Renamed configuration fields: uniqueInteractionFields to auxInteractionFields and uniqueGoldenRecordFields to auxGoldenRecordFields for better clarity.
  • Tests

    • Updated test data sources to align with the new configuration field names and fetching method.
  • Chores

    • Adjusted mock API responses and routes to reflect the new GET method for configuration fetching.

@rcrichton
Copy link
Member

Copy link
Contributor

coderabbitai bot commented May 25, 2024

Walkthrough

The recent updates primarily involve changing the HTTP method for fetching configuration data from POST to GET within the ApiClient class and updating the associated routes and mock data accordingly. Additionally, several test files and configuration interfaces were updated to reflect changes in field names from uniqueInteractionFields and uniqueGoldenRecordFields to auxInteractionFields and auxGoldenRecordFields.

Changes

Files Change Summary
JeMPI_UI/src/services/ApiClient.ts Changed fetchConfiguration method from POST to GET.
JeMPI_UI/src/services/apiRoutes.ts Added new route constant GET_CONFIGURATION.
JeMPI_UI/src/services/mockBackend.ts Updated mock API response to use ROUTES.GET_CONFIGURATION instead of ROUTES.POST_CONFIGURATION.
JeMPI_UI/src/services/mockData.ts Adjusted mock data imports and usage.
JeMPI_UI/src/test/customSearch/Settings.test.tsx Replaced configuration with mockData.configuration.
JeMPI_UI/src/test/settings/CommonSettings.test.tsx Updated import from configurationData to mockData and adjusted usage accordingly.
JeMPI_UI/src/test/settings/GoldenRecordLists.test.tsx Replaced configuration with mockData for initializing goldenRecordListsWithIds.
JeMPI_UI/src/test/settings/UniqueToGR.test.tsx Updated import statement and data access to use mockData.
JeMPI_UI/src/test/settings/UniqueToInteraction.test.tsx Changed import and usage of configuration to mockData.
JeMPI_UI/src/pages/settings/Settings.tsx Changed properties passed to UniqueToGR and UniqueToInteraction components to use renamed fields auxGoldenRecordFields and auxInteractionFields.
JeMPI_UI/src/types/Configuration.ts Renamed fields in Configuration interface from uniqueInteractionFields and uniqueGoldenRecordFields to auxInteractionFields and auxGoldenRecordFields.
JeMPI_UI/src/utils/helpers.ts Updated generateId function and Configuration interface to use renamed fields auxInteractionFields and auxGoldenRecordFields.

🐇
In the code, a change so grand,
From POST to GET, we took a stand.
With routes updated, fields renamed,
Configuration now reclaimed.
Testing too, we did refine,
All to keep our app in line.
Hooray! A cheer for code so bright,
Our journey's end, a pure delight.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to full the review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (1)
JeMPI_Apps/JeMPI_UI/src/services/apiRoutes.ts (1)

3-3: Consider differentiating the endpoints for GET and POST configuration to avoid potential conflicts.

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between e71a563 and 774d1cf.
Files selected for processing (10)
  • JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/services/apiRoutes.ts (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/services/mockBackend.ts (3 hunks)
  • JeMPI_Apps/JeMPI_UI/src/services/mockData.ts (2 hunks)
  • JeMPI_Apps/JeMPI_UI/src/test/customSearch/Settings.test.tsx (2 hunks)
  • JeMPI_Apps/JeMPI_UI/src/test/settings/CommonSettings.test.tsx (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/test/settings/GoldenRecordLists.test.tsx (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/test/settings/UniqueToGR.test.tsx (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/test/settings/UniqueToInteraction.test.tsx (1 hunks)
  • JeMPI_Apps/JeMPI_UI/tests/services/configuration.test.ts (1 hunks)
Files skipped from review due to trivial changes (2)
  • JeMPI_Apps/JeMPI_UI/src/test/settings/UniqueToGR.test.tsx
  • JeMPI_Apps/JeMPI_UI/src/test/settings/UniqueToInteraction.test.tsx
Additional Context Used
Biome (22)
JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (16)

77-77: The computed expression can be simplified without the use of a string literal.


256-274: This else clause can be omitted because previous branches break early.


365-365: Use === instead of ==.
== is only allowed when comparing against null


375-375: Do not use template literals if interpolation and special-character handling are not needed.


386-386: Use === instead of ==.
== is only allowed when comparing against null


401-401: Template literals are preferred over string concatenation.


1-1: All these imports are only used as types.


1-2: All these imports are only used as types.


2-3: All these imports are only used as types.


3-9: All these imports are only used as types.


9-10: All these imports are only used as types.


12-22: All these imports are only used as types.


22-28: All these imports are only used as types.


28-29: Some named imports are only used as types.


29-30: All these imports are only used as types.


32-33: All these imports are only used as types.

JeMPI_Apps/JeMPI_UI/src/services/mockData.ts (4)

1-1: All these imports are only used as types.


1-2: The default import is only used as a type.


2-3: All these imports are only used as types.


3-4: All these imports are only used as types.

JeMPI_Apps/JeMPI_UI/tests/services/configuration.test.ts (2)

5-6: All these imports are only used as types.


23-23: This let declares a variable that is only assigned once.

Additional comments not posted (7)
JeMPI_Apps/JeMPI_UI/src/test/settings/CommonSettings.test.tsx (1)

5-5: Change in data source for tests is appropriate and improves maintainability.

Also applies to: 10-10

JeMPI_Apps/JeMPI_UI/src/test/customSearch/Settings.test.tsx (1)

4-4: Proper use of mock data and hooks to ensure isolated testing.

Also applies to: 6-6, 34-34

JeMPI_Apps/JeMPI_UI/src/test/settings/GoldenRecordLists.test.tsx (1)

4-4: Consistent use of mock data across test files enhances maintainability.

Also applies to: 10-10

JeMPI_Apps/JeMPI_UI/src/services/mockBackend.ts (1)

66-66: Correct update of mock setup to use GET for configuration fetching.

Verification successful

The fetchConfiguration method in ApiClient.ts correctly uses the GET method to fetch configuration data, aligning with the updated mock setup.

  • JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts: async fetchConfiguration() { const { data } = await this.client.get<Configuration>(ROUTES.GET_CONFIGURATION); return data; }
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify integration of GET configuration with actual API calls.

# Test: Search for the actual API call usage. Expect: Only occurances of the GET method.
rg --type typescript $'fetchConfiguration'

Length of output: 76



Script:

#!/bin/bash
# Description: Verify integration of GET configuration with actual API calls.

# Test: Search for the actual API call usage. Expect: Only occurrences of the GET method.
rg 'fetchConfiguration' --glob '*.ts'

Length of output: 370



Script:

#!/bin/bash
# Description: Extract the implementation of fetchConfiguration from ApiClient.ts

# Test: Retrieve the function definition to verify it uses the GET method.
rg 'async fetchConfiguration' -A 10 --glob 'JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts'

Length of output: 858

JeMPI_Apps/JeMPI_UI/src/services/mockData.ts (2)

336-514: The expanded configuration object is well-structured and detailed, which should enhance the testing capabilities for field and rule configurations.


Line range hint 515-527: The export of the mockData object is correctly implemented, ensuring all mock data structures are available for import in other modules.

JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (1)

92-92: The update to use a GET request in fetchConfiguration is correctly implemented and aligns with the new route configuration.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range and nitpick comments (5)
JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (5)

Line range hint 365-365: Use strict equality comparison (===) instead of loose equality (==).

- if (response.status == 200 &&
+ if (response.status === 200 &&

Line range hint 375-375: Avoid using template literals when not necessary.

- throw new Error('Failed to updateGoldenRecord with error: ' + error)
+ throw new Error('Failed to updateGoldenRecord with error: ' + String(error))

Line range hint 386-386: Use strict equality comparison (===) instead of loose equality (==).

- if (response.status == 200) {
+ if (response.status === 200) {

Line range hint 401-401: Prefer template literals for better readability and consistency.

- throw new Error('Failed to updateGoldenRecord with error: ' + error)
+ throw new Error(`Failed to updateGoldenRecord with error: ${error}`)

Line range hint 1-33: Optimize imports by using TypeScript's import type when imports are only used for type annotations.

- import { AxiosInstance, AxiosRequestConfig } from 'axios'
+ import type { AxiosInstance, AxiosRequestConfig } from 'axios'
- import { AuditTrail } from '../types/AuditTrail'
+ import type { AuditTrail } from '../types/AuditTrail'
- import { FieldChangeReq, Fields } from '../types/Fields'
+ import type { FieldChangeReq, Fields } from '../types/Fields'
- import {
+ import type {
  ApiSearchResponse,
  ApiSearchResult,
  CustomSearchQuery,
  SearchQuery
} from '../types/SimpleSearch'
- import { OAuthParams } from '../types/User'
+ import type { OAuthParams } from '../types/User'
- import {
+ import type {
  NotificationResponse,
  Interaction,
  ExpandedGoldenRecordResponse,
  InteractionWithScore,
  NotificationRequest,
  LinkRequest,
  GoldenRecordCandidatesResponse,
  DashboardData
} from 'types/BackendResponse'
- import {
+ import type {
  GoldenRecord,
  AnyRecord,
  DemographicData,
  PatientRecord
} from 'types/PatientRecord'
- import { Notifications, NotificationState } from 'types/Notification'
+ import type { Notifications, NotificationState } from 'types/Notification'
- import { Configuration } from 'types/Configuration'
+ import type { Configuration } from 'types/Configuration'
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 774d1cf and bc000fb.
Files selected for processing (3)
  • JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/services/apiRoutes.ts (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/services/mockBackend.ts (3 hunks)
Files skipped from review as they are similar to previous changes (2)
  • JeMPI_Apps/JeMPI_UI/src/services/apiRoutes.ts
  • JeMPI_Apps/JeMPI_UI/src/services/mockBackend.ts
Additional Context Used
Biome (16)
JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (16)

77-77: The computed expression can be simplified without the use of a string literal.


256-274: This else clause can be omitted because previous branches break early.


365-365: Use === instead of ==.
== is only allowed when comparing against null


375-375: Do not use template literals if interpolation and special-character handling are not needed.


386-386: Use === instead of ==.
== is only allowed when comparing against null


401-401: Template literals are preferred over string concatenation.


1-1: All these imports are only used as types.


1-2: All these imports are only used as types.


2-3: All these imports are only used as types.


3-9: All these imports are only used as types.


9-10: All these imports are only used as types.


12-22: All these imports are only used as types.


22-28: All these imports are only used as types.


28-29: Some named imports are only used as types.


29-30: All these imports are only used as types.


32-33: All these imports are only used as types.

Additional comments not posted (1)
JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (1)

92-92: Update to use GET request for fetching configuration aligns with RESTful best practices when retrieving data.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (2)
JeMPI_Apps/JeMPI_UI/src/utils/helpers.ts (2)

Line range hint 64-64: Consider specifying more precise types instead of using any.

- export const decodeQueryString = <T>(queryString: string): any => {
+ export const decodeQueryString = <T>(queryString: string): T => {

Also applies to: 82-82, 85-85


Line range hint 70-76: Simplify the encodeQueryString function by using template literals and removing unnecessary else clauses.

-    } else if (typeof val === 'object') {
-      return encodeQueryString(val, nesting + `${key}.`)
-    } else {
-      return [nesting + key, val]
-        .map(s => encodeURIComponent(s ? s.toString() : ''))
-        .join('=')
-    }
+    } else {
+      return typeof val === 'object'
+        ? encodeQueryString(val, `${nesting}${key}.`)
+        : `${nesting}${key}=${encodeURIComponent(val ? val.toString() : '')}`;
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between bc000fb and 517a63d.
Files selected for processing (3)
  • JeMPI_Apps/JeMPI_UI/src/pages/settings/Settings.tsx (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/types/Configuration.ts (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/utils/helpers.ts (2 hunks)
Additional Context Used
Biome (10)
JeMPI_Apps/JeMPI_UI/src/pages/settings/Settings.tsx (2)

2-3: The default import and some named imports are only used as types.


12-13: Some named imports are only used as types.

JeMPI_Apps/JeMPI_UI/src/utils/helpers.ts (8)

64-64: Unexpected any. Specify a different type.


70-76: This else clause can be omitted because previous branches break early.


71-71: Template literals are preferred over string concatenation.


72-76: This else clause can be omitted because previous branches break early.


82-82: Unexpected any. Specify a different type.


85-85: Unexpected any. Specify a different type.


1-1: All these imports are only used as types.


1-2: All these imports are only used as types.

Additional comments not posted (2)
JeMPI_Apps/JeMPI_UI/src/utils/helpers.ts (1)

32-33: The updates to the Configuration interface and the generateId function are correctly implemented to handle the renamed fields.

Also applies to: 129-133

JeMPI_Apps/JeMPI_UI/src/pages/settings/Settings.tsx (1)

120-120: The updates to component props in Settings.tsx correctly reflect the renamed fields in the Configuration interface.

Also applies to: 128-128

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 517a63d and 9b4c02c.
Files selected for processing (1)
  • JeMPI_Apps/JeMPI_UI/tests/services/configuration.test.ts (1 hunks)
Additional Context Used
Biome (2)
JeMPI_Apps/JeMPI_UI/tests/services/configuration.test.ts (2)

5-6: All these imports are only used as types.


23-23: This let declares a variable that is only assigned once.

@MatthewErispe MatthewErispe merged commit 5690105 into CU-86by1w64p_JeMPI-UI-Configuration May 28, 2024
@MatthewErispe MatthewErispe deleted the CU-86byw9prc_Load-Configuration-Integration branch May 28, 2024 12:55
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (4)
JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (4)

Line range hint 77-77: Consider simplifying the computed expression in the request interceptor setup to enhance readability.

- if (['post', 'patch', 'put', 'delete'].indexOf(method || '') !== -1) {
+ if (['post', 'patch', 'put', 'delete'].includes(method || '')) {

Line range hint 367-367: Use strict equality checks (===) instead of loose equality checks (==) to avoid potential bugs due to type coercion.

- if (response.status == 200) {
+ if (response.status === 200) {

Also applies to: 388-388


Line range hint 377-377: Avoid using template literals when there is no variable interpolation or special character handling required.

- throw new Error(`Got response from server but not all authentication details were present. Failed to validate`);
+ throw new Error('Got response from server but not all authentication details were present. Failed to validate');

Line range hint 403-403: Prefer using template literals for string concatenation to improve readability and maintainability.

- throw new Error('Failed to updateGoldenRecord with error: ' + error)
+ throw new Error(`Failed to updateGoldenRecord with error: ${error}`)
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 9b4c02c and 50f0d4b.
Files selected for processing (5)
  • JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/services/mockData.ts (2 hunks)
  • JeMPI_Apps/JeMPI_UI/src/test/settings/GoldenRecordLists.test.tsx (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/test/settings/UniqueToGR.test.tsx (1 hunks)
  • JeMPI_Apps/JeMPI_UI/src/test/settings/UniqueToInteraction.test.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • JeMPI_Apps/JeMPI_UI/src/test/settings/GoldenRecordLists.test.tsx
  • JeMPI_Apps/JeMPI_UI/src/test/settings/UniqueToGR.test.tsx
  • JeMPI_Apps/JeMPI_UI/src/test/settings/UniqueToInteraction.test.tsx
Additional Context Used
Biome (20)
JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (16)

77-77: The computed expression can be simplified without the use of a string literal.


258-276: This else clause can be omitted because previous branches break early.


367-367: Use === instead of ==.
== is only allowed when comparing against null


377-377: Do not use template literals if interpolation and special-character handling are not needed.


388-388: Use === instead of ==.
== is only allowed when comparing against null


403-403: Template literals are preferred over string concatenation.


1-1: All these imports are only used as types.


1-2: All these imports are only used as types.


2-3: All these imports are only used as types.


3-9: All these imports are only used as types.


9-10: All these imports are only used as types.


12-22: All these imports are only used as types.


22-28: All these imports are only used as types.


28-29: Some named imports are only used as types.


29-30: All these imports are only used as types.


32-33: All these imports are only used as types.

JeMPI_Apps/JeMPI_UI/src/services/mockData.ts (4)

1-1: All these imports are only used as types.


1-2: The default import is only used as a type.


2-3: All these imports are only used as types.


3-4: All these imports are only used as types.

Additional comments not posted (1)
JeMPI_Apps/JeMPI_UI/src/services/ApiClient.ts (1)

92-94: The method fetchConfiguration has been updated to use a GET request instead of a POST request. This change aligns with RESTful best practices for fetching data.

Comment on lines +335 to +523
}
},
{
fieldName: 'gender',
fieldType: 'String',
source: {
csvCol: 3
},
indexGoldenRecord: '@index(exact,trigram)',
linkMetaData: {
comparison: 'JARO_WINKLER_SIMILARITY',
comparisonLevels: [0.92],
m: 0.9468393,
u: 0.4436446
}
},
{
fieldName: 'dob',
fieldType: 'String',
source: {
csvCol: 4
},
linkMetaData: {
comparison: 'JARO_WINKLER_SIMILARITY',
comparisonLevels: [0.92],
m: 0.7856196,
u: 0.0000465
}
},
{
fieldName: 'city',
fieldType: 'String',
source: {
csvCol: 5
},
indexGoldenRecord: '@index(trigram)',
linkMetaData: {
comparison: 'JARO_WINKLER_SIMILARITY',
comparisonLevels: [0.92],
m: 0.8445694,
u: 0.0355741
}
},
{
fieldName: 'phone_number',
fieldType: 'String',
source: {
csvCol: 6
},
indexGoldenRecord: '@index(exact,trigram)',
linkMetaData: {
comparison: 'JARO_WINKLER_SIMILARITY',
comparisonLevels: [0.92],
m: 0.84085,
u: 0.0000004
}
},
{
fieldName: 'national_id',
fieldType: 'String',
source: {
csvCol: 7
},
indexGoldenRecord: '@index(exact,trigram)',
indexInteraction: '@index(exact,trigram)',
linkMetaData: {
comparison: 'JARO_WINKLER_SIMILARITY',
comparisonLevels: [0.92],
m: 0.8441029,
u: 0.0000002
}
}
],
rules: {
link: {
deterministic: [
{
vars: ['national_id'],
text: 'eq(national_id)'
},
{
vars: ['given_name', 'family_name', 'phone_number'],
text: 'eq(given_name) and eq(family_name) and eq(phone_number)'
}
],
probabilistic: [
{
vars: [
'given_name',
'family_name',
'city',
'phone_number',
'national_id'
],
text: 'match(given_name,3) and match(family_name,3) or match(given_name,3) and match(city,3) or match(family_name,3) and match(city,3) or match(phone_number,2) or match(national_id,3)'
}
]
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

The script output indicates that there are still references to the old field names uniqueInteractionFields and uniqueGoldenRecordFields in the following files:

  • JeMPI_Apps/JeMPI_UI/src/test/settings/UniqueToGR.test.tsx
  • JeMPI_Apps/JeMPI_UI/src/test/settings/UniqueToInteraction.test.tsx

These references need to be updated to match the new field names in the configuration object to avoid runtime errors.

  • Update references to uniqueInteractionFields and uniqueGoldenRecordFields in the identified files.
Analysis chain

The configuration object has been updated with new field names and structures to reflect the changes in the Configuration interface. Ensure that all references to these fields in the application are updated accordingly to avoid runtime errors.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all references to configuration fields match the new structure.

# Test: Search for old field names usage. Expect: No occurrences of old names.
rg --type typescript $'uniqueInteractionFields|uniqueGoldenRecordFields'

Length of output: 108



Script:

#!/bin/bash
# Description: Verify all references to configuration fields match the new structure.

# Test: Search for old field names usage. Expect: No occurrences of old names.
rg --type ts $'uniqueInteractionFields|uniqueGoldenRecordFields'

Length of output: 1020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants