-
Notifications
You must be signed in to change notification settings - Fork 246
/
Copy pathindex.ts
64 lines (52 loc) · 2.21 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { defineConfigSchema, getAsyncLifecycle, getSyncLifecycle } from '@openmrs/esm-framework';
import { createDashboardLink } from '@openmrs/esm-patient-common-lib';
import { configSchema } from './config-schema';
import orderBasketActionMenuComponent from './order-basket-action-button/order-basket-action-button.extension';
import { ordersDashboardMeta } from './dashboard.meta';
import OrdersSummary from './orders-summary/orders-summary.component';
export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');
const moduleName = '@openmrs/esm-patient-orders-app';
const options = {
featureName: 'patient-orders',
moduleName,
};
export function startupApp() {
defineConfigSchema(moduleName, configSchema);
}
// t('orderBasketWorkspaceTitle', 'Order Basket')
export const orderBasketWorkspace = getAsyncLifecycle(() => import('./order-basket/order-basket.workspace'), options);
// t('orderCancellation','Order cancellation')
export const patientOrdersFormWorkspace = getAsyncLifecycle(
() => import('./order-cancellation-form/cancel-order-form.component'),
options,
);
// t('enterTestResults', 'Enter test results')
export const testResultsFormWorkspace = getAsyncLifecycle(
() => import('./lab-results/lab-results-form.component'),
options,
);
export const orderBasketActionMenu = getSyncLifecycle(orderBasketActionMenuComponent, options);
export const orderPriceDetailsExtension = getAsyncLifecycle(
() => import('./components/order-price-details.component'),
options,
);
export const orderStockDetailsExtension = getAsyncLifecycle(
() => import('./components/order-stock-details.component'),
options,
);
export const ordersDashboardLink =
// t('Orders', 'Orders')
getSyncLifecycle(
createDashboardLink({
...ordersDashboardMeta,
moduleName,
}),
options,
);
export const ordersDashboard = getSyncLifecycle(OrdersSummary, options);
export const labResult = getAsyncLifecycle(() => import('./lab-results/lab-result.component'), options);
// t('searchOrderables','Search orderables')
export const orderableConceptSearch = getAsyncLifecycle(
() => import('./order-basket/general-order-type/orderable-concept-search/orderable-concept-search.workspace'),
options,
);