Skip to main content

Module library

Module library 

Source
Expand description

Parse a SQLQuery Library (FHIR Library profile) into the parts the engine needs: the SQL string, parameter declarations, and depends-on ViewDefinitions.

See https://build.fhir.org/ig/FHIR/sql-on-fhir-v2/StructureDefinition-SQLQuery.html

Structs§

DependsOnView
A depends-on entry in the Library’s relatedArtifact. The SQLQuery profile requires relatedArtifact.resource to be a canonical URL — inline ViewDefinition resources are not part of the profile and are rejected.
LibraryParameter
One row’s worth of metadata from Library.parameter. use=in only.
SqlQueryLibrary
A parsed SQLQuery Library.

Constants§

ENGINE_DIALECT
SQL dialect the engine speaks. Used to pick the most specific application/sql;dialect=… content attachment.
LIBRARY_TYPE_CODE
Library.type.coding.code value the SQLQuery profile fixes.
LIBRARY_TYPE_SYSTEM
Library.type.coding.system value the SQLQuery profile fixes.

Functions§

is_valid_sql_label
Spec invariant sql-name: ^[A-Za-z][A-Za-z0-9_]*$.
parse_sqlquery_library
Parses a Library resource JSON into a SqlQueryLibrary.