File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ def vaccination_events
401401 if ( vaccine = vaccination_record . vaccine )
402402 "Vaccinated with #{ vaccine . brand } "
403403 elsif vaccination_record . sourced_from_manual_report? ||
404- vaccination_record . sourced_from_historical_upload?
404+ vaccination_record . sourced_from_historical_upload?
405405 "Historical vaccination record added"
406406 else
407407 "Vaccinated"
@@ -412,10 +412,13 @@ def vaccination_events
412412
413413 subtitle =
414414 if vaccination_record . administered? &&
415- vaccination_record . reported_at . present? &&
416- ( vaccination_record . sourced_from_manual_report? ||
417- vaccination_record . sourced_from_historical_upload? )
418- "Record added #{ vaccination_record . reported_at . to_fs ( :long ) } . Vaccination given #{ vaccination_record . performed_at . to_fs ( :long ) } ."
415+ vaccination_record . reported_at . present? &&
416+ (
417+ vaccination_record . sourced_from_manual_report? ||
418+ vaccination_record . sourced_from_historical_upload?
419+ )
420+ "Record added #{ vaccination_record . reported_at . to_fs ( :long ) } . " \
421+ "Vaccination given #{ vaccination_record . performed_at . to_date . to_fs ( :long ) } ."
419422 end
420423
421424 kept = {
Original file line number Diff line number Diff line change 221221
222222 include_examples "card" ,
223223 title : "Historical vaccination record added" ,
224- date : "Record added 15 December 2025 at 2:33pm. Vaccination given 6 January 2025." ,
224+ date :
225+ "Record added 15 December 2025 at 2:33pm. Vaccination given 6 January 2025." ,
225226 programme : "Flu"
226227
227228 include_examples "card" ,
Original file line number Diff line number Diff line change 6767 when_the_status_updater_runs
6868 and_i_navigate_to_the_patient_record
6969 then_i_see_that_the_vaccination_record_has_outcome_vaccinated
70+
71+ when_i_open_the_activity_log
72+ then_i_see_a_historical_vaccination_log_entry_for_mmr
73+ and_it_includes_the_programme_and_both_reported_and_performed_at_dates
7074 end
7175
7276 scenario "record a patient as already had their 1st MMR dose and then edit dates" do
@@ -416,10 +420,26 @@ def and_i_navigate_to_the_patient_record
416420 end
417421
418422 def then_i_see_that_the_vaccination_record_has_outcome_vaccinated
419- expect ( page ) . to have_content ( "Vaccination date #{ @vaccination_date . strftime ( "%-d %B %Y" ) } " )
423+ expect ( page ) . to have_content (
424+ "Vaccination date #{ @vaccination_date . strftime ( "%-d %B %Y" ) } "
425+ )
420426 expect ( page ) . to have_content ( "Location Unknown" )
421427 expect ( page ) . to have_content ( "Programme MMR" )
422428 expect ( page ) . to have_content ( "Source Manual report" )
423429 expect ( page ) . to have_content ( "Outcome Vaccinated" )
424430 end
431+
432+ def when_i_open_the_activity_log
433+ click_on "Activity log"
434+ end
435+
436+ def then_i_see_a_historical_vaccination_log_entry_for_mmr
437+ expect ( page ) . to have_content ( "Historical vaccination record added" )
438+ end
439+
440+ def and_it_includes_the_programme_and_both_reported_and_performed_at_dates
441+ expect ( page ) . to have_content (
442+ "MMR Record added 1 July 2025 at 12:00am. Vaccination given #{ @vaccination_date . strftime ( "%-d %B %Y" ) } ."
443+ )
444+ end
425445end
You can’t perform that action at this time.
0 commit comments