# simlab

> A library to generate mock patient laboratory test reports, for use in medical simulation teaching.

Latest version **0.1.0** (published 2020-02-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install simlab
pnpm add simlab
yarn add simlab
bun add simlab
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2020-02-16 |
| First published | 2020-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 37 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tristan Jones |
| Maintainers | jones.tristand |

## Links

- npm: https://www.npmjs.com/package/simlab
- npm.io page: https://npm.io/package/simlab

## Dependencies (3)

- [random](https://npm.io/package/random.md) ^2.1.1
- [underscore](https://npm.io/package/underscore.md) ^1.9.2
- [underscore.get](https://npm.io/package/underscore.get.md) ^0.2.9

## Recent versions

- 0.1.0 (latest) — 2020-02-16

## README

# Welcome to simlab 👋
![Version](https://img.shields.io/badge/version-0.1.0-blue.svg?cacheSeconds=2592000)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Twitter: TDJonesEM](https://img.shields.io/twitter/follow/TDJonesEM.svg?style=social)](https://twitter.com/TDJonesEM)

> A library to generate mock patient laboratory test reports, for use in medical simulation teaching.

### 🏠 [Homepage/Demo](simlab.tdjones.ca)

## Install

```sh
npm install
```

## Usage

```js
import { Tests, OrderSets, Diseases, generateLabResults  } from 'simlab';

const result = generateLabResults(
  // Lab tests requested
  [
    'cbc',
    'lytes',
    'alt',
    'ast',
    'alp',
    'ggt'
  ],
  // Disease processes applied
  [
    'endo.dka',
    'cv.nstemi'
  ],
  // Patient demographics
  {
    age: 40,
    gender: 'm',
    height: 154, // cm
    weight: 70 // kg
  }
);

/**
result = {
  "Hematology": [
    {
      "id": "wbc",
      "long": "White Blood Cell Count",
      "short": "WBC",
      "category": "Hematology",
      "categoryOrder": 10,
      "low": 4,
      "high": 10,
      "precision": 1,
      "units": "x10^9/L",
      "initialValue": 7
    },
    {
      "id": "rbc",
      "long": "Red Blood Cell Count",
      "short": "RBC",
      "category": "Hematology",
      "categoryOrder": 20,
      "low": 4.4,
      "high": 5.7,
      "precision": 2,
      "units": "x10^12/L",
      "initialValue": 4.53
    },
    {
      "id": "hgb",
      "long": "Hemoglobin",
      "short": "Hgb",
      "category": "Hematology",
      "categoryOrder": 30,
      "low": 130,
      "high": 170,
      "precision": 0,
      "units": "g/L",
      "initialValue": 178
    },
    [...]
  ],
  [...]
}
**/
```

## Run tests

```sh
npm run test
```

## Contibuting
Coming soon

## Author

👤 **Tristan Jones <jones.tristand@gmail.com> (http://www.tdjones.ca/)**

* Website: http://www.tdjones.ca
* Twitter: [@TDJonesEM](https://twitter.com/TDJonesEM)
* Github: [@jonestristand](https://github.com/jonestristand)

## Show your support

Give a ⭐️ if this project helped you!


## 📝 License

Copyright © 2020 [Tristan Jones &lt;jones.tristand@gmail.com&gt;](https://github.com/jonestristand).

This project is [MIT](https://opensource.org/licenses/MIT) licensed.

***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

---
_Source: https://npm.io/package/simlab · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
