A while ago, I was tasked with creating a (nearly) complete list of all attributes that can be stored in a composition as defined by the openEHR reference model.
The goal was to compile an example of all paths that can be populated with information when creating a composition for the Clinical Data Repository (CDR). Understanding these paths also facilitates formulating AQL queries.
For instance, an end time for the context can be stored at: context/end_time/value
Similarly, the ID of an external reference of the composer can be stored at: composer/external_ref/id/value
Initially, I manually created this list by navigating through various web pages of the reference model and constructing the paths myself. This process was quite tedious, so we developed a script to scrape the reference model pages, extracting all tables containing class information.
The outcome is a JSON file containing all classes and attributes, which can be easily processed by machines.
I am sharing the JSON file here because it could be beneficial for anyone encountering a similar challenge.
Furthermore, this initiative might inspire future revisions of the reference model to be published in a similar machine-readable format.
20250116_openEHR_RM.json (207.2 KB)
I am also sharing an excel file as an example of the path list that can be created automatically.
20250116_RM_path_output.xlsx (165.5 KB)