Skip to content
skoba edited this page Feb 25, 2013 · 13 revisions

Getting started.

Welcome to our openEHR-ruby implementation project. This project provide core library to build EHR by the openEHR standard specifications. You should learn about these technology to utilize this library.

What you need to implement

This library contains only the core of openEHR technology. If you want to create Rails apps or other application frameworks with this library, you need to implement these components, which we are working on. If you can collaborate with us, please, please contact me or leave comment on this page. I always welcome your pull requests and messages.

  • Persistent layer for RMs

You need to implement mapping module, AM to RM, and RM to ActiveRecord or DataMapper.

  • Versioning and audit trails

Version container and audit trails as openEHR specification were implemented, but for Rails, it must be simplify.

  • Security module, authentication and user management
  • Demographic service(Patient/People management)
  • Managed UI

How to use library

You have to set up Ruby 1.9.3, because this library supports Ruby 1.9.2 or later and now we are developing on Ruby 1.9.3.

'openehr' gem is available from rubygems.org. To install this 'openehr' gem, only to run gem install command.

gem install openehr

Or, you may add 'gem openehr' to Gemfile for bundler.

After you successfully installed 'openehr', you can generate AM/RM instance with this library.

  • AM

AM instance can be generated from ADL file, which defines archetype of clinical information model. For example,

require 'openehr'

adl_parser = OpenEHR::Parser::ADLParser.new('sample.adl')
archetype = adl_parser.parse
  • RM

    You can generate RM instance by their constructor with attributes. Because RM needs many parameter to create, we adopt hash style arguments to constructor not to refer manuals to confirm the order of arguments. For example,

require 'openehr'

dv_boolean = OpenEHR::RM::DataTypes::Basic::DvBoolean.new(value: true)
dv_amount = OpenEHR::RM::DataTypes::Quantity::DvAmount.new(magnitude: 10)

Factory class is useful to generate RM instances. e.g.

require 'openehr'

dv_boolean = OpenEHR::RM::Factory.create("DV_BOOLEAN", value: true)
dv_amount = OpenEHR::RM::Factory.create("DvAmount", magnitude: 10)

The working examples are available under spec directory.

Clone this wiki locally