# Where to find AOM2 BMM for the latest stable release (2.3.0)

**URL:** <https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006>\
**Category:** ADL\
**Created:** [30 October 2021 14:17 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006 "2021-10-30T14:17:33Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![borut.jures](https://discourse.openehr.org/user_avatar/discourse.openehr.org/borut.jures/32/1391_2.png) [@borut.jures](https://discourse.openehr.org/u/borut.jures)\
**Post date:** [1 November 2021 12:49 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/21 "2021-11-01T12:49:23Z")

</div>

> [@thomas.beale](#):
>
> There is now an AOM 2.0.6 BMM schema

Thank you! Tried it but it is (probably correctly) including “openehr\_base\_1.0.4”.

Version generated by Pieter from Archie is including “openehr\_base\_1.1.0” which is great as I could use it with the newer releases.

I guess AOM 2.2.0 and 2.3.0 will use newer RM releases so that it will be compatible with the OPT2 exported from the VSCode extension.

p.s.  
I’m preparing a “thank you project”. It rhymes with BMM =\> UML 😉

---

<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:** [1 November 2021 13:44 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/22 "2021-11-01T13:44:09Z")

</div>

> [@borut.jures](#):
>
> Tried it but it is (probably correctly) including “openehr\_base\_1.0.4”.

Yes, that is correct; you will see that there as well. It contains the correct version of the (old) Expression model. It’s not quite complete yet, a bit more to do on it.

The next versions will include openehr\_base\_1.1.0 and openehr\_expression\_1.0.4.

I’ll get the AM 2.2.0 and 2.3.0 BMMs up fairly soon.

Note that none of them use RM directly; ADL/AOMs is independent of RM, AOM1.4 had a small dependence on RM types, which I think you probably don’t care about.

---

<div class="post-metadata">

**Author:** ![pieterbos](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pieterbos/32/512_2.png) [@pieterbos](https://discourse.openehr.org/u/pieterbos)\
**Post date:** [1 November 2021 13:45 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/23 "2021-11-01T13:45:46Z")

</div>

Thanks for looking at the conversion results.

Note that this converter is mainly for a limited purpose - just generate something that works, not generating something that’s an optimal hand-coded BMM file. From that perspective:

> [@thomas.beale](#):
>
> all (?) properties seem to have `is_mandatory` set on them

Hmm, looks like the AOM implementation in Archie is not annotated with @Nullable, unlike the RM. I’ll try to see if I can do this.

> [@thomas.beale](#):
>
> cardinality only needed when it is something other than `0..*`

From the above perspective, very low priority, but also easy, so I will check if it is.

> [@thomas.beale](#):
>
> the old form of list `<xxx, ...>` used for ‘ancestors’ not needed, can just be `<xxx>`

The , … indicates it is a list, which makes the BMM much easier to convert to correct JSON/YAML and to process with existing tools. Archie can parse the other form just fine, but it will be annoying for anyone else. This is not just the BMM, but the generic ODIN generation of Archie that does this for any single element list. So not sure if I should fix this at all.

> [@thomas.beale](#):
>
> Boolean properties have ‘is\_’ missing in the name (see below ex.)

Ah, that I will look into. Can be tricky, I hope they do not appear like this in the JSON serialization as well, because then it will be more tricky to fix (will probably need a new configuration parameter to make it backwards compatible on demand, and parse both alternatives?)

> [@thomas.beale](#):
>
> - the converter currently outputs a complex type structure for ?all `P_BMM_SINGLE_PROPERTYs`

if easy to fix I will add it, but otherwise the meaning of the output is exactly the same, so will not matter much.

There are more problems in the generated BMM: for example constraint is not in C\_PRIMITIVE\_OBJECT. Neither is assumed\_value. They are in the subclasses. This is because this is actually a BMM generated from a java implementation of the AOM, where some of these things have to be different to work. That might actually help in code generation, by the way.

---

<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:** [1 November 2021 13:49 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/24 "2021-11-01T13:49:05Z")

</div>

> [@pieterbos](#):
>
> There are more problems in the generated BMM: for example constraint is not in C\_PRIMITIVE\_OBJECT. Neither is assumed\_value. They are in the subclasses.

Ah yes, I had to put those things in as well. BMM just does replaces of same-named properties, with some conformance checking.

For the ancestors list thing, it’s not wrong, so you might as well leave it in your version.

---

<div class="post-metadata">

**Author:** ![pieterbos](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pieterbos/32/512_2.png) [@pieterbos](https://discourse.openehr.org/u/pieterbos)\
**Post date:** [1 November 2021 14:25 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/25 "2021-11-01T14:25:17Z")

</div>

Ok, so a couple more differences:

TEMPLATE.overlays in the spec, archie as templateOverlays (so template\_overlays in BMM). Looks like a mistake on my side in 2016.  
C\_TEMPORAL. pattern\_constraint in spec, patterned\_constraint in archie (probably mistake on my side?)

- in the spec, several C\_PRIMITIVE\_OBJECT subclasses have default\_value is mandatory. I do not think it should.
- in the spec, C\_TERMINOLOGY\_CODE.constraint is mandatory. Should it be?
- the class RESOURCE\_ANNOTATIONS cannot be found in the specifications
- in base BMM, resource\_description.details is mandatory, in the specification, it is not.

---

<div class="post-metadata">

**Author:** ![pieterbos](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pieterbos/32/512_2.png) [@pieterbos](https://discourse.openehr.org/u/pieterbos)\
**Post date:** [1 November 2021 14:33 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/26 "2021-11-01T14:33:39Z")

</div>

Oh, and:

- ARCHETYPE\_HRID.namespace is incorrectly mandatory in the base 1.1.0 BMM

---

<div class="post-metadata">

**Author:** ![pieterbos](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pieterbos/32/512_2.png) [@pieterbos](https://discourse.openehr.org/u/pieterbos)\
**Post date:** [1 November 2021 15:15 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/27 "2021-11-01T15:15:38Z")

</div>

Ok, fixed some things, and generated the BMM for AOM 2.3.0. Changes:

- the changes in AOM 2.3.0 (obviously 🙂 ), such as rm\_overlay and constraint binding strength
- fixed the STRING and BOOLEAN type so it is now String and Boolean
- cardinality no longer present for lists if \>=0
- All optional fields should no longer appear as mandatory
- it now outputs type= instead of type\_def= for simple properties

Issues remaining:

- Archie outputs in both JSON and this BMM boolean fields in the AOM without the `is_`prefix.
- It still contains some (but not all) classes also present in base

Both are fixable, but will take more time to properly fix, and in the first case will mean some work to ensure backwards compatibility of the JSON output is guaranteed, probably with some extra configuration.

Output is available at [aom-2.3.0-generated.bmm · GitHub](https://gist.github.com/pieterbos/b5cbfb9bbf64d320f77195943db6c14c)

---

<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:** [1 November 2021 15:22 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/28 "2021-11-01T15:22:26Z")

</div>

> [@pieterbos](#):
>
> patterned\_constraint

Yep i fixed this one yesterday - sorry, I should have written these down. Should be `pattern_constraint`.

> [@pieterbos](#):
>
> C\_PRIMITIVE\_OBJECT subclasses have default\_value is mandatory. I do not think it should

yep - I fixed those, that is incorrect.

> [@pieterbos](#):
>
> in the spec, C\_TERMINOLOGY\_CODE.constraint is mandatory. Should it be?

yes, otherwise the object does not need to exist.

> [@pieterbos](#):
>
> the class RESOURCE\_ANNOTATIONS cannot be found in the specifications

That appears to be a missing ‘include’ line in the Resource spec - I’ll fix that. ([Here it is in the UML site)](https://specifications.openehr.org/releases/UML/latest/index.html#Architecture___18_1_83e026d_1429721427946_83239_4696).

> [@pieterbos](#):
>
> in base BMM, resource\_description.details is mandatory, in the specification, it is not.

That’s a BMM error I missed; will correct.

> [@pieterbos](#):
>
> ARCHETYPE\_HRID.namespace is incorrectly mandatory in the base 1.1.0 BMM

Ok - corrections to do there as well.

Teamwork rules 😉

---

<div class="post-metadata">

**Author:** ![borut.jures](https://discourse.openehr.org/user_avatar/discourse.openehr.org/borut.jures/32/1391_2.png) [@borut.jures](https://discourse.openehr.org/u/borut.jures)\
**Post date:** [1 November 2021 18:15 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/29 "2021-11-01T18:15:49Z")

</div>

> [@pieterbos](#):
>
> Output is available at [aom-2.3.0-generated.bmm · GitHub](https://gist.github.com/pieterbos/b5cbfb9bbf64d320f77195943db6c14c)

Thank you @pieterbos !!!

I got it working.

Did the same changes as for 2.0.6 (removed duplicate classes already in openehr\_base\_110.bmm):

- AUTHORED\_RESOURCE

- TRANSLATION\_DETAILS

- RESOURCE\_DESCRIPTION

- RESOURCE\_DESCRIPTION\_ITEM

For 2.3.0 I additionally removed:

- MULTIPLICITY\_INTERVAL

- CARDINALITY

These two were “silently” added to the openehr\_base\_110.bmm when Thomas pushed the added openEHR\_am\_206.bmm.

I also added missing `generic_parameters = <"xyz">` to all `root_type = <"INTERVAL">`.

Thank you both!!! You two rule 🤗

---

<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:** [1 November 2021 21:52 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/30 "2021-11-01T21:52:41Z")

</div>

See the specifications-ITS\_REPO now; contains various fixes in both BASE and AM BMMs; also contains a AM 2.1.0 and 2.2.0 BMM. Compiling in ADL Workbench. 2.3.0 coming tomorrow.

---

<div class="post-metadata">

**Author:** ![borut.jures](https://discourse.openehr.org/user_avatar/discourse.openehr.org/borut.jures/32/1391_2.png) [@borut.jures](https://discourse.openehr.org/u/borut.jures)\
**Post date:** [7 November 2021 15:40 UTC](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006/31 "2021-11-07T15:40:28Z")

</div>

> [@borut.jures](#):
>
> p.s.  
> I’m preparing a “thank you project”. It rhymes with BMM =\> UML 😉

I’ve released UML diagrams generated from the specifications. See this post:

> [@Generating UML diagrams from specifications](https://discourse.openehr.org/t/generating-uml-diagrams-from-specifications/2038):
>
> I heard @thomas.beale mentioning his wish to have diagrams generated directly from the computable specifications. This might enable him to skip using UML tools that he doesn’t like. I’ve created a simple UML diagram generator and browser. Sample class with enum: Larger diagram: You can also create your own custom diagrams: (Recreation of [“The Archetype Package Overview”](https://specifications.openehr.org/releases/AM/Release-2.2.0/AOM2.html#_overview_2) found at specifications site) Thanks to @pieterbos and @tho…

[Previous page](https://discourse.openehr.org/t/where-to-find-aom2-bmm-for-the-latest-stable-release-2-3-0/2006.md?page=1)
