# Comprehensive documentation of the FLAT format

**URL:** <https://discourse.openehr.org/t/comprehensive-documentation-of-the-flat-format/2434>\
**Category:** Implementation\
**Created:** [15 March 2022 20:38 UTC](https://discourse.openehr.org/t/comprehensive-documentation-of-the-flat-format/2434 "2022-03-15T20:38:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![birger.haarbrandt](https://discourse.openehr.org/user_avatar/discourse.openehr.org/birger.haarbrandt/32/24_2.png) [@birger.haarbrandt](https://discourse.openehr.org/u/birger.haarbrandt)\
**Post date:** [15 March 2022 20:38 UTC](https://discourse.openehr.org/t/comprehensive-documentation-of-the-flat-format/2434/1 "2022-03-15T20:38:43Z")

</div>

Hi all,

we just published a comprehensive documentation of the flat format as part of the EHRbase documentation. Ever wondered how the Feeder Audit is represented in flat? Which CTX fields are automatically mapped?

You will find the answers here:

[https://ehrbase.readthedocs.io/en/latest/09\_flat/index.html](https://ehrbase.readthedocs.io/en/latest/09_flat/index.html)

This is an important step towards the standardization of the WebTemplate and Flat format as part of the openEHR specs. We achieved a high level of conformance with Better within our implementation (available under Apache 2 license as part of our Software Development Kit and of course EHRbase: [GitHub - ehrbase/openEHR\_SDK](https://github.com/ehrbase/openEHR_SDK)).

Looking forward to receive some feedback and we hope this is a valuable contribution to the community

---

<div class="post-metadata">

**Author:** ![thomas.beale](https://discourse.openehr.org/user_avatar/discourse.openehr.org/thomas.beale/32/35_2.png) [@thomas.beale](https://discourse.openehr.org/u/thomas.beale)\
**Post date:** [15 March 2022 21:06 UTC](https://discourse.openehr.org/t/comprehensive-documentation-of-the-flat-format/2434/2 "2022-03-15T21:06:29Z")

</div>

Nice work! I see the basis of a specification right here…

One question I have is whether the community wants to use the ‘compact’ formats [we started documenting in this spec](https://specifications.openehr.org/releases/SM/latest/serial_data_formats.html#_openehr_reference_model_data_value_types) for the DV\_XX types, e.g. DV\_QUANTITY, DV\_CODED\_TEXT etc.

For example, most DV\_QUANTITYs with just magnitude and units would appear as below (right side of the colon):

```auto
".../section/observation/any_event:0/dv_quantity": "65.9,mmol/L"

```

And a DV\_CODED\_TEXT would appear in the familiar short form used in openEHR: `[icd10AM::F60.1|Schizoid personality disorder|]` whereas EhrBase documents this as:

```auto
 ".../conformance_section/observation/any_event:0/dv_coded_text|value": "Schizoid personality disorder",
 ".../conformance_section/observation/any_event:0/dv_coded_text|code": "F60.1",
 ".../conformance_section/observation/any_event:0/dv_coded_text|terminology": "icd10AM"

```

The compact forms are a lot smaller, and arguably much easier to read in data. However… clearly the long form should be valid, and it’s almost always needed when a Data value has some deep structure, e.g. DV\_QUANTITY has reference\_ranges, or DV\_CODED\_TEXT has term mappings.

It would be good to get consensus on this question, because I suspect that once we have it, this excellent work can be used as the definitive flat format for openEHR.

One other thing I noticed in passing: date/times are recorded down to 1/10th of a microsecond where they appear. Is such precision really valid? E.g. [here](https://ehrbase.readthedocs.io/en/latest/09_flat/01_data_types/index.html#feeder-audit):

```auto
 ".../any_event:0/_feeder_audit/originating_system_audit|time": "2021-12-21T16:02:58.0094262+01:00",

```
