fhirform-vue
v0.6.0
Published
FHIR Questionnaire To Web Form Converter for rendering in Vue
Downloads
12
Maintainers
Readme
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.
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
TSDX Bootstrap
This project was bootstrapped with TSDX.