The BMM openehr_base_110.bmm is significantly more recent than the OPT 1.4 XSD. AFAIK, the XSD is is the currently use and correct way to process OPT 1.4 XML.
Semantically, there is no change in the use of Terminology_code, it does the same thing as CODE_PHRASE, but is not buried inside the Reference Model. Outside of the RM, Terminology_code is now used to represent a terminology code.
I’m afraid things in XSD-land might not exactly match the source specs, in terms of file-naming, etc, but as they are in constant use, I think they most likely correct; the problem is that if you come along without knowing the (hidden) history, it’s hard to magically know what gets used where. @sebastian.iancu did much of the work on cleaning up XSDs and could probably elaborate.
On the plus side, if you are looking to construct a new system or application based on openEHR, just use the latest published release of everything i.e. RM 1.1.0 and so on; don’t use any previous releases. Things should work fine if you do that. If you still find XSD (or BMM or any other) errors, please report them, either here, if you are not sure, or if you are sure of a problem, you can create an official PR (Problem Report) here on Jira.
Thank you for the explanation @thomas.beale. That was super quick
I’ll implement the “language” element as type TERMINOLOGY_CODE in OPT 1.4 files. I guess the published Reference.xsd wasn’t re-generated and still refers to the old release.
@pieterbos has written an (as far as I know still experimental) OPT1.4 to OPT2 converter which sounds what you may want to have a look at. Something we’ll add to CKM as well in due course (but certainly not over the weekend)
Can the ADL Workbench generate OPT1.4 to OPT2 already, @thomas.beale (and not “only” convert adl1.4 to adl2 / opt2. The oets may be the remaining challenge?
What may be even more interesting is an OPT2 → OPT1.4 conversion, because quite likely most openEHR vendors will have to rely on OPT1.4 for a while.
I used public CKMs to download few OPTs for testing.
Thank you for offered help in generating OPT2 files but I don’t want to take your time.
…unless you have few of them ready on your disk
That would speed let me write OPT2 to AOM2 converter over the weekend and skip the OPT14.
Welcome to the club of people who support ADL 2 natively! We’re still a small group unfortunately, but support to migrate is growing fast.
The OPT 1.4 → OPT 2 converter in Archie is feature complete, but has only had limited testing. It will work for at least some OPTs, and may give problems for others. Any issues found should be easy to fix. If you try it, please do report your results, including any issues you find, so the converter can be improved.
OPT2 is already fully AOM2, so I am not sure what you mean with ‘opt2 to aom 2 converter’. Converting OPT 1.4 to OPT 2 is quite a lot of work to get right, just directly importing the OPT 1.4 data into AOM 2 is much less work. The Archie branch that Sebastian pointed to contains the code for both processes.
Thank you @pieterbos for the OPT 1.4 to OPT 2 converter!
On my first review I saw a DEVELOPMENT status for OPT2 so I picked OPT 1.4 instead. I’m happy to join the ADL 2 club (now that I learned the OPT 1.4 is using the “original” RM release).
Everything else is already AOM 2 in my little project.
Its the part where I read the OPT(2) file and “convert” it to AOM classes in-memory.
Thank you for all the links and information to everybody.
I’ve (re)read OPT2 specifications and I could skip the “convert” part if I used OPT2 in JSON format (.optj). I could generate the serialize/deserialize code for the AOM2 classes from the AOM2 BMM. This would let me deserialize directly from the .optj file to the AOM2 in-memory classes. Zero code to maintain thanks to the BMM!
I’m reading through the “ADL Workbench (AWB) User Guide” to see how to create a few sample .optj files.
(if somebody has done this before and has these files, please send/upload them)
I went ahead and installed ADL Workbench on my Mac. That was an experience
If somebody tries doing the same:
Don’t install in the Documents folder.
Don’t skip the line “Then clone the iso8601 and error_message libraries into a directory such as …/EiffelHub/:” => create the EiffelHub directory before executing the last two “git clone” commands.
I was able to compile AWB but received 8 errors (they are actually only 1 error):
1 VCCH(1) Class has deferred feature(s), but is not declared as deferred. Check deferred feature yymax_symbol_equiv_class from class YY_SCANNER_SKELETON. ADL_14_2_REWRITER.yymax_symbol_equiv_class (adl_components)
...
CADL_14_SCANNER.yymax_symbol_equiv_class (adl_components)
ADL_14_SCANNER.yymax_symbol_equiv_class (adl_components)
BMM_TYPE_NAME_SCANNER.yymax_symbol_equiv_class (eomf_bmm)
OG_PATH_SCANNER.yymax_symbol_equiv_class (eomf_object_graph)
ODIN_SCANNER.yymax_symbol_equiv_class (eomf_odin)
ADL_2_SCANNER.yymax_symbol_equiv_class (adl_components)
CADL_2_SCANNER.yymax_symbol_equiv_class (adl_components)
I was brave enough to try to fix them. My first experience with Eiffel. No, I wasn’t successful.
Next, I installed the provided AWB EXE file on my Windows computer. I was able to open a template and save it as a .JSON file. It says it is an operational template but doesn’t use the .OPTJ extension as in OPT2 specifications. Well, it is good enough for me even with the .json.
I guess a can now generate serialize/deserialize support to the AOM2 classes. It will save me a lot of coding now and it will be future proof when specifications change.
It was a good day. Thank you to everybody who took the time to help
I have to say, as the author of AWB, but who uses Windows and Linux, it works on both of those platforms, but to get it working on the Mac, which we did manage in the past, was very difficult, partly due to difficulty of getting GTK2 installed. Anyway, I might have saved you the trouble if I had known you were going to try that platform
I will however check the state of the source build; not many people do that, so it may be out of date with respect to the compiler version you probably installed (can you let me know which compiler version it was?).
Sorry for the annoyance - I’ll try to improve things there.
Don’t worry about the Mac. Windows and Linux is enough. I guess there are more important things on your ToDo list than making AWB run on a Mac for one person
I installed the Eiffel Studio successfully. The source build worked. Based on the compiler errors I thought that the deferred feature yymax_symbol_equiv_class was added to these classes and they were somehow not in sync with the change.
But it was the first time I saw an Eiffel code so I’m probably completely wrong here
I already deleted Eiffel Studio so I don’t know which compiler version was used. I guess the latest since I installed everything following the instructions from their site.