Skip to content

Conversation

@adamrefaey
Copy link
Collaborator

Change

refactor: remove missing reference ranges notice and related checks from AiAnalysisTab

Does this PR introduce a breaking change?

{...}

What needs to be documented once your changes are merged?

{...}

Additional Comments

{...}

@adamrefaey adamrefaey requested a review from Copilot April 29, 2025 14:19
@adamrefaey adamrefaey self-assigned this Apr 29, 2025
@adamrefaey adamrefaey requested a review from GuidoBR April 29, 2025 14:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the application by removing the missing reference ranges notice and the associated checks from the frontend and backend components. Key changes include the complete removal of the MissingReferenceRangesNotice component, the elimination of related conditional checks in AiAnalysisTab, and updates to backend prompt instructions and documentation regarding metadata handling.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
frontend/src/pages/Reports/components/MissingReferenceRangesNotice.tsx Removed the legacy component for displaying missing reference ranges notice.
frontend/src/pages/Reports/components/AiAnalysisTab.tsx Removed the import and conditional rendering of the missing reference ranges notice.
backend/src/services/perplexity.service.ts Updated the system prompt to no longer enforce preservation of the metadata.missingInformation array.
backend/src/document-processor/services/aws-bedrock.service.ts Removed instructions for adding "reference-ranges-missing" to the missingInformation array.
Comments suppressed due to low confidence (2)

backend/src/document-processor/services/aws-bedrock.service.ts:89

  • The removal of the instruction to add 'reference-ranges-missing' to the missingInformation array should be verified to ensure that the lab value processing logic is updated accordingly.
  -- IMPORTANT: Failing to add "reference-ranges-missing" to missingInformation when ANY lab value lacks explicit ranges

backend/src/services/perplexity.service.ts:286

  • The updated system prompt no longer specifies that the metadata.missingInformation array should remain unchanged. Please ensure this change is intentional and that downstream systems can handle the updated metadata structure correctly.
      'Medical information verification specialist. Verify analysis against trusted sources (Mayo Clinic, Cleveland Clinic, CDC, NIH, WHO, medical journals). Ensure accuracy of lab ranges, interpretations, and recommendations. Return only corrected JSON. IMPORTANT: Do not modify the metadata object.'

@GuidoBR GuidoBR merged commit 0fe5c82 into main Apr 29, 2025
2 checks passed
@adamrefaey adamrefaey deleted the ADE-66 branch April 29, 2025 14:29
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