Skip to content

Files

Latest commit

 

History

History
40 lines (27 loc) · 1.09 KB

README.md

File metadata and controls

40 lines (27 loc) · 1.09 KB

Hpr

Ruby wrapper for Helsepersonellregisteret (HPR).

Installation

Add this line to your application's Gemfile:

gem 'hpr'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hpr

Usage

require "hpr"

scraper = Hpr.scraper(hpr_number: '9434607')
scraper.birth_date # => #<Date: 1966-11-05 ((2439435j,0s,0n),+0s,2299161j)>
scraper.dentist? # => true
dentist = scraper.dentist
dentist.approval # => "Autorisasjon"
dentist.approval_period # => #<Date: 1991-07-04 ((2448442j,0s,0n),+0s,2299161j)>..#<Date: 2041-11-05 ((2466829j,0s,0n),+0s,2299161j)>
dentist.additional_expertise # => [#<struct Hpr::AdditionalExpertise name="Godkjent implantatprotetisk behandler", period=#<Date: 2011-01-05 ((2455567j,0s,0n),+0s,2299161j)>..#<Date: 2041-11-05 ((2466829j,0s,0n),+0s,2299161j)>>]
# ..

Contributing

  1. Fork it ( http://github.com/legelisten/hpr/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request