{"id":15661220,"url":"https://github.com/dermatologist/fhirformjs","last_synced_at":"2025-08-22T08:31:21.629Z","repository":{"id":37940881,"uuid":"139331420","full_name":"dermatologist/fhirformjs","owner":"dermatologist","description":"NPM module to convert FHIR Questionnaire JSON to JSON Schema for form rendering.","archived":false,"fork":false,"pushed_at":"2024-12-09T23:28:15.000Z","size":2934,"stargazers_count":19,"open_issues_count":9,"forks_count":8,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2024-12-13T10:38:20.603Z","etag":null,"topics":["fhir","fhir-client","fhir-parser","hacktoberfest","npm-package","questionnaire"],"latest_commit_sha":null,"homepage":"https://nuchange.ca","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dermatologist.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-07-01T13:28:40.000Z","updated_at":"2024-11-19T23:19:53.000Z","dependencies_parsed_at":"2023-11-15T03:26:08.694Z","dependency_job_id":"6a4fc49e-b34a-4daa-a473-e2dada3cfb62","html_url":"https://github.com/dermatologist/fhirformjs","commit_stats":{"total_commits":202,"total_committers":6,"mean_commits":"33.666666666666664","dds":0.6089108910891089,"last_synced_commit":"03fd1d32ee85e5f9f18fba545607105153a07a24"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dermatologist%2Ffhirformjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dermatologist%2Ffhirformjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dermatologist%2Ffhirformjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dermatologist%2Ffhirformjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dermatologist","download_url":"https://codeload.github.com/dermatologist/fhirformjs/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230575851,"owners_count":18247484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fhir","fhir-client","fhir-parser","hacktoberfest","npm-package","questionnaire"],"created_at":"2024-10-03T13:26:31.729Z","updated_at":"2024-12-20T11:07:50.423Z","avatar_url":"https://github.com/dermatologist.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# fhirformjs\n\n[![npm version](https://badge.fury.io/js/fhirformjs.svg)](https://www.npmjs.com/package/fhirformjs)\n[![npm](https://img.shields.io/npm/dt/fhirformjs)](https://www.npmjs.com/package/fhirformjs)\n[![Build](https://github.com/dermatologist/fhirformjs/workflows/CI/badge.svg)](https://nuchange.ca)\n[![Known Vulnerabilities](https://snyk.io/test/github/dermatologist/fhirformjs/badge.svg)](https://www.npmjs.com/package/fhirformjs)\n[![Documentation](https://badgen.net/badge/icon/documentation?icon=libraries\u0026label)](https://dermatologist.github.io/fhirformjs/)\n\n## About\nCreating, maintaining and using forms for health data capture is vital, and [FHIRForm](https://github.com/E-Health/fhirform) is a framework for that. FHIRFormJS is one of its components (an npm module) that helps create input forms corresponding to a [FHIR questionnaire](https://www.hl7.org/fhir/questionnaire.html). FHIRFormJS does not render forms but converts FHIR questionnaire into a schema and lets other libraries (such as [react-jsonschema-form](https://github.com/rjsf-team/react-jsonschema-form) ) do the heavy lifting. An output mapper that maps the output from a react-jsonschema-form to a [QuestionnaireResponse](https://www.hl7.org/fhir/questionnaireresponse.html) is also available. [Checkout this example React app](https://github.com/dermatologist/fhir-questionnaire-render-react) to see how it is used. This is a modern alternative to [LHC-Forms](https://lhncbc.github.io/lforms/)\n\nFHIRFormJS is WIP (not production ready). Pull requests are welcome (See CONTRIBUTING.md) and add issues and feature requests by clicking on the 'issues' tab. :point_up:\n\n## Installation\n```\nnpm i --save fhirformjs\n```\n\n## Usage example (In a React component)\n* FHIRFormJS is framework independent and can be used with other frameworks such as Vue / Angular.\n* *Testq1 is a FHIR Questionnaire object*\n```\nimport { FhirJsonForm, FhirJsonResp } from 'fhirformjs'\nimport Form from \"@rjsf/core\"\n  const resp = FhirJsonForm(Testq1)\n  let formData = {}\n  let respData = {}\n  function handleSubmit(data){\n    respData = FhirJsonResp(resp.model, data, resp.schema)\n    console.log(JSON.stringify(respData))\n  }\n  return (\n    \u003cdiv className=\"App\"\u003e\n      \u003cheader className=\"App-header\"\u003e\n        \u003cForm schema={resp.schema}\n        uiSchema={resp.uiSchema}\n        formData={formData}\n        onSubmit={e =\u003e handleSubmit(e.formData)}\n        /\u003e\n      \u003c/header\u003e\n    \u003c/div\u003e\n  );\n```\n### Update\n**since v0.8.0: Backend API**\n```\nimport { FhirBackend } from 'fhirformjs'\nconst backend = new FhirBackend('https://lforms-fhir.nlm.nih.gov/baseR4');\nconsole.log(backend.getTableOfContents())\nconsole.log(backend.getQuestionnaire('2050148'))\n```\n### [See an example](https://github.com/dermatologist/fhir-questionnaire-render-react) :point_left:\n\n\n## Give us a star ⭐️\nIf you find this project useful, give us a star. It helps others discover the project.\n\n## Author\n\n* [Bell Eapen](https://nuchange.ca) [![Twitter Follow](https://img.shields.io/twitter/follow/beapen?style=social)](https://twitter.com/beapen)\n\n## Contributor(s)\n* [Marco Ferreira](https://rco.cc) [![Twitter Follow](https://img.shields.io/twitter/follow/marfife?style=social)](https://twitter.com/marfife)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdermatologist%2Ffhirformjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdermatologist%2Ffhirformjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdermatologist%2Ffhirformjs/lists"}