4.3.178 • Published 10 months ago

@iehr/fhirtypes v4.3.178

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 months ago

iEHR FHIR Type Definitions

This library contains TypeScript type definitions for all R4 types.

Installation

Add as a dependency:

npm install --save-dev @iehr/fhirtypes

Basic Usage

Consider the following untyped code:

const myPatient = {
  resourceType: 'Patient',
  name: 'George Washington',
};

Keen observers will note that Patient.name should not be a string. Instead, it should be an array of HumanName objects.

Let's add the type definition and see what happens:

import { Patient } from '@iehr/fhirtypes';

const myPatient: Patient = {
  resourceType: 'Patient',
  name: 'George Washington',
};

Now "name" is a compile error. Developer tools with TypeScript support should provide feedback. For example, VS Code adds red squigglies and a helpful error message.And now you will receive typeahead support. So we can build a well-formed example:

import { Patient } from '@iehr/fhirtypes';

const myPatient: Patient = {
  resourceType: 'Patient',
  name: [
    {
      given: ['George'],
      family: 'Washington',
    },
  ],
};

About iEHR

iEHR is a healthcare platform that helps you quickly develop high-quality compliant applications. iEHR includes a FHIR server, React component library, and developer app.

License

Apache 2.0.

4.3.176

10 months ago

4.3.177

10 months ago

4.3.178

10 months ago

4.3.175

10 months ago

4.3.174

10 months ago

4.3.151

11 months ago

4.3.170

10 months ago

4.3.150

11 months ago

4.3.160

11 months ago

4.3.141

11 months ago

4.3.110

11 months ago

4.3.91

11 months ago

4.3.90

11 months ago

4.3.140

11 months ago

4.3.120

11 months ago

4.3.82

12 months ago

4.3.81

12 months ago

4.3.80

12 months ago

4.3.84

11 months ago

4.3.83

11 months ago

3.2.2

1 year ago

3.2.1

1 year ago

3.1.11

1 year ago

3.2.0

1 year ago

4.3.60

1 year ago

4.3.70

12 months ago

3.1.10

1 year ago

4.3.63

12 months ago

4.3.52

1 year ago

4.3.62

12 months ago

4.3.51

1 year ago

4.3.40

1 year ago

4.3.61

1 year ago

4.3.50

1 year ago

3.1.3

1 year ago

3.1.1

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.4

1 year ago