Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching report doesn't populate all reports #9631

Closed
1yuv opened this issue Nov 8, 2024 · 7 comments
Closed

Searching report doesn't populate all reports #9631

1yuv opened this issue Nov 8, 2024 · 7 comments
Labels
Type: Bug Fix something that isn't working as intended Won’t fix: Not an issue Working as expected

Comments

@1yuv
Copy link
Member

1yuv commented Nov 8, 2024

Describe the bug
Searching for reports by medic id doesn't populate app forms. Only sms forms are populated on search result.

To Reproduce
Steps to reproduce the behavior:

  1. Have a configuration where both SMS forms and App forms can be submitted for patient.
  2. Register/Create a patient, note patient's medic id.
  3. Submit SMS form(s) and webapp form for that patient.
  4. Go to reports tab and search by providing Medic id from step 2.
  5. Only sms froms will be populated on the results and web app form won't be populated on the results.

Expected behavior
If we are searching on reports tab by medic id, result should populate all reports (sms and app forms).

Logs

Screenshots

Environment

  • Instance: gandaki prod
  • Browser: Any
  • App: webapp
  • Version: 4.10.0
@1yuv 1yuv added the Type: Bug Fix something that isn't working as intended label Nov 8, 2024
@dianabarsan
Copy link
Member

@1yuv
Which webapp form are you submitting? The connection between report and patient is done through patient_uuid and patient_id fields, but these are configured within the form itself and aren't added automatically. If your form doesn't store patient_id, then there will be no reference to the patient contact through that string.

Can you share the JSON body of the XML report that you expected to see as a search result, please?

@1yuv
Copy link
Member Author

1yuv commented Nov 8, 2024

Hi @dianabarsan , the XML report had patient_id set to empty. Which may be the reason why that form didn't come on as a search result. How about searching from patient name? The patient name is in both SMS form and xml form. Is it because they may be stored in different json path?

@dianabarsan
Copy link
Member

If the report didn't have a patient_id, this is expected behavior and not a bug.
The report form itself is responsible with populating these fields.

Are you not getting the XML report when searching by name?

@dianabarsan dianabarsan added the Won’t fix: Not an issue Working as expected label Nov 8, 2024
@dianabarsan
Copy link
Member

Any updates here @1yuv ? Did you find another behavior which is not expected?

@1yuv
Copy link
Member Author

1yuv commented Nov 12, 2024

Hi @dianabarsan , I am seeing strange search result on local instance. Sometimes Sms forms are not coming on search result and sometimes xml form are not coming on. Below is the example of sms form not coming on as a result.

Search result showing xml form only:
Image

Patient's contact page with 1 xml form and 1 sms form:
Image

Let's keep this issue open for a while and observe it on other instances.

@1yuv 1yuv changed the title Searching webapp form on Report tab doesn't populate associated report Searching report doesn't populate all reports Nov 12, 2024
@1yuv
Copy link
Member Author

1yuv commented Nov 12, 2024

If the report didn't have a patient_id, this is expected behavior and not a bug. The report form itself is responsible with populating these fields.

Are you not getting the XML report when searching by name?

I think for the name field also same thing applies. If name is not on the field of the other reports, it won't be populated on search result.

@1yuv 1yuv closed this as completed Nov 12, 2024
@dianabarsan
Copy link
Member

If name is not on the field of the other reports, it won't be populated on search result.

This applies on any field. Search uses fields in the reports alone, and doesn't do any smart connection to contacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Fix something that isn't working as intended Won’t fix: Not an issue Working as expected
Projects
None yet
Development

No branches or pull requests

2 participants