description: 'A ViewDefinition represents a tabular projection of a FHIR resource, where the columns and inclusion \ncriteria are defined by FHIRPath expressions. ' package_name: org.sql-on-fhir.ig derivation: specialization name: ViewDefinition type: https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition elements: description: {type: markdown, short: Natural language description of the view definition, index: 9} where: type: BackboneElement short: A series of zero or more FHIRPath constraints to filter resources for the view. array: true index: 51 elements: path: {type: string, short: A FHIRPath expression defining a filter condition, index: 52} description: {type: string, short: A human-readable description of the above where constraint., index: 53} required: [path] meta: {type: Meta, short: Metadata about the view definition, index: 4} publisher: {type: string, short: Name of the publisher/steward (organization or individual), index: 7} 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: 13 name: type: string short: Name of view definition (computer and database friendly) 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: https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition severity: error expression: empty() or matches('^[A-Za-z][A-Za-z0-9_]*$') index: 2 constant: type: BackboneElement short: Constant that can be used in FHIRPath expressions array: true index: 14 elements: valueBase64Binary: {type: base64Binary, short: Value of constant, choiceOf: value, index: 18} valueCode: {type: code, short: Value of constant, choiceOf: value, index: 21} valueUri: {type: uri, short: Value of constant, choiceOf: value, index: 34} valueTime: {type: time, short: Value of constant, choiceOf: value, index: 32} valueDecimal: {type: decimal, short: Value of constant, choiceOf: value, index: 24} valueCanonical: {type: canonical, short: Value of constant, choiceOf: value, index: 20} 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: https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition severity: error expression: empty() or matches('^[A-Za-z][A-Za-z0-9_]*$') index: 15 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: 17 valueString: {type: string, short: Value of constant, choiceOf: value, index: 30} valueBoolean: {type: boolean, short: Value of constant, choiceOf: value, index: 19} valueInstant: {type: instant, short: Value of constant, choiceOf: value, index: 26} valueDateTime: {type: dateTime, short: Value of constant, choiceOf: value, index: 23} valueDate: {type: date, short: Value of constant, choiceOf: value, index: 22} valueInteger64: {type: integer64, short: Value of constant, choiceOf: value, index: 28} valueUuid: {type: uuid, short: Value of constant, choiceOf: value, index: 36} valueInteger: {type: integer, short: Value of constant, choiceOf: value, index: 27} valueUnsignedInt: {type: unsignedInt, short: Value of constant, choiceOf: value, index: 33} valueOid: {type: oid, short: Value of constant, choiceOf: value, index: 29} valuePositiveInt: {type: positiveInt, short: Value of constant, choiceOf: value, index: 31} valueId: {type: id, short: Value of constant, choiceOf: value, index: 25} valueUrl: {type: url, short: Value of constant, choiceOf: value, index: 35} required: [valueBase64Binary, valueUri, valueString, valueCode, valuePositiveInt, valueCanonical, valueDecimal, valueDateTime, name, valueInstant, value, valueBoolean, valueDate, valueInteger64, valueUnsignedInt, valueUuid, valueTime, valueId, valueUrl, valueOid, valueInteger] useContext: {type: UsageContext, short: The context that the content is intended to support, array: true, index: 10} copyright: {type: markdown, short: Use and/or publishing restrictions, index: 11} experimental: {type: boolean, short: 'For testing purposes, not real usage', index: 6} title: {type: string, short: Name for this view definition (human friendly), index: 3} status: type: code short: draft | active | retired | unknown binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/publication-status'} index: 5 resource: type: code short: FHIR resource for the ViewDefinition binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/resource-types'} index: 12 url: {type: uri, short: 'Canonical identifier for this view definition, represented as a URI (globally unique)', index: 0} identifier: {type: Identifier, short: Additional identifier for the view definition, index: 1} contact: {type: ContactDetail, short: Contact details for the publisher, array: true, index: 8} 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` or `forEachOrNull`., source: 'https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition', severity: error, expression: (forEach | forEachOrNull).count() <= 1} array: true min: 1 index: 37 elements: column: type: BackboneElement short: A column to be produced in the resulting table. array: true index: 38 elements: path: {type: string, short: FHIRPath expression that creates a column and defines its content, index: 39} 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: https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition severity: error expression: empty() or matches('^[A-Za-z][A-Za-z0-9_]*$') index: 40 description: {type: markdown, short: Description of the column, index: 41} collection: {type: boolean, short: Indicates whether the column may have multiple values., index: 42} type: {type: uri, short: A FHIR StructureDefinition URI for the column's type., index: 43} tag: type: BackboneElement short: Additional metadata describing the column array: true index: 44 elements: name: {type: string, short: Name of tag, index: 45} value: {type: string, short: Value of tag, index: 46} required: [name, value] required: [path, name] select: short: Nested select relative to a parent expression. elementReference: ['https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition', elements, org/ig/StructureDefinition/ViewDefinition#ViewDefinition, elements, select] array: true index: 47 forEach: {type: string, short: A FHIRPath expression to retrieve the parent element(s) used in the containing select. The default is effectively `$this`., index: 48} forEachOrNull: {type: string, short: 'Same as forEach, but will produce a row with null values if the collection is empty.', index: 49} unionAll: short: Creates a union of all rows in the given selection structures. elementReference: ['https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition', elements, org/ig/StructureDefinition/ViewDefinition#ViewDefinition, elements, select] array: true index: 50 package_version: 2.0.0 class: logical kind: logical url: https://sql-on-fhir.org/ig/StructureDefinition/ViewDefinition base: http://hl7.org/fhir/StructureDefinition/Base version: 2.0.0 required: [resource, select, status]