# @openhealthnz-credentials/physioboard-apc-reader

> Parses and extracts info from NZ Physio board issued certificates

Latest version **1.2.3** (published 2022-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @openhealthnz-credentials/physioboard-apc-reader
pnpm add @openhealthnz-credentials/physioboard-apc-reader
yarn add @openhealthnz-credentials/physioboard-apc-reader
bun add @openhealthnz-credentials/physioboard-apc-reader
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2022-01-17 |
| First published | 2022-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jasper Miller-Waugh |
| Maintainers | squareshaped, fallstop, sean-stanley, saille2 |
| Keywords | pdf, nz, certificates, physiotherapy |

## Links

- npm: https://www.npmjs.com/package/@openhealthnz-credentials/physioboard-apc-reader
- Repository: https://github.com/openhealthnz-credentials/physioboard-apc-reader
- Issues: https://github.com/openhealthnz-credentials/physioboard-apc-reader/issues
- npm.io page: https://npm.io/package/@openhealthnz-credentials/physioboard-apc-reader

## Dependencies (1)

- [pdf-parse](https://npm.io/package/pdf-parse.md) ^1.1.1

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.2.3 (latest) — 2022-01-17
- 1.2.2 — 2022-01-13
- 1.2.1 — 2022-01-13
- 1.2.0 — 2022-01-12
- 1.1.0 — 2022-01-12
- 1.0.0 — 2022-01-11

## README

# NZ Physioboard APC Reader ![](https://img.shields.io/badge/lang-TS-blue?style=flat-square) [![License][]](LICENSE) [![NPM Package]](https://npmjs.org/package/physioboard-apc-reader)

[license]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
[npm package]: https://img.shields.io/npm/v/@openhealthnz-credentials/physioboard-apc-reader.svg?style=flat-square


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

```bash
  npm install @openhealthnz-credentials/physioboard-apc-reader # or
  yarn add @openhealthnz-credentials/physioboard-apc-reader
```
    
## Usage

### From a file:

```javascript
import { ApcFromPDFBuffer } from '@openhealthnz-credentials/physioboard-apc-reader'
...
let details = await ApcFromPDFBuffer(fileBuffer);
```

### From a file buffer 

```javascript
import { ApcFromPDFFile } from '@openhealthnz-credentials/physioboard-apc-reader'
...
let details = await ApcFromPDFFile("./path/to/file.pdf");
```

### Error Handling
```javascript
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

[Demo site here!](https://physioboard-apc-reader.pages.dev/)

![](./demo.gif)

## Contributing

Contributions are always welcome!
Please adhere to this project's [`code of conduct`](./CODE_OF_CONDUCT.md).


### Core Library
```bash
# 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
```bash
cd demo-site
# Install dependencies
yarn
# Start development environment
yarn dev
```
### Docker Service
```bash
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
```bash
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](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-format) 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

---
_Source: https://npm.io/package/@openhealthnz-credentials/physioboard-apc-reader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
