Skip to content

Instantly share code, notes, and snippets.

View jmandel's full-sized avatar

Josh Mandel jmandel

View GitHub Profile
@jmandel
jmandel / export_history.py
Last active August 29, 2015 13:59
export skype chat hsitory for FHIR Implementers
import sqlite3
import json
import sys
# e.g. python export_history.py /home/jmandel/.Skype/jcmandel/main.db > export.json
c = sqlite3.connect(sys.argv[1])
c.row_factory = sqlite3.Row
cur = c.cursor()
@jmandel
jmandel / fhir-device-workflows.md
Last active August 29, 2015 14:01
FHIR Device Workflows

Medical Device Workflows in FHIR

Medical device workflow are rich and complex. This design attempts to factor the domain into a minimal set of components that can be combined to produce useful systems. It's self-consciously naïve, but it should serve as a seed for discussion.

A few assumptions and a sketch

  • Any device can be online all the time, and can act as a FHIR server -- possible all on its own, or possibly with the help of a proxy/manager/facade component that "fronts for" the device. (Communication between the device and its manager occurs using any mechanism necessary; but the components below be useful for such internal communication, too.)

  • A device generates snapshot (i.e. point-in-time) reports -- which can consist of observations or alerts.

@jmandel
jmandel / 00-intro.md
Last active August 29, 2015 14:06
# Questions about Profiles (from Lipid Report example)
@jmandel
jmandel / sketch.md
Last active August 29, 2015 14:16
SMART Support for HAPI?

Here are a few components that could help. This is just a sketch -- looking to refine (or completely replace) these ideas with a more concrete proposal...

Authorization Server

A common set of components that allow end-users to authorize access to clinical data. Handles fundamental aspects of client registration, authorization flows, and token generation. Currently SMART and HSPC (and also Duke) have independently modified versions of MITREid Connect, but they all rely on different, non-compatible customizations. We'd want to build modular support for:

  • User sign-in. Should be able to tie into existing user account services -- e.g. via LDAP or any other back-end protocol. Bottom line: OpenMRS should be able to configure an instance of this server so users can sign in with their existing OpenMRS credentials (and ditto for SMART sandbox users, or HSPC sandbox users, etc).

  • App launch context communication. The SMART launch protocol allows the EHR to estab

@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 / 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"
}
@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