Generic business logic for web-based medical imaging applications
npm install @dcm-cloud/core
@dcm-cloud/core is a collection of useful functions and classes for building web-based medical imaging applications. This library helps power DCMCloud's zero-footprint DICOM viewer.
// with npm
npm i @dcm-cloud/core --save-exact
// with yarn
yarn add @dcm-cloud/core --exact
`
$3
Usage is dependent on the feature(s) you want to leverage. The bulk of
@dcm-cloud/core's features are "pure" and can be imported and used in place.
_Example: retrieving study metadata from a server_
`js
import { studies } from '@dcm-cloud/core';
const studiesMetadata = await studies.retrieveStudiesMetadata(
server, // Object
studyInstanceUIDs, // Array
seriesInstanceUIDs // Array (optional)
);
`
$3
It is notoriously difficult to setup multiple dependent repositories for
end-to-end testing and development. That's why we recommend writing and running
unit tests when adding and modifying features for this library. This allows us
to program in isolation without a complex setup, and has the added benefit of
producing well-tested business logic.
1. Clone this repository
2. Navigate to the project directory, and yarn install
3. To begin making changes, yarn run dev
4. To commit changes, run yarn run cm
When creating tests, place the test file "next to" the file you're testing.
For example:
`js
// File
index.js;
// Test for file
index.test.js;
`
As you add and modify code, jest will watch for uncommitted changes and run
your tests, reporting the results to your terminal. Make a pull request with
your changes to master`, and a core team member will review your work. If you