FHIR © HL7.org  |  FHIRsmith 4.0.1  |  Server Home  |  XIG Home  |  XIG Stats  | 

FHIR IG analytics

Packageio.health-samurai.core.r4b
Resource TypeStructureDefinition
IdStructureDefinition-SQLView.json
FHIR VersionR4B
Sourcehttps://simplifier.net/resolve?scope=io.health-samurai.core.r4b@0.2607.0&canonical=https://sql-on-fhir.org/ig/StructureDefinition/SQLView
URLhttps://sql-on-fhir.org/ig/StructureDefinition/SQLView
Version0.2607.0
Statusdraft
Date2026-06-16T00:00:00+00:00
NameSQLView
TitleSQL View Library
Realmuv
DescriptionThe SQLView profile represents a reusable, named SQL query that other queries reference as a virtual table source, analogous to a SQL view. It bundles the SQL and its dependencies for sharing and versioning. Unlike SQLQuery, an SQLView cannot declare parameters.
TypeLibrary
Kindresource

Resources that use this resource

StructureDefinition
io.health-samurai.core.r4b#0.2607.0SQLViewSQL View Library

Resources that this resource uses

StructureDefinition
io.health-samurai.core.r4b#0.2607.0ViewDefinitionView Definition
io.health-samurai.core.r4b#0.2607.0SQLViewSQL View Library
org.sql-on-fhir.ig#currentsql-textSQL Text
ValueSet
org.sql-on-fhir.ig#currentAllSQLContentTypeCodesAll SQL Content Type Codes

Narrative

No narrative content found in resource


Source1

{
  "description": "The SQLView profile represents a reusable, named SQL query that other queries\nreference as a virtual table source, analogous to a SQL view. It bundles the\nSQL and its dependencies for sharing and versioning. Unlike SQLQuery, an\nSQLView cannot declare parameters.",
  "date": "2026-06-16T00:00:00+00:00",
  "derivation": "constraint",
  "publisher": "Health Samurai",
  "fhirVersion": "4.3.0",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001",
          "display": "World"
        }
      ]
    }
  ],
  "name": "SQLView",
  "mapping": [
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "objimpl",
      "uri": "http://hl7.org/fhir/object-implementation",
      "name": "Object Implementation Information"
    }
  ],
  "abstract": false,
  "type": "Library",
  "resourceType": "StructureDefinition",
  "title": "SQL View Library",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-implements",
      "valueUri": "http://hl7.org/fhir/StructureDefinition/MetadataResource"
    }
  ],
  "status": "draft",
  "id": "SQLView",
  "kind": "resource",
  "url": "https://sql-on-fhir.org/ig/StructureDefinition/SQLView",
  "version": "0.2607.0",
  "differential": {
    "element": [
      {
        "id": "Library",
        "path": "Library",
        "constraint": [
          {
            "key": "sql-must-be-sql-expressions",
            "severity": "error",
            "human": "The content of the Library must be SQL expressions.",
            "expression": "content.all(contentType.startsWith('application/sql'))",
            "source": "https://sql-on-fhir.org/ig/StructureDefinition/SQLView"
          }
        ]
      },
      {
        "id": "Library.type",
        "path": "Library.type",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "https://sql-on-fhir.org/ig/CodeSystem/LibraryTypesCodes",
              "code": "sql-view"
            }
          ]
        }
      },
      {
        "id": "Library.parameter",
        "path": "Library.parameter",
        "short": "Not permitted (views cannot be parameterised)",
        "max": "0"
      },
      {
        "id": "Library.relatedArtifact",
        "path": "Library.relatedArtifact",
        "mustSupport": true
      },
      {
        "id": "Library.relatedArtifact.type",
        "path": "Library.relatedArtifact.type",
        "short": "depends-on for ViewDefinition or SQLView references",
        "mustSupport": true
      },
      {
        "id": "Library.relatedArtifact.label",
        "path": "Library.relatedArtifact.label",
        "short": "Table name used in SQL view",
        "min": 1,
        "constraint": [
          {
            "key": "sql-name",
            "severity": "error",
            "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.",
            "expression": "empty() or matches('^[A-Za-z][A-Za-z0-9_]*[%content%]#39;)",
            "source": "https://sql-on-fhir.org/ig/StructureDefinition/SQLView"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Library.relatedArtifact.resource",
        "path": "Library.relatedArtifact.resource",
        "short": "Canonical URL of a ViewDefinition or SQLView",
        "min": 1,
        "type": [
          {
            "code": "canonical",
            "targetProfile": [
              "http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition",
              "https://sql-on-fhir.org/ig/StructureDefinition/SQLView"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Library.content",
        "path": "Library.content",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Library.content.extension:sqlText",
        "path": "Library.content.extension",
        "sliceName": "sqlText",
        "short": "Plain-text SQL for readability",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://sql-on-fhir.org/ig/StructureDefinition/sql-text"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Library.content.contentType",
        "path": "Library.content.contentType",
        "short": "application/sql or application/sql;dialect=...",
        "min": 1,
        "mustSupport": true,
        "binding": {
          "strength": "example",
          "valueSet": "https://sql-on-fhir.org/ig/ValueSet/AllSQLContentTypeCodes"
        }
      },
      {
        "id": "Library.content.data",
        "path": "Library.content.data",
        "short": "SQL view (base64-encoded)",
        "min": 1,
        "mustSupport": true
      }
    ]
  },
  "contact": [
    {
      "name": "SQL on FHIR Working Group",
      "telecom": [
        {
          "system": "url",
          "value": "https://sql-on-fhir.org"
        }
      ]
    }
  ],
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Library"
}