Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new code snippet component #76

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
78ee6d8
Merge pull request #2 from NHSDigital/main
mark-r-bjss Oct 10, 2024
1bf442b
Added mention of 'message cascades' in routing plan content for 'para…
jakecosgrove Oct 10, 2024
99dd075
'or' replaced with 'and'
jakecosgrove Oct 11, 2024
fab3891
Merge pull request #8 from NHSDigital/routing-plans-content-changes
jakecosgrove Oct 11, 2024
abf8c0a
Message status page created
jakecosgrove Oct 14, 2024
dc21528
Emma 2i requested changes
jakecosgrove Oct 15, 2024
9378e54
Merge pull request #9 from NHSDigital/message-status-content
jakecosgrove Oct 15, 2024
4c473d4
Added /using-nhs-notify/nhs-app-templates, /using-nhs-notify/email-te…
emmagifford Oct 16, 2024
e58b908
Merge pull request #10 from NHSDigital/Creating-templates-and-persona…
jakecosgrove Oct 17, 2024
ca7e65e
Removed mention of bank holidays from emails and text message deliver…
jakecosgrove Oct 22, 2024
640d617
Merge pull request #11 from NHSDigital/delivery-times-and-links
jakecosgrove Oct 22, 2024
df7581d
Removed unnecessary bullets and headings anchor links in Text message…
emmagifford Oct 23, 2024
1a516af
Fixed typo in /text-message-templates. Removed 'Creating...' from lin…
emmagifford Oct 23, 2024
cd938e8
Updated names of Word docs to replace spaces with hyphens and make al…
emmagifford Oct 23, 2024
019e3b6
Removed unnecessary space from line 26 on docs/pages/using-nhs-notify…
emmagifford Oct 24, 2024
2bbf678
Merge pull request #12 from NHSDigital/Changes-following-Jake's-review
jakecosgrove Oct 24, 2024
d58cb55
Update accept.txt
jakecosgrove Oct 28, 2024
a1763dd
Merge pull request #14 from NHSDigital/jakecosgrove-language-usage-pa…
jakecosgrove Oct 28, 2024
7f8fb85
In /using-nhs-notify/delivery-times#letters, replaced the sentence 'O…
emmagifford Nov 4, 2024
c5e0fbf
Merge pull request #16 from NHSDigital/Letter-delivery-times-update
jakecosgrove Nov 4, 2024
fa9592a
Added content on what users need to do in order to use recipient cont…
jakecosgrove Nov 5, 2024
d099cf4
Emma recommendations
jakecosgrove Nov 5, 2024
eff75cd
Merge pull request #17 from NHSDigital/PDS-override-content
jakecosgrove Nov 5, 2024
f1798de
Merge remote-tracking branch 'upstream/main' into update-from-upstream
RossBugginsNHS Nov 5, 2024
4a1ba6f
Merge pull request #19 from NHSDigital/update-from-upstream
RossBugginsNHS Nov 5, 2024
dba7c44
Removed address_line_x, clientRef, recipientContactValue and template…
emmagifford Nov 11, 2024
0229360
In /workspaces/nhs-notify-web-cms-dev/docs/_sass/_nhsnotify.scss I ad…
emmagifford Nov 11, 2024
1c54ab4
Merge pull request #22 from NHSDigital/PDS-personalisation-fields-update
jakecosgrove Nov 22, 2024
c328369
Removed mentions of date of birth from failed message status descript…
jakecosgrove Dec 3, 2024
2f7854a
Added link to NHS Notify MESH documentation in /using-nhs-notify/mesh
jakecosgrove Dec 3, 2024
4b271f9
Squashed commit of the following:
RossBugginsNHS Dec 3, 2024
f6b4bf8
Changed first subheading to a h2 from h3
jakecosgrove Dec 3, 2024
5df29ed
Merge pull request #24 from NHSDigital/CCM-7534-CMS-Phase-1-rb-002
jakecosgrove Dec 6, 2024
28fe20e
Removed other phase-banner tests
jakecosgrove Dec 13, 2024
6495c3d
Removed the other phase banners from Ross' test
jakecosgrove Dec 13, 2024
c80fe0a
Merge pull request #25 from NHSDigital/Phase-banner-quick-fix
jakecosgrove Dec 13, 2024
49ec18d
Merge remote-tracking branch 'upstream/main'
RossBugginsNHS Dec 13, 2024
a4b2378
Merge pull request #26 from NHSDigital/robu6/2024-12-13/merge-in-upst…
RossBugginsNHS Dec 13, 2024
57b803c
removed phase banner includes due to component not being tested or re…
jakecosgrove Dec 16, 2024
bd1c4aa
Merge pull request #27 from NHSDigital/hide-phase-banner
jakecosgrove Dec 16, 2024
c2bdb26
First commit
alexcolbeck1 Dec 17, 2024
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
5 changes: 3 additions & 2 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ GEM
rbs (>= 3, < 4)
sorbet-runtime (>= 0.5.10782)
safe_yaml (1.0.5)
sass-embedded (1.69.5-arm64-darwin)
sass-embedded (1.69.5)
google-protobuf (~> 3.23)
sass-embedded (1.69.5-x86_64-linux-gnu)
rake (>= 13.0.0)
sass-embedded (1.69.5-arm64-darwin)
google-protobuf (~> 3.23)
sorbet-runtime (0.5.11466)
strscan (3.1.0)
Expand Down
6 changes: 6 additions & 0 deletions docs/_includes/components/code-snippet.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="nhsnotify-code-snippet">
<span class="nhsuk-u-visually-hidden">Code snippet:</span>
<code>
{{ include.text | markdownify }}
</code>
</div>
14 changes: 14 additions & 0 deletions docs/_includes/components/phase-banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="nhsuk-phase-banner" id="{{include.phase_id}}">
<div class="nhsuk-width-container">
<p class="nhsuk-phase-banner__content">
<strong class="nhsuk-tag">{{include.phase_tag}}</strong>
<span class="nhsuk-phase-banner__text">{{include.phase_text}}</span>
</p>
</div>
</div>
<script>
console.log("{{include.auto_hide}}")
if ("{{include.auto_hide}}" == 'true' && (window.location.hostname.startsWith('notify.nhs.uk') || window.location.hostname.startsWith('127.0.0.2'))) {
document.getElementById("{{ include.phase_id }}").style.visibility = 'hidden';
}
</script>
36 changes: 36 additions & 0 deletions docs/_layouts/no-nav-page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
layout: default
---

{% assign current_dir = page.dir %}
{% assign paths = page.dir | split: "/" %}
{% assign parent_dir = paths[1] %}

{%-
assign nav_pages = site.pages
| where_exp: "item", "item.dir contains parent_dir"
-%}

{% assign first_level_dir = parent_dir | prepend: '/' | append: '/' %}
{%-
assign first_level = nav_pages
| where_exp: "item", "item.dir == first_level_dir"
| group_by: "section"
| sort: 'name', 'last'
-%}

<div class="nhsuk-width-container">
<main class="nhsuk-main-wrapper" id="maincontent" role="main">
<div class="nhsuk-grid-row">
<div class="nhsuk-grid-column-full">
<div class="nhsnotify-pane__main-content nhsuk-grid-column-three-quarters">
{% if page.section != undefined %}
<heading class="nhsuk-heading-s" style="margin-bottom: 0; color: #4c6272">{{ page.section }}</heading>
{% endif %}
<h1>{{ page.title }}</h1>
{{ content }}
</div>
</div>
</div>
</main>
</div>
30 changes: 15 additions & 15 deletions docs/_layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
---

{% assign current_dir = page.dir %}
{% assign paths = page.dir | split: "/" %}
{% assign paths = page.dir | split: "/" %}
{% assign parent_dir = paths[1] %}

{%-
assign nav_pages = site.pages
| where_exp: "item", "item.dir contains parent_dir"
assign nav_pages = site.pages
| where_exp: "item", "item.dir contains parent_dir"
-%}

{% assign first_level_dir = parent_dir | prepend: '/' | append: '/' %}
{%-
assign first_level = nav_pages
| where_exp: "item", "item.dir == first_level_dir"
| group_by: "section"
| sort: 'name', 'last'
assign first_level = nav_pages
| where_exp: "item", "item.dir == first_level_dir"
| group_by: "section"
| sort: 'name', 'last'
-%}
<div class="nhsuk-width-container">
<main class="nhsuk-main-wrapper" id="maincontent" role="main">
Expand All @@ -26,21 +26,21 @@
<div class="nhsnotify-pane__side-bar nhsuk-grid-column-one-quarter">
<nav class="nhsnotify-side-nav">
<ul class="nhsuk-list nhsnotify-side-nav__list">
{% for section in first_level %}
{% for section in first_level %}
{% if section.name != "" %}
<p class="nhsuk-u-font-weight-bold nhsnotify-side-nav__list-section">{{ section.name }}</p>
<p class="nhsuk-u-font-weight-bold nhsnotify-side-nav__list-section">{{ section.name }}</p>
{% endif %}
{% assign sorted = section.items | sort: 'nav_order' %}
{% for post in sorted %}
<li class="
{% assign sorted = section.items | sort: 'nav_order' %}
{% for post in sorted %}
<li class="
nhsnotify-side-nav__item
{% if post.url == page.url %}
nhsnotify-side-nav__item--current
{% endif %}
">
<a class="nhsnotify-side-nav__link" href="{{ site.baseurl | append: post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
<a class="nhsnotify-side-nav__link" href="{{ site.baseurl | append: post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
{% endfor %}
</ul>

Expand Down
49 changes: 45 additions & 4 deletions docs/_sass/_nhsnotify.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
width: unset;
background-color: unset;
border-bottom: 0;
margin:unset;
margin: unset;
}

.nhsnotify-banner--blue {
Expand Down Expand Up @@ -68,13 +68,54 @@
}

.nhsuk-header__navigation-list {
justify-content: flex-start;
justify-content: flex-centre;
}

.nhsuk-header__navigation-link {
text-decoration: none;
text-decoration: underline;

&:hover {
text-decoration: underline;
text-decoration: none;
}
}

.nhsuk-phase-banner {
padding-top: 10px;
padding-bottom: 10px;
background-color: #fff;
}

.nhsuk-phase-banner__content {
font-size: 1rem;
line-height: 1.25;
margin-bottom: 0px;
}

.nhsuk-tag {
outline: 2px solid transparent;
outline-offset: -2px;
color: #fff;
background-color: #005eb8;
letter-spacing: 1px;
text-decoration: none;
text-transform: uppercase;
font-weight: 700;
}

.nhsuk-phase-banner__text {
font-size: 1rem;
line-height: 1.25;
padding-left: 0.5em;
}

.nhsnotify-code-snippet {
background-color: $color_nhsuk-white;
border: 1px solid $nhsuk-border-color;
padding: 24px;
margin: 12px 0 48px 0;

:last-child{
margin-bottom: 0;
padding-bottom: 0;
}
}
2 changes: 1 addition & 1 deletion docs/pages/get-started/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Feel free to add content and custom Front Matter to this file.
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults

layout: page
layout: no-nav-page
title: Get started
nav_order: 6
has_children: true
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/support/support.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Feel free to add content and custom Front Matter to this file.
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults

layout: page
layout: no-nav-page
title: Support
nav_order: 5
has_children: true
Expand Down
9 changes: 8 additions & 1 deletion docs/pages/using-nhs-notify/delivery-times.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ section: Sending a message

It can take different amounts of time for messages to be delivered depending on the message channel.

Find out about delivery times for:

- [NHS App messages](#nhs-app-messages)<!-- markdownlint-disable-line -->
- [emails](#emails)
- [text messages](#text-messages-sms)
- [letters](#letters)

## NHS App messages

NHS Notify can send NHS App messages to recipients with the NHS App at any time.
Expand Down Expand Up @@ -42,7 +49,7 @@ NHS Notify will only send text messages from 8am to 6pm on weekdays.

## Letters

Once your letter has been sent, it can take up to 6 days for it to be processed by our suppliers before it's dispatched.
Once you've [provided us with recipients' NHS numbers]({% link pages/using-nhs-notify/tell-us-who-you-want-to-message.md %}), it can take up to 2 working days for our suppliers to dispatch your letter.

First class letters are delivered 1 to 2 business days after they’re dispatched.

Expand Down
2 changes: 2 additions & 0 deletions docs/pages/using-nhs-notify/mesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ You should only use MESH to send messages if your organisation or service:
- only needs to send batches of messages to specific groups of recipients
- does not need advanced features offered by NHS Notify API

[Read our MESH documentation (opens in a new tab)](https://digital.nhs.uk/developer/api-catalogue/nhs-notify-mesh).

Check if MESH is right for you by contacting our engagement team at <[email protected]>.
1 change: 0 additions & 1 deletion docs/pages/using-nhs-notify/message-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ Messages and channels that have not reached a recipient will have a 'failed' sta
| The provider could not deliver the message. |
| There was an unexpected error while sending the letter to our printing provider. |
| PDS - patient record invalidated. |
| PDS response date of birth does not match given date of birth. |
| PDS - patient is formally dead. |
| PDS - patient is informally dead. |
| PDS - patient has an exit code. |
Expand Down
39 changes: 11 additions & 28 deletions docs/pages/using-nhs-notify/personalisation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,69 +15,52 @@ You can send personalised messages using a single template.
To personalise a message, use double brackets to add a placeholder to your content. For example:

{% include components/inset-text.html
text='<code>Hello ((firstName)), your NHS Number is ((nhsNumber))'
text='Hello ((firstName)), your NHS Number is ((nhsNumber))'
%}

### Personal Demographics Service (PDS) personalisation fields
## Personal Demographics Service (PDS) personalisation fields

NHS Notify uses the [Personal Demographics Service (PDS)](https://digital.nhs.uk/services/personal-demographics-service) to find and populate certain personalisation fields. You only need to [provide us with recipients' NHS numbers]({% link pages/using-nhs-notify/tell-us-who-you-want-to-message.md %}).
NHS Notify uses the [Personal Demographics Service (PDS)](https://digital.nhs.uk/services/personal-demographics-service) to find and populate certain personalisation fields for each recipient. This happens automatically when you [tell us who you want to message]({% link pages/using-nhs-notify/tell-us-who-you-want-to-message.md %}) using recipients' NHS numbers.

The personalisation fields available in PDS are:
You can use the following PDS personalisation fields in your templates:

- fullName
- firstName
- middleNames
- lastName
- namePrefix
- nameSuffix
- address_line_1
- address_line_2
- address_line_3
- address_line_4
- address_line_5
- address_line_6
- address_line_7
- nhsNumber
- date
- clientRef
- recipientContactValue
- template

The placeholders in your content need to match the PDS personalisation fields.
Any placeholders in your content need to match the PDS personalisation fields.

## Providing your own personalisation data

You can provide your own personalisation data.

Do not send us personalisation data that's already available in PDS. We'll use the PDS data over your own data in this case.

### If you're using the API
### If you're using NHS Notify API

Include a personalisation block in your API request.

For example, if you wanted to include 'practice' as a personalisation field, the personalisation block would be:

{% include components/inset-text.html
text='{

"practice": "PRACTICE_NAME",

}'
{% include components/code-snippet.html
text='"practice": "PRACTICE_NAME"'
%}

Read the [API documentation](https://digital.nhs.uk/developer/api-catalogue/nhs-notify#post-/v1/message-batches) to find out where to put this in your request.

### If you're using the Message Exchange for Social Care and Health (MESH)
### If you're using NHS Notify MESH

Include the personalisation fields as columns in your CSV file.

The column names should start with 'personalisation_', followed by the same wording as the placeholders in your template.
The column names should start with 'personalisation\_', followed by the same wording as the placeholders in your template.

For example, if you wanted to include 'practice' as a personalisation field, the column name would be:

{% include components/inset-text.html
text='nhsNumber,requestItemRefId,dateOfBirth,personalisation_practice'
text='nhsNumber,requestItemRefId,personalisation_practice'
%}

*[PDS]: Personal Demographics Service
*[MESH]: Message Exchange for Social Care and Health
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ The onboarding team will give you an example CSV file on request.

Use the format shown in the
<a href="https://digital.nhs.uk/developer/api-catalogue/nhs-notify" target="_blank">API documentation (opens in a new tab)</a>.

## Providing your own recipient contact details

If you need to use contact details that are not from PDS, you must make a formal request to NHS Notify.
Overriding contact details is only granted to specific use cases that provide compelling data to our onboarding team. NHS Notify will consult with relevant NHS England legal and clinical teams for approval.