Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fhir-ui

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fhir-ui

React components to display HL7 FHIR data using Material-UI

  • 0.6.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
54
decreased by-29.87%
Maintainers
1
Weekly downloads
 
Created
Source

fhir-ui

npm package npm peer dependency version npm peer dependency version npm peer dependency version npm peer dependency version npm peer dependency version npm peer dependency version npm peer dependency version npm peer dependency version npm peer dependency version

fhir-ui React components are used in conjunction with the Material UI component library to display HL7 FHIR Resources using Google's Material Design specification.

Prerequisites

Installation

fhir-ui is available as an npm package.

npm install --save fhir-ui

or

yarn add fhir-ui

Theming

fhir-ui components require a theme to be provided. The quickest way to get up and running is by using the Material-UI ThemeProvider to inject the theme into your application context. Following that, you can to use any of the components as demonstrated in the documentation. Here is a quick example to get you started:

import React from 'react'
import ReactDOM from 'react-dom'
import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles'
import { MuiPickersUtilsProvider } from '@material-ui/pickers'
import lightBlue from '@material-ui/core/colors/lightBlue'

import { PatientCard } from 'fhir-ui'

// Create a theme instance.
const theme = createMuiTheme({
  palette: {
    primary: {
      light: lightBlue[300],
      main: lightBlue[500],
      dark: lightBlue[900],
      contrastText: '#FFF',
    },
    secondary: {
      light: lightBlue[300],
      main: lightBlue[500],
      dark: lightBlue[900],
      contrastText: '#FFF',
    },
    background: {
      default: '#f9f9f9',
    },
  },
})

const App = () => (
  <ThemeProvider theme={theme}>
    <MuiPickersUtilsProvider utils={MomentUtils}>
      <PatientCard patient={patient} />
    </MuiPickersUtilsProvider>
  </ThemeProvider>
)

ReactDOM.render(<App />, document.getElementById('app'))

Patient Table Example

import React from 'react'
import { PatientTable } from 'fhir-ui'

const MyFhirComponent = () => (
  <div>
    <PatientTable
      patients={patientList}
      onRowClick={patientId => console.log('Selected Patient ID: ', patientId)}
    />
    <hr />
    <PatientDetail
      patient={patient}
      patientId={patient.id}
      onDelete={patientId => console.log('Removed Patient ID: ', patientId)}
    />
  </div>
)

export default MyFhirComponent

Please refer to each component's CodeSandbox.io example for an example on how to use them.

CodeSandbox.io Examples

License

This project is licensed under the terms of the MIT license

Keywords

FAQs

Package last updated on 24 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc