Skip to content

findanomaly/vim-canvas-demo-app

 
 

Repository files navigation

Vim Canvas Demo App (React)

Cloudflare TypeScript Vite React Radix UI TailwindCSS PNPM

Quick Links

What is Vim Canvas?

Vim is the middleware platform for healthcare. Vim Canvas is a self-service platform that empowers application developers to embed their application into Electronic Health Record (EHR) workflows, resulting in a streamlined and low-friction experience for end users. With Vim, you can deploy your applications on top of Vim Connect - Vim's in-EHR connectivity layer - accelerating time to market at reduced cost and improved flexibility.

Repo Overview 😎

This repo contains example projects for building applications on top of Vim Canvas. The applications in different frameworks demonstrates how to use the VimOS.js Canvas SDK to interact with the Vim Canvas platform. The app showcases the following features:

  • Authentication with Vim Canvas
  • Embedding an application into the Vim Canvas platform
  • Viewing EHR entities, including
    • Patients
    • Encounters
    • Referrals
    • Orders
  • Updating EHR entities, including
    • Encounters
    • Referrals

Vim Canvas Demo App (React)

Under the vim-canvas-demo-app-react we have a project that uses cloudflare pages to host the Vim Canvas Demo App built with React & also the serverless service needed for the authentication flow.

The app is built with vite and react and uses shadcn, radix-ui,tailwindcss for the UI components.

Folder Structure

Running the example code

Prerequisites

In order to see the demo code in action, you must first configure an application in the Vim Canvas Developer Platform.

If you don’t have a Vim Canvas developer account yet, register here to gain access.

Installation

To install and run the app locally, follow these steps:

  1. Clone the repository:
git clone https://github.com/getvim/vim-canvas-demo-app.git
  1. Navigate to the project directory:
cd vim-canvas-demo-app-react
  1. Install the dependencies:
npm install
  1. Create a .dev.vars file with the following content:
CLIENT_ID=<<YOU ACCOUNT CLIENT ID>>
CLIENT_SECRET=<<YOUR ACCOUNT CLIENT SECRET>>
  1. Change the appUrl in functions/api/launch.ts to "http://localhost:8788" (the local app url).

  2. Start the development server:

npm run dev
  1. Follow up on Testing Your Application in the official docs

Authentication Flow

The functions folder is a cloudflare pages function that handles the authentication flow for the app.

When running locally the api server starts at http://localhost:8788 & exposes the following endpoints:

  • /api/launch - This endpoint is used to initiate the authentication flow.
  • /api/token - This endpoint is used to handle the callback from the Vim Canvas platform to create a token.

Vim Canvas Pricing

Starter Access Patient-Based User-Based
Design and test your application before choosing a plan. Active Member Pricing (AMP) Billed Based on Per Member Per Month (PMPM) Per User Per Month (PUPM)
Who is this right for? Who is this right for? Who is this right for?
- Access to developer platform
- Ability to build application using Vim workflows
- Design and testing only. Activation and distribution of application requires a package
- Patient-based pricing model in use or applicable to workflow
- Application is enabled based on patient in context in the EHR
- Allows for unlimited clinic-level users
- User-based pricing model in use or applicable to application
- Application is always available and is not specific to patients
- Based on number of users/year for which the application is enabled
Example:
A mental health referral solution
Example:
An efficiency solution such as a medical documentation tool

Contributing

  • How can I submit an improvement?
    • Improvements are always welcomed! 🥳 Open a PR with a proper description and we'll review it as soon as possible
  • Spot a bug 🕷 ?
    • We welcome code changes that improve the apps or fix a problem. Please make sure to follow all best practices and open an "Issue" and we'll review it as soon as possible.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.1%
  • JavaScript 2.5%
  • CSS 2.1%
  • HTML 0.3%