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.createDemoPatientsOnNextStartupGP .
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.
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" , for use in growth chart.
private static final int MIN_AGE = 16;
private static final int MAX_AGE = 90;
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 ,
@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
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 ?
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 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 so i just made the minimum age to be 2 take a look a the above screenshot.