Skip to content

Commit 949c8e1

Browse files
authored
Feature/syn 776 (#133)
* Added more information regarding modularised content * Text update * Moved health aspects in to a details/summary element * Removed old list of health aspects * Added information on the Schema page types
1 parent 2b5a6b5 commit 949c8e1

1 file changed

Lines changed: 85 additions & 32 deletions

File tree

specification/nhs-website-content-api.yaml

Lines changed: 85 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -72,45 +72,98 @@ info:
7272
7373
We create modules by adding labels (health aspects) to sections of content on our web pages. For example, on our medical condition pages we have labels (health aspects) for sections on "Overview", "Symptoms", "Treatments", "Causes" and more. These labels (health aspects) are based on international standards for structured data from [Schema.org](https://schema.org/HealthAspectEnumeration). Before being made available, each module is checked by our clinical team to make sure it remains accurate and safe to use in isolation.
7474
75-
Here are the 31 health aspects that we currently have available for modularisation, in order of frequency of use:
76-
77-
* OverviewHealthAspect
78-
* SymptomsHealthAspect
79-
* TreatmentsHealthAspect
80-
* CausesHealthAspect
81-
* MedicalHelpNonurgentHealthAspect
82-
* SelfCareHealthAspect
83-
* MedicalHelpUrgentHealthAspect
84-
* MedicalHelpEmergencyHealthAspect
85-
* DiagnosisHealthAspect
86-
* PreventionHealthAspect
87-
* SideEffectsHealthAspect
88-
* LivingWithHealthAspect
89-
* SuitabilityHealthAspect
90-
* InteractionsHealthAspect
91-
* UsageOrScheduleHealthAspect
92-
* PregnancyHealthAspect
93-
* RisksOrComplicationsHealthAspect
94-
* PrognosisHealthAspect
95-
* BenefitsHealthAspect
96-
* ContagiousnessHealthAspect
97-
* WhatHappensHealthAspect
98-
* PreparationHealthAspect
99-
* ResultsHealthAspect
100-
* TypesHealthAspect
101-
* ContraindicationsHealthAspect
102-
* GettingAccessHealthAspect
103-
* WarningHealthAspect
104-
* EffectivenessHealthAspect
105-
* HowItWorksHealthAspect
106-
* IngredientsHealthAspect
75+
<div class="nhsd-m-expander" style="margin-bottom: 1rem;">
76+
<details>
77+
<summary class="nhsd-m-expander__heading-container" aria-label="List of health aspects" >
78+
<div>
79+
<span class="nhsd-m-expander__icon nhsd-!t-margin-right-1">
80+
<span class="nhsd-a-icon nhsd-a-icon--size-xs" style="margin: 0;">
81+
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" focusable="false" viewBox="0 0 16 16">
82+
<path d="M12,8l-6.5,7L4,13.5L9.2,8L4,2.5L5.5,1L12,8z"/>
83+
</svg>
84+
</span>
85+
</span>
86+
<p class="nhsd-m-expander__heading nhsd-t-body">List of health aspects</p>
87+
</div>
88+
</summary>
89+
<div class="nhsd-m-expander__content-container">
90+
<p>Here are the 31 health aspects that we currently have available for modularisation, in order of frequency of use:</p>
91+
<ul>
92+
<li>OverviewHealthAspect</li>
93+
<li>SymptomsHealthAspect</li>
94+
<li>TreatmentsHealthAspect</li>
95+
<li>CausesHealthAspect</li>
96+
<li>MedicalHelpNonurgentHealthAspect</li>
97+
<li>SelfCareHealthAspect</li>
98+
<li>MedicalHelpUrgentHealthAspect</li>
99+
<li>MedicalHelpEmergencyHealthAspect</li>
100+
<li>DiagnosisHealthAspect</li>
101+
<li>PreventionHealthAspect</li>
102+
<li>SideEffectsHealthAspect</li>
103+
<li>LivingWithHealthAspect</li>
104+
<li>SuitabilityHealthAspect</li>
105+
<li>InteractionsHealthAspect</li>
106+
<li>UsageOrScheduleHealthAspect</li>
107+
<li>PregnancyHealthAspect</li>
108+
<li>RisksOrComplicationsHealthAspect</li>
109+
<li>PrognosisHealthAspect</li>
110+
<li>BenefitsHealthAspect</li>
111+
<li>ContagiousnessHealthAspect</li>
112+
<li>WhatHappensHealthAspect</li>
113+
<li>PreparationHealthAspect</li>
114+
<li>ResultsHealthAspect</li>
115+
<li>TypesHealthAspect</li>
116+
<li>ContraindicationsHealthAspect</li>
117+
<li>GettingAccessHealthAspect</li>
118+
<li>WarningHealthAspect</li>
119+
<li>EffectivenessHealthAspect</li>
120+
<li>HowItWorksHealthAspect</li>
121+
<li>IngredientsHealthAspect</li>
122+
</ul>
123+
</div>
124+
</details>
125+
</div>
107126
108127
### Getting modularised content
109128
110129
To get modularised content, you can use the boolean `modules` query parameter in the [conditions/*](#get-/conditions/*) and [medicines/*](#get-/medicines/*) endpoints. This will return the modularised version of the page (if there is one). If the requested page has not been modularised, the full page will be returned.
111130
112131
You can get a list of which pages have (and have not) been modularised and which health aspects they contain by calling the `/manifest/pages/` endpoint.
113132
133+
## Schema page types
134+
135+
Throughout the NHS website we have a couple of page models which are defined using the `@type` property. It is a good thing to implement each page type into your product, as multiple page types can be used within in a single genre (conditions, live-well, medicines, etc).
136+
137+
1. **WebPage** &mdash; This is the default type and is [defined by Schema.org](https://schema.org/WebPage)
138+
139+
2. **MedicalWebPage** &mdash; A web page that provides medical information and is [defined by Schema.org](https://schema.org/MedicalWebPage)
140+
141+
Here is a list of properties for each schema page type we are currently using:
142+
143+
| WebPage | MedicalWebPage |
144+
| ---------------- | ------------------- |
145+
| @context | @context |
146+
| @type | @type |
147+
| name | name |
148+
| copyrightHolder | copyrightHolder |
149+
| license | license |
150+
| author | author |
151+
| about | about |
152+
| description | description |
153+
| url | url |
154+
| genre | genre |
155+
| keywords | keywords |
156+
| dateModified | dateModified |
157+
| lastReviewed | lastReviewed |
158+
| breadcrumb | breadcrumb |
159+
| hasPart | hasPart |
160+
| relatedLink | relatedLink |
161+
| contentSubTypes | contentSubTypes |
162+
| mainEntityOfPage | mainEntityOfPage |
163+
| | alternativeHeadline |
164+
165+
It is worth noting that the `genre` property is what we use to define which section the article sits in, and the `@type` is used to define how that article is structured.
166+
114167
## API status
115168
This API has moved from the [NHS website developer portal](https://developer.api.nhs.uk/).
116169
It is currently [in production](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).

0 commit comments

Comments
 (0)