Skip to content

Commit bf5de8c

Browse files
Show PDS lookup used to find a child’s NHS number
1 parent d580baa commit bf5de8c

6 files changed

Lines changed: 89 additions & 4 deletions

File tree

app/assets/stylesheets/components/_timeline.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ $_timeline-border-width: 2px;
9696
margin-bottom: 0;
9797

9898
@include nhsuk-font-size(19);
99+
100+
&.nhsuk-u-font-weight-bold .app-u-monospace {
101+
font-weight: inherit;
102+
}
99103
}
100104

101105
&__content {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.app-u-monospace {
22
font-family: ui-monospace, monospace;
33
font-weight: 450;
4+
word-spacing: -0.25em;
45
}

app/locales/en.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,13 @@ export const en = {
823823
events: {
824824
title: 'Activity log'
825825
},
826+
pds: {
827+
title: 'NHS number lookup history',
828+
description:
829+
'The following timeline shows how this child’s NHS number was found by searching the NHS Patient Demographics Service (PDS)',
830+
details:
831+
'A fuzzy search finds text that matches a term closely as well as exactly. For example, a fuzzy search can identify Jon Smith even if the term entered was John Smith.\n\nA wildcard searches for unknown parts of text. For example, if you only have part of a postcode: CV1, you can use a wildcard to search all records with a postcode that includes CV1.\n\nHistory refers to the child’s history, for example if they have changed their name or address.'
832+
},
826833
lastReminderDate: {
827834
label: 'Last reminder sent'
828835
},

app/views/_macros/timeline.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
</svg>
1515
{% endif %}
1616
<div class="app-timeline__content">
17-
<h{{ headingLevel }} class="app-timeline__header {{ headingBold }}">{{ item.headingText }}</h{{ headingLevel }}>
17+
<h{{ headingLevel }} class="app-timeline__header {{ headingBold }}">{{ item.headingText | safe }}</h{{ headingLevel }}>
1818
{% if item.description %}
19-
<p class="app-timeline__description">{{ item.description }}</p>
19+
<p class="app-timeline__description">{{ item.description | safe }}</p>
2020
{% endif %}
2121
{% if item.html %}
2222
{{ item.html | safe | trim }}

app/views/patient/pds.njk

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{% extends "_layouts/default.njk" %}
2+
3+
{% set title = __("patient.pds.title") %}
4+
5+
{% block beforeContent %}
6+
{{ breadcrumb({
7+
items: [{
8+
text: __("home.show.title"),
9+
href: "/"
10+
}, {
11+
text: __("patient.list.title"),
12+
href: "/patients"
13+
}, {
14+
text: patient.fullName,
15+
href: patient.uri
16+
}]
17+
}) }}
18+
{% endblock %}
19+
20+
{% block content %}
21+
<div class="nhsuk-grid-row">
22+
<div class="nhsuk-grid-column-two-thirds">
23+
{{ super() }}
24+
25+
{{ appHeading({
26+
caption: patient.fullName,
27+
title: title
28+
}) }}
29+
30+
{{ __("patient.pds.description") | nhsukMarkdown }}
31+
32+
{{ appTimeline({
33+
items: [{
34+
isPastItem: true,
35+
headingText: "Non-fuzzy search (with history)",
36+
description: "No matches found."
37+
}, {
38+
isPastItem: true,
39+
headingText: "Non-fuzzy search (with history and wildcard postcode)",
40+
description: "Found " + patient.formatted.nhsn
41+
}, {
42+
isPastItem: true,
43+
headingText: "Non-fuzzy search (with history, wildcard postcode and wildcard forename)",
44+
description: "Found " + patient.formatted.nhsn | replace("999", "908")
45+
}, {
46+
isPastItem: true,
47+
headingText: "Non-fuzzy search (with history, wildcard postcode and wildcard surname)",
48+
description: "Found " + patient.formatted.nhsn
49+
}, {
50+
isPastItem: true,
51+
headingText: "Fuzzy search (without history)",
52+
description: "Found " + patient.formatted.nhsn
53+
}, {
54+
active: true,
55+
headingText: "NHS number is " + patient.formatted.nhsn,
56+
description: today
57+
}]
58+
}) }}
59+
60+
{{ appHeading({
61+
level: 2,
62+
size: "m",
63+
title: "Expressions used in this lookup"
64+
}) }}
65+
66+
{{ __("patient.pds.details") | nhsukMarkdown }}
67+
</div>
68+
</div>
69+
{% endblock %}

app/views/patient/show.njk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@
4343
rows: summaryRows(patient, {
4444
nhsn: {
4545
changeLabel: "the child’s NHS number",
46-
href: patient.uri + "/edit/nhsn" if patient.hasMissingNhsNumber
47-
},
46+
href: patient.uri + "/edit/nhsn"
47+
} if patient.hasMissingNhsNumber,
48+
nhsn: {
49+
changeText: "PDS history",
50+
href: patient.uri + "/pds"
51+
} if not patient.hasMissingNhsNumber,
4852
archiveReason: {
4953
other: archiveReasonOther
5054
},

0 commit comments

Comments
 (0)