Skip to content

Instantly share code, notes, and snippets.

View jmandel's full-sized avatar

Josh Mandel jmandel

View GitHub Profile
@jmandel
jmandel / gist:bb9bb698fa4e1c662100d65285a1ade4
Created June 2, 2016 14:20
Example extension for patient portal FHIR endpoint
{
"resourceType": "Organization",
"extension": [
{
"url": "http://fhir-registry.smarthealthit.org/StructureDefinition/patient-portal-fhir-endpoint",
"valueUri": "https://open-ic.epic.com/...whatever"
}
],
}
@jmandel
jmandel / names-in-room.ipynb
Created May 23, 2016 04:28
Names in a 1908s Room
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"resourceType": "Observation",
"id": "1725-lab",
"status": "final",
"category": {
"coding": [
{
"system": "http://hl7.org/fhir/observation-category",
"code": "laboratory",
"display": "Laboratory"
@jmandel
jmandel / after.json
Created May 2, 2016 22:55
CDS Hooks API before/after ?
{
"hook":"patient-view",
"hookInstance":"e456d5b6-8f98-4e83-b586-40def6bc7778",
"fhirServer":"http://hooks.smarthealthit.org:9080",
"redirect":"http://hooks2.smarthealthit.org/service-done.html",
"user":"Practitioner/example",
"patient":"1288992",
"prefetch":{
"patientToGreet":{
"resource":{
@jmandel
jmandel / casino_bot.py
Last active May 27, 2016 18:43
FHIR Zulip Bots
#!/usr/bin/env python2.7
from __future__ import print_function
import sys
import os
import optparse
import json
import random
import zulip
zulip_client = zulip.Client(
{
"created_at": "Mon Feb 10 04:58:01 +0000 2014",
"id": 432740212176093200,
"id_str": "432740212176093184",
"text": "If Jim has 50 chocolate bars, and eats 45, what does he have? Diabetes. Jim has diabetes.",
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [],
"urls": []
{
"resourceType":"Bundle",
"type":"batch",
"entry":[
{
"request":{
"method":"POST",
"url":"Observation"
},
"fullUrl":"urn:uuid:5b242326-cda7-4333-bef3-6472648bbeb0",
@jmandel
jmandel / 2BR rents near 02135.ipynb
Last active February 19, 2016 22:00
2BR Rent Near 02135
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmandel
jmandel / index.sh
Created February 1, 2016 22:04
Download 2016 EHR Certification PDFs and index for search
wget -e robots=off --mirror -l 1 http://confluence.oncprojectracking.org/display/ONCCERT2015/ONC+Health+IT+Certification+Program+2015+Edition+Test+Methods+Home
grep -ri final_rule/pdfs confluence.oncprojectracking.org/ | grep -oP '(https.*?)\.pdf' > pdfs
for i in $(cat pdfs); do wget $i; done
for i in *.pdf; do pdftotext "$i"; done
grep API *.txt
@jmandel
jmandel / gist:c9ac24d8e37ea9998a96
Created November 21, 2015 23:51
Travis CI webhook example full request with headers and body
--> POST / HTTP/1.1
--> User-Agent: Faraday v0.9.2
--> Authorization: [redacted]
--> Travis-Repo-Slug: hl7-fhir/fhir-svn
--> Content-Type: application/x-www-form-urlencoded
--> Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
--> Accept: */*
--> Connection: close
--> Host: fhir.me:8999
--> Content-Length: 12261