Skip to content

Commit edd60fd

Browse files
committed
Create basic layout
1 parent 9fb30c9 commit edd60fd

File tree

2 files changed

+297
-0
lines changed

2 files changed

+297
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ venv/
99
.DS_Store
1010
.Rhistory
1111
.Rproj.user/
12+
analysis/reports/.ipynb_checkpoints/report-checkpoint.ipynb

analysis/reports/report.ipynb

Lines changed: 296 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,296 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"metadata": {},
7+
"outputs": [
8+
{
9+
"data": {
10+
"text/markdown": [
11+
"# <center>Pharmacy First "
12+
],
13+
"text/plain": [
14+
"<IPython.core.display.Markdown object>"
15+
]
16+
},
17+
"metadata": {},
18+
"output_type": "display_data"
19+
},
20+
{
21+
"data": {
22+
"text/markdown": [
23+
"### <center>01-01-2020 through 31-06-2024 by month"
24+
],
25+
"text/plain": [
26+
"<IPython.core.display.Markdown object>"
27+
]
28+
},
29+
"metadata": {},
30+
"output_type": "display_data"
31+
}
32+
],
33+
"source": [
34+
"import numpy as np\n",
35+
"from IPython.display import Markdown\n",
36+
"from PIL import Image\n",
37+
"\n",
38+
"start_date = '01-01-2020'\n",
39+
"end_date = '31-06-2024'\n",
40+
"\n",
41+
"display(Markdown(f'# <center>Pharmacy First '))\n",
42+
"display(Markdown(f'### <center>{start_date} through {end_date} by month'))"
43+
]
44+
},
45+
{
46+
"cell_type": "markdown",
47+
"metadata": {},
48+
"source": [
49+
"<a id=\"background\"></a>\n",
50+
"\n",
51+
"## Background\n",
52+
"\n",
53+
"Add background here\n",
54+
"\n",
55+
"## Methods\n",
56+
"\n",
57+
"This study used data from OpenSAFELY-TPP, which covers 40% of the population of England. For a description of the representativeness of this sample, please see our manuscript [here](https://doi.org/10.12688/wellcomeopenres.18010.1). Individuals were included if they were alive and registered at a TPP practice each month, across the study period. Patients were excluded if their listed age was not between 0 and 120 years.\n",
58+
"\n",
59+
"Counts represent patients with at least one clinical code of relevence in that month. Patients with more than one of the same clinical code in a month were only counted once. Rates divide the count by the included study population and multiply by 1,000 to achieve a rate per 1,000 registered patients.\n",
60+
"\n",
61+
"Counts <=7 have been redacted and all numbers rounded to the nearest 5 to avoid potential re-identification of individuals. The rates displayed were computed with these rounded counts.\n",
62+
"\n",
63+
"Our data relies on a relevent Pharmacy First code being added to a patient's GP record. The Pharmacy First service relies on [GP Connect: Update Record](https://digital.nhs.uk/services/gp-connect/gp-connect-in-your-organisation/gp-connect-update-record) to update a patient's GP record with consultation information from the community pharmacy. Following the launch of the Pharmacy First service, there has been a [gradual roll-out of GP Connect: Update Record](https://cpe.org.uk/our-news/gp-connect-update-record-rollout-and-flow-of-information/) across the approved community pharmacy IT system suppliers.\n",
64+
"\n",
65+
"*Need to complete this*\n",
66+
"\n",
67+
"Links to the codelist for each analysis can be found beneath the relevant section.\n",
68+
"\n"
69+
]
70+
},
71+
{
72+
"cell_type": "markdown",
73+
"metadata": {},
74+
"source": [
75+
"<ul id=\"docNav\">\n",
76+
" <p>This report contains the following sections:</p>\n",
77+
" <li> <a href=\"#clinical_pathways\">Clinical Pathways</a>\n",
78+
" <ul>\n",
79+
" <li> <a href=\"#clinical_condition\">Clinical Condition</a></li>\n",
80+
" <li> <a href=\"#clinical_condition_days\">Days of the week</a></li>\n",
81+
" <li> <a href=\"#clinical_condition_region\">NHS Region</a></li>\n",
82+
" <li> <a href=\"#clinical_condition_ethnicity\">Ethnicity</a></li>\n",
83+
" <li> <a href=\"#clinical_condition_imd\">IMD</a></li>\n",
84+
" <li> <a href=\"#shingles\">Shingles</a>\n",
85+
" <ul>\n",
86+
" <li><a href=\"shingles_sex\">Sex</a></li>\n",
87+
" <li><a href=\"shingles_age\">Age</a></li>\n",
88+
" <li><a href=\"shingles_ethnicity\">Ethnicity</a></li>\n",
89+
" <li><a href=\"shingles_imd\">IMD</a></li>\n",
90+
" <li><a href=\"shingles_region\">Region</a></li>\n",
91+
" <li><a href=\"shingles_medication\">Medication supply</a></li>\n",
92+
" </ul>\n",
93+
" </li>\n",
94+
" <li> <a href=\"#uti\">Urinary tract infection etc.</a>\n",
95+
" </li> \n",
96+
" </ul>\n",
97+
" </li>\n",
98+
" <li> <a href=\"#hypertension\">Hypertension</a>\n",
99+
" <ul>\n",
100+
" <li> <a href=\"#\">Age</a></li>\n",
101+
" <li> <a href=\"#\">Sex</a></li>\n",
102+
" <li> <a href=\"#\">Region</a></li>\n",
103+
" </ul>\n",
104+
" </li>\n",
105+
" <li> <a href=\"#contraception\">Contraception</a>\n",
106+
" <ul>\n",
107+
" <li> <a href=\"#\">Age</a></li>\n",
108+
" <li> <a href=\"#\">Region</a></li>\n",
109+
" </ul>\n",
110+
" </li>\n",
111+
"</ul>"
112+
]
113+
},
114+
{
115+
"cell_type": "markdown",
116+
"metadata": {},
117+
"source": [
118+
"<a id=\"clinical_pathways\"></a>\n",
119+
"## Clinical Pathways\n",
120+
"\n",
121+
"This section focuses on the Clinical Pathways element of that Pharmacy First service\n"
122+
]
123+
},
124+
{
125+
"cell_type": "markdown",
126+
"metadata": {},
127+
"source": [
128+
"### Clinical Condition\n",
129+
"\n",
130+
"This section focuses on the clinical conditions within the Clinical Pathways element of that Pharmacy First service"
131+
]
132+
},
133+
{
134+
"cell_type": "markdown",
135+
"metadata": {},
136+
"source": [
137+
"<a id=\"clinical_condition\"></a>\n",
138+
"#### Counts by clinical condition\n",
139+
"\n",
140+
"Here we show the number of consultations for each of the Pharmacy First Clinical Pathways Clinical Conditions\n",
141+
">LINE CHART WITH COUNT OF EACH CLINICAL CONDITION"
142+
]
143+
},
144+
{
145+
"cell_type": "markdown",
146+
"metadata": {},
147+
"source": [
148+
"<a id=\"clinical_condition_days\"></a>\n",
149+
"#### Counts by day of the week\n",
150+
"\n",
151+
"Here we show the number of consultations for the Pharmacy First Clinical Pathways by day of the week the consultation was conducted.\n",
152+
"(Mainly of interest to show what happens at weekends etc e.g. when GP practices are closed).\n",
153+
"> BAR CHART WITH COUNT BY DAY OF THE WEEK"
154+
]
155+
},
156+
{
157+
"cell_type": "markdown",
158+
"metadata": {},
159+
"source": [
160+
"<a id=\"clinical_condition_region\"></a>\n",
161+
"#### Rates by region\n",
162+
"\n",
163+
"Here we show the rates of consultations for the Pharmacy First Clinical Pathways by the NHS Region in which the patient is registered.\n",
164+
"(Might not be the region where PF consultation conducted).\n",
165+
"> RATES OF ANY PF CLINICAL PATHWAY BY REGION"
166+
]
167+
},
168+
{
169+
"cell_type": "markdown",
170+
"metadata": {},
171+
"source": [
172+
"<a id=\"clinical_condition_ethnicity\"></a>\n",
173+
"#### Rates by ethnicity\n",
174+
"\n",
175+
"Here we show the rates of consultations for the Pharmacy First Clinical Pathways by patient ethnicity\n",
176+
"> RATES OF ANY PF CLINICAL PATHWAY BY ETHNICITY"
177+
]
178+
},
179+
{
180+
"cell_type": "markdown",
181+
"metadata": {},
182+
"source": [
183+
"<a id=\"clinical_condition_imd\"></a>\n",
184+
"#### Rates by IMD\n",
185+
"\n",
186+
"Here we show the rates of consultations for the Pharmacy First Clinical Pathways by IMD (based on patient address)\n",
187+
"> RATES OF ANY PF CLINICAL PATHWAY BY IMD"
188+
]
189+
},
190+
{
191+
"cell_type": "markdown",
192+
"metadata": {},
193+
"source": [
194+
"<a id=\"shingles\"></a>\n",
195+
"#### Shingles\n",
196+
"\n",
197+
"Here we show the rates specifically for consultations conducted under the Shingles clinical pathway"
198+
]
199+
},
200+
{
201+
"cell_type": "markdown",
202+
"metadata": {},
203+
"source": [
204+
"<a id=\"shingles_sex\"></a>\n",
205+
"##### Rates by sex (I can't make a smaller heading here but this sits under shingles section)\n",
206+
"Here we show the rates of consultations for the Pharmacy First Shingles Clinical Pathways by sex\n",
207+
"> RATES OF SHINGLES CLINICAL PATHWAY BY SEX"
208+
]
209+
},
210+
{
211+
"cell_type": "markdown",
212+
"metadata": {},
213+
"source": [
214+
"<a id=\"shingles_age\"></a>\n",
215+
"##### Rates by age\n",
216+
"Here we show the rates of consultations for the Pharmacy First Shingles Clinical Pathways by age.\n",
217+
"(Would need to consider age bands as different for each pathway)\n",
218+
"> RATES OF SHINGLES CLINICAL PATHWAY BY AGE"
219+
]
220+
},
221+
{
222+
"cell_type": "markdown",
223+
"metadata": {},
224+
"source": [
225+
"<a id=\"shingles_ethnicity\"></a>\n",
226+
"##### Rates by ethnicity\n",
227+
"Here we show the rates of consultations for the Pharmacy First Shingles Clinical Pathways by ethnicity\n",
228+
"> RATES OF SHINGLES CLINICAL PATHWAY BY ETHNICITY"
229+
]
230+
},
231+
{
232+
"cell_type": "markdown",
233+
"metadata": {},
234+
"source": [
235+
"<a id=\"shingles_imd\"></a>\n",
236+
"##### Rates by IMD\n",
237+
"Here we show the rates of consultations for the Pharmacy First Shingles Clinical Pathways by IMD\n",
238+
"> RATES OF SHINGLES CLINICAL PATHWAY BY IMD"
239+
]
240+
},
241+
{
242+
"cell_type": "markdown",
243+
"metadata": {},
244+
"source": [
245+
"<a id=\"shingles_region\"></a>\n",
246+
"##### Rates by region\n",
247+
"Here we show the rates of consultations for the Pharmacy First Shingles Clinical Pathways by NHS region\n",
248+
"> RATES OF SHINGLES CLINICAL PATHWAY BY REGION"
249+
]
250+
},
251+
{
252+
"cell_type": "markdown",
253+
"metadata": {},
254+
"source": [
255+
"<a id=\"shingles_medication\"></a>\n",
256+
"##### Rates by medication supply\n",
257+
"Here we show the percentage of consultations for the Pharmacy First Shingles Clinical Pathways with vs without medication supply.\n",
258+
"(Could also potentially show details of which medication issued)\n",
259+
"> BAR PLOT OF PERCENTAGE OF SHINGLES CLINICAL PATHWAY WITH/WITHOUT MEDICATION SUPPLIED"
260+
]
261+
},
262+
{
263+
"cell_type": "code",
264+
"execution_count": null,
265+
"metadata": {},
266+
"outputs": [],
267+
"source": []
268+
}
269+
],
270+
"metadata": {
271+
"kernelspec": {
272+
"display_name": "Python 3 (ipykernel)",
273+
"language": "python",
274+
"name": "python3"
275+
},
276+
"language_info": {
277+
"codemirror_mode": {
278+
"name": "ipython",
279+
"version": 3
280+
},
281+
"file_extension": ".py",
282+
"mimetype": "text/x-python",
283+
"name": "python",
284+
"nbconvert_exporter": "python",
285+
"pygments_lexer": "ipython3",
286+
"version": "3.9.13"
287+
},
288+
"vscode": {
289+
"interpreter": {
290+
"hash": "bcc1f730df8fb5742a3ac26bd3a31839bd02ad4e73a558e52498dfe16975ce60"
291+
}
292+
}
293+
},
294+
"nbformat": 4,
295+
"nbformat_minor": 2
296+
}

0 commit comments

Comments
 (0)