1

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

Andy
  • 3,228
  • 8
  • 40
  • 65

1 Answers1

0

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.)

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Thanks for the response. Can ValueSets reference codes from other ValueSets? I seem to remember reading in the documentation that's it's a bad practice to make inline CodeSystems with a large usage scope. – Andy Nov 09 '16 at 15:43
  • Yes, value sets can reference codes from multiple code systems (which in STU 2, would be defined in multiple value sets). ValueSets can also import portions or all of their definitions from other value sets. – Lloyd McKenzie Nov 12 '16 at 14:20