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

Missing drugs on analyse page #4741

Open
richiecroker opened this issue Apr 4, 2024 · 5 comments
Open

Missing drugs on analyse page #4741

richiecroker opened this issue Apr 4, 2024 · 5 comments
Assignees

Comments

@richiecroker
Copy link
Collaborator

We've had two emails today saying that various presentations are missing from the analyse page:

  • liothyronine 10mcg tablets (0602010M0AAAQAQ)
  • Epesri 250mg capsules (0408010I0BDAAAA)

Both of these items appear in the BQ hscic.normalised_prescribing and show data for January 2024, as well as previous months.

The BNF - SNOMED code map appears at first glance to be correct:
image

@inglesp
Copy link
Contributor

inglesp commented Apr 4, 2024

These presentations are not marked as current:

127.0.0.1 prescribing@prescribing=# select bnf_code, name, is_current from frontend_presentation where bnf_code in ('0602010M0AAAQAQ', '0408010I0BDAAAA');
┌─────────────────┬──────────────────────────────────┬────────────┐
│    bnf_code     │               name               │ is_current │
├─────────────────┼──────────────────────────────────┼────────────┤
│ 0408010I0BDAAAA │ Epesri 250mg capsules            │ f          │
│ 0602010M0AAAQAQ │ Liothyronine 10microgram tablets │ f          │
└─────────────────┴──────────────────────────────────┴────────────┘
(2 rows)

Time: 1.587 ms

@inglesp
Copy link
Contributor

inglesp commented Apr 4, 2024

There are 461 (out of 33599) presentations with prescribing in the matrixstore but which are not marked as current:

>>> from matrixstore.db import get_db
>>> from frontend.models import Presentation
>>> 
>>> ms_codes = [row[0] for row in db.query("select bnf_code from presentation")]
>>> len(ms_codes)
33599
>>> Presentation.objects.filter(bnf_code__in=ms_codes, is_current=False).count()
461
>>> for p in Presentation.objects.filter(bnf_code__in=ms_codes, is_current=False)[:10]: print(p.bnf_code, p.name)
... 
0101010I0BFAAAE Magdose 100mg tablets
0101010Q0AAAGAG Magnesium hydroxide 7.45-8.35% oral suspension BP
0101012B0AABTBT Sodium bicarbonate 300mg/5ml oral liquid
0101021B0BSABAH Boots Heartburn Relief liquid aniseed
0101021C0AAAJAJ Calcium carbonate compound mixture paediatric
0101021C0AACKCK Calcium carbonate 1.25g/5ml oral suspension
0102000A0BEAAAA Gielism 60mg capsules
0102000ACAAAVAV Atropine 100micrograms/5ml oral solution
0103050L0AAALAL Lansoprazole 60mg/5ml oral liquid
0103050P0AABQBQ Omeprazole 7mg/5ml oral suspension

@inglesp
Copy link
Contributor

inglesp commented Apr 4, 2024

I'm running ./manage.py refresh_bnf_class_currency

@inglesp
Copy link
Contributor

inglesp commented Apr 4, 2024

@richiecroker
Copy link
Collaborator Author

@inglesp assuming this can be closed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants