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.
<CarePlan xmlns="http://hl7.org/fhir"> <id value="core-examples-CarePlan-example9" /> <meta> <versionId value="3" /> <lastUpdated value="2016-09-08T11:58:18.832+00:00" /> </meta> <text> <status value="additional" /> --- We have skipped the narrative for better readability of the resource --- </text> <contained> <Condition> <id value="p1" /> <patient> <reference value="Patient/1" /> <display value="Eve Everywoman" /> </patient> <code> <text value="pregnancy" /> </code> <verificationStatus value="confirmed" /> </Condition> </contained> <contained> <Practitioner> <id value="pr1" /> <name> <family value="Midwife" /> <given value="Mavis" /> </name> <practitionerRole> <specialty> <text value="Midwife" /> </specialty> </practitionerRole> </Practitioner> </contained> <contained> <Practitioner> <id value="pr2" /> <name> <family value="Obstetrician" /> <given value="Oscar" /> </name> <practitionerRole> <specialty> <text value="Obstetrician" /> </specialty> </practitionerRole> </Practitioner> </contained> <contained> <Goal> <id value="goal" /> <subject> <reference value="Patient/1" /> <display value="Eve Everywoman" /> </subject> <description value="Maintain patient's health throughout pregnancy and ensure a healthy child" /> <status value="in-progress" /> </Goal> </contained> <extension url="http://example.org/DoNotUse/careplan#lmp"> <valueDateTime value="2013-01-01" /> </extension> <subject> <reference value="Patient/1" /> <display value="Eve Everywoman" /> </subject> <status value="active" /> <period> <start value="2013-01-01" /> <end value="2013-10-01" /> </period> <addresses> <reference value="#p1" /> <display value="pregnancy" /> </addresses> <participant> <role> <coding> <system value="http://example.org/mysys" /> <code value="lmc" /> </coding> <text value="Midwife" /> </role> <member> <reference value="#pr1" /> <display value="Mavis Midwife" /> </member> </participant> <participant> <role> <coding> <system value="http://example.org/mysys" /> <code value="obs" /> </coding> <text value="Obstretitian" /> </role> <member> <reference value="#pr2" /> <display value="Oscar Obstetrician" /> </member> </participant> <goal> <reference value="#goal" /> </goal> <activity> <extension url="http://example.org/DoNotUse/careplan#andetails"> <valueUri value="http://orionhealth.com/fhir/careplan/1andetails" /> </extension> <detail> <category> <coding> <system value="http://hl7.org/fhir/care-plan-activity-category" /> <code value="encounter" /> </coding> </category> <code> <coding> <system value="http://example.org/mySystem" /> <code value="1an" /> </coding> <text value="First Antenatal encounter" /> </code> <status value="scheduled" /> <prohibited value="false" /> <scheduledTiming> <repeat> <boundsPeriod> <start value="2013-02-14" /> <end value="2013-02-28" /> </boundsPeriod> </repeat> </scheduledTiming> <performer> <reference value="#pr1" /> <display value="Mavis Midwife" /> </performer> <description value="The first antenatal encounter. This is where a detailed physical examination is performed. and the pregnanacy discussed with the mother-to-be." /> </detail> </activity> <activity> <detail> <category> <coding> <system value="http://hl7.org/fhir/care-plan-activity-category" /> <code value="encounter" /> </coding> </category> <code> <coding> <system value="http://example.org/mySystem" /> <code value="an" /> </coding> <text value="Follow-up Antenatal encounter" /> </code> <status value="not-started" /> <prohibited value="false" /> <scheduledTiming> <repeat> <boundsPeriod> <start value="2013-03-01" /> <end value="2013-03-14" /> </boundsPeriod> </repeat> </scheduledTiming> <performer> <reference value="#pr1" /> <display value="Mavis Midwife" /> </performer> <description value="The second antenatal encounter. Discuss any issues that arose from the first antenatal encounter" /> </detail> </activity> <activity> <detail> <category> <coding> <system value="http://hl7.org/fhir/care-plan-activity-category" /> <code value="encounter" /> </coding> </category> <code> <coding> <system value="http://example.org/mySystem" /> <code value="del" /> </coding> <text value="Delivery" /> </code> <status value="not-started" /> <prohibited value="false" /> <scheduledTiming> <repeat> <boundsPeriod> <start value="2013-09-01" /> <end value="2013-09-14" /> </boundsPeriod> </repeat> </scheduledTiming> <performer> <reference value="#pr1" /> <display value="Mavis Midwife" /> </performer> <description value="The delivery." /> </detail> </activity> </CarePlan>