RMIS javascript libraries


Keywords
RMIS, javascript, libraries
License
MIT
Install
npm install rmisjs@0.6.2

Documentation

JS-обертка для работы с RMIS

Начиная с версии 0.1.1 требуется node.js версии 8.0.0 и выше

Как использовать:

  1. npm install rmisjs
  2. Создать конфигурацию:
var config = {
    rmis: {
        auth: {
            username: "username",
            password: "password"
        },
        path: "https://dev.is-mis.ru/",
        clinicId: clinicId,
        allowedServices: [
            "departments-ws/departments",
            "individuals-ws/individuals",
            "locations-ws/resources"
        ]
    }
}
  1. Подключить модули и установить конфигурацию:
const rmisjs = require('rmisjs')(config);
const rmis = rmisjs.rmis;
const composer = rmisjs.composer;
  1. Вызвать необходимый модуль:
rmis.resource()
    .then(r => {
        return r.getLocations({ clinic: config.rmis.clinicId });
    })
    .then(r => {
        console.log(r);
    })
    .catch(e => {
        console.error(e);
    });

composer.getLocationsWithPortal()
    .then(r => {
        console.log(r);
    })
    .catch(e => { console.error(e); });