When trying to POST a FLAT Composition on EHRBase, I noticed that I wasn’t able to save a DV_CODED_TEXT with a preferred_term, and neither is it retained after saving it using a RAW/JSON Composition and then loaded in FLAT Format.
I checked the spec ( Simplified Formats for openEHR Data ) and I noticed that it seems to be implemented partially (within /_language → CODE_PHRASE), but not directly within DV_CODED_TEXT. I feel that it should be assigned as:
Flat Path = |preferred_term
RM Path = defining_code.preferred_term
It seems to work as I describe in Better’s FLAT format.
If the problem is the specifications, the formally this is the place: Jira. But if that is too complicated then a discussion here like this is also good - then one of us will make a formal SPECPR ticket, and solved it in the right SPECxx project - see on the middle of this page: openEHR - Change Process for more official stuff.
If the problem is the vendor implementation, then I guess posting here on discourse is also a good way to start a conversation, but ultimately the vendor may have a different process (github issue, support ticket, etc)
I think I found the issue in the SDT specs. PreferredTerm has been added to the SDT representation of CODE_PHRASE and is suuported by ehrbase but not to DV_CODEDTEXT.
So we need to update SDT spec and submit a cr to ehrbase