Update MSH commands to track outstanding amount and capture deductible info
- msh-status: Show outstanding amount instead of total submitted - msh-make-claims: Track outstanding_amount in metadata - msh-check-claims: Capture deductible/explanation info for partial reimbursements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
230
msh-check-claims.md
Normal file
230
msh-check-claims.md
Normal file
@@ -0,0 +1,230 @@
|
||||
# MSH Insurance Reimbursement Check
|
||||
|
||||
Automate checking reimbursement status for submitted MSH insurance claims using Playwright browser automation.
|
||||
|
||||
## Read
|
||||
|
||||
~/.claude/msh-insurance/claims-submission-guide.md
|
||||
|
||||
## Instructions
|
||||
|
||||
**CRITICAL REQUIREMENTS - READ CAREFULLY:**
|
||||
|
||||
⚠️ **AUTOMATION MODE - NO USER INTERACTION ALLOWED** ⚠️
|
||||
|
||||
1. **NEVER PROMPT THE USER:** Do not ask questions, do not wait for input, do not output "Ready to proceed?" or similar
|
||||
2. **NEVER PROVIDE MANUAL INSTRUCTIONS:** Do not say "Please follow these steps" or "Let me know when..."
|
||||
3. **AUTOMATE EVERYTHING:** Use Playwright MCP browser tools to perform ALL actions automatically
|
||||
4. **OUTPUT PROGRESS IMMEDIATELY:** Print status messages as you go (use print() or echo to force output)
|
||||
5. **RUN TO COMPLETION:** Execute all steps from start to finish without stopping
|
||||
|
||||
**YOU ARE RUNNING IN AUTOMATED MODE - CHECK ALL PENDING CLAIMS**
|
||||
|
||||
**Input:** No arguments needed - the command will automatically read claims from `~/.claude/msh-insurance/claims-tracker.json`
|
||||
|
||||
**Workflow - AUTOMATE ALL STEPS:**
|
||||
|
||||
**FIRST: Load pending claims**
|
||||
1. Read `~/.claude/msh-insurance/claims-tracker.json`
|
||||
2. Filter for claims where `reimbursement.status` is "pending"
|
||||
3. Output: "Found X pending claims to check"
|
||||
|
||||
**Automate browser navigation using Playwright MCP tools:**
|
||||
|
||||
1. **Navigate to MSH portal:**
|
||||
- Use `browser_navigate` to https://www.msh-services.com/index_assure_previnter.php?lang=en
|
||||
- Output: "Browser opened"
|
||||
|
||||
2. **Dismiss cookie/GDPR overlay (if present):**
|
||||
- Use `browser_snapshot` to check for cookie banner
|
||||
- If present, use `browser_click` to accept cookies (look for "Accept", "Accepter", "OK" buttons)
|
||||
- Output: "Cookie banner dismissed" or "No cookie banner found"
|
||||
|
||||
3. **Login:**
|
||||
- Load credentials from ~/.bash_secret (MSH_INTL_LOGIN, MSH_INTL_PASS)
|
||||
- Use `browser_type` to fill username field
|
||||
- Use `browser_type` to fill password field
|
||||
- Use `browser_click` to click login button
|
||||
- Output: "Logged in successfully"
|
||||
|
||||
4. **Navigate to "Your claims" page:**
|
||||
- Click "Your reimbursements" menu to expand it
|
||||
- Click "Your claims" link
|
||||
- Or navigate directly to: https://www.msh-services.com/index.php?module=demandes&controller=index&action=index
|
||||
- Output: "On claims page"
|
||||
|
||||
5. **For each pending claim:**
|
||||
|
||||
a. Use `browser_snapshot` to see the claims table
|
||||
|
||||
b. Find the claim number (from claims-tracker.json) in the table
|
||||
- Table has columns: "Date of claim", "Claim No.", "Claim status"
|
||||
- Look for the claim number in the "Claim No." column
|
||||
|
||||
c. Check the "Claim status" column for this claim:
|
||||
|
||||
**CASE 1: Status shows "In progress"**
|
||||
- This means claim is still being processed, not yet reimbursed
|
||||
- Keep tracker: `reimbursement.status = "pending"`
|
||||
- Output: "⏳ Claim [CLAIM_NUMBER]: Still in progress"
|
||||
- Continue to next claim
|
||||
|
||||
**CASE 2: Status shows "Processed on [date] ([reimbursement_number])"**
|
||||
- This means claim has been processed and reimbursed!
|
||||
- The reimbursement_number is a clickable link (e.g., "CH260000429")
|
||||
- Click the reimbursement number link
|
||||
- Output: "Checking claim [CLAIM_NUMBER]..."
|
||||
|
||||
d. **If claim was processed (CASE 2), read the reimbursement details page:**
|
||||
- Use `browser_snapshot` to capture the page content
|
||||
- The page shows:
|
||||
- Processing date (in first table)
|
||||
- Claim number
|
||||
- Total reimbursement amount (e.g., "45.32 CHF")
|
||||
- Payment method ("Wire transfer")
|
||||
- Payment recipient
|
||||
- Below that, a "Details of the reimbursement notice" section shows:
|
||||
- Beneficiary name as heading
|
||||
- Table with: Date of service, Service, Expenses incurred, Accepted amount, Other insurance, **Our payment**
|
||||
- **"Our payment"** column contains the actual reimbursed amount
|
||||
- **IMPORTANT:** Look for any explanation text or deductible information on the page:
|
||||
- Check for "Deductible", "Franchise", "Co-payment" mentions
|
||||
- Check for any notes explaining why reimbursement differs from expected
|
||||
- This info often appears near the "Accepted amount" or in footnotes
|
||||
|
||||
e. **Extract information from details page:**
|
||||
- Processing date (from "Processing date" cell)
|
||||
- Total reimbursement amount (from "Total reimbursement" cell)
|
||||
- Reimbursed amount per service (from "Our payment" column in details table)
|
||||
- **Deductible/explanation info** (if present) - capture any text explaining discrepancies
|
||||
|
||||
f. **Calculate expected reimbursement and flag discrepancies:**
|
||||
- Get original amount from tracker (e.g., 47.70 CHF)
|
||||
- If claim.emergency = true: expected = 100% of amount
|
||||
- If claim.emergency = false: expected = 95% of amount
|
||||
- Calculate: expected_amount = amount * (1.00 if emergency else 0.95)
|
||||
- If abs(reimbursed_amount - expected_amount) > 0.50 CHF:
|
||||
- Flag to user: "⚠ Claim [CLAIM_NUMBER]: Reimbursed [amount] CHF but expected [expected] CHF (original: [original] CHF)"
|
||||
|
||||
g. **Update tracker for processed claim:**
|
||||
- Update: `reimbursement.status = "paid"`
|
||||
- Update: `reimbursement.amount_reimbursed = [total reimbursement amount]`
|
||||
- Update: `reimbursement.reimbursement_date = [processing date in YYYY-MM-DD format]`
|
||||
- Update: `reimbursement.reimbursement_number = [reimbursement number, e.g., "CH260000429"]`
|
||||
- **If partial reimbursement (discrepancy detected):**
|
||||
- Update: `reimbursement.accepted_amount = [accepted amount from details table]`
|
||||
- Update: `reimbursement.deductible_applied = [deductible amount if mentioned]`
|
||||
- Update: `reimbursement.explanation = [any explanation text found]`
|
||||
- Update: `reimbursement.notes = "⚠ [explanation of discrepancy]"`
|
||||
- Output: "✓ Claim [CLAIM_NUMBER]: REIMBURSED - [amount] CHF on [date]"
|
||||
|
||||
h. **Navigate back to claims list:**
|
||||
- Use `browser_click` on "Go back to the list" link if available
|
||||
- Or use `browser_navigate` to https://www.msh-services.com/index.php?module=demandes&controller=index&action=index
|
||||
- Output: "Back to claims list"
|
||||
|
||||
i. **Handle pagination if needed:**
|
||||
- The claims table shows 20 claims per page
|
||||
- If there are more pages (check for "Page suivante" / "Next page" link), navigate to next page
|
||||
- Continue checking pending claims on subsequent pages
|
||||
|
||||
j. Repeat for next pending claim
|
||||
|
||||
6. **After checking all claims:**
|
||||
- Update `~/.claude/msh-insurance/claims-tracker.json` with all changes
|
||||
- Update metadata:
|
||||
- `last_updated` = current timestamp in ISO format
|
||||
- `pending_claims` = count of claims where reimbursement.status is "pending"
|
||||
- `reimbursed_claims` = count of claims where reimbursement.status is "paid"
|
||||
- `rejected_claims` = count of claims where reimbursement.status is "rejected"
|
||||
- `outstanding_amount` = sum of amounts for all pending claims
|
||||
- `total_reimbursed` = sum of amount_reimbursed for all paid claims
|
||||
- Output summary of findings
|
||||
|
||||
7. **Commit changes to git:**
|
||||
```bash
|
||||
cd ~/.claude/msh-insurance
|
||||
git add claims-tracker.json
|
||||
git commit -m "Update claims tracker: reimbursement check on [date]"
|
||||
git push
|
||||
```
|
||||
|
||||
8. **Final summary output:**
|
||||
```
|
||||
=== REIMBURSEMENT CHECK SUMMARY ===
|
||||
Total claims checked: X
|
||||
Newly reimbursed: Y (total: CHF Z.ZZ)
|
||||
Still pending: N
|
||||
|
||||
[List newly reimbursed claims with amounts and dates]
|
||||
[List any claims with unexpected reimbursement amounts]
|
||||
```
|
||||
|
||||
9. **Critical requirements:**
|
||||
- **AUTOMATION ONLY:** Use Playwright MCP browser automation tools. Never output manual instructions or ask user to do anything
|
||||
- **FULL AUTOMATION:** Complete the entire workflow from browser open to updating tracker without any user interaction
|
||||
- **PROGRESS OUTPUT:** Print progress messages as you go (e.g., "Browser opened", "Logged in", "Checking claim...")
|
||||
- **EXPECTED REIMBURSEMENT RATES:**
|
||||
- Medical expenses: 95% of amount
|
||||
- Emergency expenses: 100% of amount
|
||||
- Flag any discrepancies > 0.50 CHF to user
|
||||
- **PAGE NAVIGATION:** Use "Your claims" page (`/index.php?module=demandes&controller=index&action=index`), NOT "Your reimbursement notices"
|
||||
- **STATUS DETECTION:** Look for "Processed on [date] ([reimbursement_number])" in the status column
|
||||
- MUST dismiss cookie/GDPR banner before logging in (if present)
|
||||
- MUST navigate back to claims list after checking each processed claim
|
||||
- MUST update claims-tracker.json with all status changes
|
||||
- Exit with code 0 if completed successfully, code 1 if failed
|
||||
|
||||
**WRONG APPROACH - DO NOT DO THIS:**
|
||||
```
|
||||
Ready to proceed? Once you've logged in...
|
||||
Please follow these steps...
|
||||
Let me know when you're done...
|
||||
```
|
||||
|
||||
**CORRECT APPROACH - DO THIS:**
|
||||
```
|
||||
=== Starting MSH reimbursement check ===
|
||||
Reading claims tracker...
|
||||
Found 19 pending claims to check
|
||||
|
||||
Opening browser...
|
||||
Browser opened
|
||||
Logging in...
|
||||
Logged in successfully
|
||||
On claims page
|
||||
|
||||
Checking claim CFW7954479...
|
||||
⏳ Claim CFW7954479: Still in progress
|
||||
|
||||
Checking claim CFW7954704...
|
||||
⏳ Claim CFW7954704: Still in progress
|
||||
|
||||
Checking claim CFW7955311...
|
||||
✓ Claim CFW7955311: REIMBURSED - 45.32 CHF on 2026-01-05
|
||||
Back to claims list
|
||||
|
||||
Checking claim CFW7961812...
|
||||
✓ Claim CFW7961812: REIMBURSED - 104.88 CHF on 2026-01-06
|
||||
Back to claims list
|
||||
|
||||
... (checking remaining claims)
|
||||
|
||||
=== REIMBURSEMENT CHECK SUMMARY ===
|
||||
Total claims checked: 19
|
||||
Newly reimbursed: 2 (total: CHF 150.20)
|
||||
Still pending: 17
|
||||
|
||||
NEWLY REIMBURSED:
|
||||
✓ CFW7955311 - 45.32 CHF on 2026-01-05 (Sylvia Hannah AVERBACH - Lab tests)
|
||||
✓ CFW7961812 - 104.88 CHF on 2026-01-06 (Sylvia Hannah AVERBACH - Dental Check-up)
|
||||
|
||||
Updated claims tracker and committed changes to git.
|
||||
Done
|
||||
```
|
||||
|
||||
**IMPORTANT:** Output these progress messages immediately as each step completes to provide real-time feedback.
|
||||
|
||||
## Run
|
||||
|
||||
cd ~/.claude/msh-insurance && git pull
|
||||
196
msh-make-claims.md
Normal file
196
msh-make-claims.md
Normal file
@@ -0,0 +1,196 @@
|
||||
# MSH Insurance Claims Submission
|
||||
|
||||
Automate medical insurance claims submission to MSH Services using Playwright browser automation.
|
||||
|
||||
## Read
|
||||
|
||||
~/.claude/msh-insurance/claims-submission-guide.md
|
||||
|
||||
## Instructions
|
||||
|
||||
**CRITICAL REQUIREMENTS - READ CAREFULLY:**
|
||||
|
||||
⚠️ **AUTOMATION MODE - NO USER INTERACTION ALLOWED** ⚠️
|
||||
|
||||
1. **NEVER PROMPT THE USER:** Do not ask questions, do not wait for input, do not output "Ready to proceed?" or similar
|
||||
2. **NEVER PROVIDE MANUAL INSTRUCTIONS:** Do not say "Please follow these steps" or "Let me know when..."
|
||||
3. **AUTOMATE EVERYTHING:** Use Playwright MCP browser tools to perform ALL actions automatically
|
||||
4. **OUTPUT PROGRESS IMMEDIATELY:** Print status messages as you go (use print() or echo to force output)
|
||||
5. **RUN TO COMPLETION:** Execute all steps from start to finish without stopping
|
||||
|
||||
**YOU ARE RUNNING IN BATCH MODE - PROCESS ALL INVOICES SEQUENTIALLY**
|
||||
|
||||
**Input:** No arguments needed - the command will automatically find and process ALL invoices in:
|
||||
- `~/Downloads/bills/received, paid/` (both directories and PDF files)
|
||||
- `~/Downloads/bills/received, unpaid/` (both directories and PDF files)
|
||||
|
||||
**Workflow - AUTOMATE ALL STEPS:**
|
||||
|
||||
**FIRST: Collect all invoices**
|
||||
1. List all directories and PDF files in both received folders
|
||||
2. Output: "Found X invoices to process"
|
||||
3. For each invoice, process sequentially (one at a time)
|
||||
|
||||
**FOR EACH INVOICE:**
|
||||
|
||||
**FIRST ACTION:**
|
||||
1. Check if Playwright MCP tools are available (browser_navigate, browser_click, etc.)
|
||||
2. If NOT available: Output "ERROR: Playwright MCP tools not available" and EXIT WITH CODE 1
|
||||
3. If available: Output "=== Starting MSH automation for: [invoice_path] ===" and continue
|
||||
|
||||
**CRITICAL:** If you don't have access to browser_navigate, browser_click, browser_type, browser_snapshot, and browser_file_upload tools, you MUST exit with error code 1. Do NOT exit with code 0. Do NOT offer alternatives.
|
||||
|
||||
1. **Parse invoice information** from the provided path:
|
||||
- If directory: Read invoice images, identify beneficiary, date, provider, amount
|
||||
- If PDF file: Read PDF content to extract invoice details
|
||||
- Determine payment status from parent folder name (paid/unpaid)
|
||||
- Output: "Parsed invoice: [beneficiary] - [amount] CHF - [date]"
|
||||
|
||||
2. **Prepare files:**
|
||||
- For directories: Use compressed images if available (*_compressed.jpeg), otherwise compress images >3MB
|
||||
- For PDFs: Use the PDF file directly (already under 20MB limit)
|
||||
- Output: "Files ready: [list of files]"
|
||||
|
||||
3. **Automate browser submission using Playwright MCP tools:**
|
||||
|
||||
a. Navigate to MSH portal:
|
||||
- Use `browser_navigate` to https://www.msh-services.com/index_assure_previnter.php?lang=en
|
||||
- Output: "Browser opened"
|
||||
|
||||
b. Dismiss cookie/GDPR overlay (IMPORTANT):
|
||||
- Use `browser_snapshot` to check for cookie banner
|
||||
- If present, use `browser_click` to accept cookies (look for "Accept", "Accepter", "OK" buttons)
|
||||
- Output: "Cookie banner dismissed" or "No cookie banner found"
|
||||
|
||||
c. Login:
|
||||
- Load credentials from ~/.bash_secret (MSH_INTL_LOGIN, MSH_INTL_PASS)
|
||||
- Use `browser_type` to fill username field
|
||||
- Use `browser_type` to fill password field
|
||||
- Use `browser_click` to click login button
|
||||
- Output: "Logged in successfully"
|
||||
|
||||
d. Navigate to claims form:
|
||||
- Use `browser_navigate` to https://www.msh-services.com/index.php?module=demandes&controller=claimform&action=etape2
|
||||
- Output: "On claims form"
|
||||
|
||||
e. Select beneficiary:
|
||||
- Use `browser_snapshot` to see checkboxes
|
||||
- Use `browser_click` to select correct family member
|
||||
- Use `browser_click` to select "No" for Social Security
|
||||
- Use `browser_click` on "Next step" button
|
||||
- Output: "Selected beneficiary: [name]"
|
||||
|
||||
f. Fill medical expense details:
|
||||
- Use `browser_type` to fill date field FIRST
|
||||
- Use `browser_click` to select description category
|
||||
- Use `browser_type` for country, amount, currency
|
||||
- Use `browser_click` for emergency/accident question
|
||||
- Use `browser_click` on "Add this medical expense"
|
||||
- Use `browser_click` on "Next step"
|
||||
- Output: "Medical details filled"
|
||||
|
||||
g. Handle emergency details if needed (if emergency was selected):
|
||||
- Use `browser_click` to select nature
|
||||
- Use `browser_type` for date, place, circumstances
|
||||
- Use `browser_click` on "Next step"
|
||||
- Output: "Emergency details filled"
|
||||
|
||||
h. Upload attachments:
|
||||
- Use `browser_click` to select "Yes" for electronic documents
|
||||
- Use `browser_file_upload` to upload files
|
||||
- Wait for upload completion
|
||||
- Use `browser_click` on "Confirm"
|
||||
- Output: "Files uploaded"
|
||||
|
||||
i. Review and submit:
|
||||
- Use `browser_snapshot` to verify summary
|
||||
- Use `browser_click` to check certification checkbox
|
||||
- Use `browser_click` on "Submit" button
|
||||
- Output: "Claim submitted"
|
||||
|
||||
j. Extract claim number:
|
||||
- Use `browser_snapshot` to read success page
|
||||
- Extract claim number from page
|
||||
- Output: "Claim number: [NUMBER]"
|
||||
|
||||
4. **After successful submission:**
|
||||
- Update ~/.claude/msh-insurance/claims-tracker.json with new claim entry
|
||||
- Move invoice (directory or file) to ~/Downloads/bills/submitted/
|
||||
- Output: "Invoice [invoice_id] completed successfully"
|
||||
- Continue to next invoice
|
||||
|
||||
5. **After ALL invoices are processed:**
|
||||
- Update claims-tracker.json metadata:
|
||||
- `total_claims` = count of all claims
|
||||
- `pending_claims` = count of claims where reimbursement.status is "pending"
|
||||
- `outstanding_amount` = sum of amounts for all pending claims
|
||||
- `last_updated` = current timestamp in ISO format
|
||||
- Commit and push all changes to git repository
|
||||
- Output summary: "Processed X invoices: Y successful, Z failed"
|
||||
- Exit with code 0 if all succeeded, code 1 if any failed
|
||||
|
||||
6. **Critical requirements:**
|
||||
- **AUTOMATION ONLY:** Use Playwright MCP browser automation tools. Never output manual instructions or ask user to do anything
|
||||
- **FULL AUTOMATION:** Complete the entire workflow from browser open to claim submission without any user interaction
|
||||
- **BATCH PROCESSING:** Process ALL invoices sequentially, continue even if individual invoices fail
|
||||
- **ERROR HANDLING:** If an invoice fails, log the error and continue to the next invoice
|
||||
- **PROGRESS OUTPUT:** Print progress messages as you go (e.g., "Browser opened", "Logged in", "Claim submitted")
|
||||
- MUST dismiss cookie/GDPR banner before logging in (only needed once per batch)
|
||||
- MUST check "Demandé par" field in images/PDF for "Urgences" (emergency)
|
||||
- MUST fill date field FIRST to load description categories
|
||||
- MUST extract and return claim number
|
||||
- MUST handle both directory-based and PDF file invoices
|
||||
- Exit with code 0 only if ALL invoices succeeded, code 1 if ANY failed
|
||||
|
||||
**WRONG APPROACH - DO NOT DO THIS:**
|
||||
```
|
||||
Ready to proceed? Once you've logged in...
|
||||
Please follow these steps...
|
||||
Let me know when you're done...
|
||||
```
|
||||
|
||||
**CORRECT APPROACH - DO THIS:**
|
||||
```
|
||||
Found 13 invoices to process
|
||||
|
||||
=== Starting MSH automation for: /Users/zev/Downloads/bills/received, paid/14392 ===
|
||||
Parsing invoice...
|
||||
Parsed invoice: Zev AVERBACH - 459.20 CHF - 08/12/2025
|
||||
Files ready: IMG_0983_compressed.jpeg
|
||||
Opening browser...
|
||||
Browser opened
|
||||
Dismissing cookie banner...
|
||||
Cookie banner dismissed
|
||||
Logging in...
|
||||
Logged in successfully
|
||||
On claims form
|
||||
Selected beneficiary: Zev AVERBACH
|
||||
Medical details filled
|
||||
Files uploaded
|
||||
Claim submitted
|
||||
Claim number: CFW1234567
|
||||
Invoice 14392 completed successfully
|
||||
|
||||
=== Starting MSH automation for: /Users/zev/Downloads/bills/received, paid/12345 ===
|
||||
Parsing invoice...
|
||||
Parsed invoice: Simon Alexander AVERBACH - 125.00 CHF - 15/12/2025
|
||||
Files ready: invoice.pdf
|
||||
On claims form (already logged in)
|
||||
Selected beneficiary: Simon Alexander AVERBACH
|
||||
Medical details filled
|
||||
Files uploaded
|
||||
Claim submitted
|
||||
Claim number: CFW1234568
|
||||
Invoice 12345 completed successfully
|
||||
|
||||
... (processing remaining invoices)
|
||||
|
||||
Processed 13 invoices: 13 successful, 0 failed
|
||||
Done
|
||||
```
|
||||
|
||||
**IMPORTANT:** Output these progress messages immediately as each step completes to provide real-time feedback on batch progress.
|
||||
|
||||
## Run
|
||||
|
||||
cd ~/.claude/msh-insurance && git pull
|
||||
207
msh-status.md
Normal file
207
msh-status.md
Normal file
@@ -0,0 +1,207 @@
|
||||
# MSH Insurance Status Summary
|
||||
|
||||
Quick summary of all insurance claims and reimbursement status from the claims tracker.
|
||||
|
||||
## Instructions
|
||||
|
||||
**CRITICAL REQUIREMENTS:**
|
||||
|
||||
1. **READ-ONLY OPERATION:** This command only reads and summarizes data, no browser automation needed
|
||||
2. **DETERMINISTIC OUTPUT:** Parse claims-tracker.json and output a formatted summary
|
||||
3. **NO USER INTERACTION:** Run to completion with no prompts or questions
|
||||
|
||||
**Input:** No arguments needed - reads from `~/.claude/msh-insurance/claims-tracker.json`
|
||||
|
||||
**Workflow:**
|
||||
|
||||
1. **Read claims tracker:**
|
||||
- Load `~/.claude/msh-insurance/claims-tracker.json`
|
||||
- Extract metadata and all claims
|
||||
|
||||
2. **Generate summary output:**
|
||||
|
||||
```
|
||||
=== MSH INSURANCE STATUS SUMMARY ===
|
||||
Last updated: [metadata.last_updated in readable format]
|
||||
|
||||
OVERVIEW:
|
||||
Total claims: [total_claims]
|
||||
Outstanding amount: [sum of pending claim amounts] CHF
|
||||
|
||||
REIMBURSEMENT STATUS:
|
||||
✓ Paid: [reimbursed_claims] claims - [sum of amount_reimbursed] CHF
|
||||
⏳ Pending: [pending_claims] claims - [sum of pending amounts] CHF
|
||||
✗ Rejected: [rejected_claims] claims - [sum of rejected amounts] CHF
|
||||
⊘ Cancelled: [cancelled_claims] claims - [sum of cancelled amounts] CHF
|
||||
|
||||
BREAKDOWN BY BENEFICIARY:
|
||||
[For each unique beneficiary, show:]
|
||||
[Beneficiary Name]:
|
||||
Paid: [count] claims ([total CHF] CHF)
|
||||
Pending: [count] claims ([total CHF] CHF)
|
||||
Rejected: [count] claims ([total CHF] CHF)
|
||||
|
||||
ATTENTION REQUIRED:
|
||||
[List claims with warnings/notes, such as:]
|
||||
✗ [claim_number] - [beneficiary] - REJECTED: [rejection reason from notes]
|
||||
⚠ [claim_number] - [beneficiary] - [warning from notes, e.g., partial reimbursement]
|
||||
|
||||
PENDING CLAIMS (awaiting reimbursement):
|
||||
[For each pending claim:]
|
||||
⏳ [claim_number] - [beneficiary] - [amount] CHF
|
||||
[description] - [provider]
|
||||
Service date: [service_date]
|
||||
Submitted: [submission_date] ([days ago] days ago)
|
||||
|
||||
RECENT REIMBURSEMENTS (last 5):
|
||||
[For each of the 5 most recent reimbursed claims, sorted by reimbursement_date:]
|
||||
✓ [claim_number] - [beneficiary] - [amount_reimbursed] CHF
|
||||
[description] - [provider]
|
||||
Reimbursed on: [reimbursement_date] ([days ago] days ago)
|
||||
```
|
||||
|
||||
3. **Formatting requirements:**
|
||||
- Use clear visual indicators: ✓ (paid), ⏳ (pending), ✗ (rejected), ⊘ (cancelled), ⚠ (warning)
|
||||
- Show dates in readable format (YYYY-MM-DD)
|
||||
- Calculate "days ago" for pending claims and recent reimbursements
|
||||
- Sort beneficiaries alphabetically
|
||||
- Sort pending claims by submission date (oldest first)
|
||||
- Sort recent reimbursements by reimbursement date (newest first)
|
||||
- Align numbers nicely for readability
|
||||
- Include currency symbol (CHF) for all amounts
|
||||
- Round amounts to 2 decimal places
|
||||
|
||||
4. **Special cases to highlight:**
|
||||
- Claims with partial reimbursements (notes contain "⚠")
|
||||
- Rejected claims (status = "rejected")
|
||||
- Cancelled claims (status = "cancelled")
|
||||
- Pending claims submitted more than 14 days ago (flag with "⏰ DELAYED")
|
||||
- Resubmitted claims (has "previous_claim" field)
|
||||
|
||||
5. **Exit:**
|
||||
- Exit with code 0 when complete
|
||||
- No need to modify files or commit anything
|
||||
|
||||
**Example output:**
|
||||
|
||||
```
|
||||
=== MSH INSURANCE STATUS SUMMARY ===
|
||||
Last updated: 2026-01-25 14:42:00 UTC
|
||||
|
||||
OVERVIEW:
|
||||
Total claims: 26
|
||||
Outstanding amount: 3399.34 CHF
|
||||
|
||||
REIMBURSEMENT STATUS:
|
||||
✓ Paid: 16 claims - 3608.81 CHF
|
||||
⏳ Pending: 7 claims - 3366.44 CHF (expected ~3198.12 CHF at 95%)
|
||||
✗ Rejected: 2 claims - 224.40 CHF
|
||||
⊘ Cancelled: 1 claim - 139.90 CHF
|
||||
|
||||
BREAKDOWN BY BENEFICIARY:
|
||||
Abigail AVERBACH:
|
||||
Paid: 3 claims (586.54 CHF)
|
||||
Pending: 1 claim (193.50 CHF)
|
||||
Rejected: 1 claim (193.50 CHF)
|
||||
|
||||
August Winston Chester AVERBACH:
|
||||
Paid: 1 claim (504.36 CHF)
|
||||
Pending: 2 claims (141.79 CHF)
|
||||
Rejected: 1 claim (30.90 CHF)
|
||||
Cancelled: 1 claim (139.90 CHF)
|
||||
|
||||
Simon Alexander AVERBACH:
|
||||
Paid: 5 claims (1024.77 CHF)
|
||||
Pending: 1 claim (17.85 CHF)
|
||||
|
||||
Sylvia Hannah AVERBACH:
|
||||
Paid: 3 claims (362.15 CHF)
|
||||
Pending: 1 claim (1846.20 CHF)
|
||||
|
||||
Zev AVERBACH:
|
||||
Paid: 1 claim (436.24 CHF)
|
||||
Pending: 2 claims (1200.00 CHF)
|
||||
|
||||
ATTENTION REQUIRED:
|
||||
✗ CFW7961722 - August Winston Chester AVERBACH - REJECTED: 'Please provide us with the itemized invoices'
|
||||
→ Resubmitted as CFW8030371 (pending)
|
||||
|
||||
✗ CFW7961735 - Abigail AVERBACH - REJECTED: 'Please send us a copy of the invoice that you forgot to attach'
|
||||
→ Resubmitted as CFW8030381 (pending)
|
||||
|
||||
⊘ CFW7961778 - August Winston Chester AVERBACH - CANCELLED on 2026-01-07
|
||||
|
||||
⚠ CFW7954479 - Simon Alexander AVERBACH - Emergency claim: expected 189.00 CHF (100%), received 179.55 CHF
|
||||
|
||||
⚠ CFW7955164 - Sylvia Hannah AVERBACH - Partial reimbursement: expected 305.62 CHF (95%), received 132.91 CHF
|
||||
|
||||
PENDING CLAIMS (awaiting reimbursement):
|
||||
⏳ CFW8030257 - Zev AVERBACH - 600.00 CHF
|
||||
Psychotherapist (Therapists) - Dr. Marc Descombes (Psychotherapy)
|
||||
Service date: 11/12/2025
|
||||
Submitted: 2026-01-25 (0 days ago)
|
||||
|
||||
⏳ CFW8030265 - Simon Alexander AVERBACH - 17.85 CHF
|
||||
Paediatrician (Outpatient consultations) - Dre Christina Maneff
|
||||
Service date: 02/12/2025
|
||||
Submitted: 2026-01-25 (0 days ago)
|
||||
|
||||
⏳ CFW8030284 - August Winston Chester AVERBACH - 110.90 CHF
|
||||
Paediatrician (Outpatient consultations) - Dre Christina Maneff
|
||||
Service date: 11/12/2025
|
||||
Submitted: 2026-01-25 (0 days ago)
|
||||
|
||||
⏳ CFW8030294 - Sylvia Hannah AVERBACH - 1846.20 CHF
|
||||
Dental Check-up (Dental care) - Centre Dentaire Chêne-Bourg
|
||||
Service date: 30/12/2025
|
||||
Submitted: 2026-01-25 (0 days ago)
|
||||
|
||||
⏳ CFW8030347 - Zev AVERBACH - 600.00 CHF
|
||||
Psychotherapist (Therapists) - Dr. Marc Descombes (Psychotherapy)
|
||||
Service date: 28/10/2025
|
||||
Submitted: 2026-01-25 (0 days ago)
|
||||
|
||||
⏳ CFW8030371 - August Winston Chester AVERBACH - 30.89 CHF
|
||||
G.P office visit (Outpatient consultations) - Dr. FAUNDEZ Tamara
|
||||
Service date: 28/12/2025
|
||||
Submitted: 2026-01-25 (0 days ago)
|
||||
Note: Resubmission of CFW7961722 with itemized invoice
|
||||
|
||||
⏳ CFW8030381 - Abigail AVERBACH - 193.50 CHF
|
||||
Psychologist (Therapists) - Centre Médical Bachet de Pesay
|
||||
Service date: 03/11/2025
|
||||
Submitted: 2026-01-25 (0 days ago)
|
||||
Note: Resubmission of CFW7961735 with proper invoice attachment
|
||||
|
||||
RECENT REIMBURSEMENTS (last 5):
|
||||
✓ CFW7961795 - August Winston Chester AVERBACH - 504.36 CHF
|
||||
Dental Check-up (Dental care) - Dr A. Bérard & Dr T-M. Nguyen & Dr S. Torres
|
||||
Reimbursed on: 2026-01-12 (13 days ago)
|
||||
|
||||
✓ CFW7961782 - Simon Alexander AVERBACH - 226.25 CHF
|
||||
Paediatrician (Outpatient consultations) - Dre Christina Maneff
|
||||
Reimbursed on: 2026-01-10 (15 days ago)
|
||||
|
||||
✓ CFW7961716 - Simon Alexander AVERBACH - 171.47 CHF
|
||||
G.P office visit (Outpatient consultations) - Dr. FAUNDEZ Tamara
|
||||
Reimbursed on: 2026-01-10 (15 days ago)
|
||||
|
||||
✓ CFW7961835 - Sylvia Hannah AVERBACH - 211.95 CHF
|
||||
Dental Check-up (Dental care) - Centre Dentaire Chêne-Bourg
|
||||
Reimbursed on: 2026-01-10 (15 days ago)
|
||||
|
||||
✓ CFW7961866 - Simon Alexander AVERBACH - 311.32 CHF
|
||||
Orthodontic treatment (Dental care) - Centre Dentaire Chêne-Bourg
|
||||
Reimbursed on: 2026-01-10 (15 days ago)
|
||||
```
|
||||
|
||||
**IMPORTANT:**
|
||||
- This is a read-only summary command - no modifications to files
|
||||
- No browser automation required - just parse JSON and format output
|
||||
- Output should be immediate and deterministic
|
||||
- Use clear visual indicators for easy scanning
|
||||
- Highlight items requiring attention
|
||||
|
||||
## Run
|
||||
|
||||
cd ~/.claude/msh-insurance && git pull
|
||||
Reference in New Issue
Block a user