Skip to content
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
1 change: 1 addition & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
pathPrefix: `/opioid-and-ssri`,
siteMetadata: {
title: `openFDA`,
siteUrl: `https://www.open.fda.gov`,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"author": "Violet Wren, Priyanka Ayer",
"scripts": {
"dev": "gatsby develop -H 0.0.0.0 -p 3000",
"serve": "gatsby serve -H 0.0.0.0 -p 3000",
"build": "gatsby build --verbose",
"serve": "gatsby serve --prefix-paths -H 0.0.0.0 -p 3000",
"build": "gatsby build --prefix-paths --verbose",
"format": "prettier --trailing-comma es5 --no-semi --single-quote --write 'src/**/*.{js,ts,tsx}'",
"develop": "gatsby develop",
"develop": "gatsby develop --prefix-paths",
"cy:open": "cypress open",
"cy:run": "cypress run",
"test:e2e": "start-server-and-test dev http-get://127.0.0.1:3000 cy:open",
Expand Down
3 changes: 3 additions & 0 deletions src/components/ApiStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ let endpointKeys = [
'drugorangebook',
'drugsfda',
'drugshortages',
'drugresearchopioidandssri',
'deviceevent',
'devicerecall',
'deviceclass',
Expand Down Expand Up @@ -56,6 +57,7 @@ const catMap: Record<EndpointKey, string> = Object.freeze({
'drugenforcement': 'Drugs › Enforcement Reports',
'drugsfda': 'Drugs › Drugs@FDA',
'drugshortages': 'Drugs › Drug Shortages',
'drugresearchopioidandssri': 'Drugs › Opioid and SSRI Interactions Research',
'deviceevent': 'Devices › Adverse Events',
'devicerecall': 'Devices › Recalls',
'deviceclass': 'Devices › Classification',
Expand Down Expand Up @@ -89,6 +91,7 @@ const endpointLinkMap: Record<EndpointKey, string> = Object.freeze({
'drugorangebook': 'drug/orangebook',
'drugsfda': 'drug/drugsfda',
'drugshortages': 'drug/shortages',
'drugresearchopioidandssri': 'drug/researchopioidandssri',
'deviceevent': 'device/event',
'devicerecall': 'device/recall',
'deviceclass': 'device/classification',
Expand Down
2 changes: 2 additions & 0 deletions src/components/ApiUsage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ if (!bp.mob && hasWindow) {
<tr><td>Orange Book</td><td>{this.docCount('drugorangebook')}</td></tr>
<tr><td>Drugs@FDA</td><td>{this.docCount('drugsfda')}</td></tr>
<tr><td>Drug Shortages</td><td>{this.docCount('drugshortages')}</td></tr>
<tr><td>Opioid and SSRI Interactions Research</td><td>{this.docCount('drugresearchopioidandssri')}</td></tr>

<tr className='bg-primary-darkest clr-white'><td colSpan={2}><strong>Foods</strong></td></tr>
<tr><td>Adverse Event Reports</td><td>{this.docCount('foodevent')}</td></tr>
Expand Down Expand Up @@ -516,6 +517,7 @@ if (!bp.mob && hasWindow) {
<tr><td>Orange Book</td><td>{this.downloadCount('drugorangebook')}</td></tr>
<tr><td>Drugs@FDA</td><td>{this.downloadCount('drugsfda')}</td></tr>
<tr><td>Drug Shortages</td><td>{this.downloadCount('drugshortages')}</td></tr>
<tr><td>Opioid and SSRI Interactions Research</td><td>{this.downloadCount('drugresearchopioidandssri')}</td></tr>

<tr className='bg-primary-darkest clr-white'><td colSpan={2}><strong>Foods</strong></td></tr>
<tr><td>Adverse Event Reports</td><td>{this.downloadCount('foodevent')}</td></tr>
Expand Down
1 change: 1 addition & 0 deletions src/components/DataDictionary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class DataDictionary extends React.Component<{}, DataDictionaryState> {
'orangebook': 'Orange Book',
'drugsfda': 'Drugs@FDA',
'drugshortages': 'Drug Shortages',
'researchopioidandssri': 'Opioid and SSRI Interactions Research ',
'covid19serology': 'COVID-19 Serology',
'pma': 'Pre-Market Approval',
'recall': 'Recall',
Expand Down
3 changes: 2 additions & 1 deletion src/components/EndpointBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ const EndpointBox = (props: endpointBoxProps) => {
'enforcement': <div className='ep-icon' style={bg_color.drug}><i className='fa fa-3x fa-rotate-left' style={{ color: "white" }} /></div>,
'drugsfda': <div className='ep-icon' style={bg_color.drug}><i className='fa fa-3x fa-at' style={{ color: "white" }} /></div>,
'drugshortages': <div className='ep-icon' style={bg_color.drug}><i className='fa fa-3x fa-angle-double-down' style={{ color: "white" }} /></div>,
'orangebook': <div className='ep-icon' style={bg_color.drug}><i className='fa fa-3x fa-book' style={{ color: "white" }} /></div>
'orangebook': <div className='ep-icon' style={bg_color.drug}><i className='fa fa-3x fa-book' style={{ color: "white" }} /></div>,
'researchopioidandssri': <div className='ep-icon' style={bg_color.drug}><i className='fa fa-3x fa-book' style={{ color: "white" }} /></div>
},
'other': {
'historicaldocument': <div className="ep-icon" style={bg_color['other']}><i className="fa fa-3x fa-history" style={{ color: "white" }} /></div>,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Footer extends React.Component {
<img
alt='Go to FDA website'
width='180px'
src={"/img/gov-fda-new-white.svg"}
src={withPrefix("/img/gov-fda-new-white.svg")}
/>
</a>
</li>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ const Layout = (props: LayoutProps) => {
up: 'sticky-scroll-up'
}

const hasSidebar = props.location.pathname.slice(0, 6) === `/apis/`
console.log(props.location.pathname)
console.log(props.location.pathname.slice(0, 23))
const hasSidebar = props.location.pathname.slice(0, 6) === `/apis/` || props.location.pathname.slice(0, 22) === `/opioid-and-ssri/apis/`
// const hasSidebar = props.location.pathname.slice(0, 6) === `/apis/`
return (
<DocumentTitle title='openFDA' key='openFDA'>
<div>
Expand Down
12 changes: 8 additions & 4 deletions src/components/RenderContentObject/KeyFacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ const source: Record<string, Record<string, string>> = {
'enforcement': 'FDA Recall Enterprise System (RES)',
'orangebook': 'Approved Drug Products with Therapeutic Equivalence Evaluations (Orange Book)',
'drugsfda': 'Drugs@FDA',
'shortages': 'Drug Shortages'
'shortages': 'Drug Shortages',
'researchopioidandssri': 'Opioid and SSRI Interactions Research'
},
'other': {
'historicaldocument': 'Historic FDA Press Releases',
Expand Down Expand Up @@ -80,7 +81,8 @@ const sourceLink: any = {
'enforcement': '/data/res/',
'orangebook': '/data/orangebook/',
'drugsfda': '/data/drugsfda/',
'shortages': '/data/drugshortages'
'shortages': '/data/drugshortages/',
'researchopioidandssri': '/data/researchopioidandssri/'
},
'other': {
'historicaldocument': '/data/historicaldocument/',
Expand Down Expand Up @@ -127,7 +129,8 @@ const timePeriod: any = {
'enforcement': '2004 to',
'orangebook': 'Content current as of:',
'drugsfda': '1939 to',
'shortages': '2012 to'
'shortages': '2012 to',
'researchopioidandssri': 'Last updated'
},
'other': {
'historicaldocument': '1913 to',
Expand Down Expand Up @@ -175,7 +178,8 @@ const frequency = {
'enforcement': 'Weekly',
'orangebook': 'Monthly',
'drugsfda': 'Daily (Monday-Friday)',
'shortages': 'Daily'
'shortages': 'Daily',
'researchopioidandssri': 'Infrequently'
},
'other': {
'historicaldocument': 'Infrequently',
Expand Down
4 changes: 3 additions & 1 deletion src/constants/api.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const API_LINK: string = "https://api.fda.gov"
// export const API_LINK: string = "https://api.fda.gov"
export const API_LINK: string = "https://openfda-api.preprod.fda.gov"
// export const API_LINK: string = "http://54.196.38.238:8000"
export const API_NAME: string = "api.fda.gov"
export default {
API_LINK,
Expand Down
9 changes: 6 additions & 3 deletions src/constants/endpoint_box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const description: Record<NounName, Partial<Record<EndpointName, string>>
'enforcement': 'Drug product recall enforcement reports.',
'orangebook': 'Approved Drug Products with Therapeutic Equivalence Evaluations (Orange Book).',
'drugsfda': 'Drugs@FDA includes most of the drug products approved since 1939.',
'drugshortages': 'Drug Shortages can occur for many reasons, including manufacturing and quality problems, delays, and discontinuations.'
'drugshortages': 'Drug Shortages can occur for many reasons, including manufacturing and quality problems, delays, and discontinuations.',
'researchopioidandssri': 'This dataset makes available the research paper "Cannabidiol and Liver Enzyme Level Elevations in Healthy Adults".'
},
'other': {
'historicaldocument': 'FDA Press Releases, 1913-2014, in searchable format',
Expand Down Expand Up @@ -79,7 +80,8 @@ export const ep_title: Record<NounName, Partial<Record<EndpointName, string>>> =
'enforcement': 'Recall enforcement reports',
'orangebook': 'Orange Book',
'drugsfda': 'Drugs@FDA',
'drugshortages': 'Drug shortages'
'drugshortages': 'Drug shortages',
'researchopioidandssri': 'Opioid and SSRI Interactions Research'
},
'other': {
'historicaldocument': 'Historical Documents',
Expand Down Expand Up @@ -137,7 +139,8 @@ export const ep_path: Record<NounName, Partial<Record<EndpointName, string>>> =
'enforcement': '/apis/drug/enforcement/',
'orangebook': '/apis/drug/orangebook/',
'drugsfda': '/apis/drug/drugsfda/',
'drugshortages': '/apis/drug/drugshortages/'
'drugshortages': '/apis/drug/drugshortages/',
'researchopioidandssri': '/apis/drug/researchopioidandssri/'
},
'other': {
'historicaldocument': '/apis/other/historicaldocument/',
Expand Down
189 changes: 189 additions & 0 deletions src/constants/fields/drugresearchopioidandssri.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
properties:
subject_id:
description: "Participant ID"
format:
is_exact: true
possible_values:
type: string
age:
description: "Age of the participant (unit = years)"
format:
is_exact: true
possible_values:
type: integer
sex:
description: "Sex of the participant (one of 'Female' or 'Male')"
format:
is_exact: true
possible_values:
type: string
ethnicity:
description: "Ethnicity of the participant (one of 'Hispanic or Latino' or 'Not Hispanic or Latino')"
format:
is_exact: true
possible_values:
type: string
race:
description: "Race of the participant (one of ‘American Indian or Alaska Native’, 'Asian', 'Black or African American', ‘Multiple’, ‘Unknown’, or 'White')"
format:
is_exact: true
possible_values:
type: string
height:
description: "Height of the participant (unit = cm)"
format:
is_exact: true
possible_values:
type: integer
weight:
description: "Weight of the participant (unit = kg)"
format:
is_exact: true
possible_values:
type: number
body_mass_index:
description: "Body mass index of the participant (unit = kg/m2)"
format:
is_exact: true
possible_values:
type: number
treatment:
description: "Type of treatment (one of CBD = “Cannabidiol”; PLB = “Placebo”)"
format:
is_exact: true
possible_values:
type: string
primary_event_flag:
description: "Flag for if the participant had an event meeting criteria for the primary endpoint"
format:
is_exact: true
possible_values:
type: boolean
secondary_event_flag:
description: "Flag for if the participant had an event meeting criteria for the secondary endpoint"
format:
is_exact: true
possible_values:
type: boolean
discontinued_no_event:
description: "Flag for if the participant discontinued before the end of the study for reasons other than liver enzyme elevations (i.e., for non-liver safety, withdrawal of consent, lack of adherence, etc.)"
format:
is_exact: true
possible_values:
type: boolean
start_day:
description: "Day treatment was initiated. (Day = 1 for all participants)"
format:
is_exact: true
possible_values:
type: integer
end_day:
description: "Last day study drug was administered"
format:
is_exact: true
possible_values:
type: integer
periods:
type: array
items:
type: object
properties:
period:
description: "Study period when data was collected. One of 1, 2, or 3."
format:
is_exact: true
possible_values:
type: string
days:
type: array
items:
type: object
properties:
day:
description: "Nominal study day (unit = day)."
format:
is_exact: true
possible_values:
type: string
times:
type: array
items:
type: object
properties:
time:
description: "Nominal sampling time (unit = hour)."
format:
is_exact: true
possible_values:
type: string
analytes:
type: array
items:
type: object
properties:
analyte:
description: "Measured analyte. One of Oxycodone, Oxymorphone, Paroxetine, Escitalopram, Desmethylescitalopram, and Didesmethylescitalopram."
format:
is_exact: true
possible_values:
type: string
drug:
description: 'Administered co-drug with oxycodone. One of "Placebo", "Escitalopram" and "Paroxetine".'
format:
is_exact: true
possible_values:
type: string
concentration:
description: "Reported concentration with values below lower limit of quantification set to zero. (unit = ng/mL)"
format:
is_exact: true
possible_values:
type: number
mixtures:
type: array
items:
type: object
properties:
mixture:
description: "Type of hypercapnic gas mixture in rebreathing bag. One of hyperoxic (24% O2, 6% CO2, N2 balanced) or hypoxic (6% O2, 6% CO2, N2 balanced)."
format:
is_exact: true
possible_values:
type: string
drug:
description: 'Administered co-drug with oxycodone. One of "Placebo", "Escitalopram" and "Paroxetine".'
format:
is_exact: true
possible_values:
type: string
mvresting:
description: "Resting minute ventilation (unit=L/min)"
format:
is_exact: true
possible_values:
type: number
etco2:
description: "Resting end-tidal carbon dioxide partial pressure (unit=mm Hg)"
format:
is_exact: true
possible_values:
type: number
spo2:
description: "Resting oxygen saturation (unit=%)"
format:
is_exact: true
possible_values:
type: number
ve55:
description: "Minute ventilation assessment at 55 mm Hg carbon dioxide. (unit=L/min)"
format:
is_exact: true
possible_values:
type: number
vas_score:
description: "Visual analogue score for sedation (range of 0 to 100) (unit=mm)"
format:
is_exact: true
possible_values:
type: number
type: object
Loading