Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Documentation
Images
Scripts
CDemo.html
License.txt
PDemo.css
PDemo.html
Readme.html
Readme.md
favicon.ico

Readme.md

PDemo

FHIR-based Patients' DEMOgraphics

Simple HTML+JavaScript single page application that query patients' demographics information from a FHIR server.

It is a consumer implementation of the IHE PDQm profile.

Basic usage - no authentication

To start PDemo navigate with your browser to PDemo.html?fhirServiceUrl=xxxxx, where xxxx is the URL of the FHIR server to use. For example:

https://demo.careevolution.com/PDemo/PDemo.html?fhirServiceUrl=https://fhir-open-api.smartplatforms.org

starts PDemo connecting to the SMART on FHIR demo anonymous server, and:

https://demo.careevolution.com/PDemo/PDemo.html?fhirServiceUrl=http://spark.furore.com/fhir

starts PDemo connecting to the Furore demo server.

When starting in this way the app does not use authentication, and so the FHIR server must accept anonymous (non authenticated) requests.

If PDemo.html is served using HTTPS and the FHIR server uses non-secure HTTP (as in the second example above) the browser will complain about 'mixed content' or 'unauthenticated sources' and it will be necessary to confirm that that is OK for the app to work:

Unauthenticated sources in Chrome

In general PDemo.html will be hosted on a server different from the FHIR one, hence the FHIR server must support CORS.

Using SMART authentication

SMART on FHIR is an extension of the FHIR API that defines an authentication protocol based on OAuth2.

To use SMART authentication specify the URL of the FHIR server using iss instead than fhirServiceUrl. For example:

https://demo.careevolution.com/PDemo/PDemo.html?iss=https://fhir-api.smartplatforms.org

starts PDemo connecting to the SMART on FHIR demo authenticated server.

When using the iss parameter PDemo follows the SMART authorization sequence, redirecting the browser to the login page associated with the FHIR server:

SMART login

Once the user logs in and authorizes the app the browser redirects back to PDemo, that uses the user credentials to access the FHIR server.

PDemo is registered with the authorization server used by the SMART demo server. The registration includes the list of authorized startup URLs, so PDemo can be run only as https://demo.careevolution.com/PDemo/PDemo.html when accessing the SMART demo server. To run PDemo from another server it is necessary to create a new registration - and change its client ID to match the new registration. The client ID is in PDemoConfiguration.js

Using login authentication

PDemo can login directly to a FHIR server that supports OAuth2 password credentials grant.

To use login authentication specify the URL of the FHIR server as in the 'no authentication case' and specify the OAuth2 password credential grant URL using the tokenUrl parameter:

https://demo.careevolution.com/PDemo/PDemo.html?fhirServiceUrl=https://careev13:8080/fhir&tokenUrl=https://careev13:8080/OAuth2/Token

PDemo displays an additional login form in the top right corner:

PDemo login

Entering user name and password and cliking on 'Sign in' sends the password credential grant request to the token URL (https://careev13:8080/OAuth2/Token in the example), if successful then PDemo uses those user credentials to access the FHIR server:

PDemo logged-in

Configuration

Various search and display options are configurable. This configuration is accessible using the 'Configure' button at the botton of the search form:

PDemo configuration

The current configuration is stored in the browser local storage, so it is preserved between session.

To reset the configuration to its default initial value add a resetConfiguration parameter to PDemo URL:

https://demo.careevolution.com/PDemo/PDemo.html?resetConfiguration=

Dependencies

PDemo uses jQuery, AngularJS and Bootstrap - all loaded from CDN locations, so a working Internet connection is needed - even if the app and the FHIR server are local.

Browsers compatibility

Tested (mostly) with IE 11 and Chrome. It should work on any modern browser.

You can’t perform that action at this time.