Closed njogz closed 1 year ago
@njogz I tried the LTFU flow by using this branch, and when I submitted the task, I got the following error in the sentinel log:
2023-03-29 11:49:05 ERROR: Failed to push f957f3a7-716a-4fe7-b7bf-c4dab15da839 to FHIR_encounter: Error: connect ECONNREFUSED 127.0.0.1:5001
Is there extra configuration needed for the encounter creation?
@andrablaj there is no extra config required. The issue was a URL that I had failed to update. I have done so and tested and it works well now.
I have tested the full LTFU workflow from creating a patient to sending a service request and submitting the resulting task in the CHT. It all works as expected (see screenshot below)
@lorerod I believe with the tests above this can be safely merged.
Yes @njogz I agree.
Thanks @njogz!
I tried to reproduce LTFU locally, and I don't see the task in the CHT anymore after submitting the service-request
. I tried with several patients, destroyed and restarted the containers several times, and no change.
I nevertheless see the reports in the Reports tab, but somehow the Tasks don't get synched.
Any thoughts?
OK, I deleted my cache, started over, and now I see all the tasks for the test patients I've previously created in the CHT:
What's interesting is now, if I create a new patient, the service-request
is failing with 500
- unable to create the follow-up task
.
Hmmm... I remember seeing the same error when testing the dockerise PR. It turned out that the cht password I had set in my environment was the one being picked and not the default one password
. Do you mind logging the value of chtApiUrl
created here to see if it's the correct value?
Sorry, I logged it as ERROR
so I can see it 😅
2023-03-30 13:57:43 2023-03-30 13:57:43 ERROR: http:/admin:password@nginx/api/v2/records
Am I seeing this badly, or is there a missing /
?
That looks okay to me. Do the same credentials work when you use them to log in on the CHT?
Yes, I use the same credentials to login into the CHT.
I'm not sure what's going on. I have not been able to replicate your issue despite recreating the containers a few times, but I am getting another weird error where the CHT
config is undefined for some reason.
If I access the follow-up form flow via https://*****/contacts/patientUUID/report/interop_follow_up
and submit it, I can see the encounter being submitted correctly.
It's really the service-request
that seems problematic. I will try the LTFU flow with the main
branch.
OK, I managed to reproduce the problem with the main
branch, so this does not seem connected to this PR. service-request
is failing with unable to create the follow up task
error.
You can merge this PR, as the encounter endpoint works correctly. Can you open another issue to investigate why the task creation is suddenly broken?
@njogz I found the problem, it was introduced with a previous PR. I managed to fix the main branch, I will open a PR shortly
@njogz I believe that with that fix, the flow should be back to normal. Can you please bring merge the main
to this and let's try to test again?
I had already merged this to the main branch so testing on the main branch should be sufficient.
Description
Create an endpoint for handling encounters in the mediator
Closes medic/interoperability#23
Code review checklist
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.