@imedx/ics-imedx-chromely-plugin-index-examine
Advanced tools
Comparing version 0.0.1-beta.24 to 0.0.1-beta.25
import icsChromelyRequest from '@icreate/ics-chromely-js-sdk'; | ||
/** | ||
* 将特殊字符进行转义 | ||
* @param keys 关键字 | ||
* @returns | ||
*/ | ||
function escapeSpecialCharacters(keys) { | ||
var escapedQuery = keys.replace(/([+\-!():{}\[\]^"~*?\\])/g, '\\$1'); | ||
return escapedQuery; | ||
} | ||
/* | ||
@@ -30,3 +40,3 @@ * @Author: 陶慧灵 | ||
IndexExamine.query = function (indexId, category, keys) { | ||
return this.OperateEx('Query', { indexId: indexId, category: category, keys: keys }); | ||
return this.OperateEx('Query', { indexId: indexId, category: category, keys: escapeSpecialCharacters(keys) }); | ||
}; | ||
@@ -43,3 +53,3 @@ /** | ||
IndexExamine.page = function (indexId, pageIndex, pageSize, category, keys) { | ||
return this.OperateEx('Page', { indexId: indexId, pageIndex: pageIndex, pageSize: pageSize, category: category, keys: keys }); | ||
return this.OperateEx('Page', { indexId: indexId, pageIndex: pageIndex, pageSize: pageSize, category: category, keys: escapeSpecialCharacters(keys) }); | ||
}; | ||
@@ -68,3 +78,3 @@ return IndexExamine; | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.query('DictionaryIndex', category, keys); | ||
return IndexExamine.query('DictionaryIndex', category, escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -82,3 +92,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.page('DictionaryIndex', pageIndex, pageSize, category, keys); | ||
return IndexExamine.page('DictionaryIndex', pageIndex, pageSize, category, escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -99,3 +109,3 @@ return DictIndex; | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.query('Icd10Index', category, this.QueryCondition(category, keys)); | ||
return IndexExamine.query('Icd10Index', category, this.QueryCondition(category, escapeSpecialCharacters(keys))); | ||
}; | ||
@@ -113,3 +123,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.page('Icd10Index', pageIndex, pageSize, category, this.QueryCondition(category, keys)); | ||
return IndexExamine.page('Icd10Index', pageIndex, pageSize, category, this.QueryCondition(category, escapeSpecialCharacters(keys))); | ||
}; | ||
@@ -146,3 +156,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.query('IcdTcmIndex', category, keys); | ||
return IndexExamine.query('IcdTcmIndex', category, escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -160,3 +170,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.page('IcdTcmIndex', pageIndex, pageSize, category, keys); | ||
return IndexExamine.page('IcdTcmIndex', pageIndex, pageSize, category, escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -187,3 +197,3 @@ return IcdTcmIndex; | ||
if (rank === void 0) { rank = 5; } | ||
return IndexExamine.query('SysAreaIndex', '', this.QueryCondition(keys, rank, category)); | ||
return IndexExamine.query('SysAreaIndex', '', this.QueryCondition(escapeSpecialCharacters(keys), rank, category)); | ||
}; | ||
@@ -203,3 +213,3 @@ /** | ||
if (rank === void 0) { rank = 5; } | ||
return IndexExamine.page('SysAreaIndex', pageIndex, pageSize, '', this.QueryCondition(keys, rank, category)); | ||
return IndexExamine.page('SysAreaIndex', pageIndex, pageSize, '', this.QueryCondition(escapeSpecialCharacters(keys), rank, category)); | ||
}; | ||
@@ -253,3 +263,3 @@ /** | ||
if (tcmOperation === void 0) { tcmOperation = false; } | ||
return IndexExamine.query('Icd9cm3Index', category, this.QueryCondition(category, keys, tcmOperation)); | ||
return IndexExamine.query('Icd9cm3Index', category, this.QueryCondition(category, escapeSpecialCharacters(keys), tcmOperation)); | ||
}; | ||
@@ -269,3 +279,3 @@ /** | ||
if (tcmOperation === void 0) { tcmOperation = false; } | ||
return IndexExamine.page('Icd9cm3Index', pageIndex, pageSize, category, this.QueryCondition(category, keys, tcmOperation)); | ||
return IndexExamine.page('Icd9cm3Index', pageIndex, pageSize, category, this.QueryCondition(category, escapeSpecialCharacters(keys), tcmOperation)); | ||
}; | ||
@@ -304,3 +314,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.query('DictDrugBaseIndex', '', this.QueryCondition(keys, category)); | ||
return IndexExamine.query('DictDrugBaseIndex', '', this.QueryCondition(escapeSpecialCharacters(keys), category)); | ||
}; | ||
@@ -318,3 +328,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.page('DictDrugBaseIndex', pageIndex, pageSize, '', this.QueryCondition(keys, category)); | ||
return IndexExamine.page('DictDrugBaseIndex', pageIndex, pageSize, '', this.QueryCondition(escapeSpecialCharacters(keys), category)); | ||
}; | ||
@@ -352,3 +362,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.query('DictDrugPharmacologyIndex', '', this.QueryCondition(keys, skinTestCategory, parentId)); | ||
return IndexExamine.query('DictDrugPharmacologyIndex', '', this.QueryCondition(escapeSpecialCharacters(keys), skinTestCategory, parentId)); | ||
}; | ||
@@ -367,3 +377,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.page('DictDrugPharmacologyIndex', pageIndex, pageSize, '', this.QueryCondition(keys, skinTestCategory, parentId)); | ||
return IndexExamine.page('DictDrugPharmacologyIndex', pageIndex, pageSize, '', this.QueryCondition(escapeSpecialCharacters(keys), skinTestCategory, parentId)); | ||
}; | ||
@@ -370,0 +380,0 @@ /** |
@@ -9,2 +9,12 @@ (function (global, factory) { | ||
/** | ||
* 将特殊字符进行转义 | ||
* @param keys 关键字 | ||
* @returns | ||
*/ | ||
function escapeSpecialCharacters(keys) { | ||
var escapedQuery = keys.replace(/([+\-!():{}\[\]^"~*?\\])/g, '\\$1'); | ||
return escapedQuery; | ||
} | ||
/* | ||
@@ -37,3 +47,3 @@ * @Author: 陶慧灵 | ||
IndexExamine.query = function (indexId, category, keys) { | ||
return this.OperateEx('Query', { indexId: indexId, category: category, keys: keys }); | ||
return this.OperateEx('Query', { indexId: indexId, category: category, keys: escapeSpecialCharacters(keys) }); | ||
}; | ||
@@ -50,3 +60,3 @@ /** | ||
IndexExamine.page = function (indexId, pageIndex, pageSize, category, keys) { | ||
return this.OperateEx('Page', { indexId: indexId, pageIndex: pageIndex, pageSize: pageSize, category: category, keys: keys }); | ||
return this.OperateEx('Page', { indexId: indexId, pageIndex: pageIndex, pageSize: pageSize, category: category, keys: escapeSpecialCharacters(keys) }); | ||
}; | ||
@@ -75,3 +85,3 @@ return IndexExamine; | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.query('DictionaryIndex', category, keys); | ||
return IndexExamine.query('DictionaryIndex', category, escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -89,3 +99,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.page('DictionaryIndex', pageIndex, pageSize, category, keys); | ||
return IndexExamine.page('DictionaryIndex', pageIndex, pageSize, category, escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -106,3 +116,3 @@ return DictIndex; | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.query('Icd10Index', category, this.QueryCondition(category, keys)); | ||
return IndexExamine.query('Icd10Index', category, this.QueryCondition(category, escapeSpecialCharacters(keys))); | ||
}; | ||
@@ -120,3 +130,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.page('Icd10Index', pageIndex, pageSize, category, this.QueryCondition(category, keys)); | ||
return IndexExamine.page('Icd10Index', pageIndex, pageSize, category, this.QueryCondition(category, escapeSpecialCharacters(keys))); | ||
}; | ||
@@ -153,3 +163,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.query('IcdTcmIndex', category, keys); | ||
return IndexExamine.query('IcdTcmIndex', category, escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -167,3 +177,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.page('IcdTcmIndex', pageIndex, pageSize, category, keys); | ||
return IndexExamine.page('IcdTcmIndex', pageIndex, pageSize, category, escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -194,3 +204,3 @@ return IcdTcmIndex; | ||
if (rank === void 0) { rank = 5; } | ||
return IndexExamine.query('SysAreaIndex', '', this.QueryCondition(keys, rank, category)); | ||
return IndexExamine.query('SysAreaIndex', '', this.QueryCondition(escapeSpecialCharacters(keys), rank, category)); | ||
}; | ||
@@ -210,3 +220,3 @@ /** | ||
if (rank === void 0) { rank = 5; } | ||
return IndexExamine.page('SysAreaIndex', pageIndex, pageSize, '', this.QueryCondition(keys, rank, category)); | ||
return IndexExamine.page('SysAreaIndex', pageIndex, pageSize, '', this.QueryCondition(escapeSpecialCharacters(keys), rank, category)); | ||
}; | ||
@@ -260,3 +270,3 @@ /** | ||
if (tcmOperation === void 0) { tcmOperation = false; } | ||
return IndexExamine.query('Icd9cm3Index', category, this.QueryCondition(category, keys, tcmOperation)); | ||
return IndexExamine.query('Icd9cm3Index', category, this.QueryCondition(category, escapeSpecialCharacters(keys), tcmOperation)); | ||
}; | ||
@@ -276,3 +286,3 @@ /** | ||
if (tcmOperation === void 0) { tcmOperation = false; } | ||
return IndexExamine.page('Icd9cm3Index', pageIndex, pageSize, category, this.QueryCondition(category, keys, tcmOperation)); | ||
return IndexExamine.page('Icd9cm3Index', pageIndex, pageSize, category, this.QueryCondition(category, escapeSpecialCharacters(keys), tcmOperation)); | ||
}; | ||
@@ -311,3 +321,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.query('DictDrugBaseIndex', '', this.QueryCondition(keys, category)); | ||
return IndexExamine.query('DictDrugBaseIndex', '', this.QueryCondition(escapeSpecialCharacters(keys), category)); | ||
}; | ||
@@ -325,3 +335,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.page('DictDrugBaseIndex', pageIndex, pageSize, '', this.QueryCondition(keys, category)); | ||
return IndexExamine.page('DictDrugBaseIndex', pageIndex, pageSize, '', this.QueryCondition(escapeSpecialCharacters(keys), category)); | ||
}; | ||
@@ -359,3 +369,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.query('DictDrugPharmacologyIndex', '', this.QueryCondition(keys, skinTestCategory, parentId)); | ||
return IndexExamine.query('DictDrugPharmacologyIndex', '', this.QueryCondition(escapeSpecialCharacters(keys), skinTestCategory, parentId)); | ||
}; | ||
@@ -374,3 +384,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return IndexExamine.page('DictDrugPharmacologyIndex', pageIndex, pageSize, '', this.QueryCondition(keys, skinTestCategory, parentId)); | ||
return IndexExamine.page('DictDrugPharmacologyIndex', pageIndex, pageSize, '', this.QueryCondition(escapeSpecialCharacters(keys), skinTestCategory, parentId)); | ||
}; | ||
@@ -377,0 +387,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_examine_1 = require("./index-examine"); | ||
var utils_1 = require("./utils"); | ||
var DictDrugBaseIndex = /** @class */ (function () { | ||
@@ -15,3 +16,3 @@ function DictDrugBaseIndex() { | ||
if (keys === void 0) { keys = ''; } | ||
return index_examine_1.default.query('DictDrugBaseIndex', '', this.QueryCondition(keys, category)); | ||
return index_examine_1.default.query('DictDrugBaseIndex', '', this.QueryCondition(utils_1.escapeSpecialCharacters(keys), category)); | ||
}; | ||
@@ -29,3 +30,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return index_examine_1.default.page('DictDrugBaseIndex', pageIndex, pageSize, '', this.QueryCondition(keys, category)); | ||
return index_examine_1.default.page('DictDrugBaseIndex', pageIndex, pageSize, '', this.QueryCondition(utils_1.escapeSpecialCharacters(keys), category)); | ||
}; | ||
@@ -32,0 +33,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_examine_1 = require("./index-examine"); | ||
var utils_1 = require("./utils"); | ||
var DictDrugPharmacologyIndex = /** @class */ (function () { | ||
@@ -16,3 +17,3 @@ function DictDrugPharmacologyIndex() { | ||
if (keys === void 0) { keys = ''; } | ||
return index_examine_1.default.query('DictDrugPharmacologyIndex', '', this.QueryCondition(keys, skinTestCategory, parentId)); | ||
return index_examine_1.default.query('DictDrugPharmacologyIndex', '', this.QueryCondition(utils_1.escapeSpecialCharacters(keys), skinTestCategory, parentId)); | ||
}; | ||
@@ -31,3 +32,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return index_examine_1.default.page('DictDrugPharmacologyIndex', pageIndex, pageSize, '', this.QueryCondition(keys, skinTestCategory, parentId)); | ||
return index_examine_1.default.page('DictDrugPharmacologyIndex', pageIndex, pageSize, '', this.QueryCondition(utils_1.escapeSpecialCharacters(keys), skinTestCategory, parentId)); | ||
}; | ||
@@ -34,0 +35,0 @@ /** |
@@ -12,2 +12,3 @@ "use strict"; | ||
var index_examine_1 = require("./index-examine"); | ||
var utils_1 = require("./utils"); | ||
var DictIndex = /** @class */ (function () { | ||
@@ -24,3 +25,3 @@ function DictIndex() { | ||
if (keys === void 0) { keys = ''; } | ||
return index_examine_1.default.query('DictionaryIndex', category, keys); | ||
return index_examine_1.default.query('DictionaryIndex', category, utils_1.escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -38,3 +39,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return index_examine_1.default.page('DictionaryIndex', pageIndex, pageSize, category, keys); | ||
return index_examine_1.default.page('DictionaryIndex', pageIndex, pageSize, category, utils_1.escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -41,0 +42,0 @@ return DictIndex; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_examine_1 = require("./index-examine"); | ||
var utils_1 = require("./utils"); | ||
var Icd10Index = /** @class */ (function () { | ||
@@ -15,3 +16,3 @@ function Icd10Index() { | ||
if (keys === void 0) { keys = ''; } | ||
return index_examine_1.default.query('Icd10Index', category, this.QueryCondition(category, keys)); | ||
return index_examine_1.default.query('Icd10Index', category, this.QueryCondition(category, utils_1.escapeSpecialCharacters(keys))); | ||
}; | ||
@@ -29,3 +30,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return index_examine_1.default.page('Icd10Index', pageIndex, pageSize, category, this.QueryCondition(category, keys)); | ||
return index_examine_1.default.page('Icd10Index', pageIndex, pageSize, category, this.QueryCondition(category, utils_1.escapeSpecialCharacters(keys))); | ||
}; | ||
@@ -32,0 +33,0 @@ /** |
@@ -12,2 +12,3 @@ "use strict"; | ||
var index_examine_1 = require("./index-examine"); | ||
var utils_1 = require("./utils"); | ||
var Icd9cm3Index = /** @class */ (function () { | ||
@@ -26,3 +27,3 @@ function Icd9cm3Index() { | ||
if (tcmOperation === void 0) { tcmOperation = false; } | ||
return index_examine_1.default.query('Icd9cm3Index', category, this.QueryCondition(category, keys, tcmOperation)); | ||
return index_examine_1.default.query('Icd9cm3Index', category, this.QueryCondition(category, utils_1.escapeSpecialCharacters(keys), tcmOperation)); | ||
}; | ||
@@ -42,3 +43,3 @@ /** | ||
if (tcmOperation === void 0) { tcmOperation = false; } | ||
return index_examine_1.default.page('Icd9cm3Index', pageIndex, pageSize, category, this.QueryCondition(category, keys, tcmOperation)); | ||
return index_examine_1.default.page('Icd9cm3Index', pageIndex, pageSize, category, this.QueryCondition(category, utils_1.escapeSpecialCharacters(keys), tcmOperation)); | ||
}; | ||
@@ -45,0 +46,0 @@ /** |
@@ -12,2 +12,3 @@ "use strict"; | ||
var index_examine_1 = require("./index-examine"); | ||
var utils_1 = require("./utils"); | ||
var IcdTcmIndex = /** @class */ (function () { | ||
@@ -24,3 +25,3 @@ function IcdTcmIndex() { | ||
if (keys === void 0) { keys = ''; } | ||
return index_examine_1.default.query('IcdTcmIndex', category, keys); | ||
return index_examine_1.default.query('IcdTcmIndex', category, utils_1.escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -38,3 +39,3 @@ /** | ||
if (keys === void 0) { keys = ''; } | ||
return index_examine_1.default.page('IcdTcmIndex', pageIndex, pageSize, category, keys); | ||
return index_examine_1.default.page('IcdTcmIndex', pageIndex, pageSize, category, utils_1.escapeSpecialCharacters(keys)); | ||
}; | ||
@@ -41,0 +42,0 @@ return IcdTcmIndex; |
@@ -12,2 +12,3 @@ "use strict"; | ||
var ics_chromely_js_sdk_1 = require("@icreate/ics-chromely-js-sdk"); | ||
var utils_1 = require("./utils"); | ||
var IndexExamine = /** @class */ (function () { | ||
@@ -32,3 +33,3 @@ function IndexExamine() { | ||
IndexExamine.query = function (indexId, category, keys) { | ||
return this.OperateEx('Query', { indexId: indexId, category: category, keys: keys }); | ||
return this.OperateEx('Query', { indexId: indexId, category: category, keys: utils_1.escapeSpecialCharacters(keys) }); | ||
}; | ||
@@ -45,3 +46,3 @@ /** | ||
IndexExamine.page = function (indexId, pageIndex, pageSize, category, keys) { | ||
return this.OperateEx('Page', { indexId: indexId, pageIndex: pageIndex, pageSize: pageSize, category: category, keys: keys }); | ||
return this.OperateEx('Page', { indexId: indexId, pageIndex: pageIndex, pageSize: pageSize, category: category, keys: utils_1.escapeSpecialCharacters(keys) }); | ||
}; | ||
@@ -48,0 +49,0 @@ return IndexExamine; |
@@ -12,2 +12,3 @@ "use strict"; | ||
var index_examine_1 = require("./index-examine"); | ||
var utils_1 = require("./utils"); | ||
var SysAreaIndex = /** @class */ (function () { | ||
@@ -26,3 +27,3 @@ function SysAreaIndex() { | ||
if (rank === void 0) { rank = 5; } | ||
return index_examine_1.default.query('SysAreaIndex', '', this.QueryCondition(keys, rank, category)); | ||
return index_examine_1.default.query('SysAreaIndex', '', this.QueryCondition(utils_1.escapeSpecialCharacters(keys), rank, category)); | ||
}; | ||
@@ -42,3 +43,3 @@ /** | ||
if (rank === void 0) { rank = 5; } | ||
return index_examine_1.default.page('SysAreaIndex', pageIndex, pageSize, '', this.QueryCondition(keys, rank, category)); | ||
return index_examine_1.default.page('SysAreaIndex', pageIndex, pageSize, '', this.QueryCondition(utils_1.escapeSpecialCharacters(keys), rank, category)); | ||
}; | ||
@@ -45,0 +46,0 @@ /** |
{ | ||
"name": "@imedx/ics-imedx-chromely-plugin-index-examine", | ||
"version": "0.0.1-beta.24", | ||
"version": "0.0.1-beta.25", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
116774
37
1442