-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
priority:highAddress soonAddress soonscope:intelligenceIntelligence (Python AI/ML)Intelligence (Python AI/ML)type:featureNew feature or enhancementNew feature or enhancement
Description
Note for implementers: The design outlined here is a guideline, not a strict specification. Feel free to pivot from the suggested approach if you discover a better solution during implementation. Update the issue with your rationale when deviating significantly.
Summary
Match procedures to payer policies and load criteria for evidence extraction.
Context
- Existing code:
apps/intelligence/src/policies/example_policy.pydefines the expected policy structure - Analyze endpoint: has hardcoded
SUPPORTED_PROCEDURE_CODESbut no policy loading - Gap: No mechanism to match (procedure_code, payer_id) to a specific policy
Dependencies
| Issue | Relationship |
|---|---|
| #5 | Blocked by - need procedure/payer selection |
| #6, #7 | Unblocks - policy criteria feed into LLM prompts |
Policy Structure
{
"policy_id": "string",
"procedure_codes": ["CPT codes"],
"criteria": [
{
"id": "criterion_id",
"description": "Human-readable description",
"evidence_patterns": ["regex patterns"],
"required": bool
}
],
"form_field_mappings": {
"pdf_field_name": "data_field_identifier"
}
}Tasks
Phase 1: Policy Module Infrastructure
- Create
PolicyRegistryclass - Implement
get_policy(procedure_code, payer_id) -> Policy | None - Add
PolicyPydantic model
Phase 2: Integrate with Analyze Endpoint
- Add optional
payer_idtoAnalyzeRequest - Replace hardcoded procedure codes with registry lookup
- Pass loaded policy to evidence extraction
Phase 3: Demo Policy (after #5)
- Create concrete policy for selected procedure/payer
- Add unit tests
Files
| File | Action |
|---|---|
apps/intelligence/src/policies/registry.py |
Create |
apps/intelligence/src/policies/models.py |
Create |
apps/intelligence/src/api/analyze.py |
Modify |
Design References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority:highAddress soonAddress soonscope:intelligenceIntelligence (Python AI/ML)Intelligence (Python AI/ML)type:featureNew feature or enhancementNew feature or enhancement
Type
Projects
Status
Todo