Repository navigation
feat(patient): confirm receipt or report a problem with a fulfilled o… - #202
flipclip22 wants to merge 2 commits into
Conversation
…rder Implemented patient confirm receipt and report problem flows for fulfilled orders (issue DocForum#35): - Added OrderConfirmPanel component with confirm and dispute flows - Shows deadline countdown and inaction consequence in plain language - Window-expired state displays appropriate message - Integrated into OrderDetail for fulfilled orders - Added "Action needed" cards to patient dashboard for orders awaiting confirmation - Created service layer hooks (useConfirmReceipt, useReportProblem) - Added query keys and invalidations for order confirm actions - Added types for OrderConfirmationWindow, ConfirmReceiptInput, ReportProblemInput - Built against assumed API contracts (see ARCHITECTURE_ESSENTIALS.md) - Added tests for confirm, dispute, and window-expired states - Updated ROADMAP.md and changelog.d/ with new entry Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
@flipclip22 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@flipclip22 CI is failing on this branch against the latest Frontend (typecheck + test + build) The test |
|
@flipclip22 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-web.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
I'll help you implement the confirm receipt or report a problem feature for fulfilled orders. Let me start by exploring the codebase and creating the new branch.
Perfect! I've successfully implemented the confirm receipt or report a problem feature for fulfilled orders. Here's a summary of what was completed:
Summary of Changes
1. Types and Models (
src/types/models.ts)OrderConfirmationWindowwith deadline and inaction consequenceConfirmReceiptInputandConfirmReceiptResponsetypesReportProblemInputandReportProblemResponsetypesOrderandPatientOrderto includeconfirmationWindowfield2. Service Layer (
src/services/orders-service.ts)confirmReceipt()function for POST/orders/confirm-receiptreportProblem()function for POST/orders/report-problem3. Query Keys and Invalidation (
src/query-keys.ts,src/invalidations.ts)orderKeysfactory withall,mine, anddetailkeysorder.confirm-actioninvalidation entry4. React Hooks (
src/features/orders/hooks/useOrder.ts)useConfirmReceipt()mutation hookuseReportProblem()mutation hook5. UI Components
src/features/orders/components/OrderConfirmPanel.tsx):6. Integration
OrderConfirmPaneltoOrderDetailfor fulfilled ordersuseCareHubto show "Action needed" cards for orders awaiting confirmationPatientDashboardPageto handle orders source status7. Tests (
src/features/orders/components/OrderConfirmPanel.test.tsx)8. Documentation
ROADMAP.mdwith completed itemchangelog.d/35-confirm-receipt-or-report-problem.mdARCHITECTURE_ESSENTIALS.mdwith assumed API contracts9. Verification
feat/confirm-receipt-or-report-a-problem-with-aThe implementation follows all the project's architecture rules:
docforum-core's API (hard rule 1)docforum-core's models (hard rule 2)pages/components/features/hooks/services/store/types/shapestructureexpectedUpdatedAtconflict detectionCloses #35