This Package will allow you to seemlessly setup the HLS Flex Plugin to your own Twilio Flex account.
Twilio Flex Plugins allow you to customize the appearance and behavior of Twilio Flex. If you want to learn more about the capabilities and how to use the API, check out our Flex documentation.
Docker CLI and/or Docker Desktop
- Docker desktop will be used to run the application installer locally on your machine. Go to Docker website and download Docker with default options. After installation make sure to start Docker desktop.
ngrok
- Per the open-emr repo, ensure you have OpenEMR installed and are running ngrok on a local terminal. This is done by calling
ngrok http 80
from your terminal. Write down your ngrok http url for later use.
Twilio Account
- Create a Twilio account if you have not done so already
- After creating your account you will have access to an Account Sid and an Auth Token which will be needed to run through the installation.
Create a Flex account
- Ensure you sign up or login to your Twilio account in the step above.
- While in your Twilio console, go to the Overview of the Flex section under the Develop tab on the left-hand panel.
- Click on the "Create my Flex account" button on the page.
- Follow the steps to verify your email and phone and then after a couple minutes you should have a working-bare-bones Flex instance on your account.
Ensure that Telehealth is deployed to your Flex Account Once you get your flex account up and running, you'll need to deploy Telehealth to your newly created Flex account in order to access Telehealth capabilities through flex. Instructions to deploy Telehealth in this repo's README.md.
- After installing Telehealth inside your Flex account created in the intructions above, go to the Functions console.
- Inside the Functions console, click on services and click into the service named
telehealth
(Assuming you deployed Telehealth to the account). - At the bottom-left of the page, just above the "Deploy All" Button, you'll want to save that URL as that is your ``REACT_APP_TELEHEALTH_URL` which will be needed for the Docker build step in the next section.
- Build the docker image of this installer by running this command in your terminal. You'll need to get your Account Sid and Auth Token from your Twilio Console:
docker build --build-arg TWILIO_ACCOUNT_SID={ACCOUNT_SID} --build-arg TWILIO_AUTH_TOKEN={AUTH_TOKEN} --build-arg REACT_APP_TELEHEALTH_URL={REACT_APP_TELEHEALTH_URL} --build-arg REACT_APP_NGROK_URL=${REACT_APP_NGROK_URL} --no-cache --tag hls-flex-plugin https://github.com/Pham-dev/hls-emr-flex-plugin.git#main
- Now run the built docker image by executing this command:
docker run --name hls-flex-plugin --rm -p 3000:3000 -p 3001:3001 -e ACCOUNT_SID={ACCOUNT_SID} -e AUTH_TOKEN={AUTH_TOKEN} -it hls-flex-plugin
-
Go ahead and open http://localhost:3000/ on your favorite browser.
-
Your credentials should load on the page and all you have to do is click the "Deploy this application" button and you're all set!
cd
into the/installer
folder:cd installer
- run
npm install
if it's your first time developing - Then run
npm run dev
to spin up- A front-end server on port
3000
- A back-end server on port
3001
- TypeScript compiler on
--watch
mode - TailwindCSS compiler
- A front-end server on port
- You'll need to download the Twilio CLI
- In the root directory of the project, run the command:
twilio flex:plugins:start
The makefile in this repo comes with a few targets or branches for which you can execute some useful things when developing such as deploying and releasing the plugin on your account for testing.
- You can run
make
at the top level to list all targets to run Executing a target will look something like this:
make <TARGET>
The transfer functionality will not work unless you populate the REACT_APP_TELEHEALTH_URL=
field in the .env
file.
You can run npx configure-env
at the top level of the repo and that will create a .env
file and prompt you for the value(s) to populate it with. Once you have the .env
file, you can start your development normally as well as deploy and release which will have the context of your REACT_APP_TELEHEALTH_URL=
field.
Follow this README.md to install all of our HLS Blue Prints: https://github.com/Pham-dev/hls-blueprint-release