R5 Final QA

This page is part of the FHIR Specification (v5.0.0-draft-final: Final QA Preview for R5 - see ballot notes). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

Example ValueSet/example-expansion (Turtle)

Terminology Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Not linked to any defined compartments

Raw Turtle (+ also see Turtle/RDF Format Specification)

ValueSet Example using a prepared expansion

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

[a fhir:ValueSet ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "example-expansion"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "http://hl7.org/fhir/StructureDefinition/shareablevalueset"^^xsd:anyURI ;
       fhir:link <http://hl7.org/fhir/StructureDefinition/shareablevalueset>
     ] ) #     many expansions are not shareable, but this one is    
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "additional" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n			<table class=\"grid\">\n				<tr>\n					<td>http://loinc.org</td>\n					<td>14647-2</td>\n					<td>Cholesterol [Moles/volume] in Serum or Plasma</td>\n				</tr>\n				<tr>\n					<td colspan=\"3\">\n						<b>Additional Cholesterol codes</b>\n					</td>\n				</tr>\n				<tr>\n					<td>http://loinc.org</td>\n					<td>2093-3</td>\n					<td>Cholesterol [Mass/volume] in Serum or Plasma</td>\n				</tr>\n				<tr>\n					<td>http://loinc.org</td>\n					<td>48620-9</td>\n					<td>Cholesterol [Mass/volume] in Serum or Plasma ultracentrifugate</td>\n				</tr>\n				<tr>\n					<td>http://loinc.org</td>\n					<td>9342-7</td>\n					<td>Cholesterol [Percentile]</td>\n				</tr>\n				<tr>\n					<td colspan=\"3\">\n						<b>Cholesterol Ratios</b>\n					</td>\n				</tr>\n				<tr>\n					<td>http://loinc.org</td>\n					<td>2096-6</td>\n					<td>Cholesterol/Triglyceride [Mass Ratio] in Serum or Plasma</td>\n				</tr>\n				<tr>\n					<td>http://loinc.org</td>\n					<td>35200-5</td>\n					<td>Cholesterol/Triglyceride [Mass Ratio] in Serum or Plasma</td>\n				</tr>\n				<tr>\n					<td>http://loinc.org</td>\n					<td>48089-7</td>\n					<td>Cholesterol/Apolipoprotein B [Molar ratio] in Serum or Plasma</td>\n				</tr>\n				<tr>\n					<td>http://loinc.org</td>\n					<td>55838-7</td>\n					<td>Cholesterol/Phospholipid [Molar ratio] in Serum or Plasma</td>\n				</tr>\n			</table>\n		</div>"
  ] ; # 
  fhir:url [ fhir:v "http://hl7.org/fhir/ValueSet/example-expansion"^^xsd:anyURI] ; # 
  fhir:identifier ( [
     fhir:system [ fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "urn:oid:2.16.840.1.113883.4.642.3.3141" ]
  ] ) ; # 
  fhir:version [ fhir:v "20150622"] ; # 
  fhir:name [ fhir:v "LOINCCodesForCholesterolInSerumPlasma"] ; # 
  fhir:title [ fhir:v "LOINC Codes for Cholesterol in Serum/Plasma"] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:experimental [ fhir:v "true"^^xsd:boolean] ; # 
  fhir:date [ fhir:v "2015-06-22"^^xsd:date] ; #     Expansions that are not intended for persistence often do not have 
#   all the metadata. But this one, intended for persistence, does    
  fhir:publisher [ fhir:v "FHIR Project team"] ; # 
  fhir:contact ( [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir" ]
     ] )
  ] ) ; # 
  fhir:description [ fhir:v "This is an example value set that includes all the LOINC codes for serum/plasma cholesterol from v2.36."] ; # 
  fhir:copyright [ fhir:v "This content from LOINC® is copyright © 1995 Regenstrief Institute, Inc. and the LOINC Committee, and available at no cost under the license at http://loinc.org/terms-of-use."] ; # 
  fhir:compose [
     fhir:include ( [
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:filter ( [
         fhir:property [ fhir:v "parent" ] ;
         fhir:op [ fhir:v "=" ] ;
         fhir:value [ fhir:v "LP43571-6" ]
       ] )
     ] )
  ] ; #     it's optional whether to include the content logical definition, but 
#	  when an expansion is being persisted, it's better to do so (avoids
#		subsequent mystification as to what the intent was)
#	   
  fhir:expansion [
     fhir:extension ( [
       fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/valueset-expansionSource"^^xsd:anyURI ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir/ValueSet/example"^^xsd:anyURI ]
     ] ) ; #     a reference to the original content - if there is one. Note that \n		when you store an expansion, there often won't be one    
     fhir:identifier [ fhir:v "urn:uuid:42316ff8-2714-4680-9980-f37a6d1a71bc"^^xsd:anyURI ] ; #     always assigned to any expansion, this is cacheable id    
     fhir:timestamp [ fhir:v "2015-06-22T13:56:07Z"^^xsd:dateTime ] ; #     this instance of expansion    
     fhir:total [ fhir:v "8"^^xsd:integer ] ; #     it's useful to routinely fill out the total    
     fhir:offset [ fhir:v "0"^^xsd:integer ] ; #     providing an offset - implies that this expansion was requested using paging -    
     fhir:parameter ( [
       fhir:name [ fhir:v "version" ] ; #     for now, parameter names and values are server specific.\n			   it is likely these will be standardised in a future version.\n				 \n				 This example: underlying LOINC version    
       fhir:value [ fhir:v "2.50" ]
     ] ) ; #     \n		  now, parameters that describe how the expansion was generated.\n			These may help with managing caching, or limit its use \n			(e.g. this expansion was generated for a text filter)    
     fhir:property ( [
       fhir:code [ fhir:v "PROPERTY" ] ;
       fhir:uri [ fhir:v "http://loinc.org/property/PROPERTY"^^xsd:anyURI ] #   used below to connect the values to the property  
     ] ) ; #   a property that is included in the expansion  ,   it's up to the server whether to include any properties that weren't asked for in the expansion.  ,   formal definition for the property - highly recommended but not manadatory  
     fhir:contains ( [
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:version [ fhir:v "2.50" ] ; #     \n				the version can be specified for either the expansion, or\n				each individual codes. Technically, these aren't quite the same \n				thing, but it would be pretty weird for them to differ using LOINC\n			   
       fhir:code [ fhir:v "14647-2" ] ;
       fhir:display [ fhir:v "Cholesterol [Moles/volume] in Serum or Plasma" ] ;
       fhir:property ( [
         fhir:code [ fhir:v "PROPERTY" ] ;
         fhir:value [ fhir:v "SCnc" ]
       ] )
     ] [
       fhir:abstract [ fhir:v "true"^^xsd:boolean ] ;
       fhir:display [ fhir:v "Cholesterol codes" ] ;
       fhir:contains ( [
         fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
         fhir:version [ fhir:v "2.50" ] ;
         fhir:code [ fhir:v "2093-3" ] ;
         fhir:display [ fhir:v "Cholesterol [Mass/volume] in Serum or Plasma" ] ;
         fhir:property ( [
           fhir:code [ fhir:v "PROPERTY" ] ;
           fhir:value [ fhir:v "SCnc" ]
         ] )
       ] [
         fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
         fhir:version [ fhir:v "2.50" ] ;
         fhir:code [ fhir:v "48620-9" ] ;
         fhir:display [ fhir:v "Cholesterol [Mass/volume] in Serum or Plasma ultracentrifugate" ] ;
         fhir:property ( [
           fhir:code [ fhir:v "PROPERTY" ] ;
           fhir:value [ fhir:v "MCnc" ]
         ] )
       ] [
         fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
         fhir:version [ fhir:v "2.50" ] ;
         fhir:code [ fhir:v "9342-7" ] ;
         fhir:display [ fhir:v "Cholesterol [Percentile]" ] ;
         fhir:property ( [
           fhir:code [ fhir:v "PROPERTY" ] ;
           fhir:value [ fhir:v "Prctl" ]
         ] )
       ] )
     ] [
       fhir:abstract [ fhir:v "true"^^xsd:boolean ] ;
       fhir:display [ fhir:v "Cholesterol Ratios" ] ;
       fhir:contains ( [
         fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
         fhir:version [ fhir:v "2.50" ] ;
         fhir:code [ fhir:v "2096-6" ] ;
         fhir:display [ fhir:v "Cholesterol/Triglyceride [Mass Ratio] in Serum or Plasma" ] ;
         fhir:property ( [
           fhir:code [ fhir:v "PROPERTY" ] ;
           fhir:value [ fhir:v "SCnc" ]
         ] )
       ] [
         fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
         fhir:version [ fhir:v "2.50" ] ;
         fhir:code [ fhir:v "35200-5" ] ;
         fhir:display [ fhir:v "Cholesterol/Triglyceride [Mass Ratio] in Serum or Plasma" ] ;
         fhir:property ( [
           fhir:code [ fhir:v "PROPERTY" ] ;
           fhir:value [ fhir:v "SCnc" ]
         ] )
       ] [
         fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
         fhir:version [ fhir:v "2.50" ] ;
         fhir:code [ fhir:v "48089-7" ] ;
         fhir:display [ fhir:v "Cholesterol/Apolipoprotein B [Molar ratio] in Serum or Plasma" ] ;
         fhir:property ( [
           fhir:code [ fhir:v "PROPERTY" ] ;
           fhir:value [ fhir:v "SCnc" ]
         ] )
       ] [
         fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
         fhir:version [ fhir:v "2.50" ] ;
         fhir:code [ fhir:v "55838-7" ] ;
         fhir:display [ fhir:v "Cholesterol/Phospholipid [Molar ratio] in Serum or Plasma" ] ;
         fhir:property ( [
           fhir:code [ fhir:v "PROPERTY" ] ;
           fhir:value [ fhir:v "SCnc" ]
         ] )
       ] )
     ] ) #     and the actual expansion    ,     \n		  this expansion is made as a hierarchy - a preferred code, followed by two \n			sets of codes categorized by a label. This is to help a human user \n			navigate the list (e.g. in a picklist)\n			\n			Note that the hierarchy might not have anything to do with the\n			definitions of the codes (e.g. could be divided into common and less common)\n			\n			Building a hierarchy like this is not explicitly specified in a standard value set,\n			but may be controlled by extensions, the expansion profile, or just performed\n			by the expansion service.\n		   
  ]] . #    
#  	ok, and now the expansion 
#      

# -------------------------------------------------------------------------------------


Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.