Skip to content

Commit b10a485

Browse files
Merge branch 'main' into on-boarding
2 parents 0a8a4a0 + 7e8b2c9 commit b10a485

File tree

103 files changed

+495
-1489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+495
-1489
lines changed

app/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const express = require('express');
33

44
const router = express.Router();
55

6-
require('./routes/vaccinate')(router)
6+
require('./routes/record-vaccinations')(router)
77
require('./routes/regions')(router)
88
require('./routes/user-admin')(router)
99
require('./routes/user-onboarding')(router)

app/routes/find-record.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,26 @@ module.exports = router => {
100100

101101
})
102102

103+
router.post('/records/patient-search', (req, res) => {
104+
const data = req.session.data
105+
const firstName = data.firstName;
106+
const lastName = data.lastName;
107+
const dateOfBirth = data.dateOfBirth;
108+
const postcode = data.postcode;
109+
110+
if (firstName && lastName && dateOfBirth) {
111+
112+
data.patientName = firstName + " " + lastName
113+
data.nhsNumber = '9123456788'
114+
115+
res.redirect('/records/patient-history')
116+
} else {
117+
res.redirect('/records/patient-search')
118+
}
119+
120+
})
121+
122+
103123
router.get('/records/records/:id/:page', (req, res) => {
104124

105125
const id = req.params.id

0 commit comments

Comments
 (0)