Git Product home page Git Product logo

fhir.clj's Introduction

fhir.clj

Build Status Dependency Status

Clojars Project

FHIR client implementation in clojure.

Roadmap

  • not hardcoded profiles, could be added dynamicly
  • parse & serialize FHIR formats
  • validate resources against profiles
  • datatypes coersing (clj-time, ooid)
  • rest client api
  • support oauth

Usage

(require '[fhir.core :as fhir])

;; create profile index
(def idx
  (fc/index
     "profiles/profiles-resources.json"
     "profiles/profiles-types.json"))

(def pt
  (fhir/parse idx "
   {\"resourceType\": \"Patient\",
    \"name\": [{\"text\":\"Smith\"}],
    \"active\": true}
  "))

(fhir/validate idx pt)
;;=> collection of OperationOutcome.issue

(fhir/generate idx pt :xml)
;;=> <Patient> <name><text value="Smith"/></name><active value="true"></Patient>

(fhir/resource idx {:resourceType "Patient" :name {:text "Smith" :family "Eric"}})
;;=> {:resourceType "Patient" :name [{:text "Smith" :family ["Eric"]}]}

Notes

fhir.clj is not very strict about arity of attributes, so you can assign single value where collection is expected and this will be fixed using metadata from profile.

License

Copyright © 2014 HealthSamurai

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

fhir.clj's People

Contributors

aitem avatar niquola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.