محاسبهٔ دیه — Calculate blood money (دیه)
calculate_diyehCalculate دیه for a bodily injury using the CURRENT official rate and the fractions set by قانون مجازات اسلامی. ALWAYS use this instead of computing دیه yourself: the full-دیه rate changes every Persian year and the per-injury fractions are statutory. Returns the amount with the governing article and the official rate source.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | Persian year (e.g. 1405). Defaults to the latest loaded rate. | |
| count | No | How many (fingers, teeth …). Default 1. | |
| gender | No | Gender of the injured/deceased. | |
| fraction | No | دیه fraction between 0 and 1 — only when no injury_type fits. | |
| death_date | No | Jalali date of death when it differs from the act. | |
| injury_type | No | Injury key from the standard list (e.g. full = دیهٔ کامل, hand_one = یک دست, tooth_front = دندان جلویی). Pick the key, not free text. | |
| sacred_month | No | Only when no date is known: the act AND the death were in a ماه حرام (تغلیظ — a death, injury_type=full, only; ماده ۵۵۷). | |
| incident_date | No | Jalali date of the act, e.g. 1405/09/25 — the ماه حرام is derived from the official Hijri calendar (ماده ۵۵۵). |