Skip to content

Conversation

@adamrefaey
Copy link
Collaborator

@adamrefaey adamrefaey commented Apr 14, 2025

Change

This pull request includes several updates to the backend, primarily focusing on enhancing the document processing capabilities and improving the configuration management. Key changes include updating dependencies, modifying middleware configurations, adding new configuration settings, and expanding the functionality of the DocumentProcessorController.

Dependency Updates:

  • Updated @aws-sdk/client-s3 to version ^3.787.0 in backend/package.json.
  • Updated @typescript-eslint/eslint-plugin and @typescript-eslint/parser to version ^8.30.1 in backend/package.json.

Middleware and Configuration Enhancements:

  • Modified the AuthMiddleware to exclude specific routes in backend/src/app.module.ts.
  • Added AWS S3 and DynamoDB configurations in backend/src/config/configuration.ts. [1] [2]

Document Processing Improvements:

  • Expanded the DocumentProcessorController to include new methods for processing documents from S3 and handling errors more effectively in backend/src/document-processor/controllers/document-processor.controller.ts. [1] [2] [3] [4]
  • Introduced the ReportsModule to the DocumentProcessorModule in backend/src/document-processor/document-processor.module.ts.

Medical Document Analysis Enhancements:

  • Updated the MedicalDocumentAnalysis interface to include additional fields like title, category, conclusion, and suggestions in backend/src/document-processor/services/aws-bedrock.service.ts. [1] [2] [3] [4] [5] [6]

Testing Improvements:

  • Enhanced test cases to accommodate new fields and methods in backend/src/document-processor/services/aws-bedrock.service.spec.ts and backend/src/document-processor/services/aws-textract.service.spec.ts. [1] [2] [3] [4] [5] [6] [7]

Does this PR introduce a breaking change?

{...}

What needs to be documented once your changes are merged?

{...}

Additional Comments

{...}

@adamrefaey adamrefaey self-assigned this Apr 14, 2025
…al' field and update related tests and documentation
- Updated package.json to include @aws-sdk/client-s3 for S3 operations.
- Enhanced DocumentProcessorController to process files from S3 using a file path.
- Implemented getFileFromS3 method to retrieve files from S3 and streamToBuffer to convert streams to buffers.
- Integrated ReportsService to fetch report records based on file paths and user IDs.
- Added findByFilePath and updateReport methods in ReportsService for report management.
- Improved error handling and logging throughout the new functionality.
…kage.json and package-lock.json; improve error handling in AwsSecretsService
…s in DocumentProcessorController and ReportsService
@adamrefaey adamrefaey requested review from GuidoBR and Copilot April 14, 2025 22:08
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.

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

Files not reviewed (1)
  • backend/package.json: Language not supported
Comments suppressed due to low confidence (2)

backend/src/reports/reports.service.ts:33

  • The configuration key 'aws.aws.accessKeyId' appears redundant; consider verifying if this is intentional or if it should be simplified to 'aws.accessKeyId' for consistency.
const accessKeyId = this.configService.get<string>('aws.aws.accessKeyId');

backend/src/reports/reports.service.ts:37

  • Avoid using the 'any' type for clientOptions; consider defining a proper type for improved type safety and clarity in configuration settings.
const clientOptions: any = { region };

@adamrefaey adamrefaey merged commit 6e51c34 into main Apr 15, 2025
2 checks passed
@adamrefaey adamrefaey deleted the ADE-152 branch April 15, 2025 18:38
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