Skip to content

Instantly share code, notes, and snippets.

Josh Mandel jmandel

Block or report user

Report or block jmandel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jmandel
jmandel / status.md
Last active Aug 11, 2016
chat.fhir.org zulip upgrade status
View status.md

12:40ET working on update...

12:42ET cloud vm not responding :/

12:50ET looks like we're back.

13:05ET but unstable :/

14:00ET ok, back

@jmandel
jmandel / validate_resource.py
Created Jun 23, 2016
Python resource validation example
View validate_resource.py
import json
from fhirclient.models.fhirabstractbase import FHIRValidationError
from fhirclient.models.fhirelementfactory import FHIRElementFactory
resource = json.loads("""{
"resourceType": "Condition",
"patient": {
"reference": "Patient/123"
}
}""")
View gist:cbf2cc76adf3e10845bca72c3e8d08db
{
"resourceType":"CarePlan",
"id": "argo-example",
"text":{
"status":"generated",
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"> <ol> <li>CareTeam Member: John Smith, MD Role = Allopathic and Osteopathic Physicians:Internal Medicine:Cardiovascular Disease</li> <li>CareTeam Member: Allen Vitalis Role = Patient (person)</li> </ol> </div>"
},
"subject":{
"reference":"Patient/99912345"
},
@jmandel
jmandel / gist:bb9bb698fa4e1c662100d65285a1ade4
Created Jun 2, 2016
Example extension for patient portal FHIR endpoint
View gist:bb9bb698fa4e1c662100d65285a1ade4
{
"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
Names in a 1908s Room
View names-in-room.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View example.json
{
"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
CDS Hooks API before/after ?
View after.json
{
"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
FHIR Zulip Bots
View casino_bot.py
#!/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(
View response.json
{
"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": []
View example-post.json
{
"resourceType":"Bundle",
"type":"batch",
"entry":[
{
"request":{
"method":"POST",
"url":"Observation"
},
"fullUrl":"urn:uuid:5b242326-cda7-4333-bef3-6472648bbeb0",
You can’t perform that action at this time.