openEHR FLAT & OPT Validator

Check FLAT compositions against a Web Template, lint OPT 1.4 XML, or migrate FLAT between EHRBase and Better. Runs 100% in your browser.

How it works ↓
Mode
Validate FLAT compositions against Web Templates
Platform
no :0 indexing · tree.id prefix · direct paths
Waiting for input
Web Template
FLAT Composition
Validation Results
◎
Paste a Web Template and a FLAT composition above, then click Validate
or load an example to see the validator in action
Valid Paths

Validate openEHR compositions before they reach your CDR

A FLAT composition that doesn't match its template fails at the CDR with an error that rarely says which path is wrong. This validator checks the composition up front, against the same Web Template the CDR uses, and tells you exactly what to fix. It runs the oehrpy validators in your browser through Pyodide, so your templates and patient data never leave your machine.

Three modes

FLAT Composition

Paste a Web Template JSON and a FLAT composition. The validator lists every valid FLAT path in the template and reports:

OPT Template

Paste an Operational Template (OPT 1.4 XML) to check well-formedness (XML, archetype IDs, RM type names, node IDs), semantic integrity (term definitions and bindings) and structural quality before you upload it or generate code from it.

Platform Migration

Moving between CDRs? Convert a FLAT composition from the EHRBase 2.x dialect to Better's (or back), and see which paths changed.

FAQ

Where do I get the Web Template?

From your CDR. In EHRBase, call GET /rest/openehr/v1/definition/template/adl1.4/{template_id} with Accept: application/openehr.wt+json. The Web Template, not the OPT, is the authoritative source for FLAT paths.

What is the difference between EHRBase and Better FLAT?

Both flatten a composition into path|attribute keys, but they differ in details: EHRBase 2.x omits the :0 index on single-occurrence nodes and has no /any_event/ segment, while Better keeps more indices. Pick the platform your CDR runs so the validator applies the right dialect.

Can I run the same checks in Python?

Yes. pip install oehrpy, then use FlatValidator.from_web_template(...) or OPTValidator(). See the validation guide.

Is my data uploaded anywhere?

No. Everything runs client-side. The only network requests fetch Pyodide and the oehrpy wheel from PyPI on the first load (about 10 MB, cached afterwards).

Loading Python runtime...
~10 MB first load, cached afterwards