0

When creating a FHIR ValueSet using ALL codes of a small externally defined code list, which would be more appropriate (and indeed correct per the FHIR specification) - a composition or an inline codeSystem?

As an example, creating a ValueSet from the following code list:

http://www.datadictionary.nhs.uk/data_dictionary/attributes/e/end/ethnic_category_code_de.asp

Would there be advantages/disadvantages of using either method?

Jonny Rylands
  • 193
  • 4
  • 12

1 Answers1

0

Inline definition of a code system is used when the code system and value set are synonymous - you're inventing codes and saying the value set contains all of them. Places this occurs are when we're defining structural codes for FHIR (ones that we'll be maintaining rather than external organization) or for things like Questionnaires where the codes might be specific to that particular questionnaire. In general, inventing your own code system isn't encouraged because it's less likely people will recognize it. It's better to draw codes from standardized code systems, be those international (like SNOMED, LOINC, ICD9, etc.) or national or even organization-maintained code systems.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Thanks. Could/would you ever use an inline definition of a code system AND a composition of codes from other systems in the same ValueSet? Noticed that the ValueSet constraints don't seem to prevent it: "Value set SHALL contain at least one of a codeSystem, a compose, or an expansion element". – Jonny Rylands Oct 21 '15 at 11:55
  • Definitely. FHIR itself does this in a few places - grabs codes from one or two external code systems and then defines a couple of its own (generally where there's little chance of influencing the external code systems to add the needed codes). – Lloyd McKenzie Oct 21 '15 at 17:49
  • Thanks. Sorry little convoluted but - if you are creating a ValueSet composed of codes from an external source (such as the ethnic category code URL above), but the source doesn't publish a code system URI, would you represent them in FHIR as a ValueSet composition but create a system URI yourself? Or would you represent them as an inline codeSystem? – Jonny Rylands Nov 16 '15 at 11:48
  • You should search for any NamingSystem declarations for that code system. If you can't find one in any of the repositories where you'd expect the code system to be declared, you should create one (and stick it in the HL7 registry or a regional registry so others can find it). But you shouldn't generally use "define" for externally defined code systems unless you're trying to "import" the code system definition into a tool that wants to use the FHIR format for representing the content. – Lloyd McKenzie Nov 16 '15 at 17:07