Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Bastide prb112

View GitHub Profile
View list.go
package main
import (
"fmt"
)
// List represents a singly-linked list that holds
// values of any type.
type List[T any] struct {
next *List[T]
@prb112
prb112 / IBM FHIR Server - Composition-$document.postman_collection.json
Last active Aug 27, 2021
Demo postman for Composition/$document - update the Authorization and the SERVER_HOSTNAME variable.
View IBM FHIR Server - Composition-$document.postman_collection.json
{
"info": {
"_postman_id": "6c0a89ea-117d-4d1a-a323-655832225d62",
"name": "IBM FHIR Server - Composition/$document",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "PREP - Create Practitioner",
"event": [
@prb112
prb112 / Main.java
Last active May 4, 2021
Example fhir-paths for extracting specific data
View Main.java
/*
* (C) Copyright IBM Corp. 2021
*
* SPDX-License-Identifier: Apache-2.0
*/
package demo;
import static com.ibm.fhir.model.type.String.string;
@prb112
prb112 / IBM FHIR Server - Examples and Follium.ipynb
Last active Nov 23, 2020
This demo shows how to use the IBM FHIR Server Docker image along with the IBM FHIR Server examples and `near` search parameter.
View IBM FHIR Server - Examples and Follium.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@prb112
prb112 / Encounter-Example.json
Created Aug 6, 2020
iff and between example for FHIRPath
View Encounter-Example.json
{
"resourceType": "Encounter",
"id": "f203",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: f203</p><p><b>identifier</b>: Encounter_Roel_20130311 (TEMP)</p><p><b>status</b>: finished</p><h3>StatusHistories</h3><table><tr><td>-</td><td><b>Status</b></td><td><b>Period</b></td></tr><tr><td>*</td><td>arrived</td><td>08/03/2013 --&gt; (ongoing)</td></tr></table><p><b>class</b>: inpatient encounter (Details: http://terminology.hl7.org/CodeSystem/v3-ActCode code IMP = 'inpatient encounter', stated as 'inpatient encounter')</p><p><b>type</b>: Inpatient stay for nine days <span>(Details : {SNOMED CT code '183807002' = 'Inpatient stay 9 days', given as 'Inpatient stay for nine days'})</span></p><p><b>priority</b>: High priority <span>(Details : {SNOMED CT code '394849002' = 'High priority', given as 'High priority'})</span></p><p><b>subject</b>: <a>Roel</a></p><p><b>episodeOfCare</b>: <a>EpisodeOfCare/example
View jq-fu-code-type-duplicate-code.sh
$ for VALUE in `cat ./fhir-registry/definitions/search-parameters.json | jq -r '.entry[].resource | "\(.code),\(.type)"' | sort -u`
> do
> CUR_VALUE=`echo "${VALUE}" | sed 's|,| |g' | awk '{print $1}'`
> PRE_VALUE=`echo "${PREVIOUS_VALUE}" | sed 's|,| |g' | awk '{print $1}'`
> if [ "$PRE_VALUE" = "$CUR_VALUE" ]
> then
> echo "${VALUE}"
> echo "${PREVIOUS_VALUE}"
> fi
> PREVIOUS_VALUE=${VALUE}
View Fhir_Metadata_Flow.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.3">
<description></description>
<groupId>1aee98d5-0172-1000-7a2d-00d37a42e7da</groupId>
<name>Fhir Metadata Flow</name>
<snippet>
<connections>
<id>7fc1990d-d604-370e-0000-000000000000</id>
<parentGroupId>d7051a5f-6d05-30ab-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
View Test.java
package test;
public Test {
// TODO add an implementation.
}
@prb112
prb112 / pom.xml
Last active Apr 6, 2020
Shading to use with a new model
View pom.xml
<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>example</groupId>
<artifactId>resource-model-old</artifactId>
<version>3.0.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@prb112
prb112 / configuration-map-krb.json
Created Jun 10, 2019
Port forwarding for Zookeeper (to 5 remote hosts behind a firewall)
View configuration-map-krb.json
{
"88" : {
"auth-1" : 8088
}
}