@openmrs/esm-patient-common-lib 9.0.1-pre.6557 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-patient-common-lib",
3
- "version": "9.0.1-pre.6557",
3
+ "version": "9.1.0",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Library for common patient chart components",
6
6
  "browser": "dist/openmrs-esm-patient-common-lib.js",
@@ -37,6 +37,5 @@
37
37
  "@openmrs/esm-framework": "6.x",
38
38
  "react": "18.x",
39
39
  "single-spa": "6.x"
40
- },
41
- "stableVersion": "9.0.0"
40
+ }
42
41
  }
@@ -70,6 +70,7 @@ export interface OrderBasketItem {
70
70
  previousOrder?: string;
71
71
  orderType?: string;
72
72
  orderNumber?: string;
73
+ scheduledDate?: Date;
73
74
  }
74
75
 
75
76
  export type OrderUrgency = 'ROUTINE' | 'STAT' | 'ON_SCHEDULED_DATE';
@@ -96,6 +97,7 @@ export interface OrderPost {
96
97
  instructions?: string;
97
98
  accessionNumber?: string;
98
99
  orderType?: string;
100
+ scheduledDate?: string;
99
101
  }
100
102
 
101
103
  export interface DrugOrderPost extends OrderPost {
@@ -1,10 +1,11 @@
1
1
  import { useCallback, useMemo } from 'react';
2
2
  import useSWR, { useSWRConfig } from 'swr';
3
- import { type FetchResponse, openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
3
+ import { type FetchResponse, openmrsFetch, restBaseUrl, translateFrom } from '@openmrs/esm-framework';
4
4
  import type { PatientOrderFetchResponse, PriorityOption } from './types';
5
5
 
6
6
  export type Status = 'ACTIVE' | 'any';
7
7
  export const careSettingUuid = '6f0c9a92-6f24-11e3-af88-005056821db0';
8
+ const patientChartAppModuleName = '@openmrs/esm-patient-chart-app';
8
9
 
9
10
  export const drugCustomRepresentation =
10
11
  'custom:(uuid,dosingType,orderNumber,accessionNumber,' +
@@ -62,6 +63,7 @@ export function getDrugOrderByUuid(orderUuid: string) {
62
63
 
63
64
  // See the Urgency enum in https://github.com/openmrs/openmrs-core/blob/492dcd35b85d48730bd19da48f6db146cc882c22/api/src/main/java/org/openmrs/Order.java
64
65
  export const priorityOptions: PriorityOption[] = [
65
- { value: 'ROUTINE', label: 'Routine' },
66
- { value: 'STAT', label: 'Stat' },
66
+ { value: 'ROUTINE', label: translateFrom(patientChartAppModuleName, 'Routine') },
67
+ { value: 'STAT', label: translateFrom(patientChartAppModuleName, 'Stat') },
68
+ { value: 'ON_SCHEDULED_DATE', label: translateFrom(patientChartAppModuleName, 'On scheduled date') },
67
69
  ];