This figure seems to imply a single EHR could have more than one folder trees at the same time.
For an EHR already having a Directory FOLDER, when trying to POST an second FOLDER tree JSON to EHRBase Server via openEHR Tool, I got the following error (409):
{"error":"Conflict","message":"EHR with id 80a71040-3d37-42f3-a86a-ce5405138ce0 already contains a directory."}
Thank you very much, @thomas.beale and @stefanspiska. Forgive me please. Honestly, I’m still confused about: What kind of folder hierarchy a single EHR can have, i.e., mono-/multi-hierarchy? What is the relationship between directory and folders? Two separate but related attributes of the EHR class? Or is Directory just a synonym of the very first folder (root) in the first folder tree? Especially the cardinality of the attribute folders, 0…1, looks strange for me.
I think you find this strange because what you have circled is NOT the cardinality, but just the existence (or occurrences) of the folders attribute, i.e. folders may or may not exist (aka is optional).
Then, if it exists, the cardinality of the folders List is *, i.e. the folders List can contain any number of OBJECT_REFs (each pointing to the root of a Folder structure, with the first member being the “directory”).
That 0…1 means optionality, not cardinality. It means there could be not even a folders container. if there is something there, it is a List, which is a container, i.e. 0…* items.
Some other useful info: the EHR.folders was added in RM 1.1.0, previously we only had EHR.directory. The REST specs is lagging behind, as it does not have yet operation for folders. What you see there ion EHRbase is just the REST for directory “resource”. This missing piece of specs is anyway planned to be addressed soon, and hopefully it will be also supported by CDRs.
Interesting post and very helpful, as I am still struggling to understand how folders can be used in openEHR, and now I also know why there is no REST API call for such folders.
I am curious to learn how “administrative cases” and “medical episodes” are managed in openEHR. Here are the definitions of both terms for context:
Administrative Case: This organizes a patient’s medical treatment from an administrative viewpoint. It includes multiple hospitalizations or outpatient treatments at different times that are grouped under a single administrative case for billing, insurance, or other management purposes.
Medical Episode: This organizes a patient’s medical treatment from a clinical perspective. It may include various hospitalizations or outpatient treatments, potentially spread across different administrative cases, but grouped based on a specific clinical condition or treatment process.
I hope, that I interpreted your answer as a response to my post
Based on your insight, this means, that the organization of administrative cases and medical episodes need to be managed in the application using predefined AQL queries (logic layer) and not at the openEHR using associations or tags (persistence level).
Can you tell me, if I did understand your insight correctly?