osler icon indicating copy to clipboard operation
osler copied to clipboard

Capitalized Names Validation

Open nakul2234 opened this issue 10 years ago • 3 comments

We should make sure that names are put in with capitalization or else it will mess up the sorting of the patient names.

nakul2234 avatar Sep 07 '15 17:09 nakul2234

That's an excellent catch! Could we sort in a case-insentive way? Some people have lower case letters that start their names (e.g. deMaar, d'Souza).

justinrporter avatar Sep 07 '15 17:09 justinrporter

sorted(lst, key=lambda s: s.lower())

On Sep 7, 2015, at 12:48, Justin R. Porter [email protected] wrote:

That's an excellent catch! Could we sort in a case-insentive way? Some people have lower case letters that start their names (e.g. deMaar, d'Souza).

— Reply to this email directly or view it on GitHub.

Talophex avatar Sep 07 '15 18:09 Talophex

that's a good idea. I think that the sorting is actually implemented in the template file, though so I think you probably will wind up needing to do something like

{{ ... | lower | sort }}

in the actual rendering of the page.

On second thought, this is kind of a dumb solution, since ultimately we want to be able to filter this view, so it might be better to produce the sorting in the view...

justinrporter avatar Sep 07 '15 18:09 justinrporter