@emallon/hms_connector
v1.0.15
Published
Libreria que permite la conexion con los servicios de SaludSoft (AFI_v10 y CA_v20)
Downloads
24
Readme
HMS Connector
The HMS connector allows connection with the AFI_V10 and CA_V20 protocols.
Installation
npm i --save @emallon/hms_conector
Quick start
const hms_connector = require('@emallon/hms_connector');
const post_config = {
"host": "192.168.0.1",
"port": "3000",
"path": "/cawsTest/Servicios",
"method": "POST",
"headers": {"Content-Type": "text/xml; charset=utf-8"}
};
const request = { solicitud:{
"emisor": {
"id": "",
"prot": "",
"msgid": "10000",
"time": "2020-11-04T21:15:24.312Z",
"ter": "MOBILE",
"app": "HMS_MOBILE"
},
"oper": { tipo: 'CTD', fecha: '2020-11-04', idaseg: 'UP' },
"pid": { tipoid: 'CODIGO_AFI', id: '252004400' }
}};
async function connect(){
let response = await hms_connector.connect(request ,post_config,true);
console.log(response);
}
connect();