Adding Demo Data for Growth Chart Feature

Tags: #<Tag:0x00007f01bfd18b30>

Following Discussion Concerning Harvesting the Growth Chart Feature into Reff App, i have done the innitial work of harvesting the Back-end API and Clent side component of the GrowthChart feature. See this ticket.

Now i would need to add some demo data in the referencedemodata module for this feature. The current functionality for adding demo data adds random demo patients by configuring referencedemodata.createDemoPatientsOnNextStartup GP . Here are the Proposed work arounds for me adding demo patients for Growth Charts feature

  • Since the current functonality adds random patients , i will need to set all the current demo patients to be fit for Use in the Growth Charts. This means adding these vitals weights, heights, and head circumference. for all patients , and also giving them an “estimated age” of less than 3 yrs so that i Make a record for them of the above vitals form less than 3 yrs.

Another option would be creating a new GP, and creating new other demo patients for Growth Charts specifically . so that adding these demo patients is trigered by the new GP i would have created.

ideas needed here

cc @dkayiwa @k.joseph @ball @c.antwi @ssmusoke @mksd @dev4 @dev3

Aren’t those demo patients created with observations?

yes actualy those demo patients are created with some of the vitals i would need for the growth chart like weight , height , but the problem is all those patients are "too old" :smile: , for use in growth chart.

    private static final int MIN_AGE = 16;
	private static final int MAX_AGE = 90;

i need young patients majorly less than 3 years

How about just reducing the min age?

1 Like

The whole challenge , is the exact birth date is random between (min and max)say 0 -90, hence it doesn’t guarantee i will have patients less than 3 yrs old hence i may not achieve what i need exactly. . so here are the options

  • i make the min age 0 and max age 3 to gurante i have all patients young,
  • Or else i completely build new random patients with btn ages 0 - 3,

i create for them demo vists and demo Vital obs.

ill create a new GP like
referencedemodata.createDemoPatientsForGrowthChartOnNextStartup

which will trigger addition of these demo patients for growth charts ,

so which is better

  • making all current demo patients fall between 0-3 yrs or
  • Creating new demo patients in the range of 0-3 yrs , with a new Global Property ?? cc @dkayiwa

I do not believe that you can randomly generate 100 patients without any below 3 years.

1 Like

indeed its about believing :rofl: , like its random , by chance you may get. though i dint want us to have these demo patients for Growth Charts by chance or through just believing :smile:

@dkayiwa lets say , one has set to have like 5 demo patients on next start up , surely there are very little chances he will have young Demo patients created. So this option below seems a better alternative

or else we have all current demo patients be between 0-3

One would not use the demo patients feature for just 5.

By the way, have you ever come across the KISS principle? :slight_smile:

1 Like

ok thats cool. Now another problem would be , if i want to demo out the Growth chart feature and i have my Demo patients created, do we have any functionality of filtering out patents by age to know which patient to use ?

anyway i can see the age is displayed in the listed patients ,from the patient search. Ok finally let me now go with your option :blush:

Have you ever heard of the famous cohort builder? https://demo.openmrs.org/openmrs/cohortBuilder.list

1 Like

:smiley: yes though it couldnt come to my mind now , thanks , surely now i accept

so am setting min age to 0 ?? is that fine ??

Hello @dkayiwa, Now that worked, i created 200 demo patients and got 3 patients of age 2 years. the only challenge is that the observations(vitals) that are created with each demo patient are for an adult :smile: and do not reflect the vitals for a baby, well since this is just demo , its ok.

i made the minimum year to be 2 , reason being that the random start date of a vist is between 0-2 years ago. So i wanted to avoid a scenario where a patient of 0 yrs is assigned a random vist of 2years ago :grinning: so i just made the minimum age to be 2 take a look a the above screenshot.

is that fine @dkayiwa ??

other screen shots for other demo curves

Looks fine to me.

1 Like