Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) documentation clean up and fixes to broken links #26

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/docs/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"conditional-rendering": "Hiding Fields",
"developing-forms": "Form Development in OHRI",
"technical-implementation": "Technical Implementation",
"comparison-with-ampath-forms": "Supported AMPATH Forms Features",
"supported-angular-forms-features": "Supported Angular Forms Features",
"developer-guide": "Developer Guide"
}
33 changes: 0 additions & 33 deletions pages/docs/comparison-with-ampath-forms.mdx

This file was deleted.

5 changes: 3 additions & 2 deletions pages/docs/core-concepts/forms.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Forms

A form is a collection of form fields classified through `pages`, `sections` and `questions`. Forms are defined following a schema written in JSON. React Form Engine (RFE) forms are leveraging the [AMPATH Forms schema](https://ampath-forms.vercel.app/docs/core-concepts/) with a few custom extensions. Below is a snippet of a basic form structure:
A form is a collection of form fields classified through `pages`, `sections` and `questions`. Forms are defined following a schema written in JSON.
React Form Engine (RFE) forms are leveraging the [JSON Schema](https://ohri-docs.globalhealthapp.net/docs/core-concepts/forms) with a few custom extensions. Below is a snippet of a basic form structure:

```json copy
{
Expand All @@ -12,7 +13,7 @@ A form is a collection of form fields classified through `pages`, `sections` and
}
```

Form schemas get constructed using the [AMPATH form builder](https://ampath-forms.vercel.app/getting-started#create-a-form).
Form schemas get constructed using the [Form builder](https://dev3.openmrs.org/openmrs/spa/form-builder).

## Form properties

Expand Down
10 changes: 5 additions & 5 deletions pages/docs/create-new-form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ The React Form Engine (RFE) form builder platform simplifies and partially autom

## Links and ideas that are important to this text:

- Getting started - https://ohri-docs-chi.vercel.app/docs/create-new-form
- Core concepts - https://ohri-docs-chi.vercel.app/docs/core-concepts/forms
- Validating fields -https://ohri-docs-chi.vercel.app/docs/validation
- Field types - https://ohri-docs-chi.vercel.app/docs/field-types-reference
- Developer Guide - https://ohri-docs-chi.vercel.app/docs/developer-guide/contributing-guide
- Getting started - https://ohri-docs.globalhealthapp.net/docs/create-new-form
- Core concepts - https://ohri-docs.globalhealthapp.net/docs/core-concepts/forms
- Validating fields -https://ohri-docs.globalhealthapp.net/docs/validation
- Field types - https://ohri-docs.globalhealthapp.net/docs/field-types-reference
- Developer Guide - https://ohri-docs.globalhealthapp.net/docs/developer-guide/contributing-guide

## What is the RFE form builder?

Expand Down
2 changes: 1 addition & 1 deletion pages/docs/developer-guide/run-form-engine-in-openmrs3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Additionally, the [openmrs-esm-patient-chart](https://github.com/openmrs/openmrs
yarn start --sources packages/esm-form-engine-app --port 8090 --importmap https://dev3.openmrs.org/openmrs/spa/importmap.json
```

- Next, log into your 3.x frontend (could be `AMPATH 3.x`, `KenyaEMR 3.x`, or a community server like `dev3`) in your browser.
- Next, log into your 3.x frontend (could be `UgandaEMR Plus`, `KenyaEMR 3.x`, or a community server like `dev3`) in your browser.

- Congratulations! You should now be running the local version of the React form engine in your application.

Expand Down
2 changes: 1 addition & 1 deletion pages/docs/field-types-reference.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Field Types

RFE Forms has committed to the schema used by the AMPATH Forms, and as such, there is a high level of compatibility. RFE Forms supports almost all the field types from AMPATH’s schema with a few extensions. The most commonly used fields include `text`, `textarea`, `number`, `date` and `select`.
RFE has committed to the schema used by the Angular Forms, and as such, there is a high level of compatibility. RFE supports almost all the field types from the JSON schema with a few extensions. The most commonly used fields include `text`, `textarea`, `number`, `date` and `select`.

Field types are defined in the questionOptions definition of a question using the following syntax:

Expand Down
33 changes: 33 additions & 0 deletions pages/docs/supported-angular-forms-features.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Supported Angular Forms Features

RFE Forms has committed to the schema used by the Angular Forms Builder, and as such, there is a high level of compatibility. RFE Forms uses the entire schema, however some features and functionalities may not be considered necessary for RFE Forms. This page summarises that.

## Supported functionality

### Field types

The following field types as defined by Angular Forms are currently supported:

- `text`
- `select`
- `date`
- `number`
- `checkbox`
- `radio`
- `encounter-location`
- `textarea`
- `group`
- `repeating`
- `drug`
- `file`
- `problem`
- `ui-select-extended`

### Other supported features

#### Field types

The following field types are also supported, but not currently part of the Angular Forms:

- content-switcher
- toggle
2 changes: 1 addition & 1 deletion pages/docs/technical-implementation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ NOTE: We can also use the old way of linking post actions we didn't support conf
"formOptions": {
"usePreviousValueDisabled": "true"
}
```
```
12 changes: 4 additions & 8 deletions pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@ import Image from "next/image";
<Image src="/ohri.svg" alt="OHRI logo" height="50" width="150" />
</div>

React Forms Engine (RFE) Forms is a React component that renders forms based on the RFE Forms Builder. The RFE forms are well defined here. RFE Forms:

- Use the same schema as the AMPATH Forms Builder.
- May implement all features from the AMPATH Forms Builder.
- May define some extensions to the schema specific to OHRI to implement functionality needed by OHRI (such functionality may be suggested back to the AMPATH Forms Builder team for their consideration to include).
- Renders forms based on the Carbon Design system using React.
React Forms Engine (RFE) is a React based library that renders JSON forms based on the JSON form schema initially developed by AMPATH.
The RFE is built based on the Carbon Design system and uses the same schema as the Angular Forms Builder.

<div className="my-8">
<Image src="/screen.png" alt="App screenshot" height="1071" width="2016" />
<Image src="/images/screen.png" alt="App screenshot" height="1071" width="2016" />
</div>

<div className="my-8 flex justify-center">
[Start building](/docs/create-new-form) · [Form engine on
GitHub](https://github.com/UCSF-IGHS/openmrs-ohri-form-engine-lib)
GitHub](https://github.com/openmrs/openmrs-form-engine-lib)
</div>