Skip to content

Recipes

Worked examples that combine QIE scripting bindings to solve specific integration problems. Each recipe is self-contained. Copy the snippet into a mapping node, adjust the node paths or table lookups to match your interface, and adapt as needed.

Recipes are not a replacement for the JavaScript Tutorial (which teaches the language) or the Code Wizard reference (which documents every binding). Use the tutorial to learn the syntax, use the Code Wizard for function-by-function lookup, and come here when you want to see how the pieces fit together for a real problem.

Sources

Receiver-side patterns: response handling, preprocessing, and pulling messages from atypical inbound protocols.

Destinations

Sender-side patterns: shaping outbound requests and reading richer responses back.

  • Posting multipart/form-data from a Script. Build a multipart REST request with file and text parts, including the DICOM-as-Part-10-file gotcha for .dcm uploads.
  • Sending a CDA Document to an HIE. Submit a CDA via IHE ITI-41 (XDS.b / XDR), including the IHE Web Service Connection, XDS.b metadata, and the ack script that surfaces HIE RegistryError responses.
  • Reading REST Response Headers. Call qie.callRESTWebService with returnFullHttpResponse=true to read HTTP status, headers, and body from the response envelope.

Message Types

Format-specific transforms and composition. Recipes are filed under the format the reader is transforming from. Someone who has HL7 data and wants JSON out looks under HL7.

HL7

JSON

CSV

  • Reading a CSV Message: the getRowCount / getHeaders / getRows API, iterating rows by name or index, building a per-row JS object, and CSV System Variable lookups with qie.doTableLookup.
  • Converting a CSV Message to JSON with a Template: hold a JSON body as a System Variable with {ColumnName} node tags and render it against the first CSV data row with qie.evaluateTemplate.

XML

General

Patterns that work across formats.

Files & Large Data

Streaming to disk, binary output, and archive handling.

Database

Parameterized queries and bulk-load patterns.

Channel Operations

Scheduled-script patterns that manage the channel itself rather than any one message.