Skip to content

Instantly share code, notes, and snippets.

View jmandel's full-sized avatar

Josh Mandel jmandel

View GitHub Profile
@jmandel
jmandel / about-description.md
Last active August 29, 2015 14:18
Create a new Observation (and possibly a new Patient, if needed)

Goal of the transaction below: "Always create a new lab Observation, and also -- if needed -- create a new Patient to serve as the subject of that observation".

@jmandel
jmandel / extract.js
Created April 3, 2015 04:11
Extract Housing Details from Craigslist
listings = [];
$.each($("span.txt"), function(i, l){
var url = $("a", l).attr("href");
var title = $("a", l).text();
var posted = $("time", l).attr("datetime");
var price = $("span.price", l).text();
var neighborhood = $("span.pnr small", l).text();
var br = $("span.housing", l).text();
var fees = $("a.gc", l).text();
listings.push([title, url, posted, price, neighborhood, fees].join("\t"));
@jmandel
jmandel / design-sketch.md
Last active August 29, 2015 14:18
UMA entry-point for FHIR apps

The Goal

Enable a common set of scopes that can be used across UMA-based authorization and "vanilla OAuth 2.0" authorization in a consistent way. In particular, support a model where apps know which permissions they'll need and can get authorized, up-front, with all of those permissions explicitly (rather than attempting a FHIR operation, engaging in an UMA flow... and then repeating this process each time the app needs to issue a new query against the patient's clinical record). Effectively it's a way to standardize the logic by which an UMA resource server knows which scopes to register when it creates

@jmandel
jmandel / gist:5c0f7119f5d0bea437bc
Created June 15, 2015 15:23
FHIR Resource Counts
for rev in `git rev-list --reverse --all`;
do
git checkout $rev;
COUNT=$(cat trunk/source/fhir.ini trunk/build/source/fhir.ini | awk '/^\s*$/{flag=0}flag && /=/;/\[resources\]/{flag=1}' | wc -l);
DATE=$(git log -1 --date=iso --format=%ai .);
echo "$DATE $COUNT" >> /tmp/fhir_counts;
echo "$DATE $COUNT";
done
@jmandel
jmandel / card-game.ipynb
Last active August 29, 2015 14:23
Card Game
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmandel
jmandel / the-problem.md
Last active August 29, 2015 14:24
One app connecting to multiple servers

1. Launch in EHR

Got access token back:

{
  "access_token": "29141724124...",
  "patient": "123"
}
{
"resourceType": "StructureDefinition",
"id": "oauth-uris",
"url": "http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris",
"name": "OAuth Endpoint URIs",
"publisher": "SMART Health IT",
"contact": [ {
"telecom": [ {
"system": "other",
"value": "http://smarthealthit.org"
@jmandel
jmandel / summary.md
Last active August 29, 2015 14:26
Interop Findings: Standards Summary

Standards

Health IT Standards present an evolving landscape. Aspects of healthcare data exchange are working today, but clincians and patients face serious challenges on the ground. There are multiple perspectives about the best path forward.

Under the Meaningful Use Stage 2 incentive program, 2014-certified EHRs enable exchange of clinical data via the Consolidated CDA document format. Two key patterns are: exchange among clinicians

@jmandel
jmandel / Steps.md
Last active August 1, 2016 22:27
Dual boot on XPS13 9350

Setup partitions

  • Use existing EFI partition
  • Create a new 750MB boot partition (not encrypted)
  • Create a root partition.
  • Setup encryption
cryptsetup formatLuks /dev/nvme0n1p6
cryptsetup open /dev/nvme0n1p6 cryptroot
@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