Links

Aidbox Code Editor

This article outlines the basic steps to start designing form in Aidbox Code Editor in browser

Overview

This tool is based on domain-specific language (DSL) which gives flexibility and composability, with which you can describe layer-by-layer any forms with complex logic, integrate them in your current solution to capture data and store it in FHIR storage.
We have presented the form as a layered structure. To design the form, you need to describe the necessary layers using DSL.
Each layer is responsible for solving a specific problem:
  • How structured data will be stored - Data Model layer (Document DSL)
  • How a form will be rendered - Layout layer (Layout DSL)
  • How to prefill a form with existing data and set the conext - Prefill layer (Launch DSL)
  • How data will be itemized & extracted to FHIR resources - FHIR mapping layer (Finalize DSL)
  • How data will be validated and how to put constraints on the fields - Validation layer (FinalizeConstrains DSL)
  • How to bind all layers for specific form - Form layer (Form DSL)
One layer is required - Data Model layer, the rest are optional depending on needs of your practice.

Getting started

You have two options available:

Create form in Code Editor from scratch

  • Before creating new form you need to give a form title and namespace
  • After that new form template will be generated and you will be redirected to the Aidbox editor page
  • You need to describe some schemas to complete the form
Go to this page to start designing a form.
Created form will be saved to local file sysem in your repository
Don't forget to import the created form into the forms.edn file so that the form is loaded after restarting the program.
Example
{ns forms
import #{forms.vitals
forms.phq2phq9
forms.gad-7
forms.allergies
forms.ros
forms.physical-exam
forms.annual-wellness-visit}
}

Import Questionnaire (from FHIR Questionnaire)

  • You can import the FHIR Questionnaire file from your local computer or import from json
  • After that new form will be generated and you will be redirected to the Aidbox editor page
  • You can customize the form and all changes will be saved to the local file system in you repository
While converting FHIR Questionnaire to the Aidbox form basic extractions will be generated by default
Don't forget to import the created form into the forms.edn file so that the form is loaded after restarting the program.
Last modified 2mo ago