Skip to content

Instantly share code, notes, and snippets.

View ryukzak's full-sized avatar

Aleksandr Penskoi ryukzak

View GitHub Profile

ORM on FHIR: Mapping FHIR Entities to Code

Developers can write raw SQL queries with string interpolation — but they don’t like it. They prefer using ORMs because they get type safety, IDE support, less boilerplate, database agnosticism, easier schema maintenance, etc. The same logic applies to FHIR.

In this talk, I’ll describe the motivation and challenges of building such an “ORM,” introduce TypeSchema — our approach to generating SDKs from FHIR Implementation Guides — and share our roadmap for making it production-ready.

Aleksandr Penskoi, Health Samurai Engineer.


{
"identifier": {
"kind": "resource",
"package": "hl7.fhir.r4.core",
"version": "4.0.1",
"name": "Patient",
"url": "http://hl7.org/fhir/StructureDefinition/Patient"
},
"base": {
"kind": "resource",
// WARNING: This file is autogenerated by FHIR Schema Codegen.
// https://github.com/fhir-schema/fhir-schema-codegen
// Any manual changes made to this file may be overwritten.
import { Address } from './Address';
import { Attachment } from './Attachment';
import { BackboneElement } from './BackboneElement';
import { CodeableConcept } from './CodeableConcept';
import { ContactPoint } from './ContactPoint';
import { DomainResource } from './DomainResource';
data Code = Add | Div
class Compiler a where
compile :: Code -> (String, String) -> String
instance Compiler Float where
compile Add (a, b) = show (Unsafe.read a + Unsafe.read b :: Float)
compile Div (a, b) = show (Unsafe.read a / Unsafe.read b :: Float)
instance Compiler Int where
@ryukzak
ryukzak / gist:340102
Created March 22, 2010 14:07
Erlang план лекции
Erlang
=============== Заглавие ==========
О чём будет данная лекция.
- описание области, о которой пойдёт речь.
- описание стилистики изложения (сравнение с традиционными
методами).
import sublime, sublime_plugin
class ClearMarkCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.run_command("clear_bookmarks", {"name": "mark"})
self.view.settings().set('with_marker', False)
class DoAfterMarkCommand(sublime_plugin.TextCommand):
def run(self, edit, command, args = {}):
self.view.run_command("clear_mark")
{ "keys": ["alt+j"], "command": "do_after_mark", "args": {"command": "copy"}, "context": [{ "key": "setting.with_marker" }] },
{ "keys": ["alt+h"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true}, "context": [{ "key": "setting.with_marker" }] }
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
struct List {
struct List *next;
int value;
};
class Foo(val bar:Bar) {
def this() = this(new Bar)
}