Skip to content

Instantly share code, notes, and snippets.

View jnimmo's full-sized avatar

James Nimmo jnimmo

View GitHub Profile
@jnimmo
jnimmo / GetPSAsForListOfPatients
Created August 22, 2014 02:17
Intrahealth Profile - Get a table of results for a given set of patients
'library:C:\Program Files\Intrahealth\Profile\bin\IHProfBL.bpl
'library:C:\Program Files\Intrahealth\Profile\bin\Profile.exe
Dim Profile 'As ISProfile
Dim client 'As ProfileClient
Set client = CreateObject("Profile.ProfileClient")
If IsNull(client) Then
WScript.Quit
Else
Set Profile = client.Login("","","")
@jnimmo
jnimmo / RoomieCodes.plist
Last active August 29, 2015 14:07
Roomie Remote Codes for PJ-Link Projector
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>codes</key>
<dict>
<key>.POWER STATUS</key><string>%1POWR ?</string>
<key>POWER OFF</key><string>%1POWR 0</string>
<key>POWER ON</key><string>%1POWR 1</string>
@jnimmo
jnimmo / MindrayUltrasoundtoProfileChannel.xml
Created January 20, 2015 22:01
MirthConnect Channel - Mindray Ultrasound DICOM to HL7 message for Intrahealth Profile
<channel version="3.1.1">
<id>b5e5f65c-36c8-4b8c-bb67-ec4db347e603</id>
<nextMetaDataId>5</nextMetaDataId>
<name>Mindray Ultrasound to Profile</name>
<description>Accepts DICOM images, builds a HL7 file and embeds the images as JPEGs ready for automatic import to Profile</description>
<enabled>true</enabled>
<lastModified>
<time>1419210099205</time>
<timezone>Pacific/Auckland</timezone>
</lastModified>
@jnimmo
jnimmo / ValidateNZNHI
Created March 2, 2015 00:40
Validate New Zealand NHI Number
// Description: Returns true if a New Zealand NHI passes checksum validation, otherwise returns false.
function is_nz_nhi(NHI) {
var passTest = false;
// Validation steps 1 and 2
if (/^[A-HJ-NP-Z]{3}[0-9]{4}$/.test(NHI)) {
var checkValue = 0;
// Init alpha conversion table omitting O and I. A=1~Z=24
var aplhaTable = "ABCDEFGHJKLMNPQRSTUVWXYZ".split('');
for (i = 0; i < 3; i++) {
// Convert each letter to numeric value from table above
@jnimmo
jnimmo / ValidateNZNHI.cs
Last active May 10, 2022 10:02
Validate New Zealand NHI Function C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace ConsoleApplication1
{
class Program
{
@jnimmo
jnimmo / IHProfileURLHandler.cs
Last active May 1, 2019 04:23
Intrahealth Profile URL Handler, creates a custom URL scheme ihprofile:// to allow you to open patient EHR/encounters from another application or web browser
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;
using System.Web;
using System.Windows.Forms;
using Profile;
using IHProfBL;
using Microsoft.Win32;
"""
Support for interface with an Samsung TV.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.samsungtv/
"""
import logging
import socket
# from datetime import timedelta
@jnimmo
jnimmo / logstash-filebeat_apache_filter.conf
Last active July 16, 2019 02:37
Logstash Ingress Filter - Apache (for Filebeat Apache module)
# Based on https://github.com/elastic/beats/blob/7.2/filebeat/module/apache/error/ingest/pipeline.json
# Documentation at https://www.elastic.co/guide/en/logstash/current/logstash-config-for-filebeat-modules.html#parsing-apache2 is out of date
filter {
if [event][module] == "apache" {
if [fileset][name] == "access" {
grok {
match => { "message" => ["%{IPORHOST:[source][address]} - %{DATA:[user][name]} \[%{HTTPDATE:[apache][access][time]}\] \"(?:%{WORD:[http][request][method]} %{DATA:[url][original]} HTTP/%{NUMBER:[http][version]}|-)?\" %{NUMBER:[http][response][status_code]} (?:%{NUMBER:[http][response][body][bytes]}|-)( \"%{DATA:[http][request][referrer]}\")?( \"%{DATA:[user_agent][original]}\")?",
"%{IPORHOST:[source][address]} - %{DATA:[user][name]} \\[%{HTTPDATE:[apache][access][time]}\\] \"-\" %{NUMBER:[http][response][status_code]} -",
"\\[%{HTTPDATE:[apache][access][time]}\\] %{IPORHOST:[source][address]} %{DATA:[apache][access][ssl][protocol]} %{DATA:[apache][acces
@jnimmo
jnimmo / swagger.json
Created February 20, 2020 03:14 — forked from dragouf/swagger.json
Mevo
{"swagger":"2.0","info":{"version":"v1","title":"Vulog Carsharing FO API"},"basePath":"/api-fo/final","paths":{"/v1/availableVehicles":{"get":{"tags":["AvailableVehicles"],"summary":"All available vehicles.","description":"Get the list of all available vehicles, it can be a lot of data.","operationId":"V{versionAvailableVehiclesGet","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[],"responses":{"200":{"description":"An array of available vehicles","schema":{"type":"array","items":{"$ref":"#/definitions/AvailableVehicle"}}},"204":{"description":"No available vehicle found"}}}},"/v1/device/notification":{"post":{"tags":["Device"],"summary":"Susbcribe a phone device for push notifications","operationId":"V{versionDeviceNotificationPost","consumes":["application/json","text/json","application/json-patch+json"],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"subscription","in":"body","description":"the subscription details","required":false,"sche
@jnimmo
jnimmo / docker-compose.yml
Last active February 1, 2023 23:23
Docker Compose file to configure a container with TLS inspection proxy
version: '3.7'
services:
ubuntu:
image: ubuntu:jammy
container_name: vscode-server
environment:
- http_proxy=<----PROXY_URL---->
- TZ=Etc/UTC
- DEBIAN_FRONTEND=noninteractive
command: /bin/bash -c "if [ ! -f /root/.installed ]; then \