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

Monthly usage change #268

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/ApiUsage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { API_LINK, API_NAME } from '../constants/api'
import {default as $} from 'jquery'
import '../css/components/APIUsage.scss'

// Update total usage numbers with: https://api.fda.gov/usage.json?start_at=2024-10-07 - last 2024-10-07
// Update in pages/about/statistics/_content.yaml
//Update total usage numbers with: https://api.fda.gov/usage.json?start_at=2024-11-05 - last 2024-11-05
//Update in pages/about/statistics/_content.yaml
type tPROPS = {
accessSinceLaunch: string,
dynamicDisclaimer: string
Expand Down
10 changes: 4 additions & 6 deletions src/components/UpdateStatus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,17 @@ class UpdateStatus extends React.Component {
return response.json()
})
.then((endpointData) => {
if (endpointData.meta.last_updated === moment().format("YYYY-MM-DD")
|| endpointData.meta.last_updated === moment().subtract(1, 'days').format("YYYY-MM-DD")) {
if (endpointData.meta.last_updated === moment().format("YYYY-MM-DD")) {
status = "updated"
} else {
status = "delayed"
}
this.setState({
status
})
}).catch((error) => {
console.log("Error fetching response data: ", error)
})

this.setState({
status
})
}

render () {
Expand Down
4 changes: 2 additions & 2 deletions src/constants/fields/drugevent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ properties:
is_exact: false
type: string
pattern:
description: "Encoding format of the `receiptdate` field. Always set to 102 (YYYYMMDD)."
description: "Encoding format of the `transmissiondate` field. Always set to 102 (YYYYMMDD)."
possible_values:
receivedate:
format: date
Expand All @@ -742,7 +742,7 @@ properties:
is_exact: false
type: string
pattern:
description: "Encoding format of the `receivedate` field. Always set to 102 (YYYYMMDD)."
description: "Encoding format of the `transmissiondate` field. Always set to 102 (YYYYMMDD)."
possible_values:
receiver:
type: object
Expand Down
12 changes: 3 additions & 9 deletions src/constants/fields/master_fields.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4836,6 +4836,7 @@ drug:
drug:
type: array
items:
type: object
properties:
actiondrug:
format: int64
Expand Down Expand Up @@ -5072,13 +5073,6 @@ drug:
'3': "Unknown"
drugrecurrence:
properties:
drugrecuractionmeddraversion:
format:
is_exact: true
type: string
pattern:
description: "The version of MedDRA from which the term in `drugrecuraction` is drawn."
possible_values:
drugrecuraction:
format:
is_exact: true
Expand Down Expand Up @@ -5516,7 +5510,7 @@ drug:
is_exact: false
type: string
pattern:
description: "Encoding format of the `receiptdate` field. Always set to 102 (YYYYMMDD)."
description: "Encoding format of the `transmissiondate` field. Always set to 102 (YYYYMMDD)."
possible_values:
receivedate:
format: date
Expand All @@ -5530,7 +5524,7 @@ drug:
is_exact: false
type: string
pattern:
description: "Encoding format of the `receivedate` field. Always set to 102 (YYYYMMDD)."
description: "Encoding format of the `transmissiondate` field. Always set to 102 (YYYYMMDD)."
possible_values:
receiver:
type: object
Expand Down
4 changes: 2 additions & 2 deletions src/pages/about/statistics/_content.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessSinceLaunch: 'Over 815 Million'
accessSinceLaunch: 'Over 832 Million'
dynamicDisclaimer: 'The graph shown below is dynamic and gets updated on a daily basis.'
clickEndpointDisclaimer: 'Click on one of the API categories below to view usage statistics by dataset.'
clickEndpointDisclaimer: 'Click on one of the API categories below to view usage statistics by dataset.'
4 changes: 2 additions & 2 deletions static/fields/drugevent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ properties:
is_exact: false
type: string
pattern:
description: "Encoding format of the `receiptdate` field. Always set to 102 (YYYYMMDD)."
description: "Encoding format of the `transmissiondate` field. Always set to 102 (YYYYMMDD)."
possible_values:
receivedate:
format: date
Expand All @@ -742,7 +742,7 @@ properties:
is_exact: false
type: string
pattern:
description: "Encoding format of the `receivedate` field. Always set to 102 (YYYYMMDD)."
description: "Encoding format of the `transmissiondate` field. Always set to 102 (YYYYMMDD)."
possible_values:
receiver:
type: object
Expand Down
Binary file modified static/fields/drugevent_reference.pdf
Binary file not shown.
Binary file modified static/fields/drugevent_reference.xlsx
Binary file not shown.