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

Recent drug safety updates don't display a published date #1030

Open
fofr opened this issue Apr 25, 2017 · 0 comments
Open

Recent drug safety updates don't display a published date #1030

fofr opened this issue Apr 25, 2017 · 0 comments

Comments

@fofr
Copy link
Contributor

fofr commented Apr 25, 2017

specialist-frontend has specific logic for drug safety updates that hides the default published dates:
https://github.com/alphagov/specialist-frontend/blob/923530fd4b4a9e641ef4f94d4d2cb211a9f25821/app/presenters/drug_safety_update_presenter.rb#L4

This is in favour of a first_published_date that used to appear in details.metadata.first_published_at. Looking at older drug safety updates you see something like this:

"metadata": {
  "therapeutic_area": [
    "infectious-disease",
    "urology-nephrology"
  ],
  "first_published_at": "2014-09-25T00:00:00Z",
  "bulk_published": false,
  "document_type": "drug_safety_update"
},

Example: https://www.gov.uk/drug-safety-update/ivabradine-procoralan-in-the-symptomatic-treatment-of-angina-risk-of-cardiac-side-effects

However, in those published more recently (I don't know when the change occurred), the field is missing. This means the page displays without any published date:

Example: https://www.gov.uk/drug-safety-update/valproate-and-developmental-disorders-new-alert-asking-for-patient-review-and-further-consideration-of-risk-minimisation-measures

We are switching rendering from specialist-frontend to government-frontend, we haven't ported the specific date logic which means dates show correctly for new DSUs, but are duplicated on older ones:

screen shot 2017-04-25 at 19 28 02

Screenshot of this content rendered by government-frontend: https://www.gov.uk/drug-safety-update/nitrofurantoin-now-contraindicated-in-most-patients-with-an-estimated-glomerular-filtration-rate-egfr-of-less-than-45-ml-min-1-73m2

  • What is the correct behaviour?
  • Should the content be made consistent?
  • Is the correct issue date missing from newer updates? (eg date the publication was published)

More context:
alphagov/specialist-frontend#74

Never show a "Published" date for Drug Safety Updates (this is the "issued_date" in the actual document metadata, which appears at the top of the document). Show an "Updated" date if the document isn't the first edition.

alphagov/specialist-frontend@923530f

DSU is unique in that they don't display any date metadata in the footer
if it's the first edition as we would then get a duplicate Published
(which is really first_published_at) and Published, which will change to
Updated when the document is updated. When it's not the first edition we
see Published (which is really first_published_at) and Updated, so
it's not a problem in that state.

cc @tijmenb @whoojemaflip

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

1 participant