Skip to content

Instantly share code, notes, and snippets.

View jkiddo's full-sized avatar
🔥
🥷

Jens Kristian Villadsen jkiddo

🔥
🥷
View GitHub Profile
@jkiddo
jkiddo / FHIR.Subscription.md
Last active November 15, 2017 13:37
FHIR Subscription resource 'stuff-worth-talking-about'
  • Returing all resources matching criteria upon creation of a subscription
    • Current situation is that the client is supposed to know the full state up front. If any change occurs between the client trying to figure out what the full state is and creating the subscription, that state change is lost. This is fixed by letting the server evaluate the criteria once the subscription is created - and then acting upon it.
  • Resources leaving the criteria
    • When resources leaves the criteria the client is not notified. This makes it pretty hard to base an implementation around a more event based approach where the server is supposed to notify the client about any changes that may occur. As long as resources leaving the criteria set is not part of the notifications clients will become stale pretty quickly.
  • Order and use of ETag for updates
  • The order of the updates is not described. If ETags are used by the notifying server, the client is able to detect if an update has gone missing one way or another. The u
@jkiddo
jkiddo / MM
Created January 18, 2018 15:19
Are you somewhat tech-related?
Have you ever heard of versioning systems?
Do you happen to find documents attached to mails in your inbox?
@jkiddo
jkiddo / wifi
Last active April 19, 2018 15:46
#!/bin/bash
# Sagemcom Fast 3890 script for enabling/disabling Wifi
user="admin"
password="somePassword"
ssid="MySSID"
POSITIONAL=()
while [[ $# -gt 0 ]]
do
@jkiddo
jkiddo / get_oracle_jdk_linux_x64.sh
Last active March 15, 2018 09:01 — forked from n0ts/get_oracle_jdk_x64.sh
Get latest Oracle JDK package bash shell script
#!/bin/bash
# From: https://gist.github.com/n0ts/40dd9bd45578556f93e7 with suggested corrections
# You must accept the Oracle Binary Code License
# http://www.oracle.com/technetwork/java/javase/terms/license/index.html
# usage: get_jdk.sh <jdk_version> <ext>
# jdk_version: 8(default) or 9
# ext: rpm or tar.gz
docker run -it --rm --name python-web -p 8000:8000 -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:3 python -m http.server

CentOS 7 fix for letting containers reach other containers on the same host:

From moby/moby#16137 (comment)

nmcli connection modify docker0 connection.zone trusted
systemctl stop NetworkManager.service
firewall-cmd --permanent --zone=trusted --change-interface=docker0
systemctl start NetworkManager.service
nmcli connection modify docker0 connection.zone trusted

Protokol- og model-lag for læsning/skrivning af information i HL7 modellerne CDA og FHIR:

Eksemplet her viser antallet af lag for at kunne læse/skrive ansvarlig enhed for en måling (observation) i et sæt af målinger. Sikkerhed er ikke taget med, da antallet af ekstra lag er ens for begge tilgange. Det forudsættes, at CDA dokumentet hentes over IHE XDS. Det forudsættes for begge at ID'et er kendt i forvejen.

FHIR

HTTP -> Json (HL7 FHIR) -> Bundle -> Resource -> Observation -> Performer

IHE XDS + CDA

HTTP -> SOAP + MTOM/XOP -> ebXML -> XML (HL7 CDA) -> ClinicalDocument -> component -> structuredBody -> component -> section -> entry -> act -> entryRelationship -> organizer -> participant -> participantRole -> scopingEntity

@jkiddo
jkiddo / igpub maven
Created January 21, 2019 08:17
Rough initial maven file including all dependencies for igPub
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.hl7.fhir.igtools</groupId>
<artifactId>org.hl7.fhir.igtools</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
@jkiddo
jkiddo / clean_code.md
Created September 3, 2019 18:18 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules