Skip to content

Commit 57f7e0c

Browse files
Update: [AEA-5755] - updates AWAITING_RELEASE_READY and FUTURE_DATED_PRESCRIPTION (#1386)
## Summary Awaiting Release Ready is translated to "Available to download when due" Future Dated Prescription is translated to "To dispense in the future" - Routine Change
1 parent 64623cf commit 57f7e0c

File tree

2 files changed

+62
-5
lines changed

2 files changed

+62
-5
lines changed

packages/cpt-ui/__tests__/EpsPrescriptionList.test.tsx

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const mockSearchResponse: SearchResponse = {
130130
{
131131
prescriptionId: "RX003",
132132
isDeleted: false,
133-
statusCode: PrescriptionStatus.WITH_DISPENSER_ACTIVE,
133+
statusCode: PrescriptionStatus.AWAITING_RELEASE_READY,
134134
issueDate: "2025-03-10",
135135
prescriptionTreatmentType: TreatmentType.ERD,
136136
issueNumber: 3,
@@ -143,7 +143,7 @@ const mockSearchResponse: SearchResponse = {
143143
{
144144
prescriptionId: "RX004",
145145
isDeleted: false,
146-
statusCode: PrescriptionStatus.DISPENSED,
146+
statusCode: PrescriptionStatus.NOT_DISPENSED,
147147
issueDate: "2025-01-15",
148148
prescriptionTreatmentType: TreatmentType.REPEAT,
149149
issueNumber: 1,
@@ -154,7 +154,7 @@ const mockSearchResponse: SearchResponse = {
154154
{
155155
prescriptionId: "RX005",
156156
isDeleted: false,
157-
statusCode: PrescriptionStatus.NOT_DISPENSED,
157+
statusCode:PrescriptionStatus.CLAIMED,
158158
issueDate: "2024-12-20",
159159
prescriptionTreatmentType: TreatmentType.ACUTE,
160160
issueNumber: 1,
@@ -648,4 +648,61 @@ describe("PrescriptionListPage", () => {
648648
expect(heading).toHaveTextContent("Sorry, there is a problem with this service")
649649
})
650650
})
651+
it("renders correct message for a current prescription", async () => {
652+
mockedAxios.get.mockResolvedValue({
653+
status: 200,
654+
data: mockSearchResponse
655+
})
656+
657+
renderWithRouter(
658+
FRONTEND_PATHS.PRESCRIPTION_LIST_CURRENT,
659+
signedInAuthState,
660+
{
661+
...defaultSearchState,
662+
prescriptionId: "C0C757-A83008-C2D93O"
663+
}
664+
)
665+
expect(mockedAxios.get).toHaveBeenCalledTimes(1)
666+
667+
const statusLabel = await screen.findByText("Available to download when due")
668+
expect(statusLabel).toBeInTheDocument()
669+
})
670+
it("renders correct message for a past prescription", async () => {
671+
mockedAxios.get.mockResolvedValue({
672+
status: 200,
673+
data: mockSearchResponse
674+
})
675+
676+
renderWithRouter(
677+
FRONTEND_PATHS.PRESCRIPTION_LIST_PAST,
678+
signedInAuthState,
679+
{
680+
...defaultSearchState,
681+
prescriptionId: "C0C757-A83008-C2D93O"
682+
}
683+
)
684+
expect(mockedAxios.get).toHaveBeenCalledTimes(1)
685+
686+
const statusLabel = await screen.findByText("Not dispensed")
687+
expect(statusLabel).toBeInTheDocument()
688+
})
689+
it("renders correct message for a future prescription", async () => {
690+
mockedAxios.get.mockResolvedValue({
691+
status: 200,
692+
data: mockSearchResponse
693+
})
694+
695+
renderWithRouter(
696+
FRONTEND_PATHS.PRESCRIPTION_LIST_FUTURE,
697+
signedInAuthState,
698+
{
699+
...defaultSearchState,
700+
prescriptionId: "C0C757-A83008-C2D93O"
701+
}
702+
)
703+
expect(mockedAxios.get).toHaveBeenCalledTimes(1)
704+
705+
const statusLabel = await screen.findByText("To dispense in the future")
706+
expect(statusLabel).toBeInTheDocument()
707+
})
651708
})

packages/cpt-ui/src/constants/ui-strings/StatusLabels.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const STATUS_LABELS = {
22
prescription: {
3-
"0000": "Next repeat ready to download",
3+
"0000": "Available to download when due",
44
"0001": "Available to download",
55
"0002": "Downloaded by a dispenser",
66
"0003": "Some items dispensed",
@@ -11,7 +11,7 @@ export const STATUS_LABELS = {
1111
"0008": "Claimed",
1212
"0009": "Not claimed",
1313
"9000": "Future eRD issue",
14-
"9001": "Future issue date dispense",
14+
"9001": "To dispense in the future",
1515
"9005": "Future prescription cancelled"
1616
},
1717
item: {

0 commit comments

Comments
 (0)