{% extends "base.html" %} {% block content %}
FHIRFLARE IG Toolkit

Validate FHIR Sample

Validate a FHIR resource or bundle against a selected Implementation Guide. (ALPHA - TEST Fhir pathing is complex and the logic is WIP, please report anomalies you find in Github issues alongside your sample json REMOVE PHI)

Validation Form
{{ form.hidden_tag() }}
Select a package from the list below or enter a new one (e.g., hl7.fhir.us.core).
{{ form.package_name(class="form-control", id=form.package_name.id) }} {% for error in form.package_name.errors %}
{{ error }}
{% endfor %}
{{ form.version(class="form-control", id=form.version.id) }} {% for error in form.version.errors %}
{{ error }}
{% endfor %}
{{ form.include_dependencies(class="form-check-input") }} {{ form.include_dependencies.label(class="form-check-label") }}
{{ form.mode(class="form-select") }}
{{ form.sample_input(class="form-control", rows=10, placeholder="Paste your FHIR JSON here...") }} {% for error in form.sample_input.errors %}
{{ error }}
{% endfor %}
{{ form.submit(class="btn btn-primary") }}
{% if validation_report %}
Validation Report
Summary

Valid: {{ 'Yes' if validation_report.valid else 'No' }}

{% if validation_report.errors %}
Errors
    {% for error in validation_report.errors %}
  • {{ error }}
  • {% endfor %}
{% endif %} {% if validation_report.warnings %}
Warnings
    {% for warning in validation_report.warnings %}
  • {{ warning }}
  • {% endfor %}
{% endif %} {% if validation_report.results %}
Detailed Results
{% for resource_id, result in validation_report.results.items() %}
{{ resource_id }}

Valid: {{ 'Yes' if result.valid else 'No' }}

{% if result.errors %}
    {% for error in result.errors %}
  • {{ error }}
  • {% endfor %}
{% endif %} {% if result.warnings %}
    {% for warning in result.warnings %}
  • {{ warning }}
  • {% endfor %}
{% endif %} {% endfor %} {% endif %}
{% endif %}
{% endblock %}