Skip to content

Instantly share code, notes, and snippets.

@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.

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 / 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"
"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 / 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>
@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() {
{
"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"
}
{
"birthdate": 252478800,
"conditions": [
{
"anatomical_location": null,
"anatomical_target": null,
"causeOfDeath": null,
"codes": {
"ICD-10-CM": [
"E10.10"
{
"birthdate": 252478800,
"conditions": [
{
"anatomical_location": null,
"anatomical_target": null,
"causeOfDeath": null,
"codes": {
"ICD-10-CM": [
"I10"
@eedrummer
eedrummer / combined.json
Created August 3, 2018 14:50
Possible CRD responses with CDS Hooks
{
"cards": [
{
"summary": "Positive Airway Pressure (PAP) Devices: Complying with Documentation & Coverage Requirements",
"indicator": "info",
"source": {
"label": "CMS"
},
"links": [
{