How to open .CQL files on Android
To open .CQL files on Android, open the .cql file with a text/code editor app; for validation/translation or use within a system, transfer it to a desktop environment with the appropriate HL7 CQL or SRU/SRW tooling.
Step-by-step instructions
- Open the .cql file with a text/code editor app; for validation/translation or use within a system, transfer it to a desktop environment with the appropriate HL7 CQL or SRU/SRW tooling.
Recommended software
- Microsoft 365
- Google Docs
- WPS Office
Alternative methods
- Open .CQL in a browser-based viewer if desktop apps fail.
- Try opening .CQL on Android 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.