Open binokaryg opened 4 years ago
hey @binokaryg Do you think this is a duplicate of: https://github.com/medic/cht-core/issues/6149 ?
I don't think it's a duplicate, but yes some overlap is there, as mentioned in my original post above. There are two expectations that are different from #6149:
Update Medic/Patient ID in the report after its corresponding contact gets one (currently blank)
This is not a bug. We should consider this request a for new feature or an improvement of an old feature.
We have mechanics in place to link a patient to a report without the "patient_id", for example by using the "uuid" of the patient document.
Thanks @dianabarsan. We can change it to a feature request or improvement.
Another thing that I have noticed is that the link of Patient UUID is not working in a report that has Medic ID blank (submitted before a contact was synced). However, it is working in a report that has Medic ID (synced contact).
It can also be seen in the screenshots that I have shared in the original post. I have marked the Patient UUIDs as number 2
.
For example:
This behavior is different from what you have shown in #6149, such as this report. Here, the UUID field does not take you to the contact. It only takes you to the contacts tab. I believe that the report was sent after its contact was synced, henced the hyperlinked name at the top. What do you think? Could it be because of the different versions of the web-app?
Because of the missing "Patient ID", Multi-Report SMS alert can not include it.
For example, if we want to send this message:
{{contact.name}} has reported a high risk case with ID {{new_reports.0.fields.patient_id}}. Please follow up.
The "patient_id" is often sent as blank:
@binokaryg The reports that are provided to the messages in multi-report-alerts
are fully hydrated. You are able to access patient information with like {{new_reports.0.patient.patient_id}}
AT passed, ready to merge
This was only partially a duplicate of https://github.com/medic/cht-core/issues/6149, so not resolved by its fix. The remaining part (the request to update older reports when patient_id is generated on the patient contact) is probably a duplicate of https://github.com/medic/cht-core/issues/6383 .
Describe the bug As an offline user, if I create a new contact and add their report quickly without letting it sync first, the report does not get the information such as the link to the contact and Patient ID.
To Reproduce
If you pull the following fields to the report from contact:
contact/_id
contact/name
contact/patient_id
Fields 1 and 2 show up as hyperlinks in the report, but they only take you to the contact tab. Field 3 does not populate if the contact has not been synced yet.
If a report is sent after syncing the contact, Patient ID and name are shown with a hyperlink, but it takes you to the Contacts tab as reported in #6149 and #3414.
Expected behavior
Screenshots 1. Report submitted before contact is synced:
2. Report submitted after contact is synced:
Environment
nepal-healthform.app
,covid-demo.dev
,local
Additional context When digitizing paper forms, people like to quickly create a person and then add reports before it gets synced. Later when we find an interesting report and we want to go to its contact, we have to search using the name which is not very convenient.