Where can I find JSON Schema or JSON friendly metadata for CKM Archetypes?

Where can I find JSON Schema for CKM Archetypes?

I don’t think you are going to find anything like that. But to be sure I would ask further @sebastian.garde, @NeoEHR, @MattijsK or @yampeku.

never did json, but there is a download available of the archetypes as FHIR profiles and valuesets if you are interested in that

1 Like

I have attached JSON Schemas for 2 archetypes:

openEHR-EHR-OBSERVATION.age.v0.0.1-alpha.json (6.7 KB)
openEHR-EHR-OBSERVATION.blood_pressure.v2.0.8.json (22.1 KB)

It would be interesting to learn how you would use JSON schemas?

The tool for generating these is aimed at generating JSON Schemas for operational templates (OPTs) and is a side-product of a domain model classes generator:

1 Like

Hi Borut, this is really interesting stuff. Could you please share what you are using the json schem opts for?

And what do we see in the screenshot form code? Is it code generated from json schema?

We are missing an ADL and OPT 1.4 JSON Schema in ITS, for completeness I think that is something we’ll need to provide.

That’s true @pablo, but he was asking about a schema of an archetype, not of the RM/AOM. What @NeoEHR showed is the closest (yet not something standardized) I guess to what @Nikolai_Ryzhikov was looking for.

@pablo I have attached a JSON Schema for AM 1.4:

am140.json (50.3 KB)

Types that are native to JSON should probably be removed.

@joostholslag I’m not using JSON Schemas myself. As I mentioned they were easy to generate once I had the OPT domain model classes generator.

I guess there is an expectation that openEHR would be easier if presented as JSON Schemas which would allow to generate code in any language. Maybe they are right but there is a lot missing in the JSON Schema generated code (compared to the code I generate – e.g. validation).

That is why I hope somebody shares their JSON Schemas based openEHR code and/or ideas how to use them.

The code in the screenshot is generated directly from an OPT2 file.

The code is an example of how a programmer would use the domain model classes generated for an OPT (in this case Vital signs).

As you see in the example, there are no RM classes used in the code so the programmers are not required to learn openEHR – they just use the domain classes for each OPT.

1 Like

yes @sebastian.iancu what I’m saying is we need to have a JSON schema for archetypes to have an alternative for ADL in JSON, that might not be 1 to 1 representation of the AOM, but a simplified version (what we talked in the SEC meeting in Groenlo).

1 Like