How to open .CQL files on iOS
To open .CQL files on iOS, open the .cql file in the Files app using a text/code editor app; if no suitable editor is installed, transfer the file to a desktop system to view and validate it with CQL tooling.
Step-by-step instructions
- Open the .cql file in the Files app using a text/code editor app; if no suitable editor is installed, transfer the file to a desktop system to view and validate it with CQL tooling.
Recommended software
- Microsoft 365
- Apple Pages
- Google Docs
Alternative methods
- Open .CQL in a browser-based viewer if desktop apps fail.
- Try opening .CQL on iOS with a secondary app to rule out app-specific issues.
- Convert .CQL only with trusted tools when direct opening is not possible.
Common issues
The .cql file opens as gibberish or unexpected content
Most .cql files are plain text; if it looks like binary data or unreadable characters, the file may be misnamed, corrupted, or not actually CQL source.
- Verify the file was not renamed incorrectly and re-download or re-export it from the source system if possible.
- Try opening it in a different text editor that can detect encodings (UTF-8 is commonly expected for modern text).
It opens in the wrong application (or no app is associated)
File associations can be missing or incorrect, especially because .cql is used across different domains and isn’t always recognized automatically.
- Set your preferred text/code editor as the default app for .cql so you can reliably view/edit it.
- On Linux, ensure your desktop MIME associations are configured (many environments use the freedesktop.org shared-mime-info approach).
CQL tooling reports syntax/validation errors
Clinical Quality Language (HL7) and Contextual Query Language (SRU/SRW) have different syntaxes; using the wrong parser or version will produce errors.
- Open the file as text and confirm which CQL dialect it contains (HL7 Clinical Quality Language vs SRU/SRW Contextual Query Language).
- Check that your tools match the expected CQL specification/version used by the source of the file.
Security note
.cql is usually plain text, but treat it as untrusted input: CQL processors, validators, or search clients that parse CQL could have vulnerabilities, so prefer well-maintained tools and avoid running unknown tooling on sensitive systems.