@iehr/react
TypeScript icon, indicating that this package has built-in type declarations

5.1.12 • Public • Published

iEHR React Component Library

The iEHR React Component Library provides many helpful components to quickly build your healthcare web app.

The iEHR SDK can be used with any compliant FHIR server. However, some advanced features are only available when paired with a iEHR server.

Check out a live demo: https://storybook.iehr.ai/

Installation

Add as a dependency:

npm install @iehr/react

Note the following peer dependencies:

Note the following optional peer dependencies:

Basic Usage

import { IEHRClient } from '@iehr/core';
import { IEHRProvider } from '@iehr/react';

const iehr = new IEHRClient();

export function App() {
  return (
    <IEHRProvider iehr={iehr}>
      <MyPage1 />
      <MyPage2 />
      <Etc />
    </IEHRProvider>
  );
}

For more details on how to setup IEHRClient, refer to the docs for iehr.

Sign In

export function SignInPage() {
  const auth = useIEHRContext();
  return (
    <Document>
      {auth.user ? (
        <div>
          <pre>User: {JSON.stringify(auth.user)}</pre>
          <Button onClick={() => auth.iehr.signOut().then(() => alert('Signed out!'))}>Sign out</Button>
        </div>
      ) : (
        <SignInForm onSuccess={() => alert('Signed in!')} />
      )}
    </Document>
  );
}

Chat

export function ChatPage() {
  return (
    <Document>
      <ChatControl criteria="Communication?encounter=123" {...args} />
    </Document>
  );
}

About iEHR

iEHR is a FHIR®-native, AI-infused, API-first, interoperable EHR. iEHR makes it easy to build healthcare apps quickly with less code.

License

Apache 2.0.

Copyright © Medplum 2025 (HL7® FHIR® US)

Copyright © iEHR.ai 2025 (HL7® FHIR® International, AI & Data platform)

Readme

Keywords

Package Sidebar

Install

npm i @iehr/react

Homepage

www.iehr.ai/

Weekly Downloads

163

Version

5.1.12

License

Apache-2.0

Unpacked Size

14.7 MB

Total Files

15

Last publish

Collaborators

  • hamidrj
  • lmgc-bot
  • iehr-bot