Skip to content

Instantly share code, notes, and snippets.

{
"name" : "FRIL - Equal Weight - Accept 60",
"description" : "FRIL on localhost. Nearly Equal weights on all fields; accept = 60",
"destinationEndpoint" : "http://mitre.org/ptmatchadapter-fril",
"serverEndpoint" : "http://localhost:3001",
"responseEndpoint" : "http://mitre.org/ptmatch"
}
@eedrummer
eedrummer / server.go
Created March 1, 2016 16:30
ecqm with static hosting and pulling the user from a header set by nginx
package main
import (
"github.com/labstack/echo"
"github.com/labstack/echo/middleware"
"github.com/mitre/ecqm/controllers"
"gopkg.in/mgo.v2"
)
func main() {
@eedrummer
eedrummer / bundle.xml
Created January 25, 2016 21:53
FHIR XML transform to make more golang friendly
<Bundle xmlns="http://hl7.org/fhir">
<id value="10bb101f-a121-4264-a920-67be9cb82c74"/>
<type value="message"/>
<entry>
<fullUrl value="urn:uuid:267b18ce-3d37-4581-9baa-6fada338038b"/>
<resource>
<MessageHeader>
<id value="efdd254b-0e09-4164-883e-35cf3871715f"/>
<timestamp value="2015-12-08T11:15:33-05:00"/>
<event>
"use strict";
let async = require("async");
let MongoClient = require('mongodb').MongoClient;
MongoClient.connect('mongodb://127.0.0.1:27017/fhir', function(err, db) {
let patientCollection = db.collection('patients');
let cursor = patientCollection.find()
async.waterfall([
callback => {
@eedrummer
eedrummer / gist:8832311ffe0789640e51
Last active August 29, 2015 14:23
query_totals_test
package controllers
import (
"bufio"
"encoding/json"
"net/http"
"net/http/httptest"
"os"
"github.com/intervention-engine/fhir/server"
package middleware
import (
"encoding/json"
"github.com/intervention-engine/fhir/server"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"io/ioutil"
"net/http"
"net/url"
@eedrummer
eedrummer / Description.md
Last active August 29, 2015 14:00
Provider matching in popHealth

The OPML snippet will create 3 providers. The root provider is Community Provider Network. There are two child providers: Night Vale Community Medicine and Desert Bluffs Family Medicine. In the provided Cat I snippet, line 12 will cause the patient to be associated with Night Vale Community Hospital.

http://rxnav.nlm.nih.gov/REST/Ndfrt/properties/nui=N0000178444&propertyName=VUID
@eedrummer
eedrummer / gist:4532257
Last active December 11, 2015 02:38
Copy files out of an MS Access database and load it into Postgres using mdb-tools
mdb-schema current_lmrp.mdb postgres | psql lcd
mdb-tables -1 current_lmrp.mdb | xargs -Itable sh -c "mdb-export -H current_lmrp.mdb table > newcsv/table.csv"
ls newcsv | xargs -I{} sh -c "echo {} | cut -d'.' -f1" | xargs -I{} psql -c "COPY {} from '/Users/andrewg/Downloads/current_lmrp/newcsv/{}.csv' DELIMITER ',' CSV;" lcd
@eedrummer
eedrummer / pre-commit
Created November 19, 2012 20:19
Git pre-commit hook to detect the presence of pry related statements
#!/bin/sh
#
# To enable this hook, rename this file to "pre-commit".
PRY_PATTERN="require.+[\'\"]pry[\'\"]|binding\.pry"
# Redirect output to stderr.
exec 1>&2
if git diff --cached | grep '^\+' | grep -q -E $PRY_PATTERN; then
echo "ERROR: There is left over pry stuff in this commit"