Check out the cht-core repository to your local machine, either by using the Github Desktop app or by running the following command in the directory you want to check the code out into: git clone https://github.com/medic/cht-core.git . This will create a cht-core directory.
Navigate your terminal to the config/default directory of the cht-core directory. This is where the reference application is stored.
Run the following medic-conf command: medic-conf --url=https://medic:password@localhost --accept-self-signed-certs csv-to-docs upload-docs . This first compiles and then uploads the shipped default test data to your local instance
Why I run the last command, none of the files get uploaded and I get the following error "
“00a37402-7bc9-5619-92b0-99ade2056cb2”: “conflict: Document update conflict.”
Please let me know if there is something I could try here differently.
Thank you for the commands. The second does show the data
curl -k https://medic:password@localhost/medic/00a37402-7bc9-5619-92b0-99ade2056cb2
does this mean the data is already uploaded or it is present in my CHT folder? I am still getting the same error “Document update conflit” though.
FYI, the OS I am running is Windows 10. If the requirements are different for it.
I tried the same above instructions to upload the test data onto reference application on macOS, noticed something interesting. First time I run medic-conf --url=https://medic:password@localhost --accept-self-signed-certs csv-to-docs upload-docs it does say all 25 docs uploaded successfully. But from 2nd time it gives the document conflict error. Is there a way I can clear what I uploaded?
Another thing is, even when it says it uploads all 25 documents correclty, I only see one or two instances of data uploaded, please see the picture attached. I expected the app to be filled with the data. Was it a mistake?
Third, Once I change a contact form/app form and try to recompile the configuration I get the following missing files error while doing
medic-conf --url=https://medic:password@localhost --accept-self-signed-certs
Please see attached pdf for errors.Error.pdf (124.9 KB)
There isn’t a great way to remove all these uploaded documents. The best way would be go delete them manually through a UI – CouchDB’s Fauxton should be available at https://localhost/_utils.
I expected the app to be filled with the data. Was it a mistake?
No mistake! But it isn’t the greatest data set… Sample data is the intent of the command. You should see a hierarchy of places on “People” tab, there are 13 people within that hierarchy of places, an offline user you can login as (eg. username: andra, pwd: Secret_1), and one report (as displayed on the report tab you’re seeing).
I get the following missing files error while doing
I suspect you’re encountering this bug https://github.com/medic/medic-conf/issues/300. This is an active crashing bug in our latest medic-conf version affecting Windows (and I suspect possibly you on MacOS now). A fix for this bug is prioritized but no timeline can be given. Please bear with us while we get this fixed!
In the meantime, there are available workarounds:
Unconfirmed in MacOS, but apparently you can use a bash terminal.
Sorry, I don’t have MacOS so can’t verify these workarounds for your setup directly. Would you try either of these worksarounds and let me know if this works for you?
Can you clarify which issues you’re having with which operating systems?
The error pdf you linked is you trying to work in Windows right? I’m basing this off the file paths, as they look like windows paths not Unix ones, but I don’t know if One Drive somehow replicates Windows paths on MacOS.
I dusted off my Macbook, but was unfortunately unable to reproduce this. Can you give me the specs of your MacOS machine? Specifically I’m interested in the operating system version, and which file system you’re using (they recently changed this). If you open the Disk Utility app you can see which: the new one (that I’m using) is called APFS, and the old one is called MacOS Extended.
Thank you everyone for the help. The above issues have been resolved, the issue was with me trying to upload the same data twice and instead of overwriting it, it was complaining about duplicate data. The process is working fine on both Windows and macOS.