{% extends "base.html" %} {% import "cycle/_head.html" as cy with context %} {% block title %}Cycle history{% endblock %} {% block head %}{{ cy.assets() }}{% endblock %} {% block main_attrs %} data-norefresh{% endblock %} {# Tiles, every period (views.history), and a summary for a doctor: the last 12 months, printable on its own (Print → only that card, light, see @media print in cycle.css). #} {% macro dm(d) %}{{ d.day }} {{ d.strftime("%b") }}{% endmacro %} {% macro dmy(d) %}{{ d.day }} {{ d.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 %} {% set d = v.doctor %} {% block page %} {{ cy.head("History", "cycle", True, "/cycle/history") }}
{{ cy.side(now) }}
{% if not v.rows %}
Nothing logged yet. Mark your period days in the calendar; the history fills in from there.
{% else %}
Usual cycle{{ v.stats.cycle }} days{{ ("range " ~ rng(v.cycle_range)) if v.cycle_range else "from Settings until two periods are logged" }}
Usual period{{ v.stats.period }} daysaverage, recent periods count most
Last period{{ dm(v.last.start) }}{{ (v.today - v.last.start).days }} days ago
Tracked{{ v.rows | length }} period{{ "s" if v.rows | length != 1 }}{{ v.tracked }} full cycle{{ "s" if v.tracked != 1 }}

For your doctor {{ dmy(d.since) }} – {{ dmy(d.today) }}

Every logged day (CSV)
First day of last period
{{ dmy(d.last) if d.last else "—" }}
Cycle length
{% if d.cycle %}{{ d.cycle }} days on average · {{ rng(d.cycle_range) }}{% else %}not enough data yet{% endif %}
Period length
{% if d.period %}{{ d.period }} days on average · {{ rng(d.period_range) }}{% else %}not enough data yet{% endif %}
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 %}
{% if d.flags %}

Worth mentioning

    {% for f in d.flags %}
  • {{ f }}
  • {% endfor %}
{% else %}

Nothing unusual by the common guidelines (cycles 21–35 days, periods up to 7 days, no spotting between periods, …).

{% endif %}

From self-logged data; general guidance, not a diagnosis.

{% macro pager() %}{% if pages > 1 %} {% endif %}{% endmacro %}

Every period {{ v.rows | length }}{% if pages > 1 %} · {{ (pg - 1) * 12 + 1 }}–{{ (pg - 1) * 12 + rows | length }}{% endif %}

{{ pager() }}
{% for h in rows %} {% endfor %}
StartedPeriodCycleHeaviest flowStrongest pain
{{ h.start.strftime("%a") }} {{ dm(h.start) }}{{ " " ~ h.start.year if h.start.year != v.today.year }}{% for y in h.sources %} {{ y.g }}{% endfor %} {{ "going on" if h.going else (h.days ~ " days") }} {% if h.cycle and h.cycle > 60 %}{{ h.cycle }} days · gap?{% else %}{{ (h.cycle ~ " days") if h.cycle else "—" }}{% endif %} {{ h.flow or "—" }} {{ (h.pain ~ " / 5") if h.pain else "—" }}
{% if pages > 1 %}
{{ pager() }}
{% endif %}
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}