@openhealthnz-credentials/physioboard-apc-reader
v1.2.3
Published
Parses and extracts info from NZ Physio board issued certificates
Downloads
3
Readme
NZ Physioboard APC Reader
Parses and extracts info from NZ Physio board issued certificates.
Installation
This package is designed for a node-js enviroment. Install with yarn or npm
npm install @openhealthnz-credentials/physioboard-apc-reader # or
yarn add @openhealthnz-credentials/physioboard-apc-reader
Usage
From a file:
import { ApcFromPDFBuffer } from '@openhealthnz-credentials/physioboard-apc-reader'
...
let details = await ApcFromPDFBuffer(fileBuffer);
From a file buffer
import { ApcFromPDFFile } from '@openhealthnz-credentials/physioboard-apc-reader'
...
let details = await ApcFromPDFFile("./path/to/file.pdf");
Error Handling
import { ApcFromPDFFile } from '@openhealthnz-credentials/physioboard-apc-reader'
try {
let details = await ApcFromPDFFile("./path/to/file.pdf");
if (details) {
// Sucessfully parsed
console.log(details)
} else {
// details===null
// Means it failed to parse
// Likely not the correct kind of certifcate
}
} catch (e) {
// PDF was invalid, or file could not be read
}
Demo
Contributing
Contributions are always welcome!
Please adhere to this project's code of conduct
.
Core Library
# Install dependencies
yarn
# Run Tests
yarn test
For breaking changes, check how it that effects docker-service
and lambda-service
, and make appropriate changes.
Demo Site
cd demo-site
# Install dependencies
yarn
# Start development environment
yarn dev
Docker Service
cd docker-service
# Install dependencies
yarn
# Start server locally
yarn start
# Run as Docker Container
docker build -t container-name .
docker run -d container-name -p 3000
Lambda Service
cd lambda-service
# Install dependencies
yarn
# Start server locally
sam build
sam local start-api
Git Commit Messages & Semantic Versioning
Commits on the Main
branch, with changes to the to the Core Library need to follow the Angular Commit Message Conventions for semantic-release to work.
In summary, your commits should have this structure: <type>(optional scope): <description>
Where <type>
is one of the following:
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests