Skip to content

dermatologist/fhirform-vue

Repository files navigation

fhirform-vue

Render a FHIR Questionnaire as webform

About

This is an npm module to convert a FHIR Questionnaire to JSON for automatic form rendering with vue-form-generator. The corresponding FHIR Questionnaire is used as the model for capturing user input.

This is part of the FHIRForm framework.

FHIRForm

Installation

npm i --save fhirform-vue

Use github for latest dev branch:

npm install --save github:dermatologist/fhirform-vue#develop

Usage

import { FhirFormVue } from 'fhirform-vue';
import fetch from 'isomorphic-fetch'


  it('should output model and schema', async () => {
    await fetch('https://www.hl7.org/fhir/questionnaire-example-f201-lifelines.json')
      .then((response) => response.json())
      .then(async (myJson) => {
        const ff = FhirFormVue(myJson);
        console.log(ff);
        expect(ff).toBeDefined();
      });


Use it with vue-form-generator

Vue.use(VueFormGenerator)

export default {
  data () {
    return {
        model: ff.model,
        schema: ff.schema
    }
  }
}

API

Table of Contents

Credits

Bell Eapen

TSDX Bootstrap

This project was bootstrapped with TSDX.

About

Convert FHIR Questionnaire to JSON for form rendering using Vue

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •