Building a Complex Questionnaire
# support
k
Hey guys! I am building out a Scoring assessment that gathers a patient's medical background, diagnoses, therapies, equipment, and information about their day-to-day experience to see if they qualify for a program. This questionnaire will pull in ICD-10 diagnosis codes and values, data from the Patient, and external data to reference therapies and equipment. This form is dynamic, so the form will change based on values that the user inputs. The Medplum Form Builder does not allow me to build out these more complex interactions. I used the NLM Form Builder (https://lhcformbuilder.nlm.nih.gov/) to try and build the Questionnaire resource but it seems there are FHIR rules that are being broken there. Has anyone found a good form builder or at least a good example of how to format a complex form that is structurally sound and easy to understand and maintain? Additionally, for a question that needs to display a lot of additional context per answer option, is it best to use ElementStructure or ValueSet to contain that additional information? Any input here would be most helpful!
r
@kwillard95 , thanks for turning us on to the NLM form builder, seems like a fantastic tool!
Can you elaborate on the FHIR rules being broken?
k
Constraint que-11 failed with expression: answerOption.empty() or initial.empty() (Questionnaire.item.item); Constraint que-11 failed with expression: answerOption.empty() or initial.empty() (Questionnaire.item.item); Constraint que-11 failed with expression: answerOption.empty() or initial.empty() (Questionnaire.item.item) This is the message I receive when I try to edit the Questionnaire resource
r
Ah yes, this is a constraint on questionnaires. If you're specifying options, you're supposed to use the
initalSelected
field instead: https://www.hl7.org/fhir/questionnaire.html#invs
As far as adding additional context, an extension is probably the best course here.
Questionnaire
turns out to be one of the most extended resources. Some resources I can point you to: - The Structureed Data Capture (http://build.fhir.org/ig/HL7/sdc/artifacts.html#7) guide has a lot of "standard extensions" for Questionnaire. - Of note might be the answer context expression: http://build.fhir.org/ig/HL7/sdc/StructureDefinition-sdc-questionnaire-contextExpression.html - Also answerItem Media (http://build.fhir.org/ig/HL7/sdc/StructureDefinition-sdc-questionnaire-itemAnswerMedia.html)
There are also some more "standard Extensions" here: http://hl7.org/fhir/R4B/questionnaire-core.html
This is a wiki page wiht some more form builder resources: https://confluence.hl7.org/display/FHIRI/SDC+Implementations
@ilyabeda - I believe you have some tooling around form builders, right?
i
Hi @rahul1 @kwillard95 Yes, I have open source SDC implementation that includes UI for building forms. The UI for form builder is pretty high-level you can check it here https://emr.beda.software/questionnaires/builder For building more complex forms I have some kind of IDE https://github.com/beda-software/sdc-ide To try it please open any questionnaire from this list https://emr.beda.software/questionnaires in the IDE. Please feel free to message me if you have any questions.
161 Views