Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abinoam/cbhpm_table
CBHPM Table
https://github.com/abinoam/cbhpm_table
Last synced: 2 months ago
JSON representation
CBHPM Table
- Host: GitHub
- URL: https://github.com/abinoam/cbhpm_table
- Owner: abinoam
- License: mit
- Created: 2014-10-28T14:30:33.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-06-06T18:13:52.000Z (over 2 years ago)
- Last Synced: 2024-11-04T00:51:59.499Z (3 months ago)
- Language: Ruby
- Size: 45.9 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Gem Version](https://badge.fury.io/rb/cbhpm_table.svg)](http://badge.fury.io/rb/cbhpm_table)
[![Build Status](https://travis-ci.org/abinoam/cbhpm_table.svg?branch=master)](https://travis-ci.org/abinoam/cbhpm_table)
[![Code Climate](https://codeclimate.com/github/abinoam/cbhpm_table/badges/gpa.svg)](https://codeclimate.com/github/abinoam/cbhpm_table)
[![Test Coverage](https://codeclimate.com/github/abinoam/cbhpm_table/badges/coverage.svg)](https://codeclimate.com/github/abinoam/cbhpm_table/coverage)# CBHPMTable
A simple gem to wrap the CBHPM excel files from Associação Brasileira de Medicina.
**CBHPM**:
* Classificação Brasileira Hierarquizada de Procedimentos Médicos (pt)
* Brazilian Hierarchical Classification of Medical Procedures (en)## Installation
Add this line to your application's Gemfile:
gem 'cbhpm_table'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cbhpm_table
## Usage
```ruby
cbhpm_table = CBHPMTable.new "CBHPM 2012.xlsx"cbhpm_table.headers
#=> { "code"=>"ID do Procedimento", "name"=>"Descrição do Procedimento", "cir_size"=>nil, "uco"=>"Custo Operac.", "aux_qty"=>"Nº de Aux.", "an_size"=>"Porte Anestés."}cbhpm_table.row(2)
#=> {"code"=>"10101012", "name"=>"Em consultório (no horário normal ou preestabelecido)", "cir_size"=>"2B", "uco"=>nil, "aux_qty"=>nil, "an_size"=>nil})}cbhpm_table.rows
#=> # Returns an Array of Rows (as individual Hashes)cbhpm_table.each_row do |row|
# do whatever with the row
end
```## Contributing
1. Fork it ( https://github.com/[my-github-username]/cbhpm_table/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 a new Pull Request## Thanks to:
* Brandon Hilkert (@brandonhilkert) - for his "Build a Ruby Gem Email Course"