@openmrs/esm-dispensing-app 1.0.0-pre.33 → 1.0.0-pre.41
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/.github/workflows/node.js.yml +2 -2
- package/jest.config.json +3 -3
- package/package.json +22 -25
- package/src/components/history-and-comments.component.tsx +6 -3
- package/src/components/history-and-comments.scss +1 -1
- package/src/components/medication-card.component.tsx +1 -1
- package/src/components/medication-card.scss +2 -2
- package/src/components/order-expanded.component.tsx +15 -8
- package/src/components/order-expanded.scss +24 -35
- package/src/components/patient-details.scss +8 -16
- package/src/components/prescription-details.component.tsx +3 -3
- package/src/components/prescription-details.scss +4 -4
- package/src/constants.ts +1 -1
- package/src/dispensing-link.tsx +2 -2
- package/src/dispensing-tiles/dispensing-tile.component.tsx +5 -3
- package/src/dispensing-tiles/dispensing-tile.scss +13 -9
- package/src/dispensing-tiles/dispensing-tiles.component.tsx +1 -1
- package/src/dispensing-tiles/dispensing-tiles.scss +4 -4
- package/src/dispensing.component.tsx +1 -2
- package/src/index.ts +1 -1
- package/src/medication-request/medication-request.resource.tsx +6 -2
- package/src/pharmacy-header/pharmacy-header.component.tsx +3 -4
- package/src/pharmacy-header/pharmacy-header.scss +7 -8
- package/src/prescriptions/prescription-tab-lists.component.tsx +119 -78
- package/src/prescriptions/prescriptions.scss +25 -69
- package/src/root.scss +11 -12
- package/translations/en.json +3 -1
- package/dist/24.js +0 -2
- package/dist/24.js.LICENSE.txt +0 -16
- package/dist/294.js +0 -2
- package/dist/294.js.LICENSE.txt +0 -14
- package/dist/296.js +0 -1
- package/dist/299.js +0 -1
- package/dist/573.js +0 -1
- package/dist/574.js +0 -1
- package/dist/595.js +0 -2
- package/dist/595.js.LICENSE.txt +0 -1
- package/dist/614.js +0 -2
- package/dist/614.js.LICENSE.txt +0 -44
- package/dist/781.js +0 -1
- package/dist/906.js +0 -1
- package/dist/978.js +0 -1
- package/dist/openmrs-esm-dispensing-app.js +0 -1
- package/dist/openmrs-esm-dispensing-app.js.buildmanifest.json +0 -317
- package/dist/openmrs-esm-dispensing-app.old +0 -1
- package/src/dispensing.scss +0 -3
|
@@ -51,9 +51,9 @@ jobs:
|
|
|
51
51
|
with:
|
|
52
52
|
node-version: "16.x"
|
|
53
53
|
registry-url: "https://registry.npmjs.org"
|
|
54
|
-
- run:
|
|
54
|
+
- run: yarn
|
|
55
55
|
- run: sed -i -e "s/\(\"version\":\\s\+\"\([0-9]\+\.\?\)\+\)/\1-pre.${{ github.run_number }}/" 'package.json'
|
|
56
|
-
- run:
|
|
56
|
+
- run: yarn publish --access public --tag next
|
|
57
57
|
env:
|
|
58
58
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
59
59
|
|
package/jest.config.json
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"/node_modules/(?!@openmrs)"
|
|
7
7
|
],
|
|
8
8
|
"moduleNameMapper": {
|
|
9
|
-
"^@carbon/icons-react/es/(.*)$": "@carbon/icons-react/lib/$1",
|
|
10
|
-
"^carbon-components-react/es/(.*)$": "carbon-components-react/lib/$1",
|
|
11
9
|
"@openmrs/esm-framework": "@openmrs/esm-framework/mock",
|
|
12
|
-
"\\.(s?css)$": "identity-obj-proxy"
|
|
10
|
+
"\\.(s?css)$": "identity-obj-proxy",
|
|
11
|
+
"^lodash-es/(.*)$": "lodash/$1",
|
|
12
|
+
"^uuid$": "<rootDir>/node_modules/uuid/dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"setupFilesAfterEnv": [
|
|
15
15
|
"<rootDir>/src/setup-tests.ts"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-dispensing-app",
|
|
3
|
-
"version": "1.0.0-pre.
|
|
3
|
+
"version": "1.0.0-pre.41",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Medication dispensing application",
|
|
6
6
|
"browser": "dist/openmrs-esm-dispensing-app.js",
|
|
@@ -41,34 +41,30 @@
|
|
|
41
41
|
"url": "https://github.com/openmrs/openmrs-esm-dispensing/issues"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@carbon/
|
|
45
|
-
"carbon-components-react": "^7.25.0",
|
|
44
|
+
"@carbon/react": "^1.9.0",
|
|
46
45
|
"lodash-es": "^4.17.15",
|
|
47
46
|
"swr": "^1.3.0"
|
|
48
47
|
},
|
|
49
48
|
"peerDependencies": {
|
|
50
|
-
"@openmrs/esm-framework": "
|
|
51
|
-
"carbon-components": "10.x",
|
|
52
|
-
"carbon-icons": "7.x",
|
|
49
|
+
"@openmrs/esm-framework": "4.x",
|
|
53
50
|
"dayjs": "1.x",
|
|
54
|
-
"react": "
|
|
51
|
+
"react": "18.x",
|
|
52
|
+
"react-dom": "18.x",
|
|
55
53
|
"react-i18next": "11.x",
|
|
56
|
-
"react-router-dom": "
|
|
54
|
+
"react-router-dom": "6.x",
|
|
57
55
|
"rxjs": "6.x"
|
|
58
56
|
},
|
|
59
57
|
"devDependencies": {
|
|
60
|
-
"@openmrs/esm-framework": "
|
|
58
|
+
"@openmrs/esm-framework": "next",
|
|
61
59
|
"@swc/core": "^1.2.189",
|
|
62
60
|
"@swc/jest": "^0.2.21",
|
|
63
|
-
"@testing-library/dom": "^
|
|
64
|
-
"@testing-library/jest-dom": "^5.
|
|
65
|
-
"@testing-library/react": "^
|
|
66
|
-
"@testing-library/user-event": "^
|
|
67
|
-
"@types/
|
|
68
|
-
"@types/
|
|
69
|
-
"@types/
|
|
70
|
-
"@types/react": "^16.14.5",
|
|
71
|
-
"@types/react-dom": "^16.9.14",
|
|
61
|
+
"@testing-library/dom": "^8.16.0",
|
|
62
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
63
|
+
"@testing-library/react": "^13.3.0",
|
|
64
|
+
"@testing-library/user-event": "^14.2.1",
|
|
65
|
+
"@types/jest": "^28.1.4",
|
|
66
|
+
"@types/react": "^18.0.14",
|
|
67
|
+
"@types/react-dom": "^18.0.5",
|
|
72
68
|
"@types/react-router": "^5.1.14",
|
|
73
69
|
"@types/react-router-dom": "^5.1.7",
|
|
74
70
|
"@types/webpack-env": "^1.16.0",
|
|
@@ -80,19 +76,20 @@
|
|
|
80
76
|
"eslint-plugin-prettier": "^3.4.0",
|
|
81
77
|
"husky": "^6.0.0",
|
|
82
78
|
"identity-obj-proxy": "^3.0.0",
|
|
83
|
-
"jest": "^
|
|
84
|
-
"jest-cli": "^
|
|
85
|
-
"
|
|
79
|
+
"jest": "^28.1.2",
|
|
80
|
+
"jest-cli": "^28.1.2",
|
|
81
|
+
"jest-environment-jsdom": "^28.1.2",
|
|
82
|
+
"openmrs": "next",
|
|
86
83
|
"prettier": "^2.3.0",
|
|
87
84
|
"pretty-quick": "^3.1.0",
|
|
88
|
-
"react": "^
|
|
89
|
-
"react-dom": "^
|
|
85
|
+
"react": "^18.2.0",
|
|
86
|
+
"react-dom": "^18.2.0",
|
|
90
87
|
"react-i18next": "^11.7.0",
|
|
91
|
-
"react-router-dom": "^
|
|
88
|
+
"react-router-dom": "^6.3.0",
|
|
92
89
|
"rxjs": "^6.5.4",
|
|
93
90
|
"typescript": "^4.3.2"
|
|
94
91
|
},
|
|
95
92
|
"resolutions": {
|
|
96
|
-
"**/@types/react": "^
|
|
93
|
+
"**/@types/react": "^18.0.14"
|
|
97
94
|
}
|
|
98
95
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OverflowMenuVertical16 } from "@carbon/icons-react";
|
|
2
|
-
import { Button, Form, TextInput } from "carbon-components-react";
|
|
3
1
|
import React from "react";
|
|
2
|
+
import { Button, Form, TextInput } from "@carbon/react";
|
|
3
|
+
import { OverflowMenuVertical } from "@carbon/react/icons";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import styles from "./history-and-comments.scss";
|
|
6
6
|
|
|
@@ -19,7 +19,10 @@ const HistoryAndComments: React.FC = () => {
|
|
|
19
19
|
<Button kind="primary" tabIndex={0} type="submit">
|
|
20
20
|
{t("post", "Post")}
|
|
21
21
|
</Button>
|
|
22
|
-
<Button
|
|
22
|
+
<Button
|
|
23
|
+
kind="ghost"
|
|
24
|
+
renderIcon={(props) => <OverflowMenuVertical size={16} />}
|
|
25
|
+
>
|
|
23
26
|
{t("addItem", "Add item")}
|
|
24
27
|
</Button>
|
|
25
28
|
</Form>
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { DosageInstruction, MedicationRequest } from "../types";
|
|
3
3
|
import styles from "./medication-card.scss";
|
|
4
4
|
import { getDosageInstruction } from "../utils";
|
|
5
|
-
import { Tile } from "carbon
|
|
5
|
+
import { Tile } from "@carbon/react";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
7
|
|
|
8
8
|
const MedicationCard: React.FC<{ medication: MedicationRequest }> = ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PatientUuid } from "@openmrs/esm-framework";
|
|
3
|
-
import { Tab, Tabs } from "carbon
|
|
3
|
+
import { Tab, Tabs, TabList, TabPanels, TabPanel } from "@carbon/react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import HistoryAndComments from "./history-and-comments.component";
|
|
6
6
|
import styles from "./order-expanded.scss";
|
|
@@ -43,13 +43,20 @@ const OrderExpanded: React.FC<{
|
|
|
43
43
|
];
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
|
-
<div className={styles.
|
|
47
|
-
<Tabs
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
<div className={styles.expandedTabsContainer}>
|
|
47
|
+
<Tabs>
|
|
48
|
+
<TabList>
|
|
49
|
+
{tabs.map((tab: TabItem, index: number) => (
|
|
50
|
+
<Tab key={index} className={styles.orderTabs}>
|
|
51
|
+
{tab.name}
|
|
52
|
+
</Tab>
|
|
53
|
+
))}
|
|
54
|
+
</TabList>
|
|
55
|
+
<TabPanels>
|
|
56
|
+
{tabs.map((tab: TabItem) => (
|
|
57
|
+
<TabPanel>{tab.component}</TabPanel>
|
|
58
|
+
))}
|
|
59
|
+
</TabPanels>
|
|
53
60
|
</Tabs>
|
|
54
61
|
</div>
|
|
55
62
|
);
|
|
@@ -1,57 +1,46 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use '@carbon/styles/scss/spacing';
|
|
2
|
+
@use '@carbon/styles/scss/type';
|
|
3
3
|
@import "~@openmrs/esm-styleguide/src/vars";
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.expandedTabsContainer {
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: row;
|
|
9
|
-
width: 100%;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
:global(.bx--tab-content) {
|
|
13
|
-
width: 100% !important;
|
|
14
|
-
}
|
|
15
9
|
|
|
16
|
-
:global(.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
.tabsContainer {
|
|
22
|
-
margin: 1rem 0;
|
|
23
|
-
width: 20%;
|
|
24
|
-
|
|
25
|
-
&:global(.bx--tabs--scrollable .bx--tabs--scrollable__nav-item+.bx--tabs--scrollable__nav-item) {
|
|
26
|
-
margin-left: 0rem !important;
|
|
10
|
+
:global(.cds--tabs) {
|
|
11
|
+
margin: 1rem 0;
|
|
12
|
+
width: 20%;
|
|
13
|
+
max-height: 8rem !important;
|
|
27
14
|
}
|
|
28
15
|
|
|
29
|
-
|
|
16
|
+
:global(.cds--tab--list) {
|
|
30
17
|
flex-direction: column !important;
|
|
31
18
|
}
|
|
32
19
|
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
:global(.cds--tab-content) {
|
|
21
|
+
margin: 1rem 0;
|
|
22
|
+
width: 100% !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:global(.cds--tabs__nav-link) {
|
|
26
|
+
border-bottom: 0 !important;
|
|
27
|
+
border-left: 3px solid $ui-03 !important;
|
|
35
28
|
}
|
|
36
29
|
|
|
37
|
-
:global(.
|
|
30
|
+
:global(.cds--tabs__nav-item--selected) {
|
|
38
31
|
border-bottom: 0px !important;
|
|
39
32
|
border-left: 3px solid var(--brand-03) !important;
|
|
40
33
|
}
|
|
41
|
-
}
|
|
42
34
|
|
|
43
|
-
.
|
|
44
|
-
|
|
35
|
+
&:global(.cds--tabs--scrollable .cds--tabs--scrollable__nav-item+.cds--tabs--scrollable__nav-item) {
|
|
36
|
+
margin-left: 0rem !important;
|
|
37
|
+
}
|
|
45
38
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
border-left: 3px solid $ui-03 !important;
|
|
39
|
+
>ul {
|
|
40
|
+
flex-direction: column !important;
|
|
49
41
|
}
|
|
50
42
|
|
|
51
|
-
button
|
|
52
|
-
|
|
53
|
-
button:active {
|
|
54
|
-
outline: 0 !important;
|
|
55
|
-
outline-offset: 0 !important;
|
|
43
|
+
>ul>li button {
|
|
44
|
+
width: 12rem !important;
|
|
56
45
|
}
|
|
57
46
|
}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use '@carbon/styles/scss/spacing';
|
|
2
|
+
@use '@carbon/styles/scss/type';
|
|
3
3
|
@import "~@openmrs/esm-styleguide/src/vars";
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
.patientDetailsContainer > div {
|
|
7
6
|
margin-bottom: 1rem;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
9
|
.container {
|
|
17
10
|
border-bottom: 0.063rem solid $ui-03;
|
|
18
11
|
background-color: $ui-02;
|
|
@@ -27,9 +20,8 @@
|
|
|
27
20
|
}
|
|
28
21
|
|
|
29
22
|
.patientName {
|
|
30
|
-
@include
|
|
23
|
+
@include type.type-style('heading-03');
|
|
31
24
|
margin-right: 0.25rem;
|
|
32
|
-
color: $text-01;
|
|
33
25
|
}
|
|
34
26
|
|
|
35
27
|
.patientAvatar {
|
|
@@ -52,7 +44,7 @@
|
|
|
52
44
|
}
|
|
53
45
|
|
|
54
46
|
.demographics {
|
|
55
|
-
@include
|
|
47
|
+
@include type.type-style('body-compact-02');
|
|
56
48
|
color: $text-02;
|
|
57
49
|
margin-top: 0.375rem;
|
|
58
50
|
}
|
|
@@ -65,7 +57,7 @@
|
|
|
65
57
|
}
|
|
66
58
|
|
|
67
59
|
.patientNameRow {
|
|
68
|
-
margin-top:
|
|
60
|
+
margin-top: spacing.$spacing-05;
|
|
69
61
|
}
|
|
70
62
|
|
|
71
63
|
.flexRow {
|
|
@@ -75,7 +67,7 @@
|
|
|
75
67
|
}
|
|
76
68
|
|
|
77
69
|
.identifiers {
|
|
78
|
-
@include
|
|
70
|
+
@include type.type-style('body-compact-02');
|
|
79
71
|
color: $ui-04;
|
|
80
72
|
margin-top: 0.375rem;
|
|
81
73
|
}
|
|
@@ -89,11 +81,11 @@
|
|
|
89
81
|
}
|
|
90
82
|
|
|
91
83
|
.actionsButtonText {
|
|
92
|
-
@include
|
|
84
|
+
@include type.type-style('body-compact-01');
|
|
93
85
|
color: $interactive-01;
|
|
94
86
|
}
|
|
95
87
|
|
|
96
|
-
:global(.
|
|
88
|
+
:global(.cds--tooltip--definition .cds--tooltip__trigger) {
|
|
97
89
|
border-bottom: none;
|
|
98
90
|
}
|
|
99
91
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DataTableSkeleton, Tile } from "carbon
|
|
1
|
+
import { DataTableSkeleton, Tile } from "@carbon/react";
|
|
2
2
|
import React, { useEffect, useState } from "react";
|
|
3
3
|
import styles from "./prescription-details.scss";
|
|
4
|
-
import {
|
|
4
|
+
import { WarningFilled } from "@carbon/react/icons";
|
|
5
5
|
import {
|
|
6
6
|
useOrderDetails,
|
|
7
7
|
usePatientAllergies,
|
|
@@ -32,7 +32,7 @@ const PrescriptionDetails: React.FC<{
|
|
|
32
32
|
<Tile className={styles.allergiesTile}>
|
|
33
33
|
<div className={styles.allergesContent}>
|
|
34
34
|
<div>
|
|
35
|
-
<
|
|
35
|
+
<WarningFilled size={24} className={styles.allergiesIcon} />
|
|
36
36
|
<p>
|
|
37
37
|
<span style={{ fontWeight: "bold" }}>
|
|
38
38
|
{totalAllergies} allergies
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
1
|
+
@use '@carbon/styles/scss/spacing';
|
|
2
|
+
@use '@carbon/styles/scss/type';
|
|
3
3
|
@import "~@openmrs/esm-styleguide/src/vars";
|
|
4
4
|
|
|
5
5
|
.prescriptionContainer {
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
width: 100%;
|
|
9
9
|
margin-bottom: 1rem;
|
|
10
10
|
|
|
11
|
-
&:global(.
|
|
11
|
+
&:global(.cds--tile) {
|
|
12
12
|
min-height: 3rem !important;
|
|
13
13
|
padding-left: 10px !important;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.prescriptionContainer > :global(.
|
|
17
|
+
.prescriptionContainer > :global(.cds--tile) {
|
|
18
18
|
min-height: 3rem !important;
|
|
19
19
|
padding-left: 10px !important;
|
|
20
20
|
margin: auto;
|
package/src/constants.ts
CHANGED
package/src/dispensing-link.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ConfigurableLink } from "@openmrs/esm-framework";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
|
-
import {
|
|
4
|
+
import { spaBasePath } from "./constants";
|
|
5
5
|
|
|
6
6
|
export default function DispensingLink() {
|
|
7
7
|
const { t } = useTranslation();
|
|
8
8
|
return (
|
|
9
|
-
<ConfigurableLink to={
|
|
9
|
+
<ConfigurableLink to={spaBasePath}>
|
|
10
10
|
{t("dispensing", "Dispensing")}
|
|
11
11
|
</ConfigurableLink>
|
|
12
12
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
-
import { Tile, Button } from "carbon
|
|
4
|
-
import
|
|
3
|
+
import { Tile, Button } from "@carbon/react";
|
|
4
|
+
import { ArrowRight } from "@carbon/react/icons";
|
|
5
5
|
import styles from "./dispensing-tile.scss";
|
|
6
6
|
|
|
7
7
|
interface DispensingTileProps {
|
|
@@ -28,7 +28,9 @@ const DispensingTile: React.FC<DispensingTileProps> = ({
|
|
|
28
28
|
</div>
|
|
29
29
|
<Button
|
|
30
30
|
kind="ghost"
|
|
31
|
-
renderIcon={
|
|
31
|
+
renderIcon={(props) => (
|
|
32
|
+
<ArrowRight size={16} className={styles.arrowIcon} />
|
|
33
|
+
)}
|
|
32
34
|
iconDescription={t("view", "View")}
|
|
33
35
|
>
|
|
34
36
|
{t("view", "View")}
|
|
@@ -1,39 +1,43 @@
|
|
|
1
|
+
@use '@carbon/styles/scss/spacing';
|
|
2
|
+
@use '@carbon/styles/scss/type';
|
|
1
3
|
@import "~@openmrs/esm-styleguide/src/vars";
|
|
2
|
-
@import "~carbon-components/src/globals/scss/vars";
|
|
3
|
-
@import "~carbon-components/src/globals/scss/mixins";
|
|
4
4
|
|
|
5
5
|
.tileContainer {
|
|
6
6
|
border: 0.0625rem solid $ui-03;
|
|
7
7
|
flex-grow: 1;
|
|
8
8
|
height: 7.875rem;
|
|
9
|
-
padding: 0
|
|
10
|
-
margin:
|
|
9
|
+
padding: 0 spacing.$spacing-05;
|
|
10
|
+
margin: spacing.$spacing-03 spacing.$spacing-03;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.tileHeader {
|
|
14
14
|
display: flex;
|
|
15
15
|
justify-content: space-between;
|
|
16
16
|
align-items: center;
|
|
17
|
-
margin-bottom:
|
|
17
|
+
margin-bottom: spacing.$spacing-03;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.headerLabel {
|
|
21
|
-
@include
|
|
21
|
+
@include type.type-style("heading-01");
|
|
22
22
|
color: $text-02;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.totalsLabel {
|
|
26
|
-
@include
|
|
26
|
+
@include type.type-style("label-01");
|
|
27
27
|
color: $text-02;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.totalsValue {
|
|
31
|
-
@include
|
|
31
|
+
@include type.type-style("heading-04");
|
|
32
32
|
color: $ui-05;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
.headerLabelContainer {
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
|
38
|
-
height:
|
|
38
|
+
height: spacing.$spacing-07;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.arrowIcon {
|
|
42
|
+
fill: var(--cds-link-primary, #0f62fe) !important;
|
|
39
43
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
-
import { DataTableSkeleton } from "carbon
|
|
3
|
+
import { DataTableSkeleton } from "@carbon/react";
|
|
4
4
|
import { useMetrics } from "./dispensing-tiles.resource";
|
|
5
5
|
import DispensingTile from "./dispensing-tile.component";
|
|
6
6
|
import styles from "./dispensing-tiles.scss";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
@use '@carbon/styles/scss/spacing';
|
|
2
|
+
@use '@carbon/styles/scss/type';
|
|
1
3
|
@import "~@openmrs/esm-styleguide/src/vars";
|
|
2
|
-
@import "~carbon-components/src/globals/scss/vars";
|
|
3
|
-
@import "~carbon-components/src/globals/scss/mixins";
|
|
4
4
|
|
|
5
5
|
.cardContainer {
|
|
6
6
|
background-color: $ui-02 ;
|
|
7
7
|
display: flex;
|
|
8
8
|
justify-content: space-between;
|
|
9
|
-
padding: 0
|
|
9
|
+
padding: 0 spacing.$spacing-05 spacing.$spacing-10 spacing.$spacing-03;
|
|
10
10
|
flex-flow: row wrap;
|
|
11
|
-
margin-top:
|
|
11
|
+
margin-top: - spacing.$spacing-03;
|
|
12
12
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import styles from "./dispensing.scss";
|
|
3
2
|
import { PharmacyHeader } from "./pharmacy-header/pharmacy-header.component";
|
|
4
3
|
import DispensingTiles from "./dispensing-tiles/dispensing-tiles.component";
|
|
5
4
|
import PrescriptionTabLists from "./prescriptions/prescription-tab-lists.component";
|
|
6
5
|
|
|
7
6
|
export default function Dispensing() {
|
|
8
7
|
return (
|
|
9
|
-
<div className={`omrs-main-content
|
|
8
|
+
<div className={`omrs-main-content`}>
|
|
10
9
|
<PharmacyHeader />
|
|
11
10
|
<DispensingTiles />
|
|
12
11
|
<PrescriptionTabLists />
|
package/src/index.ts
CHANGED
|
@@ -62,8 +62,12 @@ interface FHIREncounterOrder {
|
|
|
62
62
|
status: string;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
export function useOrders(
|
|
66
|
-
|
|
65
|
+
export function useOrders(
|
|
66
|
+
pageSize: number = 10,
|
|
67
|
+
pageOffset: number = 0,
|
|
68
|
+
patientSearchTerm: string = ""
|
|
69
|
+
) {
|
|
70
|
+
const url = `/ws/fhir2/R4/Encounter?_getpagesoffset=${pageOffset}&_count=${pageSize}&subject.name=${patientSearchTerm}&_revinclude=MedicationRequest:encounter&_has:MedicationRequest:encounter:intent=order&_tag=http%3A%2F%2Ffhir.openmrs.org%2Fext%2Fencounter-tag%7Cencounter`;
|
|
67
71
|
const { data, error } = useSWR<
|
|
68
72
|
{ data: FHIRMedicationRequestResponse },
|
|
69
73
|
Error
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
-
import
|
|
4
|
-
import Location16 from "@carbon/icons-react/es/location/16";
|
|
3
|
+
import { Calendar, Location } from "@carbon/react/icons";
|
|
5
4
|
import { useConfig, useSession, formatDate } from "@openmrs/esm-framework";
|
|
6
5
|
import { PharmacyConfig } from "../config-schema";
|
|
7
6
|
import PharmacyIllustration from "./pharmacy-illustration.component";
|
|
@@ -18,14 +17,14 @@ export const PharmacyHeader: React.FC = () => {
|
|
|
18
17
|
<div className={styles["left-justified-items"]}>
|
|
19
18
|
<PharmacyIllustration />
|
|
20
19
|
<div className={styles["page-labels"]}>
|
|
21
|
-
<
|
|
20
|
+
<Location size={16} />
|
|
22
21
|
<span className={styles.value}>{userLocation}</span>
|
|
23
22
|
<p className={styles["page-name"]}>{t("appName", config.appName)} </p>
|
|
24
23
|
</div>
|
|
25
24
|
</div>
|
|
26
25
|
<div className={styles["right-justified-items"]}>
|
|
27
26
|
<div className={styles["date-and-location"]}>
|
|
28
|
-
<
|
|
27
|
+
<Calendar size={16} />
|
|
29
28
|
<span className={styles.value}>
|
|
30
29
|
{formatDate(new Date(), { mode: "standard" })}
|
|
31
30
|
</span>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
@use '@carbon/styles/scss/spacing';
|
|
2
|
+
@use '@carbon/styles/scss/type';
|
|
1
3
|
@import '~@openmrs/esm-styleguide/src/vars';
|
|
2
|
-
@import '~carbon-components/src/globals/scss/vars';
|
|
3
|
-
@import '~carbon-components/src/globals/scss/mixins';
|
|
4
4
|
|
|
5
5
|
.header {
|
|
6
|
-
@include
|
|
6
|
+
@include type.type-style('body-compact-02');
|
|
7
7
|
color: $text-02;
|
|
8
|
-
height:
|
|
8
|
+
height: spacing.$spacing-12;
|
|
9
9
|
background-color: $ui-02;
|
|
10
10
|
border: 1px solid $ui-03;
|
|
11
11
|
border-left: 0px;
|
|
@@ -21,14 +21,13 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.right-justified-items {
|
|
24
|
-
@include
|
|
24
|
+
@include type.type-style('body-compact-02');
|
|
25
25
|
color: $text-02;
|
|
26
26
|
padding-top: 1rem;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.page-name {
|
|
30
|
-
@include
|
|
31
|
-
color: $text-01;
|
|
30
|
+
@include type.type-style('heading-04');
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
.page-labels {
|
|
@@ -54,5 +53,5 @@
|
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
.view {
|
|
57
|
-
@include
|
|
56
|
+
@include type.type-style('label-01');
|
|
58
57
|
}
|