A VB.NET Windows Forms application demonstrating the Tiro Health Form SDK integration.
This application shows how to integrate FHIR questionnaires using the Tiro Health Form SDK. It displays a form viewer that allows users to fill out medical questionnaires and handles form submission with proper validation.
- FHIR Integration: Uses FHIR Patient data to provide context for questionnaires
- Form Submission Handling: Processes submitted QuestionnaireResponse with validation
- Validation Support: Shows validation errors and allows users to choose whether to close anyway
- Narrative Display: Shows the narrative text from submitted responses
Main form containing:
- TiroFormViewer: The form viewer user control
- Patient Context: Sample patient data (Leonardo da Vinci)
- Form Submission Flow: Handles the complete submission lifecycle
The form design is minimal - it's simply a basic Windows Form with the TiroFormViewer user control added and docked to fill the entire form. The user control handles all the form rendering and interaction, making integration straightforward.
- Form Closing: When user closes the form,
SendFormRequestSubmitAsync()is called - Submission Processing: The
HandleFormSubmittedevent handler processes the response - Validation: Checks
e.Outcome.Successfor validation errors - User Choice: If validation fails, user can choose to close anyway
- Form Closure: Form closes after successful processing
- Build and run the application
- Fill out the displayed questionnaire
- Close the form to trigger submission
- Review any validation messages
- View the narrative response in the message box
- Tiro.Health.WinForms.FormViewer
- Hl7.Fhir.Model
- SMARTWebEHR.Events
The application uses a predefined questionnaire template:
http://templates.tiro.health/templates/2630b8675c214707b1f86d1fbd4deb87