### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/ValueSet.json
### ----------------------------------------------------
### -- Chunk 16 of 16
 populated instant, but in some circumstances, value sets are expanded by hand, and the expansion is published without that precision.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "dateTime"
      }]
    },
    {
      "id" : "ValueSet.expansion.total",
      "path" : "ValueSet.expansion.total",
      "short" : "Total number of codes in the expansion",
      "definition" : "The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.",
      "comment" : "Paging only applies to flat expansions.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "integer"
      }]
    },
    {
      "id" : "ValueSet.expansion.offset",
      "path" : "ValueSet.expansion.offset",
      "short" : "Offset at which this resource starts",
      "definition" : "If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.",
      "comment" : "Paging only applies to flat expansions. If a filter is applied, the count is the number of concepts that matched the filter, not the number of concepts in an unfiltered view of the expansion.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "integer"
      }],
      "meaningWhenMissing" : "Paging is not being used"
    },
    {
      "id" : "ValueSet.expansion.parameter",
      "path" : "ValueSet.expansion.parameter",
      "short" : "Parameter that controlled the expansion process",
      "definition" : "A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.",
      "comment" : "The server decides which parameters to include here, but at a minimum, the list SHOULD include all of the parameters that affect the $expand operation. If the expansion will be persisted all of these parameters SHALL be included. If the codeSystem on the server has a specified version then this version SHALL be provided as a parameter in the expansion (note that not all code systems have a version).",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }]
    },
    {
      "id" : "ValueSet.expansion.parameter.name",
      "path" : "ValueSet.expansion.parameter.name",
      "short" : "Name as assigned by the client or server",
      "definition" : "Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.",
      "comment" : "The names are assigned at the discretion of the server.",
      "min" : 1,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }]
    },
    {
      "id" : "ValueSet.expansion.parameter.value[x]",
      "path" : "ValueSet.expansion.parameter.value[x]",
      "short" : "Value of the named parameter",
      "definition" : "The value of the parameter.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      },
      {
        "code" : "boolean"
      },
      {
        "code" : "integer"
      },
      {
        "code" : "decimal"
      },
      {
        "code" : "uri"
      },
      {
        "code" : "code"
      },
      {
        "code" : "dateTime"
      }]
    },
    {
      "id" : "ValueSet.expansion.contains",
      "path" : "ValueSet.expansion.contains",
      "short" : "Codes in the value set",
      "definition" : "The codes that are contained in the value set expansion.",
      "min" : 0,
      "max" : "*",
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "vsd-6",
        "severity" : "error",
        "human" : "SHALL have a code or a display",
        "expression" : "code.exists() or display.exists()",
        "xpath" : "exists(f:code) or exists(f:display)"
      },
      {
        "key" : "vsd-9",
        "severity" : "error",
        "human" : "Must have a code if not abstract",
        "expression" : "code.exists() or abstract = true",
        "xpath" : "exists(f:code) or (f:abstract/@value = true())"
      },
      {
        "key" : "vsd-10",
        "severity" : "error",
        "human" : "Must have a system if a code is present",
        "expression" : "code.empty() or system.exists()",
        "xpath" : "exists(f:system) or not(exists(f:code))"
      }]
    },
    {
      "id" : "ValueSet.expansion.contains.system",
      "path" : "ValueSet.expansion.contains.system",
      "short" : "System value for the code",
      "definition" : "An absolute URI which is the code system in which the code for this item in the expansion is defined.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "uri"
      }]
    },
    {
      "id" : "ValueSet.expansion.contains.abstract",
      "path" : "ValueSet.expansion.contains.abstract",
      "short" : "If user cannot select this entry",
      "definition" : "If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.",
      "comment" : "This should not be understood to exclude its use for searching (e.g. by subsumption testing). The client should know whether it is appropriate for the user to select an abstract code or not.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      }],
      "meaningWhenMissing" : "If this is not populated, systems can assume that the concept it not abstract. This SHALL always be populated for abstract concepts"
    },
    {
      "id" : "ValueSet.expansion.contains.inactive",
      "path" : "ValueSet.expansion.contains.inactive",
      "short" : "If concept is inactive in the code system",
      "definition" : "If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).",
      "comment" : "This should only have a value if the concept is inactive.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "boolean"
      }]
    },
    {
      "id" : "ValueSet.expansion.contains.version",
      "path" : "ValueSet.expansion.contains.version",
      "short" : "Version in which this code/display is defined",
      "definition" : "The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "comment" : "The exact value of the version string is specified by the system from which the code is derived.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }]
    },
    {
      "id" : "ValueSet.expansion.contains.code",
      "path" : "ValueSet.expansion.contains.code",
      "short" : "Code - if blank, this is not a selectable code",
      "definition" : "The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "code"
      }],
      "condition" : ["vsd-6"]
    },
    {
      "id" : "ValueSet.expansion.contains.display",
      "path" : "ValueSet.expansion.contains.display",
      "short" : "User display for the concept",
      "definition" : "The recommended display for this item in the expansion.",
      "min" : 0,
      "max" : "1",
      "type" : [{
        "code" : "string"
      }],
      "condition" : ["vsd-6"]
    },
    {
      "id" : "ValueSet.expansion.contains.designation",
      "path" : "ValueSet.expansion.contains.designation",
      "short" : "Additional representations for this item",
      "definition" : "Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.",
      "comment" : "The designations provided must be based on the value set and code system definitions.",
      "min" : 0,
      "max" : "*",
      "contentReference" : "#ValueSet.compose.include.concept.designation"
    },
    {
      "id" : "ValueSet.expansion.contains.contains",
      "path" : "ValueSet.expansion.contains.contains",
      "short" : "Codes contained under this entry",
      "definition" : "Other codes and entries contained under this entry in the hierarchy.",
      "comment" : "If the expansion uses this element, there is  no implication about the logical relationship between them, and the  structure cannot be used for logical inferencing. The structure  exists to provide navigational assistance for helping human users to  locate codes in the expansion.",
      "min" : 0,
      "max" : "*",
      "contentReference" : "#ValueSet.expansion.contains"
    }]
  }
}


