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

[33]- Added env variables #119

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

anandamideShakyan
Copy link
Contributor

@anandamideShakyan anandamideShakyan commented Sep 21, 2024

πŸ“‹ Description

JIRA ID:

Please provide a summary of the change and the motivation behind it. Include relevant context and details.


βœ… Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • πŸ”₯ Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • πŸ›  Refactor (change that is neither a fix nor a new feature)
  • βš™οΈ Config change (configuration file or build script updates)
  • πŸ“š Documentation (updates to docs or readme)
  • πŸ§ͺ Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • πŸš€ Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

ℹ️ Additional Information

Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.

Summary by CodeRabbit

  • New Features
    • Introduced new API endpoints for health ID functionalities, including OTP generation, health ID creation, and family tagging.
    • Added support for biometric-related operations and family relationship management.

These enhancements improve the overall functionality of health ID management within the application.

Copy link

coderabbitai bot commented Sep 21, 2024

Walkthrough

The changes involve updates to the src/environments/environment.ci.ts and src/environments/environment.ci.ts.template files, introducing numerous new API endpoint URLs related to health ID functionalities and family tagging. Key properties such as abhaExtension and various URLs for OTP generation, health ID management, and family tagging are added, expanding the configuration for enhanced health ID services.

Changes

File Path Change Summary
src/environments/environment.ci.ts Added multiple new API endpoint URLs for health ID functionalities and family tagging, including abhaExtension.
src/environments/environment.ci.ts.template Introduced new constants and URLs related to FHIR API and health ID operations, enhancing family tagging and biometric functionalities.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant API
    User->>API: Request OTP for Health ID
    API-->>User: Send OTP
    User->>API: Verify OTP
    API-->>User: Confirm Verification
    User->>API: Generate Health ID
    API-->>User: Provide Health ID
Loading

Poem

πŸ‡ In fields of code, the changes bloom,
New URLs sprout, dispelling the gloom.
With health IDs and families in tow,
A digital garden begins to grow.
Hops of joy in each line we see,
Celebrating progress, oh so free! 🌼


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>, please review it.
    -- 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @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 using 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 do a full 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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

Quality Gate Failed Quality Gate failed

Failed conditions
97.9% Duplication on New Code (required ≀ 3%)

See analysis details on SonarCloud

@@ -50,6 +50,7 @@ export const environment = {
visualAcuityTest: `Visual Acuity Test`,
haemoglobinTest: `Haemoglobin Test`,
parentAPI: `${MMU_API}`,
abhaExtension: `@abdm`,
Copy link
Member

Choose a reason for hiding this comment

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

This can be a variable.
In non production environments the value will be for sandbox - @sbx

Copy link

@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)
src/environments/environment.ci.ts (2)

427-427: Maintain consistent capitalization in comments.

In the comment on line 427, consider changing 'Urls' to 'URLs' to match standard capitalization.

Apply this diff to fix the comment:

-  /** Previous Anthropometry  Urls */
+  /** Previous Anthropometry  URLs */

431-451: Ensure consistent casing of 'OTP' in variable names.

There is inconsistency in the casing of 'OTP' in variable names. For clarity and consistency, consider standardizing the usage of 'OTP'. It's common to use uppercase for acronyms in camelCase variable names.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e855ad8 and f08a157.

Files selected for processing (2)
  • src/environments/environment.ci.ts (2 hunks)
  • src/environments/environment.ci.ts.template (3 hunks)
Additional comments not posted (14)
src/environments/environment.ci.ts (5)

53-53: Variable abhaExtension added successfully.

The addition aligns with existing configuration patterns.


438-438: Fix inconsistent casing in the variable name gethealthIdDetailsUrl.

The variable gethealthIdDetailsUrl has inconsistent casing; consider renaming it to getHealthIdDetailsUrl to follow camelCase conventions.

Apply this diff to rename the variable:

-gethealthIdDetailsUrl: `${FHIR_API}healthID/getBenhealthID`,
+getHealthIdDetailsUrl: `${FHIR_API}healthID/getBenhealthID`,

Likely invalid or redundant comment.


465-465: Fix inconsistent casing in the variable name getdeviceRDServiceUrl.

The variable getdeviceRDServiceUrl should be renamed to getDeviceRDServiceUrl to follow camelCase conventions.

Apply this diff to rename the variable:

-getdeviceRDServiceUrl: `${COMMON_API}biometric/getBiometricData/`,
+getDeviceRDServiceUrl: `${COMMON_API}biometric/getBiometricData/`,

Likely invalid or redundant comment.


456-456: Fix inconsistent casing in the variable name relationShipUrl.

The variable relationShipUrl has inconsistent casing; consider renaming it to relationshipUrl to follow camelCase conventions.

Apply this diff to rename the variable:

-relationShipUrl: `${TM_API}registrar/registrarMasterData`,
+relationshipUrl: `${TM_API}registrar/registrarMasterData`,

Likely invalid or redundant comment.


466-466: Correct the spelling of 'Aadhar' to 'Aadhaar' in the variable name.

The correct spelling is 'Aadhaar'; consider renaming confirmAadharBio to confirmAadhaarBio for accuracy and consistency.

Apply this diff to fix the spelling:

-confirmAadharBio: `${FHIR_API}healthIDWithBio/confirmWithAadhaarBio`,
+confirmAadhaarBio: `${FHIR_API}healthIDWithBio/confirmWithAadhaarBio`,

Likely invalid or redundant comment.

src/environments/environment.ci.ts.template (9)

38-38: Addition of FHIR_API constant aligns with existing conventions

The FHIR_API constant is added to store the base URL for FHIR API endpoints, following the established pattern for API constants.


55-55: Addition of abhaExtension property is consistent

The abhaExtension property is introduced with the value @abdm. This addition aligns with the existing configuration properties within the environment settings.


430-430: Addition of getAllRegistrationData endpoint

The getAllRegistrationData endpoint is added at ${COMMON_API}customization/fetchAllData. Ensure that this endpoint is correctly implemented on the server side and that it handles data securely, especially if it returns sensitive registration data.


435-444: New Health ID OTP Generation URLs are properly defined

The following Health ID OTP generation and verification URLs have been added:

  • otpGenerationUrl
  • otpGenerationWithUIDUrl
  • healthIdGenerationUrl
  • healthIdGenerationWithUIDUrl
  • verifyOTPUrl
  • checkAndGenerateMobileOTPUrl
  • verifyMobileOTPUrl
  • gethealthIdDetailsUrl
  • mapHealthIdUrl

These URLs are correctly constructed using the FHIR_API base URL and follow the existing naming conventions.


446-447: Care Context Mapping URLs added correctly

The care context mapping endpoints have been added:

  • careContextGenerateOtpUrl
  • verifyOtpForMappingContextUrl

These additions are consistent with the established patterns in the configuration.


450-451: Health ID Validation URLs are properly added

The following Health ID validation URLs have been included:

  • generateOTPForHealthIDValidation
  • verifyOTPForHealthIDValidation

They are appropriately defined and use the correct base URL.


454-455: Health ID Card Generation URLs added successfully

The URLs for Health ID Card generation are:

  • generateOTPForHealthIDCard
  • verifyOTPAndGenerateHealthCard

These URLs are correctly formed and fit within the existing configuration structure.


457-457: updateAmritIDInMongo endpoint added

The updateAmritIDInMongo endpoint is added to the configuration. Verify that proper error handling and data validation are implemented when this endpoint is used, to maintain data integrity in the MongoDB database.


460-466: Family Tagging URLs are correctly integrated

The following family tagging URLs have been added:

  • relationShipUrl
  • saveFamilyTaggingUrl
  • editFamilyTaggingUrl
  • untagFamilyUrl
  • familySearchUrl
  • createFamilyUrl
  • getFamilyMemberUrl

These endpoints are appropriately defined and consistent with the rest of the configuration.

Comment on lines +469 to +473
getdeviceRDServiceUrl: `${COMMON_API}biometric/getBiometricData/`,
confirmAadharBio: `${FHIR_API}healthIDWithBio/confirmWithAadhaarBio`,

generateABHAForBio: `${FHIR_API}healthIDWithBio/verifyBio`,
generateABHAForBioMobileOTP: `${FHIR_API}healthIDWithBio/generateMobileOTP`,
Copy link

Choose a reason for hiding this comment

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

Ensure secure handling of Biometric Health ID endpoints

The addition of biometric-related endpoints includes:

  • getdeviceRDServiceUrl
  • confirmAadharBio
  • generateABHAForBio
  • generateABHAForBioMobileOTP

Given the sensitivity of biometric data, please ensure that all necessary security measures are in place, such as encryption and secure communication protocols. Compliance with data protection regulations (e.g., GDPR, HIPAA) should be verified.

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.

2 participants