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 http://hl7.org/fhir/uv/sql-on-fhir/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_ CODE_ SQL_ VIEW Library.type.coding.codevalue the SQLView profile fixes. SQLView profiles Library the same way SQLQuery does (samedepends-on/ SQL-content shape), soparse_sqlquery_libraryaccepts both codes; the caller (crates/rest) is responsible for telling the two apart (e.g. SQLView forbidsparameter).- 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.