Skip to content

Commit

Permalink
Display orders for tests only (#63)
Browse files Browse the repository at this point in the history
* Display orders for tests only

* Add default Lab uuid to config schema
  • Loading branch information
akileng56 committed Mar 14, 2024
1 parent 204404f commit c9b2847
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/config-schema.ts
Expand Up @@ -23,7 +23,7 @@ export const configSchema = {
},
laboratoryOrderTypeUuid: {
_type: Type.String,
_default: "",
_default: "52a447d3-a64a-11e3-9aeb-50e549534c5e",

This comment has been minimized.

Copy link
@donaldkibet

donaldkibet Mar 14, 2024

Member

We should have default to empty value. This value should be provided by implementors using config file.

_description: "Uuid for orderType",
},
laboratoryReferalDestinationUuid: {
Expand Down
6 changes: 3 additions & 3 deletions src/work-list/work-list.resource.ts
Expand Up @@ -122,18 +122,18 @@ export function useGetOrdersWorklist(fulfillerStatus: string) {

const orderTypeQuery =
laboratoryOrderTypeUuid !== ""
? `orderType=${laboratoryOrderTypeUuid}&`
? `orderTypes=${laboratoryOrderTypeUuid}`
: "";

const apiUrl = `${restBaseUrl}/order?${orderTypeQuery}fulfillerStatus=${fulfillerStatus}&v=full`;
const apiUrl = `${restBaseUrl}/order?${orderTypeQuery}&fulfillerStatus=${fulfillerStatus}&v=full`;

const mutateOrders = useCallback(
() =>
mutate(
(key) =>
typeof key === "string" &&
key.startsWith(
`/ws/rest/v1/order?orderType=${laboratoryOrderTypeUuid}`
`${restBaseUrl}/order?orderTypes=${laboratoryOrderTypeUuid}`
)
),
[laboratoryOrderTypeUuid]
Expand Down

0 comments on commit c9b2847

Please sign in to comment.