Customizing and Running Core CHT Framework

Good morning
We are trying to customize an existing CHT application for Covid 19 to include TB questions, and have managed to configure the VM with all the necessary applications. We can run the CHT Core application and see the dashboard, we however cant login to the Covid App dashboard, please advise
We can only modify the XLSForm once we see how it runs

Hi @oyierphil,
Welcome to the forum.
You will need to set up the hierarchy and create users to enable you access forms for specific users. I am sharing here documentation which will guide you set up the hierarchy and create users.
CHT local environment set up
Contacts and users 1

Hi Anthony
I actually followed the instructions in setting up the server using the CHT-Core framework, and of course, the same instructions don’t hold for a customized CHT-Core application. Will create the hierarchy and users and test the forms, thanks

Good Evening Anthony,
I ran the following commands with Docker-compose using the customized application to load the container and run the application once in the server app folder

  1. sudo curl -o config-project-name-medic-os-compose.yml https://raw.githubusercontent.com/medic/cht-core/master/docker-compose.yml
  2. export DOCKER_COUCHDB_ADMIN_PASSWORD=‘couchdbpassord’
  3. sudo docker-compose -f config-covid-moh-ke-medic-os-compose.yml up
  4. Visited my project site using the server IP address https://x.x.x.x

Once the login page loads, I managed to login to the dashboard using the default medic user name and password, only to realize the roles are the CHT-Core i.e. Health facility, CHW supervisor, program officer etc. and not the customized roles to the current Covid app

Please advise if I followed the correct procedure to run a cusomized CHT app, thank you

@oyierphil you will need to upload your application code using cht-conf

You’ll use ca command similar to the following:
cht --url=https://medic: couchdbpassord@x.x.x.x

Derick
Is it possible to get the complete list of commands for running the same? This is a crucial step in configuring the app for our project, and it seems all the commands I try to use doesnt work!!!
Thank you

Hi Derick,
I get the error attached when running the command

Try removing the /medic suffix from the URL and rerun the command. Also note that the commands should be run as the user medic (admin)

what do you get by running the following?

curl -vv https://medic:YOUR_PASSWORD@41.204.187.172
curl -vv https://medic:YOUR_PASSWORD@41.204.187.172/medic

Is it possible to get the complete list of commands for running the same

Running cht --help should list all the commands available.

Is there something specific you want to try out?

Derick
Thank you, I want to see the Covid app running in my local server instance so that we add some questions for TB

We don’t have a domain yet and an SSH certificate, wanted to see how the modified form displays and how data moves

To work around the certificate issue, use the --accept-self-signed-certs flag to bypass the self-signed certificate.

cht --url=https://medic:YOUR_PASSWORD@41.204.187.172   --accept-self-signed-certs

The above command will upload your application code.

You will still need to create a hierarchy (places and contacts) as illustrated here for you to be able to try out the forms.

Derick, noted, thank you.
I share the contents of the current project folder with the app files

And the error I get, let me shut down and run afresh

There’s a typo on your command

cht --url=https://medic:YOUR_PASSWORD@41.204.187.172   --accept-self-signed-certs

Seen Derick
We have the config-covid-moh-ke-medic-os-compose.yml file instead of docker-compose.yml, does thus used the commands below:

  1. sudo curl -o config-project-name-medic-os-compose.yml https://raw.githubusercontent.com/medic/cht-core/master/docker-compose.yml
  2. export DOCKER_COUCHDB_ADMIN_PASSWORD=‘couchdbpassord’
  3. sudo docker-compose -f config-covid-moh-ke-medic-os-compose.yml up
  4. Visited my project site using the server IP address https://x.x.x.x

@oyierphil I unfortunately did not understand the challenge (if any) from this comment

Also, given you are using a public IP, please don’t share the credentials on the forum. I encourage you to update the passwords that have already been shared.

Derick
My challenge is when I ran the command, it loads the CHT-Core App and not the MoH Covid app
I will change the credentials for the Db now

Did you run the following after bringing up the server

cht --url=https://medic:YOUR_PASSWORD@41.204.187.172   --accept-self-signed-certs

What output did you get?

The above command uploads the application code but you would need to do some setup (adding contacts i.e places and people)

Thank you Nick,
Running the command with the skip option brings errors referring to the CHT-C
ERROR Error: Webpack warnings when building contact-summary
at compiler.run (/usr/local/lib/node_modules/cht-conf/src/lib/package-lib.js:103:23)
at finalCallback (/usr/local/lib/node_modules/cht-conf/node_modules/webpac /lib/MultiCompiler.js:254:12)
at runWithDependencies.err (/usr/local/lib/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js :277:6)

Any idea?

Good afternoon
Managed to load the forms after handling the permissions, but the register form doesn’t

show details as below, trying to find out why, would appreciate any help
Looks

From the screenshot you’ve shared, what do you expect to see?

What I gather from the screenshot, Contacts (People / Places) are registered via ‘Register’. If you have any report (data collection) forms, they would be accessible based on the how the form context expression is evaluated.

You might need to flesh out your hierarchy so that the forms are visible