Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Search is not working off-line #631

Closed
mnorbeck opened this issue Aug 23, 2016 · 7 comments
Closed

Search is not working off-line #631

mnorbeck opened this issue Aug 23, 2016 · 7 comments
Assignees
Labels
🐛bug issue/pull request that documents/fixes a bug

Comments

@mnorbeck
Copy link

Expected behavior:
Search should work off-line

Actual behavior:
Search is not working, the search working dialog comes up, but it never closes

Steps to reproduce:

  1. login to hospital run
  2. wait for sync (watch network activity in dev tools)
  3. close tab in browser
  4. go off the network
  5. open new tab
  6. go to hospital run url
  7. attempt a patient search

Screenshots (if applicable):

n/a

OS and Browser:

OSX Yosemite Chrome 52.0.2743.116 (64-bit)

@tangollama tangollama added 🐛bug issue/pull request that documents/fixes a bug help wanted indicates that an issue is open for contributions LOE: < 1 week and removed LOE: < 1 week labels Sep 21, 2016
@halatef
Copy link

halatef commented Sep 27, 2016

Dear, i am sorry for posting here about this but i don't know where can i post my question

but i need to know how can i get a user manual/documentation for hospital run?

@jkleinsc jkleinsc removed the help wanted indicates that an issue is open for contributions label Oct 5, 2016
@dinhvle
Copy link

dinhvle commented Oct 6, 2016

Anybody working on this issue? I do have a suggestion regarding search, it's kinda hard to tell what you are searching for. It would be better if the search bar is move from the side bar to the main view pages.

@broerse
Copy link

broerse commented Oct 6, 2016

@dinhvle I am not working on this but we could now use pouchdb-find
https://github.com/HospitalRun/hospitalrun-frontend/blob/master/bower.json#L19

@wolfieorama
Copy link

@dinhvle I have just started on it, I like both suggestions

@wolfieorama
Copy link

@mnorbeck does this apply for all the records, offline created records, or the synced record only ? I a asking because I am not able to exactly reproduce

@jkleinsc
Copy link
Member

jkleinsc commented Oct 7, 2016

@wolfieorama the issue is that currently the app tries to call /search/hrdb/ which cannot be reached while offline. The bulk of the offline support is currently contained in our serviceworker code at /app/serviceworkers/pouchdb-sync. The solution would be to add an intercept in /app/serviceworkers/pouchdb-sync for the server route /search/hrdb/ that tries to make the call server side and if that fails, it should either perform a "slow search" via a temp view like we do here: https://github.com/HospitalRun/hospitalrun-server-routes/blob/master/routes/20-searchproxy.js or use pouchdb-find as @broerse mentioned. In order to use pouchdb-find, the proper indexes would need to be built.

This issue was incorrectly labeled as being LOE: 1 day, but unfortunately this is a little more complicated that what can be done in a day.

@jkleinsc jkleinsc assigned jkleinsc and unassigned wolfieorama Mar 23, 2017
@jkleinsc
Copy link
Member

I am going to tackle this one.

jkleinsc added a commit that referenced this issue Mar 23, 2017
@jkleinsc jkleinsc mentioned this issue May 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛bug issue/pull request that documents/fixes a bug
Projects
None yet
Development

No branches or pull requests

7 participants