Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/routes/record-vaccinations.js
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,10 @@ module.exports = router => {
const data = req.session.data
const pregnancyDueDate = dateFromYearMonthDay(data.pregnancyDueDate?.year, data.pregnancyDueDate?.month, data.pregnancyDueDate?.day)

if (!pregnancyDueDate) {
return res.render('record-vaccinations/rsv/not-yet-28-weeks-pregnant-warning')
}

// Vaccination date is today
const vaccinationDate = new Date()

Expand All @@ -656,6 +660,10 @@ module.exports = router => {
const data = req.session.data
const pregnancyDueDate = dateFromYearMonthDay(data.pregnancyDueDate?.year, data.pregnancyDueDate?.month, data.pregnancyDueDate?.day)

if (!pregnancyDueDate) {
return res.render('record-vaccinations/pertussis/not-yet-16-weeks-pregnant-warning')
}

// Vaccination date is today
const vaccinationDate = new Date()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@
{% endif %}

{% set panelHtml %}
{% set randomWeeks = (range(1, 15) | random) %}
<p>
{{ displayName }} is
{% if fullWeeksPregnant is defined and fullWeeksPregnant is not none %}
{{ fullWeeksPregnant | plural("week") }}
{% else %}
{{ randomWeeks }} week{{ 's' if randomWeeks > 1 }}
13 weeks
{% endif %}
{% if remainderDaysPregnant is defined and remainderDaysPregnant > 0 %} and {{ remainderDaysPregnant | plural("day") }}{% endif %} pregnant.
</p>
<p>The pertussis vaccine is recommended between 16 and 32 weeks of pregnancy.</p>

<p><a href="https://www.gov.uk/government/publications/vaccination-against-pertussis-whooping-cough-for-pregnant-women/pertussis-whooping-cough-vaccination-programme-for-pregnant-women" target="_blank">UKHSA guidance on pertussis vaccination of pregnant women (opens in new tab)</a>.</p>
<p>Check before going ahead or refer to a prescriber for a patient specific direction (PSD).</p>

{{ button({
"text": "Continue anyway",
Expand All @@ -49,4 +48,3 @@
</div>
</div>
{% endblock %}

Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,19 @@
{% endif %}

{% set panelHtml %}
{% set randomWeeks = (range(1, 27) | random) %}
<p>
{{ displayName }} is
{% if fullWeeksPregnant is defined and fullWeeksPregnant is not none %}
{{ fullWeeksPregnant | plural("week") }}
{% else %}
{{ randomWeeks }} week{{ 's' if randomWeeks > 1 }}
13 weeks
{% endif %}
{% if remainderDaysPregnant is defined and remainderDaysPregnant > 0 %} and {{ remainderDaysPregnant | plural("day") }}{% endif %} pregnant.
</p>

<p>The RSV vaccine is not routinely recommended before 28 weeks of pregnancy.</p>

<p><a href="https://www.gov.uk/government/publications/respiratory-syncytial-virus-rsv-programme-information-for-healthcare-professionals/rsv-vaccination-of-pregnant-women-for-infant-protection-information-for-healthcare-practitioners" target="_blank">UKHSA guidance on RSV vaccination of pregnant women (opens in new tab)</a>.</p>
<p>Check before going ahead or refer to a prescriber for a patient specific direction (PSD).</p>

{{ button({
"text": "Continue anyway",
Expand All @@ -50,4 +49,3 @@
</div>
</div>
{% endblock %}

Loading