Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/airslie/renalware-forms
PDF forms library for Renalware
https://github.com/airslie/renalware-forms
Last synced: about 1 month ago
JSON representation
PDF forms library for Renalware
- Host: GitHub
- URL: https://github.com/airslie/renalware-forms
- Owner: airslie
- License: mit
- Created: 2020-02-25T15:35:25.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-30T23:30:30.000Z (almost 2 years ago)
- Last Synced: 2023-03-02T13:56:53.527Z (almost 2 years ago)
- Language: Ruby
- Size: 138 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
[![Gem Version](https://badge.fury.io/rb/renalware-forms.svg)](https://badge.fury.io/rb/renalware-forms)
[![Maintainability](https://api.codeclimate.com/v1/badges/945cd0c49335e9e4595d/maintainability)](https://codeclimate.com/github/airslie/renalware-forms/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/945cd0c49335e9e4595d/test_coverage)](https://codeclimate.com/github/airslie/renalware-forms/test_coverage)# Renalware::Forms
This gem
- is a library of pre-defined generic PDF forms that Renalware can populate and present
to the user, for example when a user needs to print and sign a list of drugs to be delivered for
homecare.
- provides a API for creating these PDFs, and others (see renalware-forms-* gems) so that form
creation is abstracted from Renalware.The PDFs are constructed using Prawn, chosen mainly for its speed.
The gem exposes an API for a caller to specify the type and version of the PDF they require, along
with data to populate it (patient name and address etc).See other gems ie `renalware-forms-` for instances where we have built custom forms
based on this gem.## Future enhancements
To be more extensible and remove the need for developer input when adding new forms, an alternative
implementation is possible where the request to create for example "Fresenius Homecare
Supply Version 1.1" will load a PDF file with the corrersponding name. If the PDF is created for
example in Acrobat or LibreOffice and specifically-named form fields are inserted, these can be
populated with the supplied the data the caller also provides. It could even allow the path to a
custom PDF form to be supplied by the caller. Using a shared library of PDF files stored inside this
gem will provide more re-usue opportunity across sites, though there could be nothing stopping a
hospital developing a custom form stored outside of this gem, and not sharing it.## Installation
Add this line to your application's Gemfile:```ruby
gem 'renalware-forms'
```And then execute:
```bash
$ bundle
```Or install it yourself as:
```bash
$ gem install renalware-forms
```
## TestingYou can generate example instances of all the PDFs in this gem from the command line.
You can see a list available tasks:
```bash
$ bundle exec rake -T
```For example:
```bash
$ bundle exec rake forms:generic:homecare:v1
```will create the version 1 PDF with test data and open it in Linux (will require a change
for it to open on a Mac).## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT)