Skip to content

Commit

Permalink
fix: Alterations after review
Browse files Browse the repository at this point in the history
  • Loading branch information
edvinstava committed Mar 22, 2024
1 parent cdf187f commit e4d2f38
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 28 additions & 14 deletions docs/using-capture-growth-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,32 @@
Capture growth charts is a web application that allows users to capture and view growth data for children under the age of 5. The application is designed to be used by health workers in the field to capture growth data for children and to view growth charts for children in their care. The application is designed to be used on a tablet or computer device and is optimized for data entry and visualization of growth charts for efficient monitoring of child development.

# Growth chart plugin upload
Run `yarn build` in the root of the project to build the plugin. The build can be found in `/build/bundle`, and is a compressed file (`.zip`). <br/>
Run `yarn build` in the root of the project to build the plugin. The build can then be found in `/build/bundle`, and is a compressed file (`.zip`). <br/>

Upload the compressed file to the DHIS2 instance using the `manuall install` funciton in the **App Management** app. Now the plugin should be an available app on the instance and you can find it on this url:
- `<Url of instance>/api/apps/capture-growth-chart/plugin.html`

Remember to alter `<Url of instance>` with the actual url of you instance.
Make sure to alter `<Url of instance>` with the actual url of you instance.
<br />

# Configuration { #configuration }
## Maintenance { #maintenance }
## Maintenance app { #maintenance }
The following steps can be made in the **Maintenance** app on DHIS2. <br />

### Dataelement
Create data elements for **Weight**, **Height** and **Head circumference**.
Weight can be in either `gram` or `kg`, but height and head circumference should be in `cm`.
<br />
### Data element
Data elements needed to support full functionality in for the growth chart are; **Weight**, **Height** and **Head circumference**. **Weight** can be in either `gram` or `kg`, but **Height** and **Head circumference** should be in `cm`. If one of the data elements are missing, growth charts using that data element will not be displayed. <br /> <br />

### Program
#### Tracked entity attribute
Tracked entity attribues needed for the Growth chart plugin is `Date of birth` and `gender`. However, `First Name` and `Last Name` are also needed if you want the name to be printed when using the print function. <br /> <br />
Tracked entity attribues needed for the Growth chart plugin is `Date of birth` and `Gender`. However, `First Name` and `Last Name` are also utilized in additional functionality, but not necessary for using the growth chart itself. <br /> <br />

#### Tracked entity type
Tracked entity type for person needs the same attributes as the tracked entity attributes. <br /> <br />

Navigate to the tracked entity type for **Person**. This type needs to be assigned the same attributes as those created in the [Tracked Entity Attributes](#tracked-entity-attributes) step. Make sure `Display in list` for the attributes is active, like the image below.
![Tracked entity type](resources/images/tracked_entity_type_attributes.png) <br /> <br />

#### Program
Select you preffered program for storing the growth variables and displaying the Growth Chart. <br />
##### Attributes
Select you preffered program for storing the growth variables and displaying the Growth Chart.
The program should have the following attributes:
- `First name`
- `Last name`
Expand All @@ -47,7 +46,7 @@ The program stage should have the following data elements:
- `Head circumference` (cm)
<br /> <br />

## Datastore Manangement { #datastore_management }
## Datastore Manangement app { #datastore_management }
### Capture
In namespace `capture`, enter the file with key `enrollmentOverviewLayout`
Add new section for the growth chart under `leftColumn`. You can choose where on the left column to place it. Add the following code, but remember to change out `<Url of instance>` with the url of your instance.
Expand All @@ -62,13 +61,28 @@ Add new section for the growth chart under `leftColumn`. You can choose where on
### Capture-growth-chart
#### Config
Create new namespace `capture-growth-chart` with key `config`
The growth chart plugin needs this config to work. All Id's should be changed, and will be specific for each implementation. The `femaleOptionCode` and `maleOptionCode` should map to the option codes used for gender. The structure of the config has to be the same as the one in the example below;
The growth chart plugin needs this config to work. Keep in mind that all Id's should be changed, and will be specific for each implementation.

In the configuration we use a `programStageId` which refers to the program stage where the growth data is stored.

The `femaleOptionCode` and `maleOptionCode` should map to the option codes that correspont to the gender of the individual.

Option code used for gender can be found or created in `Option set` under **Other** in the **Maintenance** app. <br />

The `settings` object contains the following keys:
- `customReferences` - A boolean value that determines if custom references should be used.
- `defaultStandard` - A string value that determines the default standard to use. Here you can choose between `z` and `p`, where `z` is the z-score and `p` is the percentile.
- `weightInGrams` - A boolean value that determines if the weight should be in grams or kg. <br />

The structure of the config has to be the same as the one in the example below;
```json
{
"metadata": {
"attributes": {
"dateOfBirth": "AMl8BkN8Lyq",
"gender": "tyNlJWNnEbs",
"firstName": "Sx5Gd4JfPrL",
"lastName": "sljlq9XtqaA",
"femaleOptionCode": "CGC_Female",
"maleOptionCode": "CGC_Male"
},
Expand All @@ -90,7 +104,7 @@ The growth chart plugin needs this config to work. All Id's should be changed, a
```
<br />

#### Custom references
#### Custom references (Future functionality)
##### Create custom references
1. Create a new key in the `capture-growth-chart` namespace with the key `customReferences`
2. Add the custom references you want to use. The structure of the custom references has to be the same as the one in the example below. But the **datasetValues** should be changed to fit your own references.
Expand Down

0 comments on commit e4d2f38

Please sign in to comment.