ID: 3614290 Fix stale chart note lock being left after user exits chart

Fix invoice reports rejected list returning nothing

Change-Id: I7b727b487438ef676933b1058b468ef0198978ea
Selenium IDE tests

Change-Id: I1dad816ac3fa5f760fe4857e392479b9fc52d02d

marc - rebased
Merge "ID: 3614290 Fix stale chart note lock being left after user exits chart"
ID: 3609788 Accessing Templates in Encounter Screen Logs User Out

Rewrite the security rule of templates:
1. No right of _newCasemgmt.templates, hide template list
2. READ of _newCasemgmt.templates, show template list without
add/edit option
3. WRITE of _newCasemgmt.templates, show template list with
add/edit option

Change-Id: Ifeb12bb68202b8dca4d7e079499e6a83959b5f08