3.1.0 • Published 6 years ago

rhi-core-isncsci-algorithm v3.1.0

Weekly downloads
17
License
https://raw.githu...
Repository
github
Last release
6 years ago

<rhi-core-isncsci-algorithm>

TypeScript version of the ISNCSCI algorithm.

What is ISNCSCI?

The International Standards for Neurological Classification of Spinal Cord Injury (ISNCSCI) is an examination used to score the motor and sensory impairment and severity of a spinal cord injury. The American Spinal Injury Association (ASIA).

Demo and documentation

We recommend the use of the usecases.CalculateTotalsUseCase class when performing calculations. Just pass your exam data to the usecases.CalculateTotalsUseCase.execute method. The data must follow implement the interface usecases.iIsncsciExamModel.

<script>
    import { iIsncsciAppStoreProvider } from 'rhi-core-isncsci-algorithm.boundaries';
    import { IsncsciTotals } from 'rhi-core-isncsci-algorithm.domain';
    import { CalculateTotalsUseCase, iIsncsciExamModel } from 'rhi-core-isncsci-algorithm.usecases';

    // Set totals will be called when the calculation has been completed.
    // We are following Clean Architecture principles in the implementation of our use cases:
    // https://www.linkedin.com/pulse/designing-typescript-todo-list-application-following-clean-eduardo/?lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_view_base_post_details%3Bo8kh9v7zTOuNHXWXrFhT9g%3D%3D
    const appStoreProvider = {
        setDermatomeValue: (dermatomeName: string, value: string) => Promise.resolve(),
        setTotals: (totals: IsncsciTotals) => { console.log(`These are the totals produced by the algorithm: ${totals}`); };
    };

    // Set you exam's raw data in an object that implements the interface `iIsncsciExamModel`
    const examData: iIsncsciExamModel = { 
        c5RicghtTouch: '2',
        c5RightPrick: '2',
        // Fully implement the interface
    };

    new CalculateTotalsUseCase(<iIsncsciAppStoreProvider>appStoreProvider).execute(examData);
</script>

Installation:

Download the component using npm:

   npm install --save rhi-core-isncsci-algorithm

or download as a zip file.

Visit our UI project where we have interface elements which will allow you incorporate the algorithm to your web and hybrid application projects.

Run the unit tests

  1. Run: npm install
  2. On:
  • Mac and Linux: ./node_modules/.bin/karma start
  • Windows: node_modules.bin\karma start

Demo

  1. cd demo
  2. tsc
  3. cd ..
  4. npm start
  5. Open the demo page on your browser.
3.1.0

6 years ago

3.0.3

6 years ago

2.0.2

6 years ago