PackagesCanonicalsLogsProblems
    Packages
    hl7.fhir.uv.sql-on-fhir@3.0.0-ballot
    http://hl7.org/fhir/StructureDefinition/ViewDefinition
description: 'A ViewDefinition represents a tabular projection of a FHIR resource, where the columns and inclusion \ncriteria are defined by FHIRPath expressions. '
package_name: hl7.fhir.uv.sql-on-fhir
derivation: specialization
name: ViewDefinition
type: ViewDefinition
elements:
  description: {type: markdown, short: Natural language description of the view definition, index: 14}
  date: {short: Date last changed, type: dateTime, isSummary: true, index: 11}
  where:
    type: BackboneElement
    short: A series of zero or more FHIRPath constraints to filter resources for the view.
    array: true
    index: 70
    elements:
      path: {type: string, short: A FHIRPath expression defining a filter condition, index: 71}
      description: {type: string, short: A human-readable description of the above where constraint., index: 72}
    required: [path]
  endorser: {type: ContactDetail, short: Who endorsed the view definition, array: true, index: 27}
  publisher: {short: Name of the publisher/steward (organization or individual), type: string, isSummary: true, index: 12}
  approvalDate: {type: date, short: When the view definition was approved by publisher, index: 20}
  fhirVersion:
    type: code
    short: FHIR version(s) of the resource for the ViewDefinition
    binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/FHIR-version'}
    array: true
    index: 31
  jurisdiction:
    short: Intended jurisdiction for view definition (if applicable)
    type: CodeableConcept
    array: true
    binding: {strength: extensible, valueSet: 'http://hl7.org/fhir/ValueSet/jurisdiction'}
    isSummary: true
    index: 16
  purpose: {type: markdown, short: Why this view definition is defined, index: 17}
  name:
    constraint:
      sql-name:
        human: "Name is limited to letters, numbers, or underscores and cannot start with an\nunderscore -- i.e. with a regular expression of: ^[A-Za-z][A-Za-z0-9_]*$ \n\n\nThis makes it usable as table names in a wide variety of databases."
        source: http://hl7.org/fhir/StructureDefinition/ViewDefinition
        severity: error
        expression: empty() or matches('^[A-Za-z][A-Za-z0-9_]*$')
    short: Name for this view definition (computer friendly)
    type: string
    isSummary: true
    index: 7
  constant:
    type: BackboneElement
    short: Constant that can be used in FHIRPath expressions
    array: true
    index: 32
    elements:
      valueBase64Binary: {type: base64Binary, short: Value of constant, choiceOf: value, index: 36}
      valueCode: {type: code, short: Value of constant, choiceOf: value, index: 39}
      valueUri: {type: uri, short: Value of constant, choiceOf: value, index: 52}
      valueTime: {type: time, short: Value of constant, choiceOf: value, index: 50}
      valueDecimal: {type: decimal, short: Value of constant, choiceOf: value, index: 42}
      valueCanonical: {type: canonical, short: Value of constant, choiceOf: value, index: 38}
      name:
        type: string
        short: Name of constant (referred to in FHIRPath as %[name])
        constraint:
          sql-name:
            human: "Name is limited to letters, numbers, or underscores and cannot start with an\nunderscore -- i.e. with a regular expression of: ^[A-Za-z][A-Za-z0-9_]*$ \n\n\nThis makes it usable as table names in a wide variety of databases."
            source: http://hl7.org/fhir/StructureDefinition/ViewDefinition
            severity: error
            expression: empty() or matches('^[A-Za-z][A-Za-z0-9_]*$')
        index: 33
      value:
        short: Value of constant
        choices: [valueBase64Binary, valueBoolean, valueCanonical, valueCode, valueDate, valueDateTime, valueDecimal, valueId, valueInstant, valueInteger, valueInteger64, valueOid, valueString, valuePositiveInt, valueTime, valueUnsignedInt, valueUri, valueUrl, valueUuid]
        index: 35
      valueString: {type: string, short: Value of constant, choiceOf: value, index: 48}
      valueBoolean: {type: boolean, short: Value of constant, choiceOf: value, index: 37}
      valueInstant: {type: instant, short: Value of constant, choiceOf: value, index: 44}
      valueDateTime: {type: dateTime, short: Value of constant, choiceOf: value, index: 41}
      valueDate: {type: date, short: Value of constant, choiceOf: value, index: 40}
      valueInteger64: {type: integer64, short: Value of constant, choiceOf: value, index: 46}
      valueUuid: {type: uuid, short: Value of constant, choiceOf: value, index: 54}
      valueInteger: {type: integer, short: Value of constant, choiceOf: value, index: 45}
      valueUnsignedInt: {type: unsignedInt, short: Value of constant, choiceOf: value, index: 51}
      valueOid: {type: oid, short: Value of constant, choiceOf: value, index: 47}
      valuePositiveInt: {type: positiveInt, short: Value of constant, choiceOf: value, index: 49}
      valueId: {type: id, short: Value of constant, choiceOf: value, index: 43}
      valueUrl: {type: url, short: Value of constant, choiceOf: value, index: 53}
    required: [valueBase64Binary, valueUri, valueString, valueCode, valuePositiveInt, valueCanonical, valueDecimal, valueDateTime, name, valueInstant, value, valueBoolean, valueDate, valueInteger64, valueUnsignedInt, valueUuid, valueTime, valueId, valueUrl, valueOid, valueInteger]
  copyrightLabel: {short: Copyright holder and year(s), type: string, index: 19}
  useContext: {short: The context that the content is intended to support, type: UsageContext, array: true, isSummary: true, index: 15}
  copyright: {short: Use and/or publishing restrictions, type: markdown, index: 18}
  versionAlgorithm:
    short: How to compare versions
    choices: [versionAlgorithmString, versionAlgorithmCoding]
    isSummary: true
    index: 4
  experimental: {short: 'For testing purposes, not real usage', type: boolean, meaningWhenMissing: 'If absent, this resource is treated as though it is not experimental.', isSummary: true, index: 10}
  topic:
    short: E.g. Education, Treatment, Assessment, etc
    type: CodeableConcept
    array: true
    binding: {strength: example, valueSet: 'http://hl7.org/fhir/ValueSet/definition-topic'}
    index: 23
  title: {short: Name for this view definition (human friendly), type: string, isSummary: true, index: 8}
  author: {type: ContactDetail, short: Who authored the view definition, array: true, index: 24}
  versionAlgorithmCoding: {short: How to compare versions, type: Coding, choiceOf: versionAlgorithm, isSummary: true, index: 6}
  status:
    isModifier: true
    short: draft | active | retired | unknown
    type: code
    binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/publication-status'}
    isModifierReason: This is labeled as "Is Modifier" because applications should not use a retired view definition without due consideration
    isSummary: true
    index: 9
  resource:
    type: code
    short: FHIR resource for the ViewDefinition
    binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/resource-types'}
    index: 29
  url:
    constraint:
      cnl-1: {human: 'URL should not contain | or # - these characters make processing canonical references problematic', source: 'http://hl7.org/fhir/StructureDefinition/MetadataResource', severity: warning, expression: 'exists() implies matches(''^[^|# ]+$'')'}
    short: Canonical identifier for this view definition, represented as an absolute URI (globally unique)
    type: uri
    isSummary: true
    index: 0
  identifier: {short: Additional identifier for the view definition, type: Identifier, array: true, isSummary: true, index: 1}
  lastReviewDate: {short: When the view definition was last reviewed by the publisher, type: date, index: 21}
  editor: {type: ContactDetail, short: Who edited the view definition, array: true, index: 25}
  versionAlgorithmString: {short: How to compare versions, type: string, choiceOf: versionAlgorithm, isSummary: true, index: 5}
  reviewer: {type: ContactDetail, short: Who reviewed the view definition, array: true, index: 26}
  version: {short: Business version of the view definition, type: string, isSummary: true, index: 2}
  relatedArtifact: {short: 'Additional documentation, citations, etc', type: RelatedArtifact, array: true, index: 28}
  contact: {short: Contact details for the publisher, type: ContactDetail, array: true, isSummary: true, index: 13}
  profile: {type: canonical, short: FHIR profiles that this view definition was intended to be executed against, array: true, index: 30}
  effectivePeriod: {short: When the view definition is expected to be used, type: Period, isSummary: true, index: 22}
  select:
    type: BackboneElement
    short: A collection of columns and nested selects to include in the view.
    constraint:
      sql-expressions: {human: 'Can only have at most one of `forEach`, `forEachOrNull`, or `repeat`.', source: 'http://hl7.org/fhir/StructureDefinition/ViewDefinition', severity: error, expression: (forEach.exists().toInteger() + forEachOrNull.exists().toInteger() + repeat.exists().toInteger()) <= 1}
    array: true
    min: 1
    index: 55
    elements:
      column:
        type: BackboneElement
        short: A column to be produced in the resulting table.
        array: true
        index: 56
        elements:
          path: {type: string, short: FHIRPath expression that creates a column and defines its content, index: 57}
          name:
            type: string
            short: Column name produced in the output
            constraint:
              sql-name:
                human: "Name is limited to letters, numbers, or underscores and cannot start with an\nunderscore -- i.e. with a regular expression of: ^[A-Za-z][A-Za-z0-9_]*$ \n\n\nThis makes it usable as table names in a wide variety of databases."
                source: http://hl7.org/fhir/StructureDefinition/ViewDefinition
                severity: error
                expression: empty() or matches('^[A-Za-z][A-Za-z0-9_]*$')
            index: 58
          description: {type: markdown, short: Description of the column, index: 59}
          collection: {type: boolean, short: Indicates whether the column may have multiple values., index: 60}
          type: {type: uri, short: A FHIR StructureDefinition URI for the column's type., index: 61}
          tag:
            type: BackboneElement
            short: Additional metadata describing the column
            array: true
            index: 62
            elements:
              name: {type: string, short: Name of tag, index: 63}
              value: {type: string, short: Value of tag, index: 64}
            required: [name, value]
        required: [path, name]
      select:
        short: Nested select relative to a parent expression.
        elementReference: ['http://hl7.org/fhir/StructureDefinition/ViewDefinition', elements, org/fhir/StructureDefinition/ViewDefinition#ViewDefinition, elements, select]
        array: true
        index: 65
      forEach: {type: string, short: A FHIRPath expression to retrieve the parent element(s) used in the containing select. The default is effectively `$this`., index: 66}
      forEachOrNull: {type: string, short: 'Same as forEach, but will produce a row with null values if the collection is empty.', index: 67}
      repeat: {type: string, short: FHIRPath expressions to recursively select from., array: true, index: 68}
      unionAll:
        short: Creates a union of all rows in the given selection structures.
        elementReference: ['http://hl7.org/fhir/StructureDefinition/ViewDefinition', elements, org/fhir/StructureDefinition/ViewDefinition#ViewDefinition, elements, select]
        array: true
        index: 69
package_version: 3.0.0-ballot
class: resource
kind: resource
url: http://hl7.org/fhir/StructureDefinition/ViewDefinition
base: http://hl7.org/fhir/StructureDefinition/DomainResource
version: 3.0.0-ballot
required: [resource, select, status]