0.1.0 ā€¢ Published 4 years ago

simlab v0.1.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Welcome to simlab šŸ‘‹

Version License: MIT Twitter: TDJonesEM

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

šŸ  Homepage/Demo

Install

npm install

Usage

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

npm run test

Contibuting

Coming soon

Author

šŸ‘¤ Tristan Jones jones.tristand@gmail.com (http://www.tdjones.ca/)

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2020 Tristan Jones <jones.tristand@gmail.com>.

This project is MIT licensed.


This README was generated with ā¤ļø by readme-md-generator