Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@icreate/hb-basic-js-sdk

Package Overview
Dependencies
Maintainers
7
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@icreate/hb-basic-js-sdk - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10-beta.1

dist/lib/api/imedx-base.js

343

dist/lib/api/base.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.baseParams = void 0;
var base = {

@@ -104,345 +103,3 @@ // 登录

};
exports.baseParams = {
// 登录
login: {
code: 'string',
password: 'string'
},
// 判断科室是否存在对应的职能
checkDept: {
deptId: 'string',
functionId: 'string'
},
// 根据 token 获取用户信息
getUserInfoByToken: {
token: 'string'
},
// 获取用户所在科室与病区
getUserDeptList: {
userId: 'string',
organizationId: 'string'
},
//修改用户密码
setPassWord: {
userId: 'string',
password: 'string',
newPassword: 'string'
},
//获取用户权限科室
getAuthDeptList: {
userId: 'string',
targetAppId: 'string'
},
//获取用户特殊权限列表
getUserSpecRightList: {
userId: 'string'
},
//CA 登录接口
caLogin: {
code: 'string',
caId: 'string'
},
//获取应用列表
getApplist: {
applicationId: 'string',
firmId: 'string'
},
//特殊权限注册
registerSpecRight: {
id: 'string',
Name: 'string',
categoryId: 'string',
remark: 'string',
registerUserId: 'string',
registerUserName: 'string'
},
//注册应用菜单
registerAppMenu: {
appModules: [
{
id: '',
name: '',
parentId: '',
title: '',
path: '',
component: '',
icon: '',
registerUserId: '',
registerUserName: '',
sceneId: '',
describe: '',
remark: ''
}
],
initFlag: 'Number'
},
//注册应用菜单功能按钮
registerAppMenuOper: {
opers: [
{
moduleId: '',
id: '',
name: '',
path: '',
remark: '',
registerUserId: '',
registerUserName: '',
sceneId: '',
describe: ''
}
],
initFlag: 'Number'
},
//获取指定用户应用菜单列表
getAppMenuList: {
appId: 'string',
appName: 'string',
moudleId: 'string',
moudleName: 'string',
parentId: 'string',
categoryId: 'string',
categoryName: 'string',
title: 'string',
path: 'string',
component: 'string',
icon: 'string',
orderNo: 'string',
spellCode: 'string',
strokeCode: 'string',
describe: 'string',
remark: 'string'
},
//获取指定用户菜单下的按钮列表
getAppMenuOperList: {
userId: 'string',
moduleId: 'string'
},
// 获取用户权限应用列表
getAppUserRightList: {
userId: 'string'
},
//记录用户最近访问菜单
setVisitRecord: {
userId: 'string',
moduleId: 'string',
clientCode: 'string'
},
//获取用户最近访问菜单列表
getVisitRecordList: {
userId: 'string',
sortOrder: 'string'
},
//获取用户常用菜单列表
getCommonMenuList: {
userId: 'string'
},
//用户常用功能菜单注册
registerCommonMenu: {
userId: 'string',
moduleId: 'string'
},
//取消用户常用菜单注册
registerCommonMenuCancel: {
userId: 'string',
moduleId: 'string'
},
//用户常用菜单排序
sortCommonMenu: {
userId: 'string',
moduleOrder: [
{
orderNo: 'Number',
moduleId: 'String'
}
]
},
//获取机构列表
getOrgList: {
id: 'string',
name: 'string',
orgLevelCode: 'string',
orgLevelName: 'string',
code: 'string',
address: 'string',
telephone: 'string',
major: Number,
spellCode: 'string',
orderNo: 'string',
strokeCode: 'string',
remark: 'string'
},
//根据科室或病区获取机构信息
getInfoByDept: {
deptId: 'string'
},
//检查两个科室或病区是否属于同一分院
checkOrgSame: {
deptId1: 'string',
deptId2: 'string'
},
//判断用户是否是某个病区领导(护士长)
checkNurseUnitLeader: {
nursingUnitId: 'string',
userId: 'string'
},
//判断用户是否是某个科室领导(科主任)
checkDeptLeader: {
userId: 'string',
deptId: 'string'
},
// 根据指定流水号编码获取流水号
getSerialNum: {
applicationId: 'string',
serialId: 'string',
subId: 'string',
obtainUserId: 'string',
obtainUserName: 'string'
},
//注册流水号
registerSerialNum: {
applicationId: 'string',
serialId: 'string',
serialName: 'string',
description: 'string',
subId: 'string',
prefix: 'string',
format: 'string',
numberLen: 'string',
remark: 'string',
registerUserId: 'string',
registerUserName: 'string'
},
//获取应用字典数据分页列表
getDictDataPage: {
dictId: 'MODULE_CATEGORY',
pageSize: 1000,
currentPage: 1
},
//根据菜单类别获取菜单列表
getAppMenuCateList: {
categoryId: 'string',
appId: 'string'
},
//获取应用字典数据分页列表
getAppDictDataPage: {
appDictId: 'string',
current: 1
},
//获取应用参数值列表
getAppParamList: {
paramId: 'string',
subId: 'string'
},
//根据应用菜单编码获取已注册系统参数列表
getSystemParamList: {
moduleId: 'string'
},
//获取系统参数值
getSystemParamValue: {
paramId: 'string',
subId: 'string',
moduleId: 'string'
},
//设置系统参数
setSystemParam: {
paramId: 'string',
paramName: 'string',
paramDefaultValue: 'string',
paramValueList: 'string',
paramDesc: 'string',
remark: 'string',
moduleId: 'string',
settingUserId: 'string',
settingUserName: 'string'
},
//根据应用菜单编码获取已注册本地参数列表
getLocalParamList: {
clientId: 'string',
moduleId: 'string'
},
//获取本地参数值
getLocalParamValue: {
paramId: 'string',
clientId: 'string',
moduleId: 'string'
},
//本地参数设置
setLocalParam: {
paramId: 'string',
paramName: 'string',
paramDefaultValue: 'string',
paramValueList: 'string',
paramDesc: 'string',
remark: 'string',
moduleId: 'string',
settingUserId: 'string',
settingUserName: 'string',
version: 'string'
},
//本地参数值设置
setLocalParamValue: {
paramId: 'string',
clientId: 'string',
paramValue: 'string',
remark: 'string',
settingUserId: 'string',
settingUserName: 'string'
},
//获取系统参数值列表
getSystemParamValueList: {
paramId: 'string'
},
//客户端验证
checkClient: {
id: 'string',
macAddress: 'string',
ipAddr: 'string'
},
//客户端注册
registerClient: {
id: 'string',
name: 'string',
orgId: 'string',
ipAddr: 'string',
hostName: 'string',
macAddress: 'string',
clientInfo: 'string',
remark: 'string',
registerUserCode: 'string',
registerUserName: 'string',
registerUserPassword: 'string'
},
//根据客户端编码获取客户端信息
getClientInfo: {
id: 'string'
},
//获取数据验证规则列表
getDataValidRuleList: {
id: 'string',
name: 'string',
oraclePattern: 'string',
netPattern: 'string',
javaPatten: 'string',
jsPatten: 'string',
vuePatten: 'string',
ruleDesc: 'string',
remark: 'string'
},
//获取数据验证规则列表
getDeptListByOrg: {
orgId: 'string'
},
//获取数据验证规则列表
getOrgBuildingList: {
orgId: 'string'
},
//获取数据验证规则列表
getOrgUserList: {
orgId: 'string',
deptId: 'string',
flag: 'string',
sceneId: 'string'
}
};
exports.default = base;
//# sourceMappingURL=base.js.map

11

dist/lib/api/index.js

@@ -14,4 +14,13 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/*
* @Author: 刘邓
* @Date: 2022-05-15 20:46:08
* @LastEditors: 刘邓
* @LastEditTime: 2022-08-11 09:44:05
* @Description:
* @FilePath: \src\api\index.ts
*/
var base_1 = require("./base");
exports.default = __assign({}, base_1.default);
var imedx_base_1 = require("./imedx-base");
exports.default = __assign(__assign({}, base_1.default), imedx_base_1.default);
//# sourceMappingURL=index.js.map

@@ -5,4 +5,4 @@ "use strict";

* @Date: 2022-05-05 18:26:36
* @LastEditors: ld10016 763725112@qq.com
* @LastEditTime: 2022-05-17 18:43:07
* @LastEditors: 刘邓
* @LastEditTime: 2022-08-11 15:28:32
* @Description:

@@ -78,2 +78,4 @@ * @FilePath: \src\hb-basic-js-sdk.ts

var api_1 = require("./api");
var imedx_base_1 = require("./api/imedx-base");
var usuallyUrlList = Object.values(imedx_base_1.default);
var ContentType;

@@ -111,3 +113,2 @@ (function (ContentType) {

console.log('response:', response);
// 对出参进行解密并比对秘钥
var data = JSON.parse(js_base64_1.Base64.decode(response.data));

@@ -134,2 +135,19 @@ var sign = data.sign, rest = __rest(data, ["sign"]);

}
// 普通的,不需要加密的
function usuallyHttps(config) {
var https = axios_1.default.create(config);
https.interceptors.request.use(function (config) {
var headers = config.headers;
config.headers = __assign(__assign({}, headers), { 'content-type': ContentType.json });
config.method = 'POST';
return config;
});
https.interceptors.response.use(function (response) {
var data = response.data;
return data;
}, function (error) {
return Promise.reject(error);
});
return https;
}
var HBBasicClient = /** @class */ (function () {

@@ -139,2 +157,3 @@ function HBBasicClient(config) {

this.httpClient = https(config);
this.usuallyHttpClient = usuallyHttps(config);
}

@@ -146,6 +165,14 @@ HBBasicClient.prototype.$post = function (url, data) {

switch (_a.label) {
case 0: return [4 /*yield*/, this.httpClient.request({ url: url, data: data })];
case 0:
resData = null;
if (!usuallyUrlList.includes(url)) return [3 /*break*/, 2];
return [4 /*yield*/, this.usuallyHttpClient.request({ url: url, data: data })];
case 1:
resData = _a.sent();
return [2 /*return*/, Promise.resolve(resData)];
return [3 /*break*/, 4];
case 2: return [4 /*yield*/, this.httpClient.request({ url: url, data: data })];
case 3:
resData = _a.sent();
_a.label = 4;
case 4: return [2 /*return*/, Promise.resolve(resData)];
}

@@ -152,0 +179,0 @@ });

@@ -52,3 +52,2 @@ declare const base: {

};
export declare const baseParams: Object;
export default base;
declare const _default: {
getDictList: string;
getInpatientAge: string;
getOutpatientAge: string;
login: string;

@@ -48,3 +51,6 @@ checkDept: string;

packageRegister: string;
getDeptListByOrg: string;
getOrgBuildingList: string;
getOrgUserList: string;
};
export default _default;

@@ -23,2 +23,3 @@ import { AxiosInstance, AxiosRequestConfig } from 'axios';

httpClient: AxiosInstance;
usuallyHttpClient: AxiosInstance;
constructor(config: IaxiosRequestConfig);

@@ -25,0 +26,0 @@ private $post;

@@ -276,3 +276,39 @@ interface Iapi {

}): Promise<any>;
getDictList(opts: {
enabled?: number;
id?: string;
name?: string;
spellCode?: string;
strokeCode?: string;
tableName: string;
}): Promise<any>;
/**
* 获取住院患者年龄
* @param opts
* algorithmFlag(必传) 计算方式标志 0:挂号日期为当前时间 1:挂号日期为入院时间or入区时间;出院时间or出区时间
* birthDate (必传)出生日期
* flag(必传):0:周岁 1:虚岁
* registrationDate (必传)挂号日期
*/
getInpatientAge(opts: {
algorithmFlag: number;
birthDate: string;
flag: number;
registrationDate: string;
}): Promise<any>;
/**
*获取门诊患者年龄
* @param opts
* showFlag(必传)显示标志: 0: 25月 1: 2岁1月
* registrationDate(必传) 挂号日期
* flag(必传):0:周岁 1:虚岁
* birthDate(必传) 出生日期
*/
getOutpatientAge(opts: {
showFlag: number;
birthDate: string;
flag: number;
registrationDate: string;
}): Promise<any>;
}
export default Iapi;
{
"name": "@icreate/hb-basic-js-sdk",
"version": "0.0.9",
"version": "0.0.10-beta.1",
"description": "",

@@ -126,2 +126,2 @@ "keywords": [],

}
}
}

@@ -146,2 +146,4 @@ ## 引入

getOrgUserList: '/org/user/list'
// 获取字典数据
getDictList: '/dict/get'
}

@@ -148,0 +150,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc