Skip to content

Instantly share code, notes, and snippets.

@p2
p2 / csv-to-sqlite.py
Created December 4, 2013 23:35
Quickly create a SQLite table from a CSV/TSV file
#!/usr/bin/python
#
# Read a CSV/TSV with a header row (!) and put it into a new sqlite table
import sys
import csv
import sqlite3
class Importer (object):
@p2
p2 / .profile
Last active August 27, 2021 04:28
BaSH Profile
# Now written for ZSH and using oh-my-zsh
# Install oh-my-zsh as shown in https://github.com/robbyrussell/oh-my-zsh#basic-installation
# Install our custom theme: ln -s ~/profile/p2.zsh-theme ~/.oh-my-zsh/themes/p2.zsh-theme
# Change ~/.zshrc and use:
# ZSH_THEME="p2"
# plugins=()
# source ~/.profile
# -----------------------
# keep history per session (oh-my-zsh sets this to shared)
@p2
p2 / Implementation Details.md
Last active May 16, 2018 14:22
SMART on FHIR Tech Overview

Implementation Details

We'll be addressing certain implementation details here.

Pregnancy & Breastfeeding

To be able to detect whether a woman is pregnant, we would expect a [Condition][res-condition] resource with start date, end date and the Snomed-CT code for patient currently pregnant (77386006) or one if its many child codes. There is also a code for possible pregnancy (102874004) that we can consider using, if it makes sense from HCA's side.

@p2
p2 / 0-README.md
Last active August 27, 2017 19:32
🔥FHIR Condition with mutation Observation example

🔥FHIR DSTU-2 data representing sample patient 1's cancer diagnosis: IDC diagnosis with 3 tumor mutation tests, 2 of them positive.

FHIR Version

The current official FHIR version is DSTU-1. There is a new DSTU-2 ballot version for May 2015 that introduces some nice data model changes to be expected for DSTU-2. I propose using this ballot version for our pilot.

@p2
p2 / Vagrantfile
Created November 11, 2016 17:18
Let Vagrant set up an Ubuntu Xenial VM with Swift installed
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
# Create a shared folder for easy development
config.vm.synced_folder "../Ubuntu-Share", "/macOSshare"
config.vm.provision "shell", inline: <<-CMD
sudo apt-get update
sudo apt-get --assume-yes install clang libicu-dev libcurl3 libpython2.7
//
// CBLUITableSource.h
// CouchbaseLite
//
// Created by Jens Alfke on 8/2/11.
// Copyright 2011-2013 Couchbase, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>

C3-PRO Übersicht - Questionnaires

QuestionnaireController

Dient als Ausgangspunkt für den App Programmierer.

Soll ein Fragebogen (questionnaire, survey) angezeigt werden, wird ein FHIR Questionnaire aus dem Internet oder aus lokalem File in ein FHIR Objekt geladen, via FHIR library. Dann wird ein QuestionnaireController mit Referenz auf dieses questionnaire instanziiert.

@p2
p2 / TerminalOutput.sh
Created July 18, 2012 23:59
Error installing gnome-doc-utils
$ brew update
Updated Homebrew from 612e0b1c to c4b88b2a.
==> Updated Formula
ddrescue fbida geeqie
$ brew doctor
Your system is raring to brew.
$ brew uninstall libxml2
Uninstalling /usr/local/Cellar/libxml2/2.8.0...
$ brew install libxml2 --with-python
==> Downloading ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz
@p2
p2 / Custom CSS
Created February 22, 2012 15:28
Tumblr Blog Page
h3 {
margin-bottom: 0.5em;
}
#header {
margin-bottom: 40px;
padding-top: 40px;
}
#header h1 a.no_header {
font-family: Palatino, Helvetica, sans-serif;