{# Health ▸ report: the cycle tracker's part (the same summary as History ▸ For your doctor, always its last 12 months). Uses the report's .rp-* styles. #} {% macro dmy(x) %}{{ x.day }} {{ x.strftime("%b %Y") }}{% endmacro %} {% macro rng(r, unit="days") %}{% if r %}{% if r[0] == r[1] %}{{ r[0] }}{% else %}{{ r[0] }}–{{ r[1] }}{% endif %} {{ unit }}{% else %}—{% endif %}{% endmacro %}

Menstrual cycle self-logged, {{ dmy(d.since) }} – {{ dmy(d.today) }}

{% if not has %}

Nothing logged yet.

{% else %}
Last period{{ ("started " ~ dmy(d.last)) if d.last else "—" }}
Cycle length{% if d.cycle %}{{ d.cycle }} days{% else %}—{% endif %}{% if d.cycle %}range {{ rng(d.cycle_range) }}{% else %}not enough data yet{% endif %} (typical 21–35)
Period length{% if d.period %}{{ d.period }} days{% else %}—{% endif %}{% if d.period %}range {{ rng(d.period_range) }}{% endif %} (typical up to 7)
Periods logged{{ d.periods }}
Pain{% if d.pain_days %}on {{ d.pain_days }} day{{ "s" if d.pain_days != 1 }}, {{ d.pain_avg }} / 5 on average{% else %}none logged{% endif %}
Most common{% if d.symptoms %}{% for name, n in d.symptoms %}{{ name }} ({{ n }}×){{ ", " if not loop.last }}{% endfor %}{% else %}no symptoms logged{% endif %}
{% endif %}