Visual Studio Code extension for writing FHIR resources with SQL.
Provides snippets for easily writing FHIR resources with SQL queries. Each snippet corresponds to a FHIR datatype.
In a SQL file, every command starts with the prefix fhir
.
fhirbuildobject
:
json_build_object()
fhirbuildarray
:
json_build_array()
fhirselect
:
SELECT
AS fhir
FROM
fhir{datatype}
to create a datatype. For exemple, with fhiridentifier
:
'identifier',
json_build_array(
json_build_object(
'use', ,
'type', json_build_object(
'text', ,
'coding',
json_build_array(
json_build_object(
'system', ,
'version', ,
'code', ,
'display', ,
'userSelected', ,
)
),
),
'system', ,
'value', ,
'period', json_build_object(
'start', ,
'end',
),
'assigner', ,
),
),
fhirRef{reference}
to create a reference. For exemple, with fhirRefsubject
:
'subject',
json_build_object(
,
,
:: TEXT
)
Command name | Utility |
---|---|
fhirselect | creates a sql SELECT request |
fhirbuildobject | creates a fhir_build_object() |
fhirbuildarray | creates a fhir_build_array() |
Command name | Data-type |
---|---|
fhiridentifier | Identifier |
fhircoding | Coding |
fhirratio | Ratio |
fhirperiod | Period |
fhirrange | Range |
fhirratioRange | RatioRange |
fhirattachement | Attachement |
fhirannotation | Annotation |
fhirhumanName | HumanName |
fhircodeableConcept | CodeableConcept |
fhirtiming | Timing |
fhirmoney | Money |
fhiraddress | Address |
fhirquantity | Quantity |
fhirsimpleQuantity | SimpleQuantity* |
fhirmoneyQuantity | MoneyQuantity* |
fhircount | Count* |
fhirduration | Duration* |
fhirdistance | Distance* |
fhirage | Age* |
fhirsampledData | SampledData |
fhirsignature | Signature |
fhircontactPoint | ContactPoint |
Command name | Data-type |
---|---|
fhirExtension | Extension |
fhirMeta | Meta |
sqltofhir functions arkhn
Command name | Data-type |
---|---|
fhirRefsubject | Subject |