@automate-medical/fhir-schema-types

中文文档
0.0.4发布于 2021/05/21ES Module近 30 天下载 2071

TypeScript definitions for FHIR

原始使用文档
文档目录4 节
  1. Installation and use
  2. Features & Roadmap
  3. Contributing
  4. License and notice

fhir-schema-types

An npm-published set of TypeScript definitions for Fast Healthcare Interoperability Resources (FHIR).

Installation and use

Install this into an existing TypeScript project with:

npm install @automate-medical/fhir-schema-types

The definitions are exported in the root level of the module, by version. You can import the latest stable version by default. You can also import named versions.

import FHIR from '@automate-medical/fhir-schema-types'

import { R4 as FHIR } from '@automate-medical/fhir-schema-types'

You can also import specific versions.

import { v4_6_0 as FHIR } from '@automate-medical/fhir-schema-types'

This library exposes type and interface definitions in TypeScript for all of the elements and resources in FHIR. You can use it in your TypeScript projects to bring type-safety guarantees to your programs that manipulate FHIR documents. We wrote a custom JSON schema parser to achieve this, and to ensure maximum flexibility so that the project can be maintained into the future.

Features & Roadmap

Note This project is semantically versioned. We make no commitments about the stability of our interfaces until 1.0.0.

  • Simple translation of JSON Schema definitions to type and interface definitions
  • Support for const values
  • Support for using named enum types instead of union types that enumerate field options
  • Support for class definitions instead of interfaces
  • Public test suite/CICD
  • Support for version 4.0.1 (R4) and latest published 4.6.0
  • Programatically download JSON Schema definitions for every version of FHIR and export schema
  • Support definitions for the Graphql definitions provided in 4.6.0+
  • Define a contributor license agreement
  • Publish NPM module
  • NPM build should include a bundle + sourcemaps instead of the raw build

Contributing

Building the project can be done with:

npm run build

At present, you must create a directory in the root of the project called hl7, inside of which you must create specific fhir.schema.json files for each of the versions you need to build. In the future, the project will download the assets itself.

License and notice

Copyright Automate Medical Inc.

FHIR® is the registered trademark of HL7 and is used with the permission of HL7.

The use of the term FHIR is in no way endorsed, or sponsored by, or part of the trademark steward. Automate Medical Inc. truthfully asserts that this project complies with version 4.0.1 and 4.6.0 of the FHIR standard as a matter of fair use.

版本与发布记录

@automate-medical/fhir-schema-types 共发布 3 个版本,首次发布于 2021/05/21;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.0.4latest2021/05/215 年前
0.0.32021/05/215 年前
0.0.22021/05/215 年前

关于 @automate-medical/fhir-schema-types 的常见问题

@automate-medical/fhir-schema-types 是什么?

TypeScript definitions for FHIR

如何安装 @automate-medical/fhir-schema-types?

在项目目录运行 npm install @automate-medical/fhir-schema-types,或使用 pnpm add / yarn add / bun add。

@automate-medical/fhir-schema-types 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/automate-medical__fhir-schema-types 是否存在。

@automate-medical/fhir-schema-types 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@automate-medical/fhir-schema-types 可以商用吗?

@automate-medical/fhir-schema-types 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@automate-medical/fhir-schema-types 的下载量有多少?

根据 npm 官方下载统计,@automate-medical/fhir-schema-types 在 2026/10/07 – 2026/11/05 这 30 天内被下载 2,071 次,日均约 69 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@automate-medical/fhir-schema-types 还在维护吗?

最新版本 0.0.4 发布于 2021/05/21(5 年前);至今共发布 3 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/05/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。