Skip to content

Instantly share code, notes, and snippets.


Mark Olschesky molsches

View GitHub Profile
molsches / gist:32fcec2499e95b5b23bc268800e22780
Last active Nov 28, 2018
Sample Note for AWS Comprehend Medical
View gist:32fcec2499e95b5b23bc268800e22780
ROS (10 systems)
In addition to that documented in the HPI above, the additional ROS was obtained:
Constitutional: Denies fevers or chills
Eyes: Denies vision changes
ENMT: Denies sore throat
CV: Denies chest pain
Resp: Denies SOB
GI: Denies vomiting or diarrhea
GU: Denies painful urination
MSK: Denies recent trauma
View gist:2f64e2c46289f0ad682a41dd2a63918d
//This is a javascript writer segment
// File to send
var file = new"s3-hl7", ".json");
var bw = new;
//'object' is just whatever you have in the channelMap that you want to push to S3. Might be just the raw message or the transformed message.
View gist:9aa0cca8fac9acb9d012
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="CDA.xsl"?>
Title: US_Realm_Header_Template
Revision History:
01/31/2011 bam created
07/29/2011 RWM modified
11/26/2011 RWM modified
08/12/2012 RWM modified
View raw CDA json
"ClinicalDocument": {
"-xmlns:xsi": "",
"-xmlns": "urn:hl7-org:v3",
"-xmlns:cda": "urn:hl7-org:v3",
"-xmlns:sdtc": "urn:hl7-org:sdtc",
"-xsi:schemaLocation": "urn:hl7-org:v3 ../../../CDA%20R2/cda-schemas-and-samples/infrastructure/cda/CDA.xsd",
"realmCode": { "-code": "US" },
"typeId": {
"-root": "2.16.840.1.113883.1.3",
molsches / gist:d4ec0c18794a069b1811
Created Feb 26, 2015
Building Node from source on Ubuntu
View gist:d4ec0c18794a069b1811
//Make a directory to hold the node
mkdir node-install-dir
cd node-install-dir
//Curl and unzip latest node
curl | tar xz --strip-components=1
//Install gcc and g++
sudo apt-get update
sudo apt-get install make gcc g++ apache2
View Basic ADT JSON
data.rfv = msg['PV2']['PV2.3']['PV2.3.1'].toString();
data.patientAddress = msg['PID']['PID.11']['PID.11.1'].toString() + (msg['PID']['PID.11']['PID.11.2'].length >= 1 ? (", " + msg['PID']['PID.11']['PID.11.2'].toString()) : "") + ", " + msg['PID']['PID.11']['PID.11.3'].toString() + ", " + msg['PID']['PID.11']['PID.11.4'].toString() + " " + msg['PID']['PID.11']['PID.11.5'].toString();
data.givenName = msg['PID']['PID.5']['PID.5.2'].toString();
data.familyName = msg['PID']['PID.5']['PID.5.1'].toString();
data.middleInitialOrName = msg['PID']['PID.5']['PID.5.3'].toString();
data.dob = new String(DateUtil.convertDate("yyyyMMdd","MM/dd/yyyy HH:mm:ss", msg['PID']['PID.7']['PID.7.1'].toString())); = msg['PID']['PID.8']['PID.8.1'].toString();
data.phoneNumber = msg['PID']['PID.13']['PID.13.1'].toString();
data.eventTime = new String(DateUtil.convertDate("yyyyMMddHHmm","MM/dd/yyyy HH:mm:ss",msg['EVN']['EVN.2']['EVN.2.1'].toString()));
View ADT as JSON
var in1 = [];
var dg1 = [];
var pr1 = [];
msh = {
"sendingFacility" : msg['MSH']['MSH.4']['MSH.4.1'].toString(),
"dateTime" : msg['MSH']['MSH.7']['MSH.7.1'].toString(),
"messageType" : msg['MSH']['MSH.9']['MSH.9.1'].toString(),
"messageEvent" : msg['MSH']['MSH.9']['MSH.9.2'].toString()
View gist:723ad1b10d129ce89291
  1. Have Python 2.7 installed

  2. Install pip.

  3. Extract hl7python into a directory

  4. pip install virtualenv will install virtualenv

  5. cd into the hl7python directory

View Transformer.js
var json = JSON.parse(connectorMessage.getRawData());
var currentDate = DateUtil.getCurrentDate("yyyyMMddHHmmss");
//OK, duplicate for each field
channelMap.put("tmp", tmp);
//TODO: Placeholder for MRN/Zipnosis Patient ID

NextGen Connect (formerly known as Mirth Connect) Server Setup

Create a VM running Ubuntu. Use a modern version.

Great thanks for the original guide:

# Update Ubuntu
sudo apt-get update

# Upgrade Ubuntu
sudo aptitude upgrade
You can’t perform that action at this time.