1.0.8 • Published 4 years ago

@artezio/fhir-converter v1.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

artezio/fhir-converter

It's a mapper designed to convert json models from fhire format to @artezio/models and back.

Installation

with npm

$ npm install @artezio/models

with yarn

$ yarn add @artezio/models

 

Usage

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 to make a model;

Then you can do manipulations with model in your code and convert it back:

const myNewFHIRModel = questionnaireConverter.fromModel(myQuestionnaireModel);
service.putQuestionnaire(myNewFHIRModel);

The same behavior with questionnaireResponseConverter.

1.0.8

4 years ago

1.0.7

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago