feat(#3490): Analyzer Manual QC Recording - Spring Boot backend#3499
feat(#3490): Analyzer Manual QC Recording - Spring Boot backend#3499karansahani78 wants to merge 8 commits into
Conversation
- Liquibase migration: new analyzer_qc_run table, QC config fields on analyzer - AnalyzerQcRun entity: UUID-based ID, analyzer FK, result/value/runDate/source - Analyzer entity: qcFrequencyType, qcFrequencyHours, qcRequired - AnalyzerQcRunDAO + Impl: lastPass, lastRun, history queries (BaseDAOImpl) - AnalyzerQcServiceImpl: DAILY/PER_SHIFT/CUSTOM_HOURS status evaluation - AnalyzerQcRestController: 3 REST endpoints with @PreAuthorize - Unit tests: 7 cases covering all status rules and validation
|
Hi maintainers, |
There was a problem hiding this comment.
Pull request overview
Adds backend support for Analyzer Manual QC Recording (#3490) by introducing a new persistence model for manual QC runs, QC scheduling configuration on analyzers, and REST endpoints for status/recording/history.
Changes:
- Adds Liquibase migration to create
analyzer_qc_runand add QC configuration columns toanalyzer. - Introduces new Analyzer QC domain layer (entity/DAO/service) plus REST controller endpoints.
- Adds enums and unit tests for QC status evaluation and QC run validation.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/org/openelisglobal/analyzerqc/AnalyzerQcServiceTest.java | Unit tests for QC status evaluation and record validation logic. |
| src/main/resources/liquibase/base-changelog.xml | Wires the new analyzer QC Liquibase migration into the master changelog. |
| src/main/resources/liquibase/analyzer/004-014-create-analyzer-qc-run.xml | Creates analyzer_qc_run table and adds analyzer QC config columns. |
| src/main/java/org/openelisglobal/analyzerqc/valueholder/AnalyzerQcStatus.java | DTO for QC status response (status + last run + next due). |
| src/main/java/org/openelisglobal/analyzerqc/valueholder/AnalyzerQcRun.java | New JPA entity representing a manual analyzer QC run. |
| src/main/java/org/openelisglobal/analyzerqc/service/AnalyzerQcServiceImpl.java | Implements QC evaluation rules and QC run recording. |
| src/main/java/org/openelisglobal/analyzerqc/service/AnalyzerQcService.java | Service interface for QC status, recording, and history. |
| src/main/java/org/openelisglobal/analyzerqc/form/QcRunForm.java | Request body model for recording a QC run. |
| src/main/java/org/openelisglobal/analyzerqc/daoimpl/AnalyzerQcRunDAOImpl.java | DAO queries for last pass, last run, and full history. |
| src/main/java/org/openelisglobal/analyzerqc/dao/AnalyzerQcRunDAO.java | DAO interface for QC run persistence/query methods. |
| src/main/java/org/openelisglobal/analyzerqc/controller/AnalyzerQcRestController.java | REST endpoints for QC status, recording, and history. |
| src/main/java/org/openelisglobal/analyzer/valueholder/QcStatus.java | New QC status enum used by the analyzer QC API. |
| src/main/java/org/openelisglobal/analyzer/valueholder/QcFrequencyType.java | New enum for QC frequency rules (daily/shift/custom). |
| src/main/java/org/openelisglobal/analyzer/valueholder/Analyzer.java | Adds QC schedule/required configuration fields to Analyzer entity. |
|
Thanks for the review. I’ve addressed the key feedback:
Please let me know if anything else needs improvement. |
|
Some files include unnecessary comments, maybe you can remove some of them. |
Thanks for the feedback! Sure, I’ll clean up unnecessary comments and push an update shortly. |
|
Thanks for the detailed context on issue #3490 regarding OGC-41 integration. I realize my current implementation introduces a separate QC run flow, which does not align with the intended architecture using QCResult, QCControlLot, and the existing QCResultCreatedEvent pipeline. I can refactor this PR to integrate with the existing QCResult flow (instead of maintaining a separate analyzer_qc_run model). Please let me know if you'd prefer this refactor in the current PR or as a new PR. Happy to align with the OGC-41 design direction. |
Closes #3490
This PR introduces backend support for Analyzer Manual QC Recording.
Changes
analyzer_qc_runtable and QC config fields on analyzerAnalyzerentity with QC configuration (frequency + required flag)Note
Local Maven build fails due to unresolved dependencies (
org.itech:dataexport-*), which appear unrelated to this change. Changes are scoped to analyzer QC feature.