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.
{ "resourceType": "Bundle", "id": "PSON-example-Bundle-01", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-bundle|0.10.0" ] }, "identifier": { "system": "http://ontariohealth.ca/fhir/NamingSystem/id-acme-centre-epic-ps-document", "value": "435ea7cf-4b72-4718-aa98-4175b6086ecc" }, "type": "document", "timestamp": "12/11/2021 13:30:00", "entry": [ { "fullUrl": "urn:uuid:d792b9de-b97a-4319-b34c-a3fe012ddfa2", "resource": { "resourceType": "Composition", "identifier": { "system": "http://ontariohealth.ca/fhir/NamingSystem/id-acme-centre-epic-ps-document", "value": "435ea7cf-4b72-4718-aa98-4175b6086ecc" }, "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-composition|0.12.0" ] }, "status": "final", "type": { "coding": [ { "system": "http://loinc.org", "code": "60591-5", "display": "Patient summary Document" } ] }, "subject": { "reference": "urn:uuid:a0df9da6-3157-4b72-95f1-729853718c09" }, "date": "12/11/2021 13:30:00", "author": [ { "reference": "urn:uuid:76ff8f74-03c7-436f-a3e0-71ac9503c1a2" }, { "reference": "urn:uuid:76ff8f74-03c7-436f-a3e0-71ac9514b1d3" } ], "title": "Ontario Patient Summary", "attester": [ { "mode": "official", "time": "12/11/2021 13:30:00", "party": { "reference": "urn:uuid:5f85e9b2-80b4-40ac-a4db-5971ee33f6b7" } } ], "custodian": { "reference": "urn:uuid:5f85e9b2-80b4-40ac-a4db-5971ee33f6b7" }, "event": [ { "code": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-ActClass", "code": "PCPR" } ] } ], "period": { "end": "12/11/2021 13:30:00" } } ], "section": [ { "title": "Problems", "code": { "coding": [ { "system": "http://loinc.org", "code": "11450-4", "display": "Problem list - Reported" } ] }, "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Problems</p></div>" }, "entry": [ { "reference": "urn:uuid:7cd8b889-5456-43d4-935c-abc10791ebd6" } ] }, { "title": "Medication", "code": { "coding": [ { "system": "http://loinc.org", "code": "10160-0", "display": "History of Medication use Narrative" } ] }, "entry": [ { "reference": "urn:uuid:fe376aa6-83fb-4d0e-be60-ad959c57114f" } ], "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Medication History</p></div>" } }, { "title": "Allergies and Intolerances", "code": { "coding": [ { "system": "http://loinc.org", "code": "48765-2", "display": "Allergies and adverse reactions Document" } ] }, "entry": [ { "reference": "urn:uuid:4056cffb-1f82-4478-95b5-54837deb23fc" } ], "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Allergies and Intolerances</p></div>" } }, { "title": "History of Procedures", "code": { "coding": [ { "system": "http://loinc.org", "code": "47519-4", "display": "History of Procedures Document" } ] }, "entry": [ { "reference": "urn:uuid:55500340-936a-41e5-a003-e8ed0576b250" } ], "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>History of Procedures</p></div>" } }, { "title": "Past History of Illness", "code": { "coding": [ { "system": "http://loinc.org", "code": "11348-0", "display": "History of Past illness Narrative" } ] }, "entry": [ { "reference": "urn:uuid:497e1a22-5107-4e51-99b6-87fc16342b33" } ], "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Past History of Illness</p></div>" } }, { "title": "Immunizations", "code": { "coding": [ { "system": "http://loinc.org", "code": "11369-6", "display": "History of Immunization Narrative" } ] }, "entry": [ { "reference": "urn:uuid:381abb24-2ed5-4149-853e-6e9b45106b1d" } ], "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Immunizations</p></div>" } } ] } }, { "fullUrl": "urn:uuid:a0df9da6-3157-4b72-95f1-729853718c09", "resource": { "resourceType": "Patient", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-patient|0.12.0" ] }, "identifier": [ { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "JHN" } ] }, "system": "https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-patient-hcn", "value": "1234567891" } ], "name": [ { "family": "Doe", "given": [ "Jane" ] } ], "telecom": [ { "system": "phone", "value": "1 (555) 867 5309" }, { "system": "email", "value": "janedoe@example.com" } ], "gender": "female", "birthDate": "1951-02-19", "address": [ { "use": "home", "type": "physical", "line": [ "123 Any Street" ], "city": "Waterloo", "state": "ON", "postalCode": "N2L 3G1" } ], "contact": [ { "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0131", "code": "C", "display": "Emergency Contact" } ], "text": "Emergency Contact" } ], "name": { "family": "Doe", "given": [ "John" ] }, "telecom": [ { "system": "phone", "value": "(555) 555 1212" } ], "address": { "line": [ "50 Another St.", "Unit 2" ], "city": "Waterloo", "state": "ON", "postalCode": "N2L 3G2" } } ], "generalPractitioner": [ { "reference": "urn:uuid:76ff8f74-03c7-436f-a3e0-71ac9503c1a2" } ] } }, { "fullUrl": "urn:uuid:76ff8f74-03c7-436f-a3e0-71ac9514b1d3", "resource": { "resourceType": "Device", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-device|0.10.0" ] }, "identifier": [ { "system": "http://ehealthontario.ca/fhir/NamingSystem/id-oneid-clientid", "value": "OHQAPSCDRContributor_Acme_EMR" } ], "deviceName": [ { "name": "Acme Electronic Medical Record System", "type": "user-friendly-name" } ] } }, { "fullUrl": "urn:uuid:4288fe45-c95e-492c-8527-a9045296f632", "resource": { "resourceType": "Practitioner", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-practitioner|0.10.0" ] }, "identifier": [ { "system": "https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-license-physician", "value": "111789" } ], "name": [ { "use": "official", "family": "Jones", "given": [ "Jack" ] } ], "telecom": [ { "system": "phone", "value": "(555) 987-1234", "use": "work" }, { "system": "fax", "value": "(555) 987-1234", "use": "work" } ] } }, { "fullUrl": "urn:uuid:76ff8f74-03c7-436f-a3e0-71ac9503c1a2", "resource": { "resourceType": "PractitionerRole", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-practitionerrole|0.10.0" ] }, "practitioner": { "reference": "urn:uuid:4288fe45-c95e-492c-8527-a9045296f632", "display": "Dr Jack Jones" }, "organization": { "reference": "urn:uuid:5f85e9b2-80b4-40ac-a4db-5971ee33f6b7", "display": "Primary Care Medical Clinics" } } }, { "fullUrl": "urn:uuid:5f85e9b2-80b4-40ac-a4db-5971ee33f6b7", "resource": { "resourceType": "Organization", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-organization|0.10.0" ] }, "identifier": [ { "system": "https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-health-care-facility-id", "value": "4664" } ], "name": "South East LHIN" } }, { "fullUrl": "urn:uuid:7cd8b889-5456-43d4-935c-abc10791ebd6", "resource": { "resourceType": "Condition", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-condition|0.12.0" ] }, "clinicalStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", "code": "active", "display": "Active" } ] }, "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-category", "code": "problem-list-item", "display": "Problem List Item" } ] } ], "code": { "coding": [ { "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/20611000087101", "code": "44054006", "display": "Diabetes mellitus type 2" } ], "text": "Diabetes mellitus type 2" }, "subject": { "reference": "urn:uuid:a0df9da6-3157-4b72-95f1-729853718c09" }, "onsetDateTime": "2014", "asserter": { "reference": "urn:uuid:76ff8f74-03c7-436f-a3e0-71ac9503c1a2" } } }, { "fullUrl": "urn:uuid:497e1a22-5107-4e51-99b6-87fc16342b33", "resource": { "resourceType": "Condition", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-condition|0.12.0" ] }, "clinicalStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", "code": "inactive", "display": "Inactive" } ] }, "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed" } ] }, "category": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/condition-category", "code": "problem-list-item", "display": "Problem List Item" } ] } ], "code": { "coding": [ { "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/20611000087101", "code": "254651007", "display": "Squamous cell carcinoma of skin" } ], "text": "Squamous cell carcinoma of skin" }, "subject": { "reference": "urn:uuid:a0df9da6-3157-4b72-95f1-729853718c09" }, "onsetDateTime": "2010", "asserter": { "reference": "urn:uuid:76ff8f74-03c7-436f-a3e0-71ac9503c1a2" } } }, { "fullUrl": "urn:uuid:fe376aa6-83fb-4d0e-be60-ad959c57114f", "resource": { "resourceType": "MedicationStatement", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-medicationstatement|0.10.0" ] }, "status": "active", "medicationReference": { "reference": "urn:uuid:c6222017-94f6-4dbc-8958-fcdf9df3356a" }, "subject": { "reference": "urn:uuid:a0df9da6-3157-4b72-95f1-729853718c09" }, "effectivePeriod": { "start": "2014" }, "informationSource": { "reference": "urn:uuid:76ff8f74-03c7-436f-a3e0-71ac9503c1a2" }, "dosage": [ { "text": "40 mg/day", "timing": { "repeat": { "frequency": 1, "period": 1, "periodUnit": "d" } }, "doseAndRate": [ { "doseQuantity": { "value": 40, "unit": "mg", "system": "http://unitsofmeasure.org", "code": "mg" } } ] } ] } }, { "fullUrl": "urn:uuid:c6222017-94f6-4dbc-8958-fcdf9df3356a", "resource": { "resourceType": "Medication", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-medication|0.11.0" ] }, "code": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/hc-CCDD", "code": "9000643", "display": "simvastatin 40 mg oral tablet" } ], "text": "simvastatin 40 mg oral tablet" }, "form": { "coding": [ { "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/20611000087101", "code": "385057009", "display": "Film-coated tablet" } ] } } }, { "fullUrl": "urn:uuid:4056cffb-1f82-4478-95b5-54837deb23fc", "resource": { "resourceType": "AllergyIntolerance", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-allergyintolerance|0.10.0" ] }, "clinicalStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", "code": "active" } ] }, "verificationStatus": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", "code": "confirmed" } ] }, "code": { "coding": [ { "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/20611000087101", "code": "256303006", "display": "Ragweed pollen" } ], "text": "Ragweed pollen" }, "patient": { "reference": "urn:uuid:a0df9da6-3157-4b72-95f1-729853718c09" }, "reaction": [ { "manifestation": [ { "coding": [ { "system": "http://snomed.info/sct", "code": "418290006", "display": "Itching" } ], "text": "Itching" } ], "severity": "severe" } ] } }, { "fullUrl": "urn:uuid:381abb24-2ed5-4149-853e-6e9b45106b1d", "resource": { "resourceType": "Immunization", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-immunization|0.10.0" ] }, "status": "completed", "vaccineCode": { "coding": [ { "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/20611000087101", "code": "7891000087104", "display": "Adult vaccine product containing only tetanus + diphtheria low dose + acellular pertussis low dose + inactivated human poliovirus antigens (medicinal product)" } ], "text": "Tetanus + Diphtheria + Pertussis + Polio" }, "patient": { "reference": "urn:uuid:a0df9da6-3157-4b72-95f1-729853718c09" }, "occurrenceDateTime": "06/03/1998 22:00:00", "site": { "coding": [ { "system": "http://snomed.info/sct", "code": "11207009", "display": "Right thigh" } ], "text": "Right thigh" }, "route": { "coding": [ { "system": "http://snomed.info/sct", "code": "78421000", "display": "Intramuscular use" } ], "text": "Intramuscular use" } } }, { "fullUrl": "urn:uuid:55500340-936a-41e5-a003-e8ed0576b250", "resource": { "resourceType": "Procedure", "meta": { "profile": [ "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-procedure|0.11.0" ] }, "status": "completed", "code": { "coding": [ { "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/20611000087101", "code": "233404000", "display": "Insertion of arterial stent" }, { "system": "http://snomed.info/sct", "version": "http://snomed.info/sct/20611000087101", "code": "233258006", "display": "Balloon angioplasty of artery" } ], "text": "Previous balloon angioplasty on mid-LAD stenosis with STENT Implantation" }, "subject": { "reference": "urn:uuid:a0df9da6-3157-4b72-95f1-729853718c09" }, "performedPeriod": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", "valueCode": "unknown" } ] } } } ] }