@cc-openmrs/cc-esm-active-prescriptions 1.0.39 → 1.0.40
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.
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"auxiliaryFiles": [
|
|
109
109
|
"91.js.map"
|
|
110
110
|
],
|
|
111
|
-
"hash": "
|
|
111
|
+
"hash": "f1dcd5503ef8293f",
|
|
112
112
|
"childrenByOrder": {}
|
|
113
113
|
},
|
|
114
114
|
{
|
|
@@ -589,7 +589,7 @@
|
|
|
589
589
|
"auxiliaryFiles": [
|
|
590
590
|
"main.js.map"
|
|
591
591
|
],
|
|
592
|
-
"hash": "
|
|
592
|
+
"hash": "09a96b5648a86c87",
|
|
593
593
|
"childrenByOrder": {}
|
|
594
594
|
},
|
|
595
595
|
{
|
package/dist/routes.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"Red box","component":"redBox","slot":"Boxes"},{"name":"Blue box","component":"blueBox","slot":"Boxes"},{"name":"Brand box","component":"blueBox","slot":"Boxes"},{"name":"Prescriptions","component":"root","slot":"patient-actions","order":50},{"name":"Prescriptions action","component":"
|
|
1
|
+
{"$schema":"https://json.openmrs.org/routes.schema.json","backendDependencies":{"fhir2":">=1.2","webservices.rest":">=2.2.0"},"extensions":[{"name":"Red box","component":"redBox","slot":"Boxes"},{"name":"Blue box","component":"blueBox","slot":"Boxes"},{"name":"Brand box","component":"blueBox","slot":"Boxes"},{"name":"Prescriptions","component":"root","slot":"patient-actions","order":50},{"name":"Prescriptions action","component":"prescriptionsActionMenuItem","slot":"action-menu-patient-chart-items-slot","order":50,"meta":{"label":"Prescriptions","icon":"pill"}}],"pages":[{"component":"root","route":"root"}],"workspaces2":[{"name":"cc-active-prescriptions-workspace","component":"root","window":"cc-active-prescriptions-window"}],"workspaceWindows2":[{"name":"cc-active-prescriptions-window","group":"patient-chart"}],"workspaceGroups2":[{"name":"patient-chart","scopePattern":"/patient/([^/]+)/chart"}],"version":"1.0.40"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cc-openmrs/cc-esm-active-prescriptions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "An OpenMRS seed application for building microfrontends",
|
|
6
6
|
"browser": "dist/openmrs-esm-template-app.js",
|
|
@@ -108,4 +108,4 @@
|
|
|
108
108
|
"*.{css,scss,ts,tsx}": "prettier --write --list-different"
|
|
109
109
|
},
|
|
110
110
|
"packageManager": "yarn@4.10.3"
|
|
111
|
-
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { OverflowMenuItem } from '@carbon/react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { launchWorkspace } from '@openmrs/esm-framework';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
patient: fhir.Patient;
|
|
8
|
+
closeMenu?: () => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const PrescriptionsActionMenuItem: React.FC<Props> = ({ patient, closeMenu }) => {
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
|
|
14
|
+
const onClick = useCallback(() => {
|
|
15
|
+
launchWorkspace('cc-active-prescriptions-workspace', {
|
|
16
|
+
patientUuid: patient.id,
|
|
17
|
+
openedFrom: 'patient-chart-actions',
|
|
18
|
+
});
|
|
19
|
+
}, [patient]);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<OverflowMenuItem
|
|
23
|
+
itemText={t('prescriptions', 'Prescriptions')}
|
|
24
|
+
onClick={onClick}
|
|
25
|
+
closeMenu={closeMenu}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default PrescriptionsActionMenuItem;
|
package/src/index.ts
CHANGED
|
@@ -43,7 +43,5 @@ export const root = getAsyncLifecycle(() => import('./root.component'), options)
|
|
|
43
43
|
* The following are named exports for the extensions defined in this frontend modules. See the `routes.json` file to see how these are used.
|
|
44
44
|
*/
|
|
45
45
|
export const redBox = getAsyncLifecycle(() => import('./boxes/extensions/red-box.component'), options);
|
|
46
|
-
|
|
47
46
|
export const blueBox = getAsyncLifecycle(() => import('./boxes/extensions/blue-box.component'), options);
|
|
48
|
-
|
|
49
47
|
export const brandBox = getAsyncLifecycle(() => import('./boxes/extensions/brand-box.component'), options);
|
package/src/routes.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "Prescriptions action",
|
|
31
|
-
"component": "
|
|
31
|
+
"component": "prescriptionsActionMenuItem",
|
|
32
32
|
"slot": "action-menu-patient-chart-items-slot",
|
|
33
33
|
"order": 50,
|
|
34
34
|
"meta": {
|
|
@@ -42,5 +42,24 @@
|
|
|
42
42
|
"component": "root",
|
|
43
43
|
"route": "root"
|
|
44
44
|
}
|
|
45
|
+
],
|
|
46
|
+
"workspaces2": [
|
|
47
|
+
{
|
|
48
|
+
"name": "cc-active-prescriptions-workspace",
|
|
49
|
+
"component": "root",
|
|
50
|
+
"window": "cc-active-prescriptions-window"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"workspaceWindows2": [
|
|
54
|
+
{
|
|
55
|
+
"name": "cc-active-prescriptions-window",
|
|
56
|
+
"group": "patient-chart"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"workspaceGroups2": [
|
|
60
|
+
{
|
|
61
|
+
"name": "patient-chart",
|
|
62
|
+
"scopePattern": "/patient/([^/]+)/chart"
|
|
63
|
+
}
|
|
45
64
|
]
|
|
46
65
|
}
|