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§
- Depends
OnView - A
depends-onentry in the Library’srelatedArtifact. The SQLQuery profile requiresrelatedArtifact.resourceto be a canonical URL — inline ViewDefinition resources are not part of the profile and are rejected. - Library
Parameter - One row’s worth of metadata from
Library.parameter.use=inonly. - SqlQuery
Library - 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.codevalue the SQLQuery profile fixes.- LIBRARY_
TYPE_ SYSTEM Library.type.coding.systemvalue 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.