Skip to content

Commit

Permalink
BB 2.0 enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
gajen0981 committed May 11, 2015
1 parent ef64764 commit 8fe2190
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<bean class="ca.uhn.fhir.to.TesterConfig">
<property name="servers">
<list>
<value>local , DSTU1 , Local Gaj's Server (DSTU1 FHIR) , http://localhost:8080/hapi-fhir-jpaserver/baseDstu1</value>
<value>local , DSTU1 , Local Gaj's Server (DSTU1 FHIR) , http://localhost:8080/fhir/baseDstu1</value>
<value>local , DSTU2 , Local Gaj's Server (DSTU2 FHIR) , http://localhost:8080/fhir/baseDstu2</value>
<value>home , DSTU1 , UHN/HAPI Server (DSTU1 FHIR) , http://fhirtest.uhn.ca/baseDstu1</value>
<value>home_dev , DSTU2 , UHN/HAPI Server (DSTU2 FHIR) , http://fhirtest.uhn.ca/baseDstu2</value>
<value>home , DSTU1 , UHN/HAPI Server (DSTU1 FHIR) , http://fhirtest.uhn.ca/baseDstu1</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@
<li><a href="#" th:name="${requestUrl} + '/$everything?_format=xml'" id="getXml">FHIR XML</a></li>
</ul>
</div>

<div class="well" id="resultWell">
FHIR API - Patient Consent/Proxy Access to 3rd Parties
<a href="https://healthauth.org/login" target="_blank">UMA Profile Using OIDC/OAuth 2.0</a>
</div>

<div class="well" id="resultWell">
JSON:<br />
<a th:href="${requestUrl} + '/$everything?_format=json'" th:utext="${requestUrlText} + '/$everything?_format=json'"/>
<br /><br />
XML:<br />
<a th:href="${requestUrl} + '/$everything?_format=xml'" th:utext="${requestUrlText} + '/$everything?_format=xml'"/>
</div>
</div>

<p>&nbsp;</p>
Expand Down
8 changes: 6 additions & 2 deletions hapi-fhir-testpage-overlay/src/main/webapp/js/bluebutton2.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// Download the JSON
$("#getJson").bind("click",function(){
var url = $(this).attr('name').replace("baseDstu1", "baseDstu2");
console.info("Downloading Data from FHIR API as JSON: " + url);

// If baseDstu1 then replace it otherwise regular pass through
var url = $(this).attr('name').replace("baseDstu1", "baseDstu2");

d3.json(url,function(data){
console.log(data);
var href = "data:application/octet-stream," + encodeURIComponent(JSON.stringify(data));
Expand All @@ -14,9 +16,11 @@ $("#getJson").bind("click",function(){

// Download the XML
$("#getXml").bind("click",function(){
var url = $(this).attr('name').replace("baseDstu1", "baseDstu2");
console.info("Downloading Data from FHIR API as XML: " + url);

// If baseDstu1 then replace it otherwise regular pass through
var url = $(this).attr('name').replace("baseDstu1", "baseDstu2");

d3.xml(url, function(data){
// Need to serialize it before encode it
var xml = new XMLSerializer().serializeToString(data);
Expand Down
Binary file modified screenshots/BB2Download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/BB2DownloadedFiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8fe2190

Please sign in to comment.