Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NHS number field doesn't appear for administrator users #728

Closed
AmaniKrayemRCPCH opened this issue Jan 4, 2024 · 3 comments
Closed

NHS number field doesn't appear for administrator users #728

AmaniKrayemRCPCH opened this issue Jan 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working priority: highest Highest Priority Work - Max 1 Item

Comments

@AmaniKrayemRCPCH
Copy link
Contributor

Issue raised by user

We are having trouble entering data on the web portal today (we have been trying to enter patients since yesterday with no issues until this morning). The above message is displayed when entering patient demographics (details redacted for data protection, but have actually been filled in).

Image

@AmaniKrayemRCPCH
Copy link
Contributor Author

They've stated that they tried 4 different patients, and that none of the information is invalid.
They have added patients before with no difficulty. The issue started today and is ongoing.

@AmaniKrayemRCPCH
Copy link
Contributor Author

Just spotted that it's missing the NHS number field. I was able to replicate this as an administrator user on the staging site:

Image

(this isn't real patient data)

@AmaniKrayemRCPCH AmaniKrayemRCPCH changed the title Cannot add patient - no reason stated NHS number field doesn't appear for administrator users Jan 4, 2024
@AmaniKrayemRCPCH AmaniKrayemRCPCH added the bug Something isn't working label Jan 5, 2024
@pacharanero pacharanero added the priority: highest Highest Priority Work - Max 1 Item label Jan 5, 2024
@eatyourpeas
Copy link
Member

Thanks for raising this @AmaniKrayemRCPCH
I think this is to do with permissions of the person entering the data:

{% if request.user|has_group:"trust_audit_team_full_access, trust_audit_team_edit_access, epilepsy12_audit_team_edit_access, epilepsy12_audit_team_full_access" %}
  <div class="field">
    <label>NHS Number</label>
    {{form.nhs_number}} {% if form.nhs_number.errors %}
    <div class="ui pointing red basic label">{{form.nhs_number.errors}}</div>
    {% endif %}
  </div>
{% endif %}

It is a bit of legacy code before we introduced more granular permissions and Helen at the time wanted NHS number invisible from certain users. Of course the child cannot be saved without an NHS number, hence the error. I will remove the conditional test and this should fix this item, but I would be grateful if @nikyraja / @AmaniKrayemRCPCH you could independently send me the name of the user that I might check their permissions and ensure they are allocated to the correct group.

This will close once #726 merges

@eatyourpeas eatyourpeas self-assigned this Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: highest Highest Priority Work - Max 1 Item
Projects
None yet
Development

No branches or pull requests

3 participants