FQL is a query language that allows you to retrieve, filter and project data from any data source containing FHIR Resources. It brings the power of three existing languages together: SQL, JSON and FhirPath. It allows you to create tables and is useful for gaining insight and perform quality control.
<Provenance xmlns="http://hl7.org/fhir"> <meta> <profile value="https://pta.kanta.fi/fhir/StructureDefinition/AppointmentProvenance" /> </meta> <language value="fi" /> <contained> <Patient> <id value="PAT1" /> <meta> <profile value="https://pta.kanta.fi/fhir/StructureDefinition/AppointmentPatient" /> </meta> <identifier> <use value="official" /> <system value="urn:oid:1.2.246.21" /> <value value="300111A9001" /> </identifier> <identifier> <use value="old" /> <system value="urn:oid:1.2.246.10.12345678.22.2023" /> <value value="1122" /> </identifier> <name> <use value="official" /> <family value="Koski" /> <given value="Iida" /> <given value="Maria" /> </name> <birthDate value="2011-01-30" /> </Patient> </contained> <contained> <Practitioner> <id value="PRACTITIONER1" /> <meta> <profile value="https://pta.kanta.fi/fhir/StructureDefinition/AppointmentPractitioner" /> </meta> <identifier> <system value="urn:oid:1.2.246.537.26" /> <value value="032763" /> </identifier> <name> <use value="official" /> <family value="Seppä" /> <given value="Aili" /> <given value="Sini" /> </name> </Practitioner> </contained> <contained> <Device> <id value="DEVICE1" /> <meta> <profile value="https://gen.kanta.fi/fhir/StructureDefinition/KantaDevice" /> </meta> <identifier> <system value="urn:oid:1.2.246.537.6.12.999.2003.34" /> <value value="345675" /> </identifier> <deviceName> <name value="Tietojärjestelmän nimi Valviran tietojärjestelmärekisterin sosiaali- ja terveydenhuollon tietojärjestelmistä mukaan" /> <type value="other" /> </deviceName> <version> <value value="Versio xyz" /> </version> </Device> </contained> <extension url="https://gen.kanta.fi/fhir/StructureDefinition/extension/serviceEvent"> <valueIdentifier> <system value="urn:ietf:rfc:3986" /> <value value="urn:oid:1.2.246.10.99999773.14.2024.123" /> </valueIdentifier> </extension> <extension url="https://gen.kanta.fi/fhir/StructureDefinition/extension/Status"> <valueCoding> <system value="urn:oid:1.2.246.537.5.40154.2008" /> <code value="3" /> <display value="Arkistointivalmis" /> </valueCoding> </extension> <extension url="https://gen.kanta.fi/fhir/StructureDefinition/extension/RegisterType"> <valueCoding> <system value="urn:oid:1.2.246.537.5.40150.2009" /> <code value="2" /> <display value="Julkinen terveydenhuolto" /> </valueCoding> </extension> <target> <reference value="urn:uuid:ce5ea340-adfd-40f2-87d4-a25e4f8bf143" /> <display value="Ajanvaraus" /> </target> <recorded value="2023-05-10T09:02:00+00:00" /> <agent> <role> <coding> <system value="http://gen.kanta.fi/figen-cs-provenancerolecategory" /> <code value="3" /> <display value="Asiakas tai potilas, jota resurssi koskee" /> </coding> </role> <who> <reference value="#PAT1" /> </who> </agent> <agent> <role> <coding> <system value="http://gen.kanta.fi/figen-cs-provenancerolecategory" /> <code value="2" /> <display value="Resurssin tallentanut ammattihenkilö" /> </coding> </role> <who> <reference value="#PRACTITIONER1" /> </who> </agent> <agent> <role> <coding> <system value="http://gen.kanta.fi/figen-cs-provenancerolecategory" /> <code value="7" /> <display value="Resurssin tallentaneen ammattihenkilön palveluyksikkö" /> </coding> </role> <who> <identifier> <system value="urn:ietf:rfc:3986" /> <value value="urn:oid:1.2.246.10.99999773.10.20.1014" /> </identifier> <display value="Asiakaspalvelu, Kirkonkylän sosiaali- ja terveystoimi" /> </who> </agent> <agent> <role> <coding> <system value="http://gen.kanta.fi/figen-cs-provenancerolecategory" /> <code value="1" /> <display value="Resurssin rekisterinpitäjä" /> </coding> </role> <who> <identifier> <system value="urn:ietf:rfc:3986" /> <value value="urn:oid:1.2.246.10.99999773.19.0" /> </identifier> <display value="Hämeen hyvinvointialueen rekisterinpitäjä" /> </who> </agent> <agent> <role> <coding> <system value="http://gen.kanta.fi/figen-cs-provenancerolecategory" /> <code value="13" /> <display value="Resurssin tuottanut palveluntuottaja" /> </coding> </role> <who> <identifier> <system value="urn:ietf:rfc:3986" /> <value value="urn:oid:1.2.246.10.99999773.10.0" /> </identifier> <display value="Hämeen hyvinvointialue" /> </who> </agent> <agent> <role> <coding> <system value="http://gen.kanta.fi/figen-cs-provenancerolecategory" /> <code value="10" /> <display value="Palvelunjärjestäjä" /> </coding> </role> <who> <identifier> <system value="urn:ietf:rfc:3986" /> <value value="urn:oid:1.2.246.10.99999773.10.0" /> </identifier> <display value="Hämeen hyvinvointialue" /> </who> </agent> <agent> <role> <coding> <system value="http://gen.kanta.fi/figen-cs-provenancerolecategory" /> <code value="4" /> <display value="Resurssin tuottanut tietojärjestelmä" /> </coding> </role> <who> <reference value="#DEVICE1" /> </who> </agent> </Provenance>