Skip to content

legelisten/hpr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Ruby gem for screen scraping Helsepersonellregisteret (HPR)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages