This repository contains an early release reference implementation that may be useful to developers wishing to integrate Google Meet into EHR systems that support SMART on FHIR.
To use this reference implementation, you should fork this repository and add any required user interface or other integrations that are appropriate.
This reference implementation assumes that:
- The provider/physician has access to a GSuite account with the Calendar and Meets applications enabled.
- If the patient is accessing the application on the desktop, they can join the meeting anonymously. If the patient accesses the application from a mobile device, they must download the Meet application and sign in.
The application requires several things to be configured:
- An OAuth2 Client ID and secret to access the Google Cloud Datastore
- A SMART on FHIR Client ID registered with the EHR system
- A secret key used to encrypt the session cookie
- The calendar API must be enabled in the project
The OAuth2 Client ID can be created using the Cloud Console.
- Select 'Web application' as the type.
- The redirect URI should point to '/authenticate' on the appropriate server (e.g., localhost or your appspot.com subdomain).
- In the "Scopes for Google APIs" section of the OAuth2 consent screen, make
sure you add
https://www.googleapis.com/auth/calendar.events
as a scope.
To provide these settings, create a file called settings.json
using the
instructions in settings.json-example
.
The example settings file creates calendar events on the primary calendar. Instead, a custom name can be specified and the named calendar will be created (if it doesn't exist) and events will be added there.
Note that if you choose to use this feature you must invalidate all previous user sessions since the required OAuth2 scopes are broader.
The launch URL should be set to /launch.html
on the appropriate server (e.g.
localhost or your appspot.com subdomain).
Note that this application does not work inside a frame, so it must be configured to launch as a new window in the SMART on FHIR integration point.
You will need a recent version of Node. Once installed, you can run npm install
to install the other required dependencies.
Once everything is installed, configure Google Application Default credentials
with access to a Cloud Datastore in a project you own and run npm start
.
To deploy on Google Cloud, you will need a project that does not already have an Appengine application deployed.
Deploy the application using gcloud app deploy
.
You can use the SMART on FHIR launcher to make sure your instance is working as expected. Open two different profiles in a web browser and configure one as a patient and one as a physician and click the launch button.