Skip to content

Commit a957764

Browse files
Fix follow-up request logic
1 parent f42b2fd commit a957764

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

app/controllers/reply.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,18 +379,22 @@ export const replyController = {
379379
{
380380
child: patientSession.patient,
381381
parent: reply.parent,
382-
patient_uuid: patientSession.patient.uuid,
383-
session_id: patientSession.session.id,
384-
programme_id: patientSession.programme.id,
382+
patient_uuid: patientSession.patient_uuid,
383+
session_id: patientSession.session_id,
384+
programme_id: patientSession.programme_id,
385385
method: ReplyMethod.Phone
386386
},
387387
data.wizard
388388
)
389389

390+
const createdReply = new Reply(newReply, data)
391+
390392
// Clean up session data
391393
delete data.decision
392394

393-
response.redirect(`${newReply.uri}/new/decision?referrer=${reply.uri}`)
395+
response.redirect(
396+
`${createdReply.uri}/new/decision?referrer=${reply.uri}`
397+
)
394398
}
395399
},
396400

app/views/reply/show.njk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
}, {
1414
text: reply.session.location.name,
1515
href: reply.session.uri
16-
}, {
17-
text: __("session.consent.label"),
18-
href: reply.session.uri + "/consent"
1916
}, {
2017
text: reply.patient.fullName,
2118
href: reply.session.uri + "/patients/" + reply.patient.nhsn + "/" + reply.programme.id

0 commit comments

Comments
 (0)