Skip to content

Commit

Permalink
Removed fhirViewer.enabled checks
Browse files Browse the repository at this point in the history
  • Loading branch information
KathrynElrod committed Jul 28, 2021
1 parent af8cc9f commit 831268c
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 28 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ selenium-debug.log
/build/config/*-custom.json5
src/.DS_Store
.idea/*.*
build/config/default.json5
2 changes: 1 addition & 1 deletion build/config/default.json5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
server: {
type: "STU-3",
url: "https://r3.smarthealthit.org",
url: "http://localhost:8080/fhir-server/api/v4",
tags: [
{
key : "pro-7-2017",
Expand Down
6 changes: 3 additions & 3 deletions build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<meta charset="UTF-8"/>
<title>SMART Patient Browser</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="shortcut icon" href="img/icon.png" type="image/png?_=09a9ebc8d86e2de4483d" />
<link rel="shortcut icon" href="img/icon.png" type="image/png?_=3b0b6c9f10177f06c832" />
<link rel="stylesheet" href="vendor/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="vendor/bootstrap-3.3.7-dist/css/bootstrap.min.css">
</head>
<body>
<div id="overlay"></div>
<div id="main"></div>
<script src="vendor/babel-polyfill.min.js"></script>
<script src="js/commons.js?_=09a9ebc8d86e2de4483d"></script>
<script src="js/index.js?_=09a9ebc8d86e2de4483d"></script>
<script src="js/commons.js?_=3b0b6c9f10177f06c832"></script>
<script src="js/index.js?_=3b0b6c9f10177f06c832"></script>
<script src="vendor/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<script src="vendor/jdenticon-1.4.0.min.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion build/js/commons.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/js/index.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion build/js/index.js.09a9ebc8d86e2de4483d.map

This file was deleted.

1 change: 1 addition & 0 deletions build/js/index.js.3b0b6c9f10177f06c832.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/js/report.html

Large diffs are not rendered by default.

20 changes: 8 additions & 12 deletions src/components/Fhir/Grid/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,13 @@ export class Grid extends React.Component
)
})
}
{this.props.settings.fhirViewer.enabled ?
<td>
<div style={{ color: '#337ab7', textAlign: 'center' }}>
<button onClick={ () => window.open(url, "_blank") }>
<i className="fa fa-eye fas fa-bold"/>
</button>
</div>
</td>
: null}
<td>
<div style={{ color: '#337ab7', textAlign: 'center' }}>
<button onClick={ () => window.open(url, "_blank") }>
<i className="fa fa-eye fas fa-bold"/>
</button>
</div>
</td>
</tr>
)
}
Expand Down Expand Up @@ -177,9 +175,7 @@ export class Grid extends React.Component
)
})
}
{ this.props.settings.fhirViewer.enabled ?
<th><div className="text-center">View</div></th>
: null}
<th><div className="text-center">View</div></th>
</tr>
</thead>
<tbody>
Expand Down
10 changes: 5 additions & 5 deletions src/components/Fhir/InsightsDetailButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export default class InsightsDetailButton extends React.Component {
let isDocument = deets.insightSource==InsightSource.DOCUMENT
let prettyDate = new Date(deets.lastUpdated).toUTCString()

let url
let sourceUrl
if (isDocument) {
url = `${this.props.settings.server.url}/${deets.basedOn}`;
sourceUrl = `${this.props.settings.server.url}/${deets.basedOn}`;
if (this.props.settings.fhirViewer.enabled) {
url = this.props.settings.fhirViewer.url +
sourceUrl = this.props.settings.fhirViewer.url +
(this.props.settings.fhirViewer.url.indexOf("?") > -1 ? "&" : "?") +
this.props.settings.fhirViewer.param + "=" +
encodeURIComponent(url);
encodeURIComponent(sourceUrl);
}
}

Expand Down Expand Up @@ -67,7 +67,7 @@ export default class InsightsDetailButton extends React.Component {
</tr>
<tr>
<td style={{fontWeight: "bold"}}>Insight Source</td>
<td>{isDocument ? <a href={url}>{deets.basedOn.replace("/", " ")}</a> : deets.insightSource}</td>
<td>{isDocument ? <a href={sourceUrl}>{deets.basedOn.replace("/", " ")}</a> : deets.insightSource}</td>
</tr>
</tbody>
{ isDocument ?
Expand Down

0 comments on commit 831268c

Please sign in to comment.