Skip to content

Instantly share code, notes, and snippets.

View robstwd's full-sized avatar

robstwd

  • Brisbane
  • 06:49 (UTC +10:00)
View GitHub Profile
@startuml
left to right direction
actor "Authorised user" as fc
rectangle "PatientSearch" {
usecase "by ID" as UC12
usecase "by demographics" as UC13
usecase "by address" as UC14
usecase "by electronic telecommunication" as UC15
}
fc --> UC12
#!/usr/bin/env ruby
require 'httpx'
require 'nokogiri'
# https://honeyryderchuck.gitlab.io/httpx/wiki/home.html
VALIDATE_SERVER_URL = "https://hapi.fhir.org/baseR4/"
TRANSFORM_SERVER_URL = "https://test.ahdis.ch/matchbox/fhir/"
{
"StructureDefinition-profile-adha": {
"isFileTemplate": true,
"scope": "xml",
"prefix": "StructureDefinition-profile-adha",
"body": [
"<?xml version=\"1.0\" encoding=\"utf-8\"?>",
"<StructureDefinition xmlns=\"http://hl7.org/fhir\">",
" <id value=\"${TM_FILENAME/(.*)\\..+$/$1/}\"/>",
" <url value=\"http://ns.electronichealth.net.au/fhir/StructureDefinition/${TM_FILENAME/(.*)\\..+$/$1/}\"/>",
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from lxml import etree
# ======================================================================
FILE = "au-patient.xml"
NAMESPACE = "http://hl7.org/fhir"
@robstwd
robstwd / config
Created July 25, 2017 20:35
i3 config file
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#!/usr/bin/env python
import requests
from bs4 import BeautifulSoup
import re
from requests import get
import subprocess as sp
# suppress 'InsecureRequestWarning' warning
# https://stackoverflow.com/a/28002687
@robstwd
robstwd / ruby-snmp.rb
Created December 30, 2015 23:03
Ruby script to get data from my Billion 7401 router via SNMP. Dependencies are the 2 ruby gems thinkspeak and snmp.
#!/usr/bin/env ruby
require 'snmp'
require 'thingspeak'
# ==================================================
HOST = "192.168.178.1"
MIB_MODULE = "SNMPv2-SMI"
thingspeak_content = {}
Servicename: WANDSLInterfaceConfig
Actionname: GetInfo
('NewATURCountry', 'out', 'string')
('NewATURVendor', 'out', 'string')
('NewDataPath', 'out', 'string')
('NewDownstreamAttenuation', 'out', 'ui4')
('NewDownstreamCurrRate', 'out', 'ui4')
('NewDownstreamMaxRate', 'out', 'ui4')
('NewDownstreamNoiseMargin', 'out', 'ui4')
('NewDownstreamPower', 'out', 'ui2')
@robstwd
robstwd / testfile.py
Last active October 21, 2015 20:26
Thingspeak upload with python
#!/usr/bin/env python
# dependency: installed python library python-psutil
# dependency: a library file containing the thingspeak api keys
# 'thingspeak_keys.py' containing eg:
# RASPBERRY_PI2 = "KEYABCXYZETECETC"
# ======================================================================
import sys
import subprocess as sp
#!/usr/bin/env ruby
require 'creek'
SAMPLE_FILE = "sample.xlsx"
creek = Creek::Book.new SAMPLE_FILE
my_sheet = creek.sheets[0]