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": "Bundle-notify-add-process-request-eConsult", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/eReferralBundle|1.0.0" ] }, "type": "message", "timestamp": "10/09/2020 15:21:51", "entry": [ { "fullUrl": "urn:uuid:34913a12-51ef-4afa-8fdf-8bd65e5def11", "resource": { "resourceType": "MessageHeader", "id": "6cf3735f-c8c5-4c1d-b3a1-01e861611cf8", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-MessageHeader|1.0.1" ] }, "eventCoding": { "system": "https://ehealthontario.ca/fhir/CodeSystem/message-event-code", "code": "notify-add-process-request" }, "destination": [ { "name": "RMS Source", "endpoint": "http://rmssource.org/fhir/$process-message" } ], "author": { "reference": "urn:uuid:ed206e30-0c49-11ed-861d-0242ac120002", "display": "April May" }, "source": { "name": "RMS Target", "software": "Software", "version": "1.1.0", "contact": { "system": "email", "value": "tech.support@rmstarget.org", "rank": 1 }, "endpoint": "http://rmstarget.org/fhir/$process-message" }, "reason": { "text": "Referral request accepted and is in progress" }, "response": { "identifier": "4783C82C-683E-491D-B834-3D1B8931BDD9", "code": "ok" }, "focus": [ { "reference": "urn:uuid:688d994e-0c4a-11ed-861d-0242ac120002" } ] } }, { "fullUrl": "urn:uuid:688d994e-0c4a-11ed-861d-0242ac120002", "resource": { "resourceType": "Task", "id": "688d994e-0c4a-11ed-861d-0242ac120002", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Task|1.0.1" ] }, "basedOn": [ { "reference": "urn:uuid:cd5278a4-0c4a-11ed-861d-0242ac120002" } ], "status": "ready", "businessStatus": { "coding": [ { "system": "https://ehealthontario.ca/fhir/CodeSystem/task-business-status", "code": "NW", "display": "New" } ], "text": "New" }, "intent": "proposal", "code": { "coding": [ { "system": "https://ehealthontario.ca/fhir/CodeSystem/task-code", "code": "process-request-consult" } ], "text": "Process Request Consult" }, "authoredOn": "10/09/2020 18:40:36", "lastModified": "10/09/2020 18:40:36" } }, { "fullUrl": "urn:uuid:cd5278a4-0c4a-11ed-861d-0242ac120002", "resource": { "resourceType": "ServiceRequest", "id": "cd5278a4-0c4a-11ed-861d-0242ac120002", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-ServiceRequest|1.0.1" ] }, "extension": [ { "url": "http://ehealthontario.ca/fhir/StructureDefinition/ext-routing-options", "valueCodeableConcept": { "coding": [ { "system": "http://ehealthontario.ca/fhir/CodeSystem/ereferral-source-types", "code": "DR", "display": "Referral Source Type - Primary Care Provider" } ] } } ], "identifier": [ { "system": "http://www.rmssource.org/identifiers/ServiceRequest", "value": "request-for-assessment" } ], "status": "active", "intent": "proposal", "category": [ { "coding": [ { "system": "http://snomed.info/sct", "code": "424008009", "display": "Nursing care surveillance" } ] } ], "priority": "routine", "code": { "coding": [ { "system": "http://snomed.info/sct", "code": "105385000", "display": "Full-time nursing care at home by private nurse" } ] }, "subject": { "reference": "Patient/16717ca2-bfb3-46e5-bc33-bb038cfbe872" }, "authoredOn": "2020-10-09", "requester": { "reference": "urn:uuid:ed206e30-0c49-11ed-861d-0242ac120002", "display": "Dr Jack Jones" }, "performer": [ { "reference": "http://rmstarget.org/fhir/HealthcareService/16770" } ], "supportingInfo": [ { "reference": "QuestionnaireResponse/9f46fd82-4e12-46de-aa55-b7a243754a6c", "display": "Referral Form" } ] } }, { "fullUrl": "urn:uuid:b482437a-3ac9-4918-b075-e0b72c5fa0f4", "resource": { "resourceType": "Patient", "id": "7f7ad826-f47b-4c18-9d4a-bd3d0988ad3b", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Patient|1.0.1" ] }, "identifier": [ { "extension": [ { "url": "http://ehealthontario.ca/fhir/StructureDefinition/ext-id-health-card-version-code", "valueString": "EX" } ], "use": "official", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "JHN" } ], "text": "Ontario, Canada Personal Health Number" }, "system": "https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-patient-hcn", "value": "1234567890" }, { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ], "text": "The Hospital" }, "system": "http://ehealthontario.ca/fhir/NamingSystem/id-example1-uri", "value": "ABC12345" } ], "active": true, "name": [ { "family": "Doe", "given": [ "Jane" ] } ], "telecom": [ { "system": "phone", "value": "1 (555) 867 5309", "rank": 1 }, { "system": "email", "value": "janedoe@example.com", "rank": 2 } ], "gender": "female", "birthDate": "1951-02-19", "deceasedBoolean": false, "address": [ { "use": "home", "type": "physical", "line": [ "123 Any Street" ], "city": "Waterloo", "state": "ON", "postalCode": "N2L 3G1" } ], "contact": [ { "relationship": [ { "coding": [ { "system": "http://ehealthontario.ca/fhir/CodeSystem/patient-contact-relationship", "code": "EC", "display": "Emergency Contact" } ], "text": "Emergency Contact" } ], "name": { "family": "McContact", "given": [ "David" ] }, "telecom": [ { "system": "phone", "value": "(555) 555 1212", "rank": 1 } ], "address": { "line": [ "50 Another St.", "Unit 2" ], "city": "Waterloo", "state": "ON", "postalCode": "N2L 3G2" } } ], "communication": [ { "language": { "coding": [ { "system": "urn:ietf:bcp:47", "code": "en", "display": "English" } ], "text": "english" } } ], "generalPractitioner": [ { "reference": "urn:uuid:ed206e30-0c49-11ed-861d-0242ac120002" } ] } }, { "fullUrl": "urn:uuid:1590ce70-71d4-4038-88cf-33d723d1e2be", "resource": { "resourceType": "PractitionerRole", "id": "ed206e30-0c49-11ed-861d-0242ac120002", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-PractitionerRole|1.0.0" ] }, "identifier": [ { "use": "official", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "RRI" } ] }, "system": "http://ehealthontario.ca/fhir/NamingSystem/id-ppr-epid", "value": "56442" } ], "active": true, "practitioner": { "reference": "urn:uuid:8b9f61af-55ce-4ade-9987-f40fe54cc79e", "display": "Dr Jack Jones" }, "organization": { "reference": "urn:uuid:c2a45fde-0c4b-11ed-861d-0242ac120002", "display": "Primary Care Medical Clinics" }, "code": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/practitioner-role", "code": "doctor", "display": "Doctor" } ] } ], "specialty": [ { "coding": [ { "system": "https://fhir.infoway-inforoute.ca/CodeSystem/snomedctcaextension", "code": "394802001", "display": "General medicine" } ] } ], "location": [ { "reference": "urn:uuid:25470f9e-0092-4997-af53-aa3ef0f50879", "display": "279 Yonge St, Barrie, ON L4N 7T9" } ], "telecom": [ { "system": "phone", "value": "(555) 987-1234", "use": "work", "rank": 1 }, { "system": "fax", "value": "(555) 987-1234", "use": "work", "rank": 3 }, { "system": "email", "value": "jack.jones@example.org", "use": "work", "rank": 2 } ] } }, { "fullUrl": "urn:uuid:f03b20ad-1e96-4c84-ac3c-b69431c11b92", "resource": { "resourceType": "Practitioner", "id": "8b9f61af-55ce-4ade-9987-f40fe54cc79e", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Practitioner|1.0.0" ] }, "identifier": [ { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "LN" } ], "text": "Ontario Medical License Number" }, "system": "http://infoway-inforoute.ca/fhir/NamingSystem/ca-on-license-physician", "value": "111789" } ], "name": [ { "use": "official", "family": "Jones", "given": [ "Jack" ] } ], "telecom": [ { "system": "phone", "value": "(555) 987-1234", "use": "work", "rank": 1 }, { "system": "fax", "value": "(555) 987-1234", "use": "work", "rank": 1 } ], "address": [ { "use": "work", "type": "physical", "line": [ "279 Yonge St" ], "city": "Barrie", "state": "ON", "postalCode": "M5B 1N8", "country": "CAN" } ], "gender": "male", "birthDate": "1979-02-26", "qualification": [ { "code": { "coding": [ { "system": "https://fhir.infoway-inforoute.ca/CodeSystem/scptype", "code": "MD" } ] } } ], "communication": [ { "coding": [ { "system": "urn:ietf:bcp:47", "code": "en", "display": "English" } ], "text": "English" } ] } }, { "fullUrl": "urn:uuid:334ec4c8-7932-4620-86fe-d6b33b3fc7e4", "resource": { "resourceType": "Organization", "id": "334ec4c8-7932-4620-86fe-d6b33b3fc7e4", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Organization|1.0.0" ] }, "type": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/organization-type", "code": "prov", "display": "Healthcare Provider" } ] } ], "name": "Primary Care Medical Clinics", "telecom": [ { "system": "phone", "value": "(555) 987-1234", "use": "work", "rank": 1 }, { "system": "fax", "value": "(555) 987-1234", "use": "work", "rank": 1 } ], "address": [ { "use": "work", "type": "physical", "line": [ "279 Yonge St" ], "city": "Barrie", "state": "ON", "postalCode": "M5B 1N8", "country": "CAN" } ] } }, { "fullUrl": "urn:uuid:079e98d6-0b53-4c01-b8ba-90609aca06b1", "resource": { "resourceType": "Location", "id": "25470f9e-0092-4997-af53-aa3ef0f50879", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Location|1.0.1" ] }, "name": "Yonge Street Medical Office", "address": { "type": "physical", "line": [ "279 Yonge St" ], "city": "Barrie", "state": "ON", "postalCode": "M5B 1N8", "country": "CAN" }, "position": { "longitude": -79.38248, "latitude": 43.6556497 } } }, { "fullUrl": "urn:uuid:cd527f98-0c4a-11ed-861d-0242ac120002", "resource": { "resourceType": "PractitionerRole", "id": "cd527f98-0c4a-11ed-861d-0242ac120002", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-PractitionerRole|1.0.0" ] }, "active": true, "practitioner": { "reference": "urn:uuid:8b9f61af-55ce-4ade-9987-f40fe54cc79e", "display": "April May" }, "organization": { "reference": "urn:uuid:c2a45fde-0c4b-11ed-861d-0242ac120002", "display": "South East LHIN" }, "telecom": [ { "system": "phone", "value": "(555) 987-1234", "use": "work", "rank": 1 }, { "system": "email", "value": "april.may@example.org", "use": "work", "rank": 2 } ] } }, { "fullUrl": "urn:uuid:b083a6a2-0c4b-11ed-861d-0242ac120002", "resource": { "resourceType": "Practitioner", "id": "b083a6a2-0c4b-11ed-861d-0242ac120002", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Practitioner|1.0.0" ] }, "name": [ { "use": "official", "family": "May", "given": [ "April" ] } ] } }, { "fullUrl": "urn:uuid:c2a45fde-0c4b-11ed-861d-0242ac120002", "resource": { "resourceType": "Organization", "id": "c2a45fde-0c4b-11ed-861d-0242ac120002", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Organization|1.0.0" ] }, "identifier": [ { "use": "official", "system": "https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-health-care-facility-id", "value": "4664" } ], "active": true, "type": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/organization-type", "code": "prov", "display": "Healthcare Provider" } ] } ], "name": "South East LHIN", "telecom": [ { "system": "phone", "value": "(613) 544 7090", "use": "work", "rank": 1 } ], "address": [ { "use": "work", "type": "postal", "line": [ "1471 John Counter Blvd", "Suite 200" ], "city": "Kingston", "state": "ON", "postalCode": "K7M 8S8", "country": "CAN" } ], "contact": [ { "purpose": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/contactentity-type", "code": "PATINF", "display": "Patient" } ] }, "name": { "use": "official", "family": "Person", "given": [ "Fake", "Contact" ] }, "telecom": [ { "system": "phone", "value": "(613) 544 7090", "use": "work", "rank": 1 } ], "address": { "use": "work", "type": "postal", "line": [ "120 Yonge St" ], "city": "Barrie", "district": "Rainbow", "state": "ON", "postalCode": "L2W 3R4", "country": "CAN" } } ] } }, { "fullUrl": "urn:uuid:9f46fd82-4e12-46de-aa55-b7a243754a6c", "resource": { "resourceType": "QuestionnaireResponse", "id": "9cea3cb8-d24f-4be2-acbf-dbc6c3801493", "meta": { "profile": [ "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-QuestionnaireResponse|1.0.0" ] }, "identifier": { "system": "http://www.rmssource.org/identifiers/questionnaire-ids", "value": "9cea3cb8-d24f-4be2-acbf-dbc6c3801493" }, "status": "completed", "subject": { "reference": "urn:uuid:7f7ad826-f47b-4c18-9d4a-bd3d0988ad3b" }, "authored": "2020-10-09", "author": { "reference": "urn:uuid:ed206e30-0c49-11ed-861d-0242ac120002" }, "item": [ { "linkId": "1", "text": "Section 1 Header", "item": [ { "linkId": "1.1", "text": "String Question in Section 1", "answer": [ { "valueString": "String Answer" } ] }, { "linkId": "1.2", "text": "Boolean Question in Section 1", "answer": [ { "valueBoolean": true } ] }, { "linkId": "1.3", "text": "Number Question in Section 1", "answer": [ { "valueInteger": 365 } ] }, { "linkId": "1.4", "text": "Decimal question in Section 1", "answer": [ { "valueDecimal": 364.9 } ] }, { "linkId": "1.5", "text": "DateTime Question in Section 2", "answer": [ { "valueDateTime": "05/07/2021 13:28:17" } ] } ] }, { "linkId": "2", "text": "Section 2 Header", "item": [ { "linkId": "2.1", "text": "Integer Question in Section 2", "answer": [ { "valueInteger": 365 } ] }, { "linkId": "2.2", "text": "Multi-Select Question in Section 2", "answer": [ { "valueString": "tag1" }, { "valueString": "tag2" }, { "valueString": "tag3" } ] }, { "linkId": "2.3", "text": "Date Question in Section 2", "answer": [ { "valueDate": "2019-09-05" } ] }, { "linkId": "2.4", "text": "Time Question in Section 2", "answer": [ { "valueTime": "12:34:56" } ] } ] }, { "linkId": "3", "text": "CONDITIONAL Section 3 with Question", "answer": [ { "valueBoolean": true, "item": [ { "linkId": "3.1", "text": "Conditional Question 1:", "answer": [ { "valueString": "ConditionalAnswer1" } ] }, { "linkId": "3.2", "text": "Conditional Question 2:", "answer": [ { "valueString": "ConditionalAnswer2" } ] } ] } ] } ] } } ] }