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 ↓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.
Paste a Web Template JSON and a FLAT composition. The validator lists every valid FLAT path in the template and reports:
substance → causative_agent|value on a DV_QUANTITY instead of |magnitude:0 on single-occurrence nodesPaste 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.
Moving between CDRs? Convert a FLAT composition from the EHRBase 2.x dialect to Better's (or back), and see which paths changed.
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.
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.
Yes. pip install oehrpy, then use FlatValidator.from_web_template(...) or OPTValidator(). See the validation guide.
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).