# @artezio/fhir-converter

> It's a mapper designed to convert json models from fhire format to [@artezio/models](https://github.com/Artezio/SURVEYBUILDER/tree/master/packages/models/README.md "@artezio/models") and back.

Latest version **1.0.8** (published 2019-12-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @artezio/fhir-converter
pnpm add @artezio/fhir-converter
yarn add @artezio/fhir-converter
bun add @artezio/fhir-converter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2019-12-24 |
| First published | 2019-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 38.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Maintainers | daniil_yakovenko, kluiko |

## Links

- npm: https://www.npmjs.com/package/@artezio/fhir-converter
- Repository: https://github.com/Artezio/SURVEYBUILDER/tree/master/packages/fhir-converter
- npm.io page: https://npm.io/package/@artezio/fhir-converter

## Recent versions

- 1.0.8 (latest) — 2019-12-24
- 1.0.7 — 2019-12-23
- 1.0.4 — 2019-12-23
- 1.0.3 — 2019-12-20
- 1.0.2 — 2019-12-20
- 1.0.1 — 2019-12-18

## README

# **artezio/fhir-converter**

It's a mapper designed to convert json models from fhire format to [@artezio/models](https://github.com/Artezio/SURVEYBUILDER/tree/master/packages/models/README.md "@artezio/models") and back.


# Installation
with npm
>$ npm install @artezio/models

with yarn
>$ yarn add @artezio/models

&nbsp;
# Usage

```typescript
import { questionnaireConverter } from '@artezio/fhir-converter';
import { service } from 'some FHIR service';

const myFHIRModel = service.getQuestionnaire();// fetching fhir model in json

const myQuestionnaireModel = questionnaireConverter.toModel(myFHIRModel);//json object
```
You can put myQuestionnaireModel to Questionnaire constructor from [@artezio/models](https://github.com/Artezio/SURVEYBUILDER/tree/master/packages/models/README.md "@artezio/models") to make a model;

Then you can do manipulations with model in your code and convert it back:
```typescript
const myNewFHIRModel = questionnaireConverter.fromModel(myQuestionnaireModel);
service.putQuestionnaire(myNewFHIRModel);
```
The same behavior with questionnaireResponseConverter.

---
_Source: https://npm.io/package/@artezio/fhir-converter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
