Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) add patient name to laboratory dashboard #22

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions src/completed-list/completed-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,18 @@ const CompletedList: React.FC<CompletedlistProps> = ({ fulfillerStatus }) => {
{ id: 0, header: t("date", "Date"), key: "date" },

{ id: 1, header: t("orderNumber", "Order Number"), key: "orderNumber" },
{ id: 2, header: t("patient", "Patient"), key: "patient" },

{
id: 2,
id: 3,
header: t("accessionNumber", "Accession Number"),
key: "accessionNumber",
},
{ id: 3, header: t("test", "Test"), key: "test" },
{ id: 4, header: t("action", "Action"), key: "action" },
{ id: 5, header: t("status", "Status"), key: "status" },
{ id: 6, header: t("orderer", "Orderer"), key: "orderer" },
{ id: 7, header: t("orderType", "Order Type"), key: "orderType" },
{ id: 8, header: t("urgency", "Urgency"), key: "urgency" },
{ id: 4, header: t("test", "Test"), key: "test" },
{ id: 5, header: t("action", "Action"), key: "action" },
{ id: 6, header: t("status", "Status"), key: "status" },
{ id: 8, header: t("orderer", "Orderer"), key: "orderer" },
{ id: 9, header: t("urgency", "Urgency"), key: "urgency" },
];

const tableRows = useMemo(() => {
Expand All @@ -88,6 +89,13 @@ const CompletedList: React.FC<CompletedlistProps> = ({ fulfillerStatus }) => {
</>
),
},
patient: {
content: (
<>
<span>{entry.patient.display.split("-")[1]}</span>
</>
),
},
orderNumber: { content: <span>{entry.orderNumber}</span> },
accessionNumber: { content: <span>{entry.accessionNumber}</span> },
test: { content: <span>{entry.concept.display}</span> },
Expand Down
23 changes: 16 additions & 7 deletions src/queue-list/laboratory-patient-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,19 @@ const LaboratoryPatientList: React.FC<LaboratoryPatientListProps> = () => {
{ id: 0, header: t("date", "Date"), key: "date" },

{ id: 1, header: t("orderNumber", "Order Number"), key: "orderNumber" },
{ id: 2, header: t("patient", "Patient"), key: "patient" },

{
id: 2,
id: 3,
header: t("accessionNumber", "Accession Number"),
key: "accessionNumber",
},
{ id: 3, header: t("test", "Test"), key: "test" },
{ id: 4, header: t("action", "Action"), key: "action" },
{ id: 5, header: t("status", "Status"), key: "status" },
{ id: 6, header: t("orderer", "Orderer"), key: "orderer" },
{ id: 8, header: t("urgency", "Urgency"), key: "urgency" },
{ id: 9, header: t("actions", "Actions"), key: "actions" },
{ id: 4, header: t("test", "Test"), key: "test" },
{ id: 5, header: t("action", "Action"), key: "action" },
{ id: 6, header: t("status", "Status"), key: "status" },
{ id: 8, header: t("orderer", "Orderer"), key: "orderer" },
{ id: 9, header: t("urgency", "Urgency"), key: "urgency" },
{ id: 10, header: t("actions", "Actions"), key: "actions" },
];

const tableRows = useMemo(() => {
Expand All @@ -113,6 +115,13 @@ const LaboratoryPatientList: React.FC<LaboratoryPatientListProps> = () => {
</>
),
},
patient: {
content: (
<>
<span>{entry.patient.display.split("-")[1]}</span>
</>
),
},
orderNumber: { content: <span>{entry.orderNumber}</span> },
accessionNumber: { content: <span>{entry.accessionNumber}</span> },
test: { content: <span>{entry.concept.display}</span> },
Expand Down
22 changes: 15 additions & 7 deletions src/review-list/review-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,18 @@ const ReviewList: React.FC<ReviewlistProps> = ({ fulfillerStatus }) => {
{ id: 0, header: t("date", "Date"), key: "date" },

{ id: 1, header: t("orderNumber", "Order Number"), key: "orderNumber" },
{ id: 2, header: t("patient", "Patient"), key: "patient" },

{
id: 2,
id: 3,
header: t("accessionNumber", "Accession Number"),
key: "accessionNumber",
},
{ id: 3, header: t("test", "Test"), key: "test" },
{ id: 4, header: t("action", "Action"), key: "action" },
{ id: 5, header: t("status", "Status"), key: "status" },
{ id: 6, header: t("orderer", "Orderer"), key: "orderer" },
{ id: 7, header: t("orderType", "Order Type"), key: "orderType" },
{ id: 8, header: t("urgency", "Urgency"), key: "urgency" },
{ id: 4, header: t("test", "Test"), key: "test" },
{ id: 5, header: t("action", "Action"), key: "action" },
{ id: 6, header: t("status", "Status"), key: "status" },
{ id: 8, header: t("orderer", "Orderer"), key: "orderer" },
{ id: 9, header: t("urgency", "Urgency"), key: "urgency" },
];

const tableRows = useMemo(() => {
Expand All @@ -118,6 +119,13 @@ const ReviewList: React.FC<ReviewlistProps> = ({ fulfillerStatus }) => {
</>
),
},
patient: {
content: (
<>
<span>{entry.patient.display.split("-")[1]}</span>
</>
),
},
orderNumber: { content: <span>{entry.orderNumber}</span> },
accessionNumber: { content: <span>{entry.accessionNumber}</span> },
test: { content: <span>{entry.concept.display}</span> },
Expand Down
24 changes: 16 additions & 8 deletions src/work-list/work-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,22 @@
{ id: 0, header: t("date", "Date"), key: "date" },

{ id: 1, header: t("orderNumber", "Order Number"), key: "orderNumber" },
{ id: 2, header: t("patient", "Patient"), key: "patient" },

{
id: 2,
id: 3,
header: t("accessionNumber", "Accession Number"),
key: "accessionNumber",
},
{ id: 3, header: t("test", "Test"), key: "test" },
{ id: 4, header: t("action", "Action"), key: "action" },
{ id: 5, header: t("status", "Status"), key: "status" },
{ id: 6, header: t("orderer", "Orderer"), key: "orderer" },
{ id: 7, header: t("orderType", "Order Type"), key: "orderType" },
{ id: 8, header: t("urgency", "Urgency"), key: "urgency" },
{ id: 9, header: t("actions", "Actions"), key: "actions" },
{ id: 4, header: t("test", "Test"), key: "test" },
{ id: 5, header: t("action", "Action"), key: "action" },
{ id: 6, header: t("status", "Status"), key: "status" },
{ id: 8, header: t("orderer", "Orderer"), key: "orderer" },
{ id: 9, header: t("urgency", "Urgency"), key: "urgency" },
{ id: 10, header: t("actions", "Actions"), key: "actions" },
];

const ResultsOrder: React.FC<ResultsOrderProps> = ({

Check warning on line 119 in src/work-list/work-list.component.tsx

View workflow job for this annotation

GitHub Actions / build

The 'ResultsOrder' function makes the dependencies of useMemo Hook (at line 190) change on every render. Move it inside the useMemo callback. Alternatively, wrap the definition of 'ResultsOrder' in its own useCallback() Hook
order,
patientUuid,
}) => {
Expand Down Expand Up @@ -146,6 +147,13 @@
</>
),
},
patient: {
content: (
<>
<span>{entry.patient.display.split("-")[1]}</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the split intended to get rid of the OpenMRS ID tagged to it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this was the intent

</>
),
},
orderNumber: { content: <span>{entry.orderNumber}</span> },
accessionNumber: { content: <span>{entry.accessionNumber}</span> },
test: { content: <span>{entry.concept.display}</span> },
Expand Down