FHIR Chat · CodeSystem id vs url · implementers

Stream: implementers

Topic: CodeSystem id vs url


view this post on Zulip John Moehrke (Jul 27 2017 at 20:40):

What is the difference/similarity between CodeSystem.id and CodeSystem.url? I feel like I want to put the same URL there, the URL that the CodeSystem will live at... but I am not sure.

view this post on Zulip Grahame Grieve (Jul 27 2017 at 20:43):

the canonical URL is fixed by the author, and never changes as it is copied from server to server. Customarily, the author fixes the canonical URL so that it implies the id that the resource has when it lives at it's canonical location. So for example, I am publishing an IG at http://example.org/fhir/my-ig

view this post on Zulip Grahame Grieve (Jul 27 2017 at 20:44):

the canonical URL will be http://example.org/fhir/my-ig/CodeSystem/mycs and the id will be mycs, and the canonical URL should resolve to the code system

view this post on Zulip Grahame Grieve (Jul 27 2017 at 20:44):

none of this is required though. The IG publisher encourages this but does not enforce it

view this post on Zulip Grahame Grieve (Jul 27 2017 at 20:46):

the id will change, so e.g. if you post the same resource to registry.fhir.org (once it's set up in a few weeks), the canonical URL will still be http://example.org/fhir/my-ig/CodeSystem/mycs, but it may need/decide to change the id since they cannot be duplicated locally.

view this post on Zulip John Moehrke (Jul 27 2017 at 20:48):

Likely easier if I as using the IG Publisher... but I am not. Mostly because I have no idea where to start with that. So I am using Simplifier, Forge, and ClinFHIR...

view this post on Zulip John Moehrke (Jul 27 2017 at 20:50):

I am writing a IG for AuditEvent. Starting with StructureDefinition for RESTful Query. And adding a CodeSystem for IHE transaction numbers, which are commonly used in IHE specifications of audit events per 'other' transaction events.

view this post on Zulip Grahame Grieve (Jul 27 2017 at 20:50):

we're working on integration between simplifier and the IG publisher, and also we're starting to work on an IG publisher tutorial

view this post on Zulip John Moehrke (Jul 27 2017 at 20:51):

Im fresh meat to help review and improve that...

view this post on Zulip Peter Jordan (Jul 27 2017 at 20:55):

Interesting. Thus far my implementation for SNOMED CT has been to use "SNOMED CT" as the CodeSystem.id so that the Code System can be reached at [myserver url]/CodeSystem/SNOMED CT. I've assigned "http://snomed.info/sct" to the CodeSystem.url property and left the CodeSystem.identifier property empty. Is this correct?

view this post on Zulip Grahame Grieve (Jul 27 2017 at 20:56):

you can't have a space in your id

view this post on Zulip Grahame Grieve (Jul 27 2017 at 20:56):

other than that it's not wrong

view this post on Zulip Peter Jordan (Jul 27 2017 at 21:02):

Thanks, will fix that. It looked wrong the minute I typed it and none of my other Code System IDs have a space. In terms of operations, all requests seem to use the system parameter and I attempt to match that with the Code System url or id.

view this post on Zulip Grahame Grieve (Jul 27 2017 at 21:05):

system parameter should always match the canonical

view this post on Zulip John Moehrke (Jul 27 2017 at 21:06):

Here is my challenge. IHE has a set of codes for each of the IHE defined transactins (e.g. ITI-18). These codes are used in AuditEvents.subtype. Within IHE the code system identifier is "urn:ihe:event-type-code". I have created (draft) these codes, but don't know where they will eventually live. So far I have an ftp://ftp.ihe.net, or experimentally a github space...

view this post on Zulip Grahame Grieve (Jul 27 2017 at 21:07):

well, then you don't have a challenge. the code system URL is urn:ihe:event-type-code

view this post on Zulip Grahame Grieve (Jul 27 2017 at 21:07):

irrespective of the canonical location

view this post on Zulip John Moehrke (Jul 27 2017 at 21:09):

but CodeSystem.url definition says it SHALL be a URL. So according to that I can't use a URI... which is it?

view this post on Zulip Grahame Grieve (Jul 27 2017 at 21:10):

where does it say that?

view this post on Zulip John Moehrke (Jul 27 2017 at 21:10):

http://build.fhir.org/codesystem-definitions.html#CodeSystem.url

view this post on Zulip John Moehrke (Jul 27 2017 at 21:10):

the definition

view this post on Zulip John Moehrke (Jul 27 2017 at 21:10):

does seem to conflict with everything else said... but it is right there

view this post on Zulip Grahame Grieve (Jul 27 2017 at 21:11):

ah yes. the second sentence should start 'this SHALL be URI" not a "URL". can you create a task to correct that?

view this post on Zulip Grahame Grieve (Jul 27 2017 at 21:11):

and in this case, you can follow the comments

view this post on Zulip John Moehrke (Jul 27 2017 at 21:12):

Yeah.. I will create a tas..... So then this simplifier instance is okay? https://simplifier.net/AuditEventforRESTque/urniheevent-type-code-1

view this post on Zulip Grahame Grieve (Jul 27 2017 at 21:14):

yes.

view this post on Zulip John Moehrke (Jul 27 2017 at 21:15):

bug logged at GF#13699


Last updated: Apr 12 2022 at 19:14 UTC