FHIR-based Patients' DEMOgraphics
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:
starts PDemo connecting to the SMART on FHIR demo anonymous server, and:
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.
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:
PDemo.html will be hosted on a server different from the FHIR one, hence the FHIR server must support CORS.
Using SMART authentication
To use SMART authentication specify the URL of the FHIR server using
iss instead than
fhirServiceUrl. For example:
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:
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
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
PDemo displays an additional login form in the top right corner:
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:
Various search and display options are configurable. This configuration is accessible using the 'Configure' button at the botton of the search form:
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:
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.
Tested (mostly) with IE 11 and Chrome. It should work on any modern browser.