@openmrs/esm-fast-data-entry-app 1.0.0-pre.39 → 1.0.0-pre.48

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.
@@ -0,0 +1,18 @@
1
+ ## Requirements
2
+
3
+ - [ ] This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
4
+ - [ ] My work conforms to the [OpenMRS 3.0 Styleguide](https://om.rs/styleguide).
5
+ - [ ] My work includes tests or is validated by existing tests.
6
+
7
+ ## Summary
8
+ <!-- Please describe what problems your PR addresses. -->
9
+
10
+ ## Screenshots
11
+ <!-- Required if you are making UI changes. -->
12
+
13
+ ## Related Issue
14
+ <!-- Paste the link to the Jira ticket here if one exists. -->
15
+ <!-- https://issues.openmrs.org/browse/O3- -->
16
+
17
+ ## Other
18
+ <!-- Anything not covered above -->
package/README.md CHANGED
@@ -1,12 +1,36 @@
1
-
2
-
3
- # OpenMRS ESM Fast Data Entry App
4
-
5
- This repository will hold modules which make the Fast Data Entry system work.
6
-
7
- ## Running this code
8
-
9
- ```sh
10
- yarn # to install dependencies
11
- yarn start # to run the dev server
12
- ```
1
+
2
+
3
+ # OpenMRS ESM Fast Data Entry App
4
+
5
+ The Fast Data Entry App is a module for the [OpenMRS](https://openmrs.org/) healthcare platform which allows for a natural workflow when entering many pre-recorded forms at a time. It is not meant for point-of-care workflows, but rather as a way to do retrospective data entry.
6
+
7
+ ## Overview
8
+ Currently the app consists of two main parts, a Forms Page to list available forms and a Form Workflow which allows the rapid input of forms.
9
+
10
+ ### Forms Page
11
+ The Forms page lists all forms able to be seen by a user, filtered by that user's permission to edit the given form. Additionally implementors are able to customize the page by creating form categories and listing the forms inside of each category. These categories can then be shown or hidden using configuration (see more [here](docs/configuring-form-categories.md)). From these lists forms are able to be opened in the Form Workflow using the 'Fill form' button.
12
+
13
+ ### Form Workflow
14
+ Forms can be entered quickly with the Form Entry Workflow. This workflow depends on a state machine managed by the [FormWorkflowReducer](src/context/FormWorkflowReducer.ts).
15
+
16
+ See the video below of a normal workflow.
17
+ ![Form Workflow Movie](docs/fde-workflow.mov)
18
+ State diagram for the Form Workflow.
19
+ ![Form Workflow State Diagram](docs/form-workflow-state-diagram.png)
20
+
21
+ ## Running this code
22
+
23
+ Clone the repo locally, then install and run using
24
+
25
+ ```sh
26
+ yarn # to install dependencies
27
+ yarn start # to run the dev server
28
+ ```
29
+
30
+ To customize your development build pass other arguments to yarn start (which under the hood is running `npx openmrs develop`). For example to point to a backend other than [dev3](https://dev3.openmrs.org/) specify the `--backend` option. See the full example below for running against an ICRC backend.
31
+
32
+ ```sh
33
+ yarn start --importmap "https://spa-modules.nyc3.digitaloceanspaces.com/import-map.json" --backend "https://openmrs-dev-v2.test.icrc.org/" --add-cookie "MRHSession=abcdefghijklmnop012345678910" --spa-path "/ui"
34
+ ```
35
+
36
+ To see more options run `npx openmrs --help`
Binary file
Binary file
@@ -0,0 +1,77 @@
1
+ # Configuring Form Categories for Fast Data Entry App
2
+
3
+ Configuration of which Form Categories to show, and which forms exist within each category is possible via configuration of Fast Data Entry App [config-schema](../src/config-schema.ts). For example, the configuration would setup one category "ICRC Forms" which contains one form, DASS-21. Note that formUUID must match the form UUID on the backend instance, and name is only for human readability and has no actual function.
4
+
5
+ ```json
6
+ {
7
+ "@openmrs/esm-fast-data-entry-app": {
8
+ "formCategories": [
9
+ {
10
+ "name": "ICRC Forms",
11
+ "forms": [
12
+ {
13
+ "formUUID": "373086b0-0a65-3763-ab83-21b8867bbc6f",
14
+ "name": "DASS-21"
15
+ }
16
+ ]
17
+ }
18
+ ],
19
+ "formCategoriesToShow": [
20
+ "ICRC Forms"
21
+ ]
22
+ }
23
+ }
24
+ ```
25
+
26
+ This config results in the following UI:
27
+
28
+ ![Configure ICRC Forms](config-icrc-forms.png)
29
+
30
+ Note that All Forms is always present and contains all forms the system can find.
31
+
32
+ Let's see another example. The following config will load up one more form category called "Other Forms" to show, but both entries in that form category are not able to be found in the system, so no forms will render when we navigate to the "Other Forms". Also note that "Third Category of Forms" is declared, but since it's not included in the formCategoriesToShow array it is not displayed on the UI.
33
+
34
+ ```json
35
+ {
36
+ "@openmrs/esm-fast-data-entry-app": {
37
+ "formCategories": [{
38
+ "name": "ICRC Forms",
39
+ "forms": [{
40
+ "formUUID": "373086b0-0a65-3763-ab83-21b8867bbc6f",
41
+ "name": "DASS-21"
42
+ }]
43
+ },
44
+ {
45
+ "name": "Other Forms",
46
+ "forms": [{
47
+ "formUUID": "00000000-0a65-3763-ab83-21b",
48
+ "name": "No Matching UUID"
49
+ },
50
+ {
51
+ "formUUID": "This isn't a UUID!",
52
+ "name": "Invalid UUID"
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ "name": "Third Category of Forms",
58
+ "forms": [{
59
+ "formUUID": "ce7a6da7-444a-3038-bfc2-334ff84b86c0",
60
+ "name": "CRIES-8"
61
+ }]
62
+ }
63
+ ],
64
+ "formCategoriesToShow": [
65
+ "ICRC Forms",
66
+ "Other Forms"
67
+ ]
68
+ }
69
+ }
70
+ ```
71
+
72
+ This will render the following UI
73
+
74
+ ![Configure Other Forms](config-other-forms.png)
75
+
76
+
77
+ For more information on using the OpenMRS configuration system see [this page](https://o3-dev.docs.openmrs.org/#/main/config)
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-fast-data-entry-app",
3
- "version": "1.0.0-pre.39",
3
+ "version": "1.0.0-pre.48",
4
4
  "license": "MPL-2.0",
5
5
  "description": "An OpenMRS 3.x microfrontend",
6
6
  "browser": "dist/openmrs-esm-fast-data-entry-app.js",