LibreHealthIO / lh-ehr

LibreHealth EHR - Free Open Source Electronic Health Records
Other
235 stars 261 forks source link

State name not appended to list until module is refreshed #1440

Open Priyanka488 opened 5 years ago

Priyanka488 commented 5 years ago

A) Your outreachy username : priyanka.yadav

B) Issue title : State name not appended to list until module is refreshed.

C) Site affected: The documentation site , NHANES site

D) Bug report date : March 13, 2019

E) OS/ browser used: Windows/Chrome

F) Which workflow module in LHEHR : “Add new/search” under “Patient/Client”.

G) Steps to reproduce the bug :

  1. Login with your account credentials.
  2. Click on “Add new/search” under “Patient/Client”.
  3. Enter your details and then click on “Add” to add state.
  4. Enter full name and abbreviation for the state.
  5. Click on “Add”.

H) At point of bug, the expected behavior : On clicking on “Add”, the list should have refreshed with the appended state.

I) Details of what actually happened : The list did not refresh until the module was refreshed.

J) Provide relevant screenshots :

a. Entering new state :

1

b.The list did not refresh itself :

2

c.After refreshing the module:

3

muarachmann commented 5 years ago

Nice discovery, can you file in a PR for this

On Wed, Mar 13, 2019 at 8:17 PM Priyanka Yadav notifications@github.com wrote:

A) Your outreachy username : priyanka.yadav

B) Issue title : State name not appended to list until module is refreshed.

C) Site affected: The documentation site , NHANES site

D) Bug report date : March 13, 2019

E) OS/ browser used: Windows/Chrome

F) Which workflow module in LHEHR : “Add new/search” under “Patient/Client”.

G) Steps to reproduce the bug :

  1. Login with your account credentials.
  2. Click on “Add new/search” under “Patient/Client”.
  3. Enter your details and then click on “Add” to add state.
  4. Enter full name and abbreviation for the state.
  5. Click on “Add”.

H) At point of bug, the expected behavior : On clicking on “Add”, the list should have refreshed with the appended state.

I) Details of what actually happened : The list did not refresh until the module was refreshed.

J) Provide relevant screenshots :

a. Entering new state :

[image: 1] https://user-images.githubusercontent.com/33698440/54307822-97a3b000-45f2-11e9-9e53-37c3152ec612.png

b.The list did not refresh itself :

[image: 2] https://user-images.githubusercontent.com/33698440/54307837-9ffbeb00-45f2-11e9-9f0c-2ad07ede06c9.png

c.After refreshing the module:

[image: 3] https://user-images.githubusercontent.com/33698440/54307842-a5593580-45f2-11e9-83c7-b4a425d5bf9d.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LibreHealthIO/lh-ehr/issues/1440, or mute the thread https://github.com/notifications/unsubscribe-auth/APl-XiO8YFd4a-yjf9WpssQyzmgqakv9ks5vWU7dgaJpZM4bv9Yp .

Priyanka488 commented 5 years ago

@muarachmann Sure, will do it soon . :)

aethelwulffe commented 5 years ago

Note: State should also be a field that can be toggled as required, along with the address elements, though the matching algorithm need not be restricted to that. What we are seeing is a list/add function, and not a jquery thing. Submitting requires another database read or refresh. Question is, did it add the state for the parameters when submitted? NOTE: Pretty sure that since this list is configurable under admin/lists, it is not necessarily a good thing to enable people to randomly invent states and regions. Having the states there at all is supposed to be a configuration thing. I believe this may be stored in the list_options table.

aethelwulffe commented 5 years ago

And yes, good find. Don't feel too restricted on what you fix here. If you want to replace the whole patient_search.php feature with something less old-school, have at it! :)

Priyanka488 commented 5 years ago

@aethelwulffe @muarachmann Sorry for the late reply, had mid-term exams. For the state/city options, I was thinking that state name should be asked first and then the corresponding cities could be displayed. I will add states that are already present, and once the user clicks on any of the state, he will get a list of corresponding cities in the City menu. Also,since it'll be impossible to list down all states and their corresponding cities,we can give the option to add city and add state option. So, if a user adds city, the following city will be added to the corresponding selected state. And if he chooses to add state, there will be altogether new entry of a city-state pair.

Kindly tell me your views on it.

aethelwulffe commented 5 years ago

Also, making the city/state a field that can be made required in globals options or in the Layout system....not necessary in Search, but very much so in Add. Adding a configurable default state is also a good idea. Frankly, some things, like a list of cities, states, and any number of things should be functions that are used all over the place, instead of functions or simple input fields that are CODED all over the place.