From 2768ca21a04895cc0117d8cc5b7c1e4d92f866c5 Mon Sep 17 00:00:00 2001 From: Alistair Laing Date: Tue, 3 Dec 2024 08:41:13 +0000 Subject: [PATCH 1/3] Add persons name to overlap bedspace search results --- assets/sass/components/_overlap-details.scss | 4 +++ .../components/bedspaceSearchResult.ts | 1 + cypress_shared/fixtures/person-local.json | 1 + .../manage/bedspaceSearch.cy.ts | 2 ++ .../utils/bedspaceSearchResultUtils.test.ts | 35 ++++++++++++++++--- server/utils/bedspaceSearchResultUtils.ts | 8 +++-- .../components/overlap-details/macro.njk | 10 ++++-- 7 files changed, 52 insertions(+), 9 deletions(-) diff --git a/assets/sass/components/_overlap-details.scss b/assets/sass/components/_overlap-details.scss index d7ec2f48d..deba099c2 100644 --- a/assets/sass/components/_overlap-details.scss +++ b/assets/sass/components/_overlap-details.scss @@ -8,6 +8,10 @@ display: inline; } +.overlap-details__value--bold { + font-weight: bold; +} + .overlap-details__row--inline { display: inline; } diff --git a/cypress_shared/components/bedspaceSearchResult.ts b/cypress_shared/components/bedspaceSearchResult.ts index a5b6bf49a..bbf06dd6b 100644 --- a/cypress_shared/components/bedspaceSearchResult.ts +++ b/cypress_shared/components/bedspaceSearchResult.ts @@ -57,6 +57,7 @@ export default class BedspaceSearchResult extends Component { cy.get('ul[data-cy-overlaps] > li') .eq(i) .within(() => { + cy.root().contains(`Name: ${overlap.name}`) cy.root().contains(`CRN: ${overlap.crn}`) cy.root().contains(overlap.days === 1 ? '1 day overlap' : `${overlap.days} days overlap`) cy.get('a') diff --git a/cypress_shared/fixtures/person-local.json b/cypress_shared/fixtures/person-local.json index f9ac1c2f2..373ed400f 100644 --- a/cypress_shared/fixtures/person-local.json +++ b/cypress_shared/fixtures/person-local.json @@ -9,5 +9,6 @@ "nationality": "", "ethnicity": "", "sex": "Male", + "type": "FullPerson", "genderIdentity": "Prefer not to say" } diff --git a/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts b/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts index 24b936546..cd3707016 100644 --- a/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts +++ b/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts @@ -172,7 +172,9 @@ context('Bedspace Search', () => { bedSearchResultFactory.forBedspace(premises, room).build({ overlaps: [ overlapFactory.build({ + name: person.name, crn: person.crn, + personType: person.type, roomId: room.id, bookingId: booking.id, days: 5, diff --git a/server/utils/bedspaceSearchResultUtils.test.ts b/server/utils/bedspaceSearchResultUtils.test.ts index 8dbe0b43d..711dbf34b 100644 --- a/server/utils/bedspaceSearchResultUtils.test.ts +++ b/server/utils/bedspaceSearchResultUtils.test.ts @@ -1,10 +1,10 @@ -import { TemporaryAccommodationBedSearchResultOverlap } from '@approved-premises/api' +import { FullPerson, RestrictedPerson, TemporaryAccommodationBedSearchResultOverlap } from '@approved-premises/api' import { bedSearchResultFactory, bookingFactory, characteristicFactory, - personFactory, premisesFactory, + restrictedPersonFactory, roomFactory, } from '../testutils/factories' import { @@ -12,6 +12,7 @@ import { bedspaceOverlapResult, premisesKeyCharacteristics, } from './bedspaceSearchResultUtils' +import { fullPersonFactory } from '../testutils/factories/person' describe('BedspaceSearchResultUtils', () => { describe('bedspaceKeyCharacteristics', () => { @@ -65,20 +66,23 @@ describe('BedspaceSearchResultUtils', () => { describe('bedspaceOverlapResult', () => { let overLapDays: TemporaryAccommodationBedSearchResultOverlap['days'] - let overlapResult: Omit + let overlapResult: Omit + let person: FullPerson | RestrictedPerson const createOverLapResult = () => { return { - crn: personFactory.build().crn, + crn: person.crn, days: overLapDays, - personType: personFactory.build().type, + personType: person.type, roomId: roomFactory.build().id, bookingId: bookingFactory.build().id, + name: person.type === 'FullPerson' ? (person as FullPerson).name : 'Limited access offender', } } beforeEach(() => { overLapDays = 8 + person = fullPersonFactory.build() overlapResult = createOverLapResult() }) @@ -86,8 +90,10 @@ describe('BedspaceSearchResultUtils', () => { expect(bedspaceOverlapResult(overlapResult)).toEqual({ crn: overlapResult.crn, overlapDays: '8 days overlap', + personType: 'FullPerson', roomId: overlapResult.roomId, bookingId: overlapResult.bookingId, + displayName: overlapResult.name, }) }) @@ -101,5 +107,24 @@ describe('BedspaceSearchResultUtils', () => { expect(bedspaceOverlapResult(overlapResult).overlapDays).toEqual('1 day overlap') }) }) + + describe('when offender is "Limited access offender', () => { + beforeEach(() => { + overLapDays = 8 + person = restrictedPersonFactory.build() + overlapResult = createOverLapResult() + }) + + it('returns object of key/value pairs', () => { + expect(bedspaceOverlapResult(overlapResult)).toEqual({ + crn: overlapResult.crn, + overlapDays: '8 days overlap', + personType: 'RestrictedPerson', + roomId: overlapResult.roomId, + bookingId: overlapResult.bookingId, + displayName: 'Limited access offender', + }) + }) + }) }) }) diff --git a/server/utils/bedspaceSearchResultUtils.ts b/server/utils/bedspaceSearchResultUtils.ts index e0e3aa34c..4babdf9fb 100644 --- a/server/utils/bedspaceSearchResultUtils.ts +++ b/server/utils/bedspaceSearchResultUtils.ts @@ -13,15 +13,19 @@ export function bedspaceKeyCharacteristics(result: BedSearchResult): Array, + overlapResult: Omit, ) { - const { crn, days, roomId, bookingId } = overlapResult + const { crn, days, roomId, bookingId, personType } = overlapResult const overlapDays = `${days} ${days === 1 ? 'day' : 'days'} overlap` + const displayName = personType === 'FullPerson' ? overlapResult.name : 'Limited access offender' + return { crn, overlapDays, roomId, bookingId, + personType, + displayName, } } diff --git a/server/views/components/overlap-details/macro.njk b/server/views/components/overlap-details/macro.njk index df891aa3d..e8b199d72 100644 --- a/server/views/components/overlap-details/macro.njk +++ b/server/views/components/overlap-details/macro.njk @@ -1,9 +1,15 @@ {% macro overlapDetails(params) %}
+
+
+ Name: +
+
{{ params.overlap.displayName }}
+
- CRN: -
+ CRN: +
{{ params.overlap.crn }}
From 431071e1c7b7d6afb670c445a7b8deba90cda699 Mon Sep 17 00:00:00 2001 From: Alistair Laing Date: Tue, 3 Dec 2024 11:12:01 +0000 Subject: [PATCH 2/3] Add persons sex to overlap bedspace search results We do not want to display Limited Access Offenders sex --- .../components/bedspaceSearchResult.ts | 1 + .../manage/bedspaceSearch.cy.ts | 1 + server/testutils/factories/overlap.ts | 1 + server/testutils/factories/person.ts | 2 +- server/utils/bedspaceSearchResultUtils.test.ts | 5 ++++- server/utils/bedspaceSearchResultUtils.ts | 4 +++- .../views/components/overlap-details/macro.njk | 16 +++++++++++----- 7 files changed, 22 insertions(+), 8 deletions(-) diff --git a/cypress_shared/components/bedspaceSearchResult.ts b/cypress_shared/components/bedspaceSearchResult.ts index bbf06dd6b..4b3df2df6 100644 --- a/cypress_shared/components/bedspaceSearchResult.ts +++ b/cypress_shared/components/bedspaceSearchResult.ts @@ -58,6 +58,7 @@ export default class BedspaceSearchResult extends Component { .eq(i) .within(() => { cy.root().contains(`Name: ${overlap.name}`) + cy.root().contains(`Sex: ${overlap.sex},`) cy.root().contains(`CRN: ${overlap.crn}`) cy.root().contains(overlap.days === 1 ? '1 day overlap' : `${overlap.days} days overlap`) cy.get('a') diff --git a/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts b/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts index cd3707016..949dc9ce5 100644 --- a/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts +++ b/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts @@ -178,6 +178,7 @@ context('Bedspace Search', () => { roomId: room.id, bookingId: booking.id, days: 5, + sex: person.sex, }), ], }), diff --git a/server/testutils/factories/overlap.ts b/server/testutils/factories/overlap.ts index 392716ad6..63ee7c4d4 100644 --- a/server/testutils/factories/overlap.ts +++ b/server/testutils/factories/overlap.ts @@ -6,6 +6,7 @@ import { fullPersonFactory } from './person' export default Factory.define(() => ({ crn: fullPersonFactory.build().crn, name: fullPersonFactory.build().name, + sex: fullPersonFactory.build().sex, roomId: faker.string.uuid(), personType: fullPersonFactory.build().type, bookingId: faker.string.uuid(), diff --git a/server/testutils/factories/person.ts b/server/testutils/factories/person.ts index 8b173b5e7..12b5e12f5 100644 --- a/server/testutils/factories/person.ts +++ b/server/testutils/factories/person.ts @@ -8,7 +8,7 @@ export const fullPersonFactory = Factory.define(() => ({ crn: `C${faker.number.int({ min: 100000, max: 999999 })}`, name: faker.person.fullName(), dateOfBirth: DateFormats.dateObjToIsoDate(faker.date.past()), - sex: faker.helpers.arrayElement(['Male', 'Female', 'Other', 'Prefer not to say']), + sex: faker.helpers.arrayElement(['Male', 'Female']), status: faker.helpers.arrayElement(['InCustody', 'InCommunity']), nomsNumber: `NOMS${faker.number.int({ min: 100, max: 999 })}`, nationality: faker.location.country(), diff --git a/server/utils/bedspaceSearchResultUtils.test.ts b/server/utils/bedspaceSearchResultUtils.test.ts index 711dbf34b..b16a60472 100644 --- a/server/utils/bedspaceSearchResultUtils.test.ts +++ b/server/utils/bedspaceSearchResultUtils.test.ts @@ -66,7 +66,7 @@ describe('BedspaceSearchResultUtils', () => { describe('bedspaceOverlapResult', () => { let overLapDays: TemporaryAccommodationBedSearchResultOverlap['days'] - let overlapResult: Omit + let overlapResult: Omit let person: FullPerson | RestrictedPerson const createOverLapResult = () => { @@ -77,6 +77,7 @@ describe('BedspaceSearchResultUtils', () => { roomId: roomFactory.build().id, bookingId: bookingFactory.build().id, name: person.type === 'FullPerson' ? (person as FullPerson).name : 'Limited access offender', + sex: person.type === 'FullPerson' ? (person as FullPerson).sex : undefined, } } @@ -94,6 +95,8 @@ describe('BedspaceSearchResultUtils', () => { roomId: overlapResult.roomId, bookingId: overlapResult.bookingId, displayName: overlapResult.name, + sex: 'Male', + sex: overlapResult.sex, }) }) diff --git a/server/utils/bedspaceSearchResultUtils.ts b/server/utils/bedspaceSearchResultUtils.ts index 4babdf9fb..d87203892 100644 --- a/server/utils/bedspaceSearchResultUtils.ts +++ b/server/utils/bedspaceSearchResultUtils.ts @@ -13,12 +13,13 @@ export function bedspaceKeyCharacteristics(result: BedSearchResult): Array, + overlapResult: Omit, ) { const { crn, days, roomId, bookingId, personType } = overlapResult const overlapDays = `${days} ${days === 1 ? 'day' : 'days'} overlap` const displayName = personType === 'FullPerson' ? overlapResult.name : 'Limited access offender' + const sex = personType === 'FullPerson' ? overlapResult.sex : undefined return { crn, @@ -27,5 +28,6 @@ export function bedspaceOverlapResult( bookingId, personType, displayName, + sex, } } diff --git a/server/views/components/overlap-details/macro.njk b/server/views/components/overlap-details/macro.njk index e8b199d72..843883ae5 100644 --- a/server/views/components/overlap-details/macro.njk +++ b/server/views/components/overlap-details/macro.njk @@ -1,11 +1,11 @@ {% macro overlapDetails(params) %}
-
- Name: -
-
{{ params.overlap.displayName }}
-
+
+ Name: +
+
{{ params.overlap.displayName }}
+
CRN: @@ -13,6 +13,12 @@
{{ params.overlap.crn }}
+ {% if params.overlap.sex %} +
+ Sex: +
+
{{ params.overlap.sex }},
+ {% endif %}
Overlap:
From ace16a8ce9bf8edf4f2dd74090fd4e05afcbe52c Mon Sep 17 00:00:00 2001 From: Alistair Laing Date: Wed, 4 Dec 2024 09:55:06 +0000 Subject: [PATCH 3/3] Replace booking link with a link to referral This is because users will find it more useful to view the referral and understand who the overlapping offender is. Not all overlaps will have a referral as when making a booking Assessor users can decide not to link to a referral depending on how their booking system works locally --- .../components/bedspaceSearchResult.ts | 14 ++--- .../manage/bedspaceSearch.cy.ts | 16 +++--- server/testutils/factories/overlap.ts | 2 + .../utils/bedspaceSearchResultUtils.test.ts | 30 ++++++++--- server/utils/bedspaceSearchResultUtils.ts | 10 ++-- .../components/overlap-details/macro.njk | 54 +++++++++---------- 6 files changed, 66 insertions(+), 60 deletions(-) diff --git a/cypress_shared/components/bedspaceSearchResult.ts b/cypress_shared/components/bedspaceSearchResult.ts index 4b3df2df6..1ab55bf91 100644 --- a/cypress_shared/components/bedspaceSearchResult.ts +++ b/cypress_shared/components/bedspaceSearchResult.ts @@ -62,16 +62,8 @@ export default class BedspaceSearchResult extends Component { cy.root().contains(`CRN: ${overlap.crn}`) cy.root().contains(overlap.days === 1 ? '1 day overlap' : `${overlap.days} days overlap`) cy.get('a') - .contains('View booking') - .should( - 'have.attr', - 'href', - paths.bookings.show({ - premisesId: this.result.premises.id, - roomId: overlap.roomId, - bookingId: overlap.bookingId, - }), - ) + .contains(`View referral for ${overlap.name}`) + .should('have.attr', 'href', paths.assessments.summary({ id: overlap.assessmentId })) }) }) }) @@ -79,6 +71,6 @@ export default class BedspaceSearchResult extends Component { clickOverlapLink(crn: string) { cy.get('summary').contains('Other people staying').click() - cy.get('ul[data-cy-overlaps] > li').find('dd.overlap-details__value').contains(crn).parents('li').find('a').click() + cy.get('ul[data-cy-overlaps]').find('dd.overlap-details__value').contains(crn).parents('li').find('a').click() } } diff --git a/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts b/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts index 949dc9ce5..c0a6a72ad 100644 --- a/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts +++ b/integration_tests/tests/temporary-accommodation/manage/bedspaceSearch.cy.ts @@ -1,14 +1,14 @@ import Page from '../../../../cypress_shared/pages/page' import DashboardPage from '../../../../cypress_shared/pages/temporary-accommodation/dashboardPage' +import AssessmentSummaryPage from '../../../../cypress_shared/pages/assess/summary' import BedspaceSearchPage from '../../../../cypress_shared/pages/temporary-accommodation/manage/bedspaceSearch' import BedspaceShowPage from '../../../../cypress_shared/pages/temporary-accommodation/manage/bedspaceShow' -import BookingShowPage from '../../../../cypress_shared/pages/temporary-accommodation/manage/bookingShow' import { setupTestUser } from '../../../../cypress_shared/utils/setupTestUser' import { + assessmentFactory, bedSearchParametersFactory, bedSearchResultFactory, bedSearchResultsFactory, - bookingFactory, overlapFactory, personFactory, placeContextFactory, @@ -148,7 +148,7 @@ context('Bedspace Search', () => { Page.verifyOnPage(BedspaceShowPage, premises, room) }) - it('allows me to view an overlapping booking', () => { + it("allows me to view an overlapping offender's referral", () => { // Given I am signed in cy.signIn() @@ -163,9 +163,7 @@ context('Bedspace Search', () => { const premises = premisesFactory.build() const room = roomFactory.build() - const booking = bookingFactory.build({ - person, - }) + const assessment = assessmentFactory.build({ status: 'closed' }) const results = bedSearchResultsFactory.build({ results: [ @@ -176,7 +174,7 @@ context('Bedspace Search', () => { crn: person.crn, personType: person.type, roomId: room.id, - bookingId: booking.id, + assessmentId: assessment.id, days: 5, sex: person.sex, }), @@ -188,7 +186,7 @@ context('Bedspace Search', () => { cy.task('stubBedSearch', results) cy.task('stubSinglePremises', premises) cy.task('stubSingleRoom', { premisesId: premises.id, room }) - cy.task('stubBooking', { premisesId: premises.id, booking }) + cy.task('stubFindAssessment', { ...assessment, status: 'closed' }) // And when I fill out the form const searchParameters = bedSearchParametersFactory.build() @@ -199,7 +197,7 @@ context('Bedspace Search', () => { const postSearchPage = Page.verifyOnPage(BedspaceSearchPage, results) postSearchPage.clickOverlapLink(room, person.crn) - Page.verifyOnPage(BookingShowPage, premises, room, booking) + Page.verifyOnPage(AssessmentSummaryPage, assessment) }) it('shows errors when the API returns an error', () => { diff --git a/server/testutils/factories/overlap.ts b/server/testutils/factories/overlap.ts index 63ee7c4d4..897601322 100644 --- a/server/testutils/factories/overlap.ts +++ b/server/testutils/factories/overlap.ts @@ -1,6 +1,7 @@ import { fakerEN_GB as faker } from '@faker-js/faker' import { Factory } from 'fishery' import { TemporaryAccommodationBedSearchResultOverlap as Overlap } from '../../@types/shared' +import assessmentFactory from './assessment' import { fullPersonFactory } from './person' export default Factory.define(() => ({ @@ -10,5 +11,6 @@ export default Factory.define(() => ({ roomId: faker.string.uuid(), personType: fullPersonFactory.build().type, bookingId: faker.string.uuid(), + assessmentId: assessmentFactory.build().id, days: faker.number.int({ min: 1, max: 100 }), })) diff --git a/server/utils/bedspaceSearchResultUtils.test.ts b/server/utils/bedspaceSearchResultUtils.test.ts index b16a60472..728053b66 100644 --- a/server/utils/bedspaceSearchResultUtils.test.ts +++ b/server/utils/bedspaceSearchResultUtils.test.ts @@ -1,7 +1,7 @@ import { FullPerson, RestrictedPerson, TemporaryAccommodationBedSearchResultOverlap } from '@approved-premises/api' import { + assessmentFactory, bedSearchResultFactory, - bookingFactory, characteristicFactory, premisesFactory, restrictedPersonFactory, @@ -66,7 +66,8 @@ describe('BedspaceSearchResultUtils', () => { describe('bedspaceOverlapResult', () => { let overLapDays: TemporaryAccommodationBedSearchResultOverlap['days'] - let overlapResult: Omit + let overlapResult: TemporaryAccommodationBedSearchResultOverlap + let overLapAssessmentId: TemporaryAccommodationBedSearchResultOverlap['assessmentId'] let person: FullPerson | RestrictedPerson const createOverLapResult = () => { @@ -75,7 +76,8 @@ describe('BedspaceSearchResultUtils', () => { days: overLapDays, personType: person.type, roomId: roomFactory.build().id, - bookingId: bookingFactory.build().id, + bookingId: '123456789', + assessmentId: overLapAssessmentId, name: person.type === 'FullPerson' ? (person as FullPerson).name : 'Limited access offender', sex: person.type === 'FullPerson' ? (person as FullPerson).sex : undefined, } @@ -83,6 +85,7 @@ describe('BedspaceSearchResultUtils', () => { beforeEach(() => { overLapDays = 8 + overLapAssessmentId = assessmentFactory.build().id person = fullPersonFactory.build() overlapResult = createOverLapResult() }) @@ -93,9 +96,9 @@ describe('BedspaceSearchResultUtils', () => { overlapDays: '8 days overlap', personType: 'FullPerson', roomId: overlapResult.roomId, - bookingId: overlapResult.bookingId, + assessmentId: overlapResult.assessmentId, displayName: overlapResult.name, - sex: 'Male', + referralNameOrCrn: overlapResult.name, sex: overlapResult.sex, }) }) @@ -103,6 +106,7 @@ describe('BedspaceSearchResultUtils', () => { describe('when overlap by 1 day', () => { beforeEach(() => { overLapDays = 1 + overLapAssessmentId = assessmentFactory.build().id overlapResult = createOverLapResult() }) @@ -115,6 +119,7 @@ describe('BedspaceSearchResultUtils', () => { beforeEach(() => { overLapDays = 8 person = restrictedPersonFactory.build() + overLapAssessmentId = assessmentFactory.build().id overlapResult = createOverLapResult() }) @@ -124,10 +129,23 @@ describe('BedspaceSearchResultUtils', () => { overlapDays: '8 days overlap', personType: 'RestrictedPerson', roomId: overlapResult.roomId, - bookingId: overlapResult.bookingId, + referralNameOrCrn: overlapResult.crn, + assessmentId: overlapResult.assessmentId, displayName: 'Limited access offender', }) }) }) + + describe('when no assessment is assigned', () => { + beforeEach(() => { + overLapDays = 1 + overLapAssessmentId = undefined + overlapResult = createOverLapResult() + }) + + it('returns undefined for assessment ID', () => { + expect(bedspaceOverlapResult(overlapResult).assessmentId).toBeUndefined() + }) + }) }) }) diff --git a/server/utils/bedspaceSearchResultUtils.ts b/server/utils/bedspaceSearchResultUtils.ts index d87203892..41f00150a 100644 --- a/server/utils/bedspaceSearchResultUtils.ts +++ b/server/utils/bedspaceSearchResultUtils.ts @@ -12,22 +12,22 @@ export function bedspaceKeyCharacteristics(result: BedSearchResult): Array characteristic.name) } -export function bedspaceOverlapResult( - overlapResult: Omit, -) { - const { crn, days, roomId, bookingId, personType } = overlapResult +export function bedspaceOverlapResult(overlapResult: TemporaryAccommodationBedSearchResultOverlap) { + const { crn, days, roomId, personType, assessmentId } = overlapResult const overlapDays = `${days} ${days === 1 ? 'day' : 'days'} overlap` const displayName = personType === 'FullPerson' ? overlapResult.name : 'Limited access offender' + const referralNameOrCrn = personType === 'FullPerson' ? overlapResult.name : overlapResult.crn const sex = personType === 'FullPerson' ? overlapResult.sex : undefined return { crn, overlapDays, roomId, - bookingId, personType, displayName, + referralNameOrCrn, sex, + assessmentId, } } diff --git a/server/views/components/overlap-details/macro.njk b/server/views/components/overlap-details/macro.njk index 843883ae5..b9bf9eb03 100644 --- a/server/views/components/overlap-details/macro.njk +++ b/server/views/components/overlap-details/macro.njk @@ -1,32 +1,28 @@ {% macro overlapDetails(params) %} -
-
-
- Name: -
-
{{ params.overlap.displayName }}
-
-
-
- CRN: -
-
{{ params.overlap.crn }}
-
-
- {% if params.overlap.sex %} -
- Sex: -
-
{{ params.overlap.sex }},
- {% endif %} -
- Overlap: -
-
{{ params.overlap.overlapDays }}
-
-
- - View booking +
+
+
Name:
+
{{ params.overlap.displayName }}
+
+
+
CRN:
+
{{ params.overlap.crn }}
+
+
+ {% if params.overlap.sex %} +
Sex:
+
{{ params.overlap.sex }},
+ {% endif %} +
Overlap:
+
{{ params.overlap.overlapDays }}
+
+
+ + {% if params.overlap.assessmentId %} +
+ View referral for {{ params.overlap.referralNameOrCrn }} + {% else %} +

No referral found.

+ {% endif %} {% endmacro %}