Over the past year, MITRE has been working on a domain specific language (DSL) for defining logical healthcare data models and producing FHIR profiles. By design, it is a very simple and compact method of describing a logical data model that can be directly translated into a FHIR profiles and then to a FHIR Implementation Guide. We call this language Compositional Approach to Modeling Data Elements for InterOperability, or CAMEO for short (this name is subject to change).
I’m pleased to announce that CAMEO Version 5 has just been released.
Why is a tool like CAMEO needed? Because FHIR gets you only part of the way to interoperability. You need profiles to say precisely how you will exchange information over FHIR. CAMEO is a scalable way to define profiles, most useful when you need to define a set of profiles for an entire clinical domain. Think genomics, breast cancer, skin and wound care, etc. Domains like this require numerous profiles. The profiles cross-reference each other, making it difficult to produce them one at a time. It would be difficult to model such a domain without the right tool. MITRE is using CAMEO to define a large, detailed set of clinical models we call the Standard Health Record.
Let’s do a “Hello, World” using CAMEO. First go to https://github.com/standardhealth/shr-cli/releases and download the latest release source code package as a zip file, and unzip it to any location on your machine (let’s call it rootdirectory). Follow the README instructions to set up your environment:
- Install [Node.js](https://nodejs.org/en/download/)
- Install [Yarn](https://yarnpkg.com/en/docs/install)
- Execute the following command from rootdirectory: yarn
Now, create another directory (the sourcedirectory), to put our CAMEO files. Create a file called HelloWorld.txt with the following data element definitions:
Grammar: DataElement 5.0 Namespace: hello Description: "A simple example of CAMEO." EntryElement: HelloWorld Description: "A silly profile." 0..1 SayHello Element: SayHello Description: "An extension indicating whether to say hello" Value: boolean
Next, create a file called HelloWorld_map.txt that defines the mapping to FHIR. Since this doesn’t align with any particular resource, let’s map it to Basic. This file is even simpler:
Grammar: Map 5.0 Namespace: hello Target: FHIR_STU_3 HelloWorld maps to Basic:
Since we didn’t map the HelloWorld data element to an existing element inside this resource, it will automatically appear as an extension. Now, from a command prompt in rootdirectory, run:
> node app.js /sourcedirectory
When the program runs, it will output a warning message alerting you that mapping to Basic usually isn’t the best choice, but in this case, it is intentional. After the program runs, the generated profile (a FHIR StructureDefinition) will be found in /rootdirectory/out/fhir/profiles/. StructureDefinitions are verbose, and this one clocks in at several hundred lines.
A friendlier view is created when we create an implementation guide (IG). To do this, we use the existing FHIR implementation guide (IG) publisher. In order to run the IG publisher, you must first install Java and Jekyll (Windows: Part 1 / Part 2, Mac/Linux). You may need to set up a proxy if you are behind a firewall, since the process tries to access external terminology servers. To generate the IG, run:
> yarn run ig:publish
The generated profile page will be located at /rootdirectory/out/fhir/guide/output/guide/StructureDefinition-hello-HelloWorld.html. The way we have set it up, the IG is automatically branded as part of the Standard Health Record (SHR). We are working on “de-branding” the IG, so ignore the SHR references, for now. To view the Hello World FHIR profile HTML web page, load /rootdirectory/out/fhir/guide/output/guide/StructureDefinition-hello-HelloWorld.html into your browser. It should look like this: