{file_path}'
+ return f"{file_path}"
+
+def render_section(title, emoji, issues, colour):
+ grouped = group_by_file(issues)
+ total = len(issues)
+ file_count = len(grouped)
+
+ html = f"""
+✅ No {title.lower()} found.
\n" + else: + for file_path, file_issues in sorted(grouped.items()): + html += f"| Location | Message |
|---|---|
{location} | {message} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Causative agent | Penicillin -class of antibiotic |
|---|---|
| Description of reaction | Eruption due to drug |
| Severity | Mild |
| Certainty | Certain |
| Comment | No swelling |
+
+
+
+
+
+
+ | Date and time of contact | 12-Feb-2015 07:00 |
|---|
+
+
+
+
+
+
+ | Clinical narrative |
|---|
60 year old man complaining of chest pain lasting around 2 hours. Examination unremarkable. Inferior ischaemic changes on ECG. |
Full Blood Count TestValueUnitsReference Range White Cell Count11.1x10*9/L3.5 - 10.0 Red Cell Count5.0x10*12/L4.25 - 5.75 Haemoglobin150g/L13.0 - 17.0 Haematocrit0.230L/L0.400 - 0.500 Mean Cell Volume90fL84 - 98 Mean Cell Hb33.0pg27.5 - 32.0 Mean Cell Hb Con34.0pg31.0 - 35.0 RDW12.0%< 14.5 Platelet Count300x10*9/L150 - 400 Machine Differential TestValueUnitsReference Range Neutrophils7.0x10*9/L1.7 - 7.5 Lymphocytes3.5x10*9/L1.0 - 3.5 Monocytes0.3x10*9/L< 0.6 Eosinophils0.4x10*9/L< 0.4 Basophils0.1x10*9/L< 0.1 LUCs0.2x10*9/L< 0.4 |
+
+
+
+
+
+
+ | Contact for further information | Dr Paul Rastall Tel: 0113 6323200 |
|---|
+
+
+
+
+
+
+ | Diagnosis name | Acute ST segment elevation myocardial infarction |
|---|
+
+
+
+
+
+
+ | Discharge status | Streamed from emergency department to urgent care service following initial assessment |
|---|---|
| Date/time of discharge | 12-Feb-2015 08:00 |
| Discharge destination | NHS other Hospital Provider - Ward for general Patients or the younger physically disabled |
+
+
+
+
+
+
+ | GP name | Prefix: Dr Given Name: John Family Name: Lorenzo |
|---|---|
| GP practice details | Name: MGP Medical Centre Address: Address Line: 1 MGP House, Overtown City: Leeds Post Code: LS21 7PA |
+
+
+
+
+
+
+ | Information and advice given | Patient advised to be admitted to ward for further tests after ECG results showed inferior ischaemic changes. |
|---|
+
+
+
+
+
+
+ | Medication name | Ramipril 2.5mg tablets (A A H Pharmaceuticals Ltd) |
|---|---|
| Form | Tablet |
| Route | Oral |
| Dose directions description | One 2.5mg tablet once a day. |
| Status | Continued |
| Medication name | Aspirin 75mg tablets (Sigma Pharmaceuticals Plc) |
|---|---|
| Form | Tablet |
| Route | Oral |
| Dose directions description | Take one 75mg tablet once a day. |
| Status | Continued |
| Medication name | Simvastatin 40mg tablets (Brown & Burk UK Ltd) |
|---|---|
| Form | Tablet |
| Route | Oral |
| Dose directions description | Take one 40mg tablet once a day. |
| Status | Continued |
| Medication name | Bisoprolol 5mg tablets (A A H Pharmaceuticals Ltd) |
|---|---|
| Form | Tablet |
| Route | Oral |
| Dose directions description | Take one 5mg tablet daily. |
| Comment/recommendation | Recommend Uptitrate according to BP and HR |
| Status | Continued |
+
+
+
+
+
+
+ | Patient name | Prefix: Mr Given Name: Richard Family Name: Smith |
|---|---|
| Date of birth | 1 January 1957 |
| Gender | Male |
| NHS number | 1352465790 |
| Patient address | Address Line: 21, Grove Street, Overtown City: Leeds Post Code: LS21 1PF |
+
+
+
+
+
+
+ | Name | Prefix: Dr Given Name: Paul Family Name: Rastall |
|---|
+
+
+
+
+
+
+ | Action | Patient has agreed to be admitted to Cramer ward for further tests to investigate causes of his chest pain on 12 February 2015. Person responsible: Dr. Paul Rastall (Accident and Emergency Consultant, St. James's University Hospital Accident and Emergency Department) Status: Completed Outcome: Patient expects to find out the more information about the reasons for his chest pain when tests are carried out after admission. |
|---|
+
+
+
+
+
+
+ | Presenting complaints or issue | Chest pain |
|---|
+
+
+
+
+
+
+ | Procedure name | Electrocardiographic monitoring |
|---|---|
| Comment | ECGs showed inferior ischaemic changes. |
+
+
+
+
+
+
+ | Referrer details | Self-referral to accident and emergency department |
|---|
+
+
+
+
+
+
+ | Name | Prefix: Mr Family Name: Abacus |
|---|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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