@openmrs/esm-fast-data-entry-app 1.0.0-pre.59 → 1.0.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/README.md +21 -2
- package/__mocks__/react-i18next.js +9 -14
- package/dist/101.js +1 -0
- package/dist/101.js.map +1 -0
- package/dist/132.js +1 -1
- package/dist/188.js +1 -0
- package/dist/188.js.map +1 -0
- package/dist/197.js +1 -0
- package/dist/219.js +1 -0
- package/dist/219.js.map +1 -0
- package/dist/221.js +1 -0
- package/dist/221.js.map +1 -0
- package/dist/259.js +1 -0
- package/dist/259.js.map +1 -0
- package/dist/29.js +2 -0
- package/dist/29.js.LICENSE.txt +3 -0
- package/dist/29.js.map +1 -0
- package/dist/300.js +1 -0
- package/dist/326.js +1 -0
- package/dist/326.js.map +1 -0
- package/dist/335.js +1 -0
- package/dist/367.js +1 -0
- package/dist/367.js.map +1 -0
- package/dist/480.js +1 -0
- package/dist/540.js +2 -0
- package/dist/{536.js.LICENSE.txt → 540.js.LICENSE.txt} +3 -2
- package/dist/540.js.map +1 -0
- package/dist/55.js +1 -0
- package/dist/564.js +1 -0
- package/dist/564.js.map +1 -0
- package/dist/602.js +1 -0
- package/dist/602.js.map +1 -0
- package/dist/626.js +2 -0
- package/dist/{294.js.LICENSE.txt → 626.js.LICENSE.txt} +3 -8
- package/dist/626.js.map +1 -0
- package/dist/652.js +1 -0
- package/dist/685.js +1 -0
- package/dist/685.js.map +1 -0
- package/dist/773.js +2 -0
- package/dist/773.js.LICENSE.txt +32 -0
- package/dist/773.js.map +1 -0
- package/dist/893.js +1 -0
- package/dist/893.js.map +1 -0
- package/dist/91.js +1 -0
- package/dist/91.js.map +1 -0
- package/dist/941.js +2 -0
- package/dist/941.js.LICENSE.txt +30 -0
- package/dist/941.js.map +1 -0
- package/dist/961.js +2 -0
- package/dist/{935.js.LICENSE.txt → 961.js.LICENSE.txt} +6 -10
- package/dist/961.js.map +1 -0
- package/dist/99.js +1 -0
- package/dist/99.js.map +1 -0
- package/dist/991.js +1 -0
- package/dist/991.js.map +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -0
- package/dist/openmrs-esm-fast-data-entry-app.js +1 -1
- package/dist/openmrs-esm-fast-data-entry-app.js.buildmanifest.json +500 -122
- package/dist/openmrs-esm-fast-data-entry-app.js.map +1 -0
- package/dist/routes.json +1 -0
- package/jest.config.json +21 -18
- package/package.json +59 -62
- package/prettier.config.js +8 -0
- package/src/CancelModal.tsx +42 -0
- package/src/CompleteModal.tsx +35 -0
- package/src/FormBootstrap.tsx +45 -10
- package/src/Root.tsx +11 -9
- package/src/add-group-modal/AddGroupModal.tsx +249 -0
- package/src/add-group-modal/styles.scss +49 -0
- package/src/config-schema.ts +77 -16
- package/src/constant.ts +1 -1
- package/src/context/FormWorkflowContext.tsx +32 -33
- package/src/context/FormWorkflowReducer.ts +53 -67
- package/src/context/GroupFormWorkflowContext.tsx +155 -0
- package/src/context/GroupFormWorkflowReducer.ts +405 -0
- package/src/declarations.d.ts +4 -0
- package/src/empty-state/EmptyDataIllustration.tsx +4 -16
- package/src/empty-state/EmptyState.tsx +16 -17
- package/src/empty-state/styles.scss +14 -14
- package/src/form-entry-workflow/FormEntryWorkflow.tsx +89 -125
- package/src/{form-review-card → form-entry-workflow/form-review-card}/FormReviewCard.tsx +7 -7
- package/src/form-entry-workflow/form-review-card/index.ts +3 -0
- package/src/form-entry-workflow/form-review-card/styles.scss +37 -0
- package/src/form-entry-workflow/index.ts +1 -1
- package/src/form-entry-workflow/patient-banner/PatientBanner.test.tsx +9 -0
- package/src/{patient-banner → form-entry-workflow/patient-banner}/PatientBanner.tsx +14 -27
- package/src/form-entry-workflow/patient-banner/index.ts +3 -0
- package/src/form-entry-workflow/patient-banner/styles.scss +44 -0
- package/src/form-entry-workflow/patient-search-header/PatientSearchHeader.tsx +54 -0
- package/src/form-entry-workflow/patient-search-header/index.ts +3 -0
- package/src/form-entry-workflow/patient-search-header/styles.scss +25 -0
- package/src/form-entry-workflow/styles.scss +16 -16
- package/src/form-entry-workflow/workflow-review/WorkflowReview.tsx +37 -0
- package/src/form-entry-workflow/workflow-review/index.ts +3 -0
- package/src/{workflow-review → form-entry-workflow/workflow-review}/styles.scss +0 -4
- package/src/forms-app-menu-link.tsx +5 -7
- package/src/forms-page/FormsPage.tsx +48 -37
- package/src/forms-page/forms-table/FormsTable.tsx +117 -0
- package/src/forms-page/forms-table/index.ts +3 -0
- package/src/forms-page/forms-table/styles.scss +19 -0
- package/src/forms-page/index.ts +1 -1
- package/src/forms-page/styles.scss +3 -5
- package/src/group-form-entry-workflow/GroupFormEntryWorkflow.tsx +26 -0
- package/src/group-form-entry-workflow/GroupSessionWorkspace.tsx +207 -0
- package/src/group-form-entry-workflow/SessionDetailsForm.tsx +154 -0
- package/src/group-form-entry-workflow/SessionMetaWorkspace.tsx +99 -0
- package/src/group-form-entry-workflow/attendance-table/AttendanceTable.tsx +130 -0
- package/src/group-form-entry-workflow/attendance-table/index.ts +1 -0
- package/src/group-form-entry-workflow/configurable-questions/ConfigurableQuestionsSection.tsx +41 -0
- package/src/group-form-entry-workflow/group-display-header/GroupDisplayHeader.test.tsx +9 -0
- package/src/group-form-entry-workflow/group-display-header/GroupDisplayHeader.tsx +55 -0
- package/src/group-form-entry-workflow/group-display-header/index.ts +3 -0
- package/src/group-form-entry-workflow/group-display-header/styles.scss +60 -0
- package/src/group-form-entry-workflow/group-search/CompactGroupResults.tsx +128 -0
- package/src/group-form-entry-workflow/group-search/CompactGroupSearch.tsx +66 -0
- package/src/group-form-entry-workflow/group-search/GroupSearch.tsx +134 -0
- package/src/group-form-entry-workflow/group-search/compact-group-result.scss +63 -0
- package/src/group-form-entry-workflow/group-search/compact-group-search.scss +34 -0
- package/src/group-form-entry-workflow/group-search/group-search.scss +93 -0
- package/src/group-form-entry-workflow/group-search-header/GroupSearchHeader.tsx +72 -0
- package/src/group-form-entry-workflow/group-search-header/index.ts +3 -0
- package/src/group-form-entry-workflow/group-search-header/styles.scss +20 -0
- package/src/group-form-entry-workflow/index.ts +3 -0
- package/src/group-form-entry-workflow/styles.scss +94 -0
- package/src/hooks/index.ts +7 -5
- package/src/hooks/useForm.ts +56 -0
- package/src/hooks/useFormState.ts +3 -3
- package/src/hooks/useGetAllForms.ts +7 -15
- package/src/hooks/useGetEncounter.ts +3 -3
- package/src/hooks/useGetPatient.ts +3 -3
- package/src/hooks/useGetPatients.ts +32 -0
- package/src/hooks/useGetSystemSetting.ts +36 -0
- package/src/hooks/useKeyPress.ts +31 -0
- package/src/hooks/usePostEndpoint.ts +76 -0
- package/src/hooks/useSearchEndpoint.ts +103 -0
- package/src/hooks/useStartVisit.ts +82 -0
- package/src/index.ts +12 -72
- package/src/patient-card/PatientCard.tsx +10 -20
- package/src/patient-card/index.ts +1 -1
- package/src/patient-card/styles.scss +8 -8
- package/src/routes.json +24 -0
- package/src/setup-tests.ts +1 -1
- package/src/types.ts +20 -0
- package/tools/i18next-parser.config.js +93 -0
- package/translations/am.json +75 -0
- package/translations/ar.json +75 -0
- package/translations/en.json +57 -2
- package/translations/es.json +75 -0
- package/translations/fr.json +75 -0
- package/translations/he.json +75 -0
- package/translations/km.json +75 -0
- package/turbo.json +18 -0
- package/webpack.config.js +1 -1
- package/.editorconfig +0 -12
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -10
- package/.github/pull_request_template.md +0 -18
- package/.github/workflows/node.js.yml +0 -121
- package/.husky/pre-push +0 -1
- package/.prettierignore +0 -14
- package/dist/187.js +0 -1
- package/dist/247.js +0 -1
- package/dist/294.js +0 -2
- package/dist/312.js +0 -1
- package/dist/412.js +0 -1
- package/dist/536.js +0 -2
- package/dist/574.js +0 -1
- package/dist/592.js +0 -1
- package/dist/595.js +0 -2
- package/dist/595.js.LICENSE.txt +0 -1
- package/dist/776.js +0 -1
- package/dist/804.js +0 -1
- package/dist/880.js +0 -2
- package/dist/880.js.LICENSE.txt +0 -20
- package/dist/906.js +0 -1
- package/dist/935.js +0 -2
- package/dist/990.js +0 -1
- package/dist/openmrs-esm-fast-data-entry-app.old +0 -1
- package/src/declarations.d.tsx +0 -2
- package/src/form-review-card/index.ts +0 -3
- package/src/form-review-card/styles.scss +0 -38
- package/src/forms-table/FormsTable.tsx +0 -123
- package/src/forms-table/index.ts +0 -3
- package/src/forms-table/styles.scss +0 -20
- package/src/patient-banner/PatientBanner.test.tsx +0 -9
- package/src/patient-banner/index.ts +0 -3
- package/src/patient-banner/styles.scss +0 -44
- package/src/patient-search-header/PatientSearchHeader.tsx +0 -61
- package/src/patient-search-header/index.ts +0 -3
- package/src/patient-search-header/styles.scss +0 -21
- package/src/workflow-review/WorkflowReview.tsx +0 -35
- package/src/workflow-review/index.ts +0 -3
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
@import '~@openmrs/esm-styleguide/src/vars';
|
|
2
|
-
@import '~carbon-components/src/globals/scss/vars';
|
|
3
|
-
@import '~carbon-components/src/globals/scss/mixins';
|
|
4
|
-
|
|
5
|
-
.container {
|
|
6
|
-
height: $spacing-11;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
background-color: $ui-02;
|
|
10
|
-
border-top: 0.0125rem solid $ui-03;
|
|
11
|
-
border-bottom: 0.0125rem solid $ui-03;
|
|
12
|
-
padding: 0 $spacing-05;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.photoPlaceholder {
|
|
16
|
-
height: 48px;
|
|
17
|
-
width: 48px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.patientName {
|
|
21
|
-
@include carbon--type-style('productive-heading-03');
|
|
22
|
-
font-weight: 600;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.patientInfoContent {
|
|
26
|
-
width: 100%;
|
|
27
|
-
margin-left: 1rem;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.patientInfoRow {
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
& > button {
|
|
34
|
-
min-height: 2rem;
|
|
35
|
-
}
|
|
36
|
-
@include carbon--type-style('body-short-02');
|
|
37
|
-
color: $text-02;
|
|
38
|
-
column-gap: 0.8rem;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.patientEditBtn {
|
|
42
|
-
color: $ui-05;
|
|
43
|
-
margin: $spacing-03;
|
|
44
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Add20, Close20 } from "@carbon/icons-react";
|
|
2
|
-
import {
|
|
3
|
-
ExtensionSlot,
|
|
4
|
-
interpolateUrl,
|
|
5
|
-
navigate,
|
|
6
|
-
} from "@openmrs/esm-framework";
|
|
7
|
-
import { Button } from "carbon-components-react";
|
|
8
|
-
import React, { useContext } from "react";
|
|
9
|
-
import { Link } from "react-router-dom";
|
|
10
|
-
import FormWorkflowContext from "../context/FormWorkflowContext";
|
|
11
|
-
import styles from "./styles.scss";
|
|
12
|
-
|
|
13
|
-
const PatientSearchHeader = () => {
|
|
14
|
-
const { addPatient, workflowState, activeFormUuid } =
|
|
15
|
-
useContext(FormWorkflowContext);
|
|
16
|
-
const handleSelectPatient = (uuid) => {
|
|
17
|
-
addPatient(uuid);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
if (workflowState !== "NEW_PATIENT") return null;
|
|
21
|
-
|
|
22
|
-
const afterUrl = encodeURIComponent(
|
|
23
|
-
`\${openmrsSpaBase}/forms/${activeFormUuid}?patientUuid=\${patientUuid}`
|
|
24
|
-
);
|
|
25
|
-
const patientRegistrationUrl = interpolateUrl(
|
|
26
|
-
`\${openmrsSpaBase}/patient-registration?afterUrl=${afterUrl}`
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div className={styles.searchHeaderContainer}>
|
|
31
|
-
<span className={styles.padded}>Next patient:</span>
|
|
32
|
-
<span className={styles.searchBarWrapper}>
|
|
33
|
-
<ExtensionSlot
|
|
34
|
-
extensionSlotName="patient-search-bar-slot"
|
|
35
|
-
state={{
|
|
36
|
-
selectPatientAction: handleSelectPatient,
|
|
37
|
-
buttonProps: {
|
|
38
|
-
kind: "primary",
|
|
39
|
-
},
|
|
40
|
-
}}
|
|
41
|
-
/>
|
|
42
|
-
</span>
|
|
43
|
-
<span className={styles.padded}>or</span>
|
|
44
|
-
<span>
|
|
45
|
-
<Button onClick={() => navigate({ to: patientRegistrationUrl })}>
|
|
46
|
-
Create new patient <Add20 />
|
|
47
|
-
</Button>
|
|
48
|
-
</span>
|
|
49
|
-
<span style={{ flexGrow: 1 }} />
|
|
50
|
-
<span>
|
|
51
|
-
<Link to="">
|
|
52
|
-
<Button kind="ghost">
|
|
53
|
-
Cancel <Close20 />
|
|
54
|
-
</Button>
|
|
55
|
-
</Link>
|
|
56
|
-
</span>
|
|
57
|
-
</div>
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export default PatientSearchHeader;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
@import "~@openmrs/esm-styleguide/src/vars";
|
|
2
|
-
@import "~carbon-components/src/globals/scss/vars";
|
|
3
|
-
@import "~carbon-components/src/globals/scss/mixins";
|
|
4
|
-
|
|
5
|
-
.searchHeaderContainer {
|
|
6
|
-
height: $spacing-11;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
background-color: $ui-02;
|
|
10
|
-
border-top: 0.0125rem solid $ui-03;
|
|
11
|
-
border-bottom: 0.0125rem solid $ui-03;
|
|
12
|
-
padding: 0 $spacing-05;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.searchBarWrapper {
|
|
16
|
-
min-width: 35rem;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.padded {
|
|
20
|
-
padding: $spacing-05;
|
|
21
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Button } from "carbon-components-react";
|
|
2
|
-
import React, { useContext } from "react";
|
|
3
|
-
import { useHistory } from "react-router-dom";
|
|
4
|
-
import FormWorkflowContext from "../context/FormWorkflowContext";
|
|
5
|
-
import FormReviewCard from "../form-review-card";
|
|
6
|
-
import styles from "./styles.scss";
|
|
7
|
-
|
|
8
|
-
const WorkflowReview = () => {
|
|
9
|
-
const { patientUuids } = useContext(FormWorkflowContext);
|
|
10
|
-
const history = useHistory();
|
|
11
|
-
return (
|
|
12
|
-
<div className={styles.workspaceWrapper}>
|
|
13
|
-
<div className={styles.workspace}>
|
|
14
|
-
<div className={styles.leftPanel}>
|
|
15
|
-
<h4>Review</h4>
|
|
16
|
-
<div className={styles.navButtons}>
|
|
17
|
-
<Button kind="primary" onClick={() => history.push("/")}>
|
|
18
|
-
Save & Close
|
|
19
|
-
</Button>
|
|
20
|
-
<Button kind="tertiary" onClick={() => history.push("/")}>
|
|
21
|
-
Cancel
|
|
22
|
-
</Button>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<div className={styles.formContainer}>
|
|
26
|
-
{patientUuids.map((patientUuid) => (
|
|
27
|
-
<FormReviewCard patientUuid={patientUuid} key={patientUuid} />
|
|
28
|
-
))}
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default WorkflowReview;
|