avniproject / JNPCT-Adolescent

0 stars 0 forks source link

[JNPCT Adolescent]: App Development - Program Summary - May 2024 #15

Closed kameshbhariya closed 4 months ago

kameshbhariya commented 5 months ago

Tech notes


const bmiValues = programEnrolment.getObservationsForConceptName('BMI (kg/m²)');

        let isAbnormal = false;
        if (!_.isEmpty(bmiValues)) {
            const value = bmiValues.map(({encounterDateTime, obs}) => {
                if(!isAbnormal) {
                    isAbnormal = obs <= 14.5;
                }
                return (`${imports.moment(encounterDateTime).format("DD-MM-YYYY")}: ${obs}`);
            })
                .join(", ");
            summaries.push({name: "BMI values", value: value, abnormal: isAbnormal})//
        }

`

- [ ] Similarly display Anaemic status & Nutritional Status as done in ADSR