Andy
Andy

Reputation: 3522

How to define a FHIR CodeScheme (DSTU2)

TL;DR: does fhir DSTU2 contain a mechanism for formally defining CodeSystems?

I'm trying to port over a bunch of resources to a fhir server from a proprietary system with very similar design goals. In the old system it had a build in method for defining the equivalent of CodeSchemes and ValueSets.

I currently have an instance of HAPI running locally which is running DSTU2 (not sure if that's the right way to say that, but it's in default).

I've been looking at this part of the documentation, which shows how to create a ValueSet, and when I browse the root of the HAPI server it shows there is a resource type called 'ValueSet' so I guess that the xml ValueSets I define are of that resource type: https://www.hl7.org/FHIR/valueset.html

What I can't seem to get my head around; is there actually a way of defining CodeSchemes within FHIR? Lots of the documentation mentions them, but it's ambiguous if it expects them to be defined externally and just referenced by uri, or if there is actually a resource type to explicitly hold them, where I can give definitions to my codes and such.

I've found this piece of documentation, however it states something about it being a pre release for DSTU3. The format seems very similar to the inline CodeSchemes that can be defined in ValueSets, but the resource type 'CodeSystem' doesn't seem to exist in my local instance of HAPI: https://hl7.org/fhir/2016Sep/codesystem-example.json.html

Upvotes: 1

Views: 163

Answers (1)

Lloyd McKenzie
Lloyd McKenzie

Reputation: 6793

In DSTU2, we use ValueSet for two purposes - defining true ValueSets and also for defining code systems. The latter uses ValueSet.define. (In DSTU3, this functionality gets split out into the CodeSystem resource.)

Upvotes: 0

Related Questions