How to construct a CKM URL from an archetype identifier?

Is there a way to create a URL for citation purposes from an archetype id? Is something like the following defined, or easy to support?

http://ckm.openehr.org/archetypes?id=openEHR-EHR-OBSERVATION.blood_pressure.v1.0.3

Possibly mainly for @sebastian.garde

It has some limitations, but essentially this works
https://ckm.openehr.org/ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v1

Also e.g.
https://ckm.openehr.org/ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v1/mindmap

Note that if the archetype id changes before/on publication this URL would no longer work, whereas the citeable id (e.g. 1013.1.130) remains stable.

1 Like

Alternatively, could the REST API be used to get the cid initially?

https://ckm.openehr.org/ckm/rest/v1/archetypes/citeable-identifier/openEHR-EHR-OBSERVATION.blood_pressure.v2

2 Likes

Oh yes, you can do that as well - especially helpful if you do something programmatically like the rest of the CKM REST API.

The direct link is just useful if you quickly want to open the archetype in ckm directly.

2 Likes

Interesting idea but I think I prefer the simplicity of

https://ckm.openehr.org/ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v1

We will need to factor in namespaces though, quite soon.

I think it preferable to stick with major version only, though I guess it depends on the citation requirement.

1 Like

Definitely it will be useful to specify minor versions. And probably patch. Since in adl2 I often include/specialise at the minor level.

2 Likes

Well major version only is going to get latest of that version, which is not really what you want to do when citing an existing model, whereas if you just want to ‘refer’ to the latest (whatever it is), sure. So ideally we need support for minor+patch version as well.

2 Likes

Agree. It relates a bit to the discussion wether a new major version means a new archetype. Clinically to me that’s a strange concept, but technically it makes a lot of sense. I think we should discuss this a bit to get so,e consensus for cases like this.

2 Likes

Yes, agree.
For now if you want to specify an explicit version, you can use the citeable identifier and add the asset version, e.g. https://ckm.openehr.org/ckm/archetypes/1013.1.3574/9 for the currently latest published version.

1 Like

This was my original problem: this ID is not in an archetype, so the only way to figure it out given a particular archetype is make some sort of query to CKM REST API.

We will support the following in the next CKM release:

First, this has always been possible and will go to the latest revision of the archetype:

  • ckm/archetypes/1013.1.3574
  • ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v2

New: Use the semantic version of the archetype either with the citeable id or the archetype id:

  • ckm/archetypes/1013.1.3574/2.0.8
  • ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v2/2.0.8

In addition, if you want to point to the latest published i.e. current stable version, you will be able to do this. Again, this works with the the citeable id as well as with the archetype id:

  • ckm/archetypes/1013.1.3574/latestpublished
  • ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v2/latestpublished

In all of these cases, you can append an action, for example to go the adl tab of the latest published bp v2 version:
/ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v2/latestpublished/adl

And because it is a little bit complex, we have also extended the Share with Colleague tab, so that you can construct the URL if needed:

Hope this will be helpful to you @thomas.beale (and others of course!)

2 Likes

I’ve been a user of CKM URIs since forever and they work really well. Love the “latestpublished”, although I could see just “latest” for obtaining the latest published one in general, as it is possible to point to specific non-published ones if needed

1 Like

Well, you will actually be able to use “latest” as well. However, this is not the same as “latestpublished”.

“latest” is the same as not stating anything, i.e. it points to the latest and greatest, but that may not necessarily be stable/published, generally speaking. In practice, I believe, the archetype is often republished immediately, especially for patches, but this is an editorial decision.

E.g., at the time of writing
/ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v2/latestpublished
is the same as
/ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v2/2.0.8

And this happens to also be the same as

/ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v2/latest
and /ckm/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v2

However, if e.g. @varntzen chooses to commit a 2.0.9-alpha version to the trunk without republishing it immediately, then /latestpublished will stay at 2.0.8 whereas /latest will now point to 2.0.9-alpha.

1 Like

One other issue we will need to consider is how/where archetype namespaces come in with ADL2.

This is already an issue when trying to construct URIs when mapping archetypes into FHIR or indeed openEHR local valuesets into FHIR.