Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Hiren Thacker
@hithacker
Also, I have put a card to keep track of tech debts/quality issues in the DEA code. avniproject/avni-webapp#518. We will keep updating this card with the issues for which we don't have time to fix in the current story.
Arjun Khandelwal
@arjunk

Dear everyone,I just join in avni. Currently I have setup the app locally and connect to hosted API Server. When I start it, it's required with username/password login, how can I get this info?

@dinhngocquanghuy you will have to setup an account and have your username / password. you can setup a trial account by signing up here https://avniproject.org/signup/?source=trial

Vinay Venu
@vinayvenu
@arjunk @dinhngocquanghuy wanted to set up project locally.
We can instead use local signin with no password, right?
Arjun Khandelwal
@arjunk
ok, i am not aware of the context. some people don’t want to setup the server locally but want to use the hosted server.
if complete local setup is required, then yes that can be done without sign in. The user needs to be created from admin in local and then start the server with that user to access from mobile client. or start the webapp with that server.
dinhngocquanghuy
@dinhngocquanghuy

Dear everyone,I just join in avni. Currently I have setup the app locally and connect to hosted API Server. When I start it, it's required with username/password login, how can I get this info?

@dinhngocquanghuy you will have to setup an account and have your username / password. you can setup a trial account by signing up here https://avniproject.org/signup/?source=trial

Thank you so much for your help @arjunk @vinayvenu , after hours trying, I find out the username and password right inside the source code project

ravindravs
@ravindravs
Hi All, I need to set up the AVNI setup in windows is that possible to do it. Please suggest
Vivek Singh
@petmongrels
There is no reason why it should not work on windows. We have tried it once and it worked then. Unfortunately we don’t have instructions, so it would require patience from you.
ravindravs
@ravindravs
Please provide the steps to setup the environment
Vivek Singh
@petmongrels
various install guides are here - https://avni.readme.io/docs/environment-setup-guides
ravindravs
@ravindravs
Hello Vivek, After installing the docker in windows I am able to access the App-server in windows from browser but not able to access database url(jdbc:postgresql://localhost:5434/openchs) running in docker and mobile app. Please provide the steps to run the andriod emulator in windows
image.png
image.png
image.png
Vivek Singh
@petmongrels
I think you have to use android studio for windows.
You will find that many of the commands in the makefile have not been written for windows, so you may have to change some of them
ravindravs
@ravindravs
Hi Vivek Please can you please tell me how to check the DB URL to load the database while container is running
Vivek Singh
@petmongrels
For connecting to database from outside the container, you probably have to open ports in docker container. You should refer to docker document for the same.
Joy A
@1t5j0y
Also, trying to connecting to the database from the browser (as shown in the screenshot you shared) will not work. You will need to use pgadmin or similar tool to connect to the database.
vindeolal
@vindeolal
New patch release done for avni-client. Here is list of bug fixes done
https://github.com/avniproject/avni-client/releases/tag/v3.9.6
ravindravs
@ravindravs
image.png
When I try to run the AVNI Server I am getting an datasource exception flyway. I have created a postgres database with the details given in application.properties. Can anyone suggest resolve it
Vivek Singh
@petmongrels
Are you running database on the same OS as the server? Are you able to do psql from the server machine.
vindeolal
@vindeolal
rnaveen
@rnaveen

Hello,

We are trying to setup a Offline report Card with the below query. It always returns 0. Am I missing anything? Note: "Household Covid Survey" is the encounter not attached to any Program.

// Documentation - https://docs.mongodb.com/realm-legacy/docs/javascript/latest/index.html#queries
'use strict';
({params, imports}) => {
const isCovidPatient = (enrolment) => {
const feverReading = enrolment.getObservationReadableValue('Any death in family this year');
return (feverReading && feverReading.getReadableValue()== 'Yes')
};
return params.db.objects('Individual')
.filtered(SUBQUERY(enrolments, $enrolment, SUBQUERY($enrolment.encounters, $encounter, $encounter.encounterType.name = 'Household Covid Survey' and $encounter.voided = false).@count > 0 and $enrolment.voided = false and voided = false).@count > 0)
.filter((individual) => individual.voided === false && _.some(individual.enrolments, (enrolment) => isCovidPatient(enrolment)))
};

vindeolal
@vindeolal
Hi @rnaveen

As you mentioned "Household Covid Survey" is direct encounter and in the realm query you are trying to query it under enrolments, that's the reason you are getting 0 individuals. Direct encounters are stored directly with the individual in encounters array. So the correct query will be,

'use strict';
({params, imports}) => {
    const isCovidPatient = (encounter) => {
        const feverReading = encounter.getObservationReadableValue('Any death in family this year');
        return (feverReading && feverReading.getReadableValue() === 'Yes')
    };
    return params.db.objects('Individual')
        .filtered("SUBQUERY(encounters, $encounter, $encounter.encounterType.name = 'Household Covid Survey' and $encounter.voided = false).@count > 0")
        .filter((individual) => individual.voided === false && _.some(individual.encounters, (encounter) => isCovidPatient(encounter)))
};

Let us know if this works for you.

rnaveen
@rnaveen
Hi @vindeolal
Thanks for the response. I tried this but not working. Now it is not even showing 0. I think there is some error in the code which i am not able to identify.
vindeolal
@vindeolal
@rnaveen, Yes there is an issue with isCovidPatient function. Can you please try below query,
'use strict';
({params, imports}) => {
    const isCovidPatient = (encounter) => {
        const feverReading = encounter.getObservationReadableValue('Any death in family this year');
        return feverReading === 'Yes'
    };
    return params.db.objects('Individual')
        .filtered("SUBQUERY(encounters, $encounter, $encounter.encounterType.name = 'Household Covid Survey' and $encounter.voided = false).@count > 0")
        .filter((individual) => individual.voided === false && _.some(individual.encounters, (encounter) => isCovidPatient(encounter)))
};
rnaveen
@rnaveen
Thank you @vindeolal. It worked. I am having another issue now. Evertime I open the App Sync automatically starts. Is is it something to do with the Dashboard?
vindeolal
@vindeolal
@rnaveen, sync starts automatically only when the user logs in to the app. Are you logging out before closing the app?
rnaveen
@rnaveen
No. Just closing the App or even opening after minimising.
I tried - Disable Dashboard Auto Refresh. Still it's happening.
vindeolal
@vindeolal
Which app version are you using?
rnaveen
@rnaveen
BuildVersion: 3.15.3-7e17
vindeolal
@vindeolal
So it's the latest version. Could you please share a small video of the issue, this seems like a bug. I tried reproducing it but was not able to.
rnaveen
@rnaveen

Good evening!

We are trying to add Habitations (Villages) under a GP. So the structure is Taluk (Mandal) -> GP -> Village. We did this last time using the import tool and it worked well.
Now I am trying to add it manually. When I select the Type as Village, "Part of (location)" is showing all the Mandals rather than GPs.
Are we missing anything? or these needs to be added via Import tool only? If so can we add Villages to already existing GP's?

Thanks in Advance.

vindeolal
@vindeolal
Hi @rnaveen,
In the address hierarchy, both GP and village are under Mandal (Check the Location Types), that's the reason you are getting all Mandals when creating a Village. If you want village to be under GP let us know, we'll fix the hierarchy, as right now this cannot be done from the UI.
3 replies
rnaveen
@rnaveen
@vindeolal, will it have any impact on the existing locations and the Sync?
vindeolal
@vindeolal
@rnaveen, No it won't
rnaveen
@rnaveen
Thank you @vindeolal
We are planning to clone some of the forms. Can we use the same concepts or we need to clone them as well?
vindeolal
@vindeolal
You can use same concepts if it's a separate form.
rnaveen
@rnaveen
Cool. Thanks
rnaveen
@rnaveen

Hello Everyone!
Need design suggestions. Help please..
We have different Subject types - Individual registrations (Farmers), Covid specific Individual registrations (both are person types) and Farmer Suicide Registration (Individual Type).

Then, we have same kind of programs (Govt Entitlements, Livelihood Support, Child Education Support, Covid Followup etc) on all the Subject types.

What is the best way of tying all the programs together at one place? Is it possible?

vindeolal
@vindeolal
@rnaveen, Why not have s single subject type Individual(Person) and in the registration form, there will be a question that will differentiate the type of Individual registration(Farmer, Covid or Farmer suicide). This way you don't need to create those programs again for each subject type.
3 replies
rnaveen
@rnaveen
WhatsApp Image 2021-08-16 at 7.11.30 PM.jpeg
2 replies