Healthcare IT Quick Reference Cheat Sheets

Instant developer cheat sheets for HL7 v2 pipe delimiters, FHIR RESTful search parameters, and Mirth Connect JavaScript shortcuts.

1. HL7 v2.x Encoding Characters & Delimiters

Standard separator characters defined in MSH-1 and MSH-2 segments.

HL7 v2.x
Symbol Delimiter Name Purpose & Description
| Field Separator Separates individual data fields within a segment (e.g., MSH, PID).
^ Component Separator Separates sub-fields/components inside a complex field (e.g., Family^Given Name).
~ Repetition Separator Separates multiple repeating values within a single field (e.g., Multiple Phone Numbers).
\ Escape Character Escapes special delimiter characters within text strings (e.g., \F\ for pipe).
& Sub-component Separator Separates sub-components inside a complex component structure.

2. HL7 FHIR REST API Operations Cheat Sheet

Standard HTTP interactions and URL query parameters for FHIR R4 servers.

HL7 FHIR
HTTP Method Endpoint Pattern FHIR Interaction
GET /Patient/123 Read: Fetches patient resource with ID 123.
POST /Patient Create: Creates a new patient resource (Server generates ID).
PUT /Patient/123 Update: Overwrites existing patient record with ID 123.
GET /Observation?patient=123&category=laboratory Search: Queries lab observations for patient ID 123.
GET /Patient?name=John&_summary=true Summary Search: Returns reduced summary elements only.

3. Mirth Connect Map Variables & JavaScript Shortcuts

Essential JavaScript expressions for variable mapping and message extraction.

Mirth Connect
JavaScript Mapping Snippets
// Variable Scopes
channelMap.put('mrn', msg['PID']['PID.3']['PID.3.1'].toString());     // Scope: Current Message
globalChannelMap.put('batchId', 'BATCH_001');                          // Scope: Single Channel
globalMap.put('serverEnv', 'PRODUCTION');                               // Scope: Server Wide

// Common Date Formatting
var timeStamp = DateUtil.getCurrentDate('yyyyMMddHHmmss');

// Logger Commands
logger.info('Processing Message ID: ' + messageObject.getMessageId());
logger.error('Failed to parse PID segment for MRN: ' + channelMap.get('mrn'));