Skip to content

Commit 02278b3

Browse files
committed
Merge branch 'tamuri/signal' into molaro/harvest-training-data-including-mni
merge tamuri/signal
2 parents 33f1143 + 5ff53bb commit 02278b3

File tree

5 files changed

+138
-4
lines changed

5 files changed

+138
-4
lines changed

.github/workflows/run-on-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194
195195
- name: Upload artifact if requested
196196
if: "${{ inputs.artifact-path != '' }}"
197-
uses: actions/upload-artifact@v4
197+
uses: actions/upload-artifact@v5
198198
with:
199199
name: ${{ inputs.artifact-name }}
200200
path: ${{ inputs.artifact-path }}

.github/workflows/run-profiling.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
133133
## Upload the output as an artifact so we can push it to the profiling repository
134134
- name: Save results as artifact
135-
uses: actions/upload-artifact@v4
135+
uses: actions/upload-artifact@v5
136136
with:
137137
name: ${{ needs.set-variables.outputs.artifact-name }}
138138
path: ${{ needs.set-variables.outputs.profiling-output-dir }}
@@ -155,7 +155,7 @@ jobs:
155155
)
156156
steps:
157157
- name: Download the profiling results
158-
uses: actions/download-artifact@v5
158+
uses: actions/download-artifact@v6
159159
with:
160160
name: ${{ needs.set-variables.outputs.artifact-name }}
161161
path: ${{ needs.set-variables.outputs.profiling-output-dir }}
@@ -177,7 +177,7 @@ jobs:
177177
user_name: rc-softdev-admin
178178

179179
- name: Trigger website rebuild
180-
uses: peter-evans/repository-dispatch@v3
180+
uses: peter-evans/repository-dispatch@v4
181181
with:
182182
token: ${{ secrets.PROFILING_REPO_ACCESS }}
183183
repository: UCL/TLOmodel-profiling

docs/publications.bib

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,50 @@
11

2+
@misc{collins_healthcare_2025,
3+
title = {Healthcare service user-reported quality of care in {Malawi}: a national multi-facility cross-sectional study},
4+
copyright = {© 2025, Posted by Cold Spring Harbor Laboratory. This pre-print is available under a Creative Commons License (Attribution 4.0 International), CC BY 4.0, as described at http://creativecommons.org/licenses/by/4.0/},
5+
shorttitle = {Healthcare service user-reported quality of care in {Malawi}},
6+
url = {https://www.medrxiv.org/content/10.1101/2025.09.10.25335306v1},
7+
doi = {10.1101/2025.09.10.25335306},
8+
abstract = {Background Improving healthcare service user satisfaction is one of the three core objectives of the Malawian government’s health sector strategic plan. As such, robust understanding of service users’ perceptions of care quality is crucial to inform patient-centred services that can drive service improvements.
9+
Objective This study aimed to explore how service users in Malawi perceive the quality of the healthcare they receive across services and facilities and to investigate the association between individual and health service characteristics and perceived quality of care.
10+
Design A national multi-facility cross-sectional study using service user exit interview data.
11+
Setting(s) 30 health facilities across 15 districts in Malawi.
12+
Participants 4,181 respondents surveyed after completing their visit and exiting healthcare facilities between January and May 2024.
13+
Methods Descriptive statistics of service user-reported quality of care and multinomial logistic regression analyses to determine the association between patient and healthcare characteristics and perceived care quality.
14+
Results Quality of care was reported as being high with 58\% of respondents rating care as ‘Good’ and 35\% as ‘Very good’, with some variation by ‘dimension’ of care (e.g. treatment availability). Positive or negative perceptions of care quality were associated with age, sex, education level, illness severity, previously seeking care, referral, facility type, non-governmental facility ownership, service area, access to medication and payment of fees.
15+
Conclusions Most patients in Malawi report receiving high-quality care, although a minority perceive the quality to be inadequate. Action to address gaps in service delivery, such as improving the availability of required medicines, could address the poor perceptions of quality held by the minority of interviewed service users.
16+
What is already known on this topicService user-reported quality of care is an important indicator of quality healthcare delivery and key for responsive and patient-centred systems.Previous assessments from Malawi are largely focused on single services, facilities or groups.
17+
What this study addsThis study reveals that, across a variety of facilities and services, most Malawians rate the quality of care they receive highly whilst a minority reported quality of care to be neither good nor bad, bad, or very bad.We identified that non-governmental facility ownership and factors related to how services are delivered (i.e. availability of prescribed medication, patient referral, service area) are strongly associated with perceived quality.
18+
How this study might affect research, practice or policySeveral important factors associated with service user-reported quality, including availability of medication and referral systems, are amenable to policy action and could drive improvements in both quality and health. Additionally, we highlight the need for research into the factors influencing perceived quality in non-governmental facilities in Malawi.},
19+
language = {en},
20+
urldate = {2025-11-20},
21+
publisher = {medRxiv},
22+
author = {Collins, Joseph H. and Tafesse, Wiktoria and Chitsulo, Precious and Hallett, Timothy B. and Janoušková, Eva and Mfutso-Bengo, Joseph and Mnjowe, Emmanuel and Mohan, Sakshi and Mulwafu, Watipaso and Nkhoma, Dominic and She, Bingling and Suarez, Mariana and Colbourn, Tim},
23+
month = sep,
24+
year = {2025},
25+
note = {ISSN: 3067-2007
26+
Pages: 2025.09.10.25335306},
27+
keywords = {Data Collection - Protocol and Analyses},
28+
}
29+
30+
@misc{tafesse_ownership_2025,
31+
title = {Ownership and {Quality} of {Primary} {Care}: {A} {Comparative} {Analysis} of {Public} and {Faith}-{Based} {Providers} in {Malawi}},
32+
copyright = {© 2025, Posted by openRxiv. The copyright holder has placed this preprint in the Public Domain. It is no longer restricted by copyright. Anyone can legally share, reuse, remix, or adapt this material for any purpose without crediting the original authors.},
33+
shorttitle = {Ownership and {Quality} of {Primary} {Care}},
34+
url = {https://www.medrxiv.org/content/10.1101/2025.11.18.25340538v1},
35+
doi = {10.1101/2025.11.18.25340538},
36+
abstract = {Non-profit, faith-based providers (FBPs) play a major role in primary care delivery across Sub-Saharan Africa and are increasingly integrated into national health systems, yet evidence on how the quality of faith-based primary care compares to that of public providers remains limited. Using healthcare worker observations, patient exit interviews, and patient follow-up data from Malawi, we compare consultation duration, clinical content, and patient-reported outcomes across faith-based and government facilities. Ordinary least squares estimates controlling for facility-, provider-, and shift-level characteristics, as well as patient health conditions, indicate that FBPs conduct significantly longer consultations, by around 1.9 minutes (75\% of the sample mean), and perform a greater number of key clinical processes, including physical examinations and diagnostic tests. Patient-reported data corroborate these findings. Patients attending FBPs report receiving more tests and examinations and, at follow-up, are more likely to state that their treatment is working. These findings provide new evidence that publicly supported FBPs deliver higher-quality primary care on both process measures and patient-reported outcomes, underscoring the importance of accounting for provider ownership when examining variation in access to quality primary care in Sub-Saharan Africa.},
37+
language = {en},
38+
urldate = {2025-11-20},
39+
publisher = {medRxiv},
40+
author = {Tafesse, Wiktoria and Chitsulo, Precious and She, Bingling and Collins, Joseph H. and Suarez, Mariana and Nkhoma, Dominic and Siciliani, Luigi and Chalkley, Martin and Mohan, Sakshi and Mulwafu, Watipaso and Mnjowe, Emmanuel and Hallett, Timothy B. and Mfutso-Bengo, Joseph and Colbourn, Timothy},
41+
month = nov,
42+
year = {2025},
43+
note = {ISSN: 3067-2007
44+
Pages: 2025.11.18.25340538},
45+
keywords = {Data Collection - Protocol and Analyses},
46+
}
47+
248
@misc{murray-watson_modelling_2025,
349
title = {Modelling the long-term demographic and epidemiological trends in {Malawi}},
450
copyright = {http://creativecommons.org/licenses/by/4.0/},

src/tlo/notify.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
"""
2+
A dead simple synchronous notification dispatcher.
3+
4+
Usage
5+
-----
6+
# In the notifying class/module
7+
from tlo.notify import notifier
8+
9+
notifier.dispatch("simulation.on_start", data={"one": 1, "two": 2})
10+
11+
# In the listening class/module
12+
from tlo.notify import notifier
13+
14+
def on_notification(data):
15+
print("Received notification:", data)
16+
17+
notifier.add_listener("simulation.on_start", on_notification)
18+
"""
19+
20+
21+
class Notifier:
22+
"""
23+
A simple synchronous notification dispatcher supporting listeners.
24+
"""
25+
26+
def __init__(self):
27+
self.listeners = {}
28+
29+
def add_listener(self, notification_key, listener):
30+
"""
31+
Register a listener for a specific notification.
32+
33+
:param notification_key: The identifier to listen for.
34+
:param listener: A callable to be invoked when the notification is dispatched.
35+
"""
36+
if notification_key not in self.listeners:
37+
self.listeners[notification_key] = []
38+
self.listeners[notification_key].append(listener)
39+
40+
def remove_listener(self, notification_key, listener):
41+
"""
42+
Remove a previously registered listener for a notification.
43+
44+
:param notification_key: The identifier.
45+
:param listener: The listener callable to remove.
46+
"""
47+
if notification_key in self.listeners:
48+
self.listeners[notification_key].remove(listener)
49+
if not self.listeners[notification_key]:
50+
del self.listeners[notification_key]
51+
52+
def dispatch(self, notification_key, data=None):
53+
"""
54+
Dispatch a notification to all registered listeners.
55+
56+
:param notification_key: The identifier.
57+
:param data: Optional data to pass to each listener.
58+
"""
59+
if notification_key in self.listeners:
60+
for listener in self.listeners[notification_key]:
61+
listener(data)
62+
63+
64+
# Create a global notifier instance
65+
notifier = Notifier()

tests/test_notify.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from tlo.notify import notifier
2+
3+
4+
def test_notifier():
5+
# in listening code
6+
received_data = []
7+
8+
def callback(data):
9+
received_data.append(data)
10+
11+
notifier.add_listener("test.signal", callback)
12+
13+
# in emitting code
14+
notifier.dispatch("test.signal", data={"value": 42})
15+
16+
assert len(received_data) == 1
17+
assert received_data[0] == {"value": 42}
18+
19+
# Unsubscribe and test no further calls
20+
notifier.remove_listener("test.signal", callback)
21+
notifier.dispatch("test.signal", data={"value": 100})
22+
23+
assert len(received_data) == 1 # No new data

0 commit comments

Comments
 (0)