# Harvesting the Back-end Api Functionality for Growth Charts into Reff App

**URL:** <https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672>\
**Category:** Development\
**Tags:** refapp-210\
**Created:** [June 23, 2019, 10:27am UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672 "2019-06-23T10:27:44Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [June 23, 2019, 10:27am UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672/1 "2019-06-23T10:27:44Z")

</div>

Following the disccusion About [creating Tickets for harvesting features into reff-app](https://talk.openmrs.org/t/creating-jira-tickets-for-harvesting-features-for-reference-application-2-10-release/23559), i will need more clarification about harvesting the Backend Api Functionality for the Growth Charts. See [Ticket for harvesting the backend-Api Functionality](https://issues.openmrs.org/browse/RA-1601). I’ll need to harvest certain methods from the isante-plus service , which doesnt exist in our reff ap. The following functions and their implementation need to be harvested from the [isante-plus service class](https://github.com/IsantePlus/openmrs-module-isanteplus/blob/master/api/src/main/java/org/openmrs/module/isanteplus/api/IsantePlusService.java) ie

- getPatientBMIsAcrossAnAgeDifference()
- getHeightsAtGivenPatientAges()
- getWeightsAtGivenPatientAges()
- getHeadCircumferenceAtGivenPatientAges()

The following issues need to be defined clearly

- Which module would be more suitable to contain the backend functionality ?

- Would i need to created a new service class for this functionality ?? what would be the best suitable name for the new service class?? Or else …

- what existing service class would be best to contain this new functionality ??

cc [@dev2](https://talk.openmrs.org/groups/dev2) [@dev3](https://talk.openmrs.org/groups/dev3) [@dev4](https://talk.openmrs.org/groups/dev4) [@dev5](https://talk.openmrs.org/groups/dev5) @c.antwi @ball

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [June 24, 2019, 8:46am UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672/2 "2019-06-24T08:46:59Z")

</div>

To give A little details on how the feature will work, After Logging in the reff-app,

- you’ll seach the patient , and go to the patient dashboard and acces the “ **Growth curve** ” link

 ![g1](https://talk.openmrs.org/uploads/default/original/2X/e/e2731826773ad369b4241f43b7ef6d1f10a11141.jpeg)

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [June 24, 2019, 8:50am UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672/3 "2019-06-24T08:50:00Z")

</div>

On the Growth chart page, there will be two tabs. one for the **WHO growth charts** and another for the **CDC growth charts**

 ![g2](https://talk.openmrs.org/uploads/default/original/2X/0/0c79c33ff656a52b261d9fdf9e181066f02dee2f.jpeg)

 ![image](https://talk.openmrs.org/uploads/default/original/2X/6/60ea92b47f0c4c10db147c370976f42e7109e57d.png)

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [June 24, 2019, 8:54am UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672/4 "2019-06-24T08:54:13Z")

</div>

Then under each of the tabs you can acces the patient Growth curves , as per WHO standards for WHO charts and as per the CDC standards for CDC charts ,

- CDC Growth chat

- WHO Growth chats

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [June 24, 2019, 11:19am UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672/5 "2019-06-24T11:19:42Z")

</div>

Hi @ball , Can you confirm that this is the right feature we need to harvest in ??

@dkayiwa asked for your cofrimation here.

---

<div class="post-metadata">

**Author:** ![ball](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ball/32/277_2.png) [@ball](https://talk.openmrs.org/u/ball)\
**Post date:** [June 24, 2019, 2:57pm UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672/6 "2019-06-24T14:57:47Z")

</div>

@mozzy You are exactly right about the functionality.

When this is harvested, this code should use CIEL mappings or global property for the appropriate concepts:

- weight (kg) CIEL:5089
- height (cm) CIEL:5090
- head circumference (cm) CIEL:5314
- size (lying position)? Is this different from height, @akanter ?

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [June 25, 2019, 6:47am UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672/7 "2019-06-25T06:47:43Z")

</div>

> [@mozzy](#):
>
> - Which module would be more suitable to contain the backend functionality ?
> - Would i need to created a new service class for this functionality ?? what would be the best suitable name for the new service class?? Or else …
> - what existing service class would be best to contain this new functionality ??

CC @dkayiwa@k.joseph , Urgently waiting for your comments on this

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [June 25, 2019, 7:20am UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672/8 "2019-06-25T07:20:38Z")

</div>

When i take a look at all the openmrs module-depencies for core apps module ie

```
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <emrapiVersion>1.26.0</emrapiVersion>
        <uiframeworkVersion>3.15.0</uiframeworkVersion>
        <eventVersion>2.5</eventVersion>
        <htmlformentryVersion>3.3.0</htmlformentryVersion>
        <appuiVersion>1.7</appuiVersion>
        <appframeworkVersion>2.9</appframeworkVersion>
        <openMRSVersion>1.12.0</openMRSVersion>
        <serialization.xstreamVersion>0.2.12</serialization.xstreamVersion>
        <calculationVersion>1.2</calculationVersion>
        <reportingVersion>0.10.4</reportingVersion>
        <providermanagementVersion>2.9.0</providermanagementVersion>
        <idgenVersion>4.4.0</idgenVersion>
		<metadatamappingVersion>1.3.2</metadatamappingVersion>
        <uicommonsVersion>2.3.0</uicommonsVersion>
        <webservicesRestVersion>2.17</webservicesRestVersion>

```

, and also looking at the general trend for most Apps in core apps , they have their Back-end API functionality in the **appFrameworkService** in the **Appframework module.**

I would suggest that the **Appframework module** and **appFrameworkService** would be the suitable Module and service respectively to contain the Backend Api functionality for the Growth charts.

CC @k.joseph and @dkayiwa, waitng for your confirmation

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [June 25, 2019, 8:22am UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672/9 "2019-06-25T08:22:35Z")

</div>

It would be the coreapps module.

---

<div class="post-metadata">

**Author:** ![mozzy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mozzy/32/11815_2.png) [@mozzy](https://talk.openmrs.org/u/mozzy)\
**Post date:** [June 25, 2019, 8:23am UTC](https://talk.openmrs.org/t/harvesting-the-back-end-api-functionality-for-growth-charts-into-reff-app/23672/10 "2019-06-25T08:23:37Z")

</div>

Alright , thanks @dkayiwa. So let me go ahead with the work
