cht-core icon indicating copy to clipboard operation
cht-core copied to clipboard

View reports and fill forms within the People tab

Open estellecomment opened this issue 9 years ago • 6 comments

From the People tab

  • when you click on a report in the History section, the report should be viewed within the People tab.
  • when you click on a task in the Tasks section, the form should be filled within the People tab.

See mocks that illustrate this: ~~mobile : https://projects.invisionapp.com/share/JA89C042Q#/screens/180760639 desktop : https://projects.invisionapp.com/share/XA7CTCBGU#/screens/163504823~~ mobile: https://app.zeplin.io/project.html#pid=57d311edb055084578d006ec&sid=57e2d34e535a7a86436006ac desktop: https://app.zeplin.io/project.html#pid=57d311edb055084578d006ec&sid=57e2cf3ebe5300b10d514b7e

See design spec about it: ~~https://docs.google.com/document/d/1UwSe8H3xykvOUwu65KxJYgBTxv40Y_9b3CPgRbcXOH0/edit#bookmark=id.xi7rjrs2aqlr~~ Updated link : https://docs.google.com/document/d/1UwSe8H3xykvOUwu65KxJYgBTxv40Y_9b3CPgRbcXOH0/edit#bookmark=id.907drg3i839q

When you execute a task (or file a report) about a given person, you should be on the page for that person. I.e. These elements should be about the person (e.g. "Allison Jones" in the mocks):

  • ~~the header on mobile says "Allison Jones"~~
  • the patient name "Allison Jones" is displayed above form (both mobile and desktop, see mocks)
  • the LHS on desktop has Allison Jones selected (if visible in the LHS)
  • the url is something with Allison Jones's _id (for instance something like /medic/_design/medic/_rewrite/#/contacts/<_id>/report/<report _id> or /medic/_design/medic/_rewrite/#/contacts/<_id>/report/add/<form code>)
  • the back button sends you back to "Allison Jones"
  • when you are done with the form, you land on "Allison Jones"

Edge case : if you are on "Allison Jones Family", you will see Tasks/Reports about both Allison Jones and Allison Jones Family. In that case, if you click a task about "Allison Jones":

  • header title : Allison Jones (who this is about)
  • LHS selection : Allison Jones Family (where you came from)
  • where back button goes : Allison Jones Family (where you came from)
  • url (??)
  • where you go when you’re done filling form : Allison Jones Family (where you came from)

Also :

  • on mobile, the header text is the form name (see mocks, form name is "ANC visit follow up").
  • on desktop, the form name is displayed just above the form. (see mocks, form name is "ANC visit follow up")

estellecomment avatar Sep 19 '16 20:09 estellecomment

Related: #1368 #2226 #1975 #1565

garethbowen avatar Sep 19 '16 20:09 garethbowen

I think the correct way to do this is to separate the left and the right hand sides so we can have contacts on the left and tasks on the right without duplicating the tasks code. For example the URL could be /contacts/<contact-id>/tasks/<task-id> which would call the ContactsCtrl to render the Contacts list and select the contact, and call the TasksContentCtrl to render the selected task.

This is a large rework of the way the app works as instead of TasksContentCtrl being a child of the TasksCtrl it has to be a standalone controller, but this solves a series of issues that we've been having with the strictly hierarchical model.

garethbowen avatar Sep 19 '16 20:09 garethbowen

Considering whether to defer this work, see discussion on design spec : https://docs.google.com/document/d/1UwSe8H3xykvOUwu65KxJYgBTxv40Y_9b3CPgRbcXOH0/edit#bookmark=id.xi7rjrs2aqlr

estellecomment avatar Sep 20 '16 09:09 estellecomment

Updated the initial description with the recent changes.

estellecomment avatar Oct 07 '16 08:10 estellecomment

To do this properly and consistently throughout the app will require a large refactor and I recommend this is delayed until a later release.

garethbowen avatar Oct 10 '16 09:10 garethbowen

This issue is most jarring in desktop view, yet noticeable on both mobile and desktop when using the back button and left arrow. We should deal with this before any major changes to the back button functionality, but we decided to hold off on this until we get feedback from initial beta testing - and can then prioritize accordingly. Ideally we can wait until after 2.9 is released to avoid potential regressions. Very worst case we could replicate code to do this but we'd want to avoid that and find time to do this properly.

abbyad avatar Oct 18 '16 14:10 abbyad