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
378 changes: 205 additions & 173 deletions app/models/patient-session.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/models/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export class Session {
/**
* Get consent window
*
* @returns {object} Consent window
* @returns {string} Consent window
*/
get consentWindow() {
return getConsentWindow(this)
Expand Down
4 changes: 2 additions & 2 deletions app/utils/reply.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function getRepliesWithHealthAnswers(replies) {
* Get combined answers to health questions
*
* @param {import('../models.js').PatientSession} patientSession - Patient session
* @returns {object|boolean} Combined answers to health questions
* @returns {object|undefined} Combined answers to health questions
*/
export function getConsentHealthAnswers(patientSession) {
const consentHealthAnswers = {}
Expand All @@ -69,7 +69,7 @@ export function getConsentHealthAnswers(patientSession) {
).filter((reply) => reply.healthAnswers)

if (responsesWithHealthAnswers.length === 0) {
return false
return
}

for (const response of responsesWithHealthAnswers) {
Expand Down
2 changes: 1 addition & 1 deletion app/utils/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { today } from './date.js'
* Get consent window (is it open, opening or closed)
*
* @param {import('../models.js').Session} session - Session
* @returns {object} Consent window key and value
* @returns {string} Consent window key and value
*/
export const getConsentWindow = (session) => {
const nowAt = today()
Expand Down
2 changes: 1 addition & 1 deletion app/views/patient-session/_consent.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}) %}
{# Description #}
{% if not isVaccinated %}
{{ patientSession.consentNotes | nhsukMarkdown }}
{{ patientSession.consentDescription | nhsukMarkdown }}

{% if patientSession.patient.lastReminderDate %}
{{ patientSession.patient.formatted.lastReminderDate | nhsukMarkdown }}
Expand Down
2 changes: 1 addition & 1 deletion app/views/patient-session/_register.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
headingSize: "m"
}) %}
{# Description #}
{{ patientSession.registerNotes | nhsukMarkdown }}
{{ patientSession.registerDescription | nhsukMarkdown }}

{# Actions #}
{% if patientSession.register == RegistrationOutcome.Pending %}
Expand Down
2 changes: 1 addition & 1 deletion app/views/patient-session/_report.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
headingSize: "m"
}) %}
{# Description #}
{{ patientSession.reportNotes | nhsukMarkdown }}
{{ patientSession.reportDescription | nhsukMarkdown }}

{# Decision table #}
{% set vaccinationRows = [] %}
Expand Down
2 changes: 1 addition & 1 deletion app/views/patient-session/_triage.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
headingSize: "m"
}) %}
{# Description #}
{{ patientSession.screenNotes | nhsukMarkdown }}
{{ patientSession.screenDescription | nhsukMarkdown }}

{# Actions #}
{{ actionLink({
Expand Down