Skip to content

Comments

feat: Add full cost_class details per intervention to get_places_costs() output (SNT-225)#40

Open
bramj wants to merge 1 commit intomainfrom
SNT-225-second-attempt
Open

feat: Add full cost_class details per intervention to get_places_costs() output (SNT-225)#40
bramj wants to merge 1 commit intomainfrom
SNT-225-second-attempt

Conversation

@bramj
Copy link
Contributor

@bramj bramj commented Feb 20, 2026

Improvement over the first attempt (#38)

We basically add the full cost breakdown per OU to the payload, giving us full flexibility to display filtered graphs:

{
    "place": 1071,
    "total_cost": 238501.72710000005,
    "interventions": [
        {
            "type": "R21",
            "code": "vacc",
            "total_cost": 238501.72710000005,
            # Additional payload:
            "cost_breakdown": [
                {"cost_class": "Operational", "cost": 12822.6735},
                {"cost_class": "Procurement", "cost": 225679.05360000004},
            ],
        }
    ],
}

@bramj bramj force-pushed the SNT-225-second-attempt branch from 63b6aa1 to 73531dc Compare February 20, 2026 20:45
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.

1 participant