Skip to content

Commit 115326a

Browse files
authored
Merge pull request #344 from NHSDigital/PPHA-589-add-yearly-option-to-smoking-frequency
PPHA-589: Add yearly option to smoking frequency
2 parents df59109 + ca17a1a commit 115326a

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

lung_cancer_screening/questions/forms/smoking_frequency_form.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ def __init__(self, *args, tobacco_smoking_history, normal_tobacco_smoking_histor
3131
)
3232
value_field.add_hint_for_choice(
3333
SmokingFrequencyValues.MONTHLY,
34-
"Select this option if you smoke once a month, or once every few months",
34+
"Select this option if you smoke at least once a month",
35+
)
36+
value_field.add_hint_for_choice(
37+
SmokingFrequencyValues.YEARLY,
38+
"For example, 2 to 3 times a year or fewer",
3539
)
3640

3741
class Meta:
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 5.2.11 on 2026-03-09 14:25
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('questions', '0005_alter_tobaccosmokinghistory_type'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='smokingfrequencyresponse',
15+
name='value',
16+
field=models.CharField(choices=[('D', 'Daily'), ('W', 'Weekly'), ('M', 'Monthly'), ('Y', 'Yearly')], max_length=1),
17+
),
18+
]

lung_cancer_screening/questions/models/smoking_frequency_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ class SmokingFrequencyValues(models.TextChoices):
88
DAILY = "D", "Daily"
99
WEEKLY = "W", "Weekly"
1010
MONTHLY = "M", "Monthly"
11+
YEARLY = "Y", "Yearly"
1112

1213
class SmokingFrequencyResponse(BaseModel):
1314
SINGULAR_TEXT_MAP = {
1415
SmokingFrequencyValues.DAILY: "day",
1516
SmokingFrequencyValues.WEEKLY: "week",
1617
SmokingFrequencyValues.MONTHLY: "month",
18+
SmokingFrequencyValues.YEARLY: "year",
1719
}
1820

1921
tobacco_smoking_history = models.OneToOneField(

0 commit comments

Comments
 (0)