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

Prototype CDE/study interconnections #295

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion bin/populate_env
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ echo "$template" | sed \
-e "s/%ANALYTICS_TOKEN%/$analytics_token/" \
-e "s/%META_TITLE%/$meta_title/" \
-e "s/%META_DESCRIPTION%/$meta_description/" \
> $1
> $1
6 changes: 6 additions & 0 deletions src/components/search/concept-modal/tabs/cdes/cde-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ export const CdeItem = ({ cde, cdeRelatedConcepts, highlight }) => {
</Section>
}
/>
<Section title="Studies using this measure">
<ul>
<li>Discovery of Biomarker Signatures Prognostic for Neuropathic Pain after Acute Spinal Cord Injury (<a href="https://healdata.org/portal/discovery/HDP00337">HEALDATAPLATFORM:HDP00337</a>)
</li>
</ul>
</Section>
<Section title="Related concepts">
<RelatedConceptsList
concepts={relatedConceptsSource}
Expand Down
39 changes: 29 additions & 10 deletions src/components/search/concept-modal/tabs/studies/study-variable.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Typography } from 'antd'
import {Button, Typography} from 'antd'
import Highlighter from 'react-highlight-words'
import { useAnalytics } from '../../../../../contexts'
import {ExportOutlined} from "@ant-design/icons";

const { Text } = Typography

Expand All @@ -11,14 +12,32 @@ export const StudyVariable = ({ variable, highlight, ...props }) => {
analyticsEvents.variableLinkClicked(variable.id)
}
return (
<div className="study-variables-list-item" {...props}>
<Text className="variable-name">
<Highlighter autoEscape={ true } searchWords={ highlight } textToHighlight={ variable.name } /> &nbsp;
({ variable.e_link ? <a href={ variable.e_link } onClick={ variableLinkClicked }>{ variable.id }</a> : variable.id })
</Text><br />
<Text className="variable-description">
<Highlighter autoEscape={ true } searchWords={ highlight } textToHighlight={ variable.description } />
</Text>
</div>
<>
<div className="study-variables-list-item" {...props}>
<Text className="variable-name">
<Highlighter autoEscape={true} searchWords={highlight} textToHighlight={variable.name}/> &nbsp;
({variable.e_link ?
<a href={variable.e_link} onClick={variableLinkClicked}>{variable.id}</a> : variable.id})
</Text><br/>
<Text className="variable-description">
<Highlighter autoEscape={true} searchWords={highlight} textToHighlight={variable.description}/>
</Text>
<ul>
<li {...props}>
Related to CDEs in <em>Tobacco, Alcohol, Prescription medications, and other Substance (TAPS)</em><Button
type="text"
size="small"
icon={
<ExportOutlined onClick={(e) => {
e.preventDefault()
e.stopPropagation()
window.open("https://heal.nih.gov/files/CDEs/2023-05/taps-cdes.xlsx", "_blank")
}}/>
}
style={{marginLeft: "4px"}}
/></li>
</ul>
</div>
</>
)
}
Loading