diff --git a/index.html b/index.html index c4ecfdc..4522074 100644 --- a/index.html +++ b/index.html @@ -20,6 +20,10 @@ + + + " + diff --git a/sources/constants.js b/sources/constants.js index b83ca9a..839edb3 100644 --- a/sources/constants.js +++ b/sources/constants.js @@ -211,4 +211,10 @@ export default { MULTI_LESION_TYPE_PRIORITY: { FIRST: "dermoscopic" }, + DIAGNOSIS_SEPARATOR: ":", + FILTER_ELEMENT_TYPE: { + CHECKBOX: "checkbox", + TREE_CHECKBOX: "treeCheckbox", + RANGE_CHECKBOX: "rangeCheckbox", + }, }; diff --git a/sources/models/appliedFilters.js b/sources/models/appliedFilters.js index 32cfa0c..45256f1 100644 --- a/sources/models/appliedFilters.js +++ b/sources/models/appliedFilters.js @@ -40,6 +40,7 @@ function prepareDataForList() { switch (filter.view) { case "checkbox": case "rangeCheckbox": + case constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX: { result.push(webix.copy(filter)); break; @@ -98,6 +99,21 @@ function processNewFilter(filter) { } break; } + case constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX: { + const optionId = filter.optionId; + if (filter.remove) { + if (appliedFilters.exists(optionId)) { + appliedFilters.remove(optionId); + } + } + else { + filter.id = optionId; + if (!appliedFilters.exists(optionId)) { + appliedFilters.add(filter); + } + } + break; + } case "rangeSlider": { break; @@ -356,6 +372,20 @@ function _groupFiltersByKey() { }); break; } + case constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX: { + let itemFromResult = result.find(comparedItem => comparedItem.key === `${item.key}_${item.diagnosisLevel}`, true); + if (!itemFromResult) { + itemFromResult = { + view: item.view, + key: `${item.key}_${item.diagnosisLevel}`, + datatype: item.datatype, + values: [] + }; + result.push(itemFromResult); + } + itemFromResult.values.push(_prepareOptionNameForApi(item.value, `${item.key}_${item.diagnosisLevel}`)); + break; + } default: { break; @@ -369,6 +399,7 @@ function _prepareCondition(filter) { let result = []; switch (filter.view) { case "checkbox": + case constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX: { _prepareValuesCondition(filter, result); break; @@ -390,15 +421,46 @@ function _prepareCondition(filter) { function getConditionsForApi() { const conditions = {}; conditions.operands = []; + const diagnosisRegex = /^diagnosis_\d$/; + const diagnosisFilters = _groupFiltersByKey().filter(f => diagnosisRegex.test(f.key)); const groupedFilters = _groupFiltersByKey() - .filter(groupedFilter => groupedFilter.key !== constants.COLLECTION_KEY); + .filter(groupedFilter => groupedFilter.key !== constants.COLLECTION_KEY + && !diagnosisRegex.test(groupedFilter.key)); + if (diagnosisFilters.length !== 0) { + conditions.operator = diagnosisFilters.length > 1 ? "OR" : ""; + diagnosisFilters.forEach((d) => { + conditions.operands.push(...(_prepareCondition(d))); + }); + } + let query = diagnosisFilters.length > 0 ? "(" : ""; + conditions.operands.forEach((itemOfConditions, paramIndex) => { + if (paramIndex > 0) { + if (itemOfConditions.operator.toUpperCase() === "OR") { + query += itemOfConditions.type === "number" || itemOfConditions.type === "boolean" || itemOfConditions.value.includes("[") + ? ` ${itemOfConditions.operator.toUpperCase()} ${itemOfConditions.key}:${itemOfConditions.value}${itemOfConditions.closingBracket}` + : ` ${itemOfConditions.operator.toUpperCase()} ${itemOfConditions.key}:"${itemOfConditions.value}"${itemOfConditions.closingBracket}`; + } + else { + query += itemOfConditions.type === "number" || itemOfConditions.type === "boolean" || itemOfConditions.value.includes("[") + ? ` ${conditions.operator.toUpperCase()} ${itemOfConditions.openingBracket}${itemOfConditions.key}:${itemOfConditions.value}` + : ` ${conditions.operator.toUpperCase()} ${itemOfConditions.openingBracket}${itemOfConditions.key}:"${itemOfConditions.value}"`; + } + } + else { + query += itemOfConditions.type === "number" || itemOfConditions.type === "boolean" || itemOfConditions.value.includes("[") + ? `${itemOfConditions.openingBracket}${itemOfConditions.key}:${itemOfConditions.value}${itemOfConditions.closingBracket}` + : `${itemOfConditions.openingBracket}${itemOfConditions.key}:"${itemOfConditions.value}"${itemOfConditions.closingBracket}`; + } + }); + query += query === "" ? "" : ")"; + conditions.operands.length = 0; if (groupedFilters.length !== 0) { + query += query === "" ? "" : " AND "; conditions.operator = groupedFilters.length > 1 ? "AND" : ""; groupedFilters.forEach((groupedFilter) => { conditions.operands.push(...(_prepareCondition(groupedFilter))); }); } - let query = ""; conditions.operands.forEach((itemOfConditions, paramIndex) => { if (paramIndex > 0) { if (itemOfConditions.operator.toUpperCase() === "OR") { @@ -446,7 +508,19 @@ function getFiltersFromURL(filtersArray) { .map((filter) => { let filterId; if (typeof filter === "object") { - filterId = filter.id; + if (filter.type === constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX) { + const view = $$(filter.viewId); + const item = view.getItem(filter.optionId); + const treeData = state.filtersTreeData.get(filter.viewId); + const data = getFiltersChangeTreeItemData( + treeData, + item, + item.datatype, + false, + ); + return data; + } + return null; } else if (filter.includes(constants.COLLECTION_KEY)) { const pinnedCollections = collectionsModel.getPinnedCollections(); @@ -470,7 +544,71 @@ function getFiltersFromURL(filtersArray) { } function convertAppliedFiltersToParams() { - return JSON.stringify(getFiltersArray().map(filter => filter.id)); + return JSON.stringify(getFiltersArray().map((filter) => { + if (filter.view === constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX) { + return {type: filter.view, viewId: filter.viewId, optionId: filter.optionId}; + } + return filter.id; + })); +} + +function getAppliedCollectionsForApi() { + const filtersArray = getFiltersArray(); + const appliedCollections = filtersArray + .filter(filter => filter.key === constants.COLLECTION_KEY); + const result = appliedCollections.map(collection => collection.optionId); + return result.length > 0 ? result.join(",") : ""; +} + +/** + * Get filters changed data for checkboxes + * @param {object} data + * @param {object} currentOption + * @param {String} optionName + */ +function getFiltersChangedData(data, currentOption, optionName) { + const filtersChangedData = {}; + filtersChangedData.view = data.type; + filtersChangedData.datatype = data.datatype; + filtersChangedData.key = data.id; + filtersChangedData.filterName = data.name; + filtersChangedData.value = optionName; + filtersChangedData.optionId = currentOption.optionId; + filtersChangedData.status = "equals"; + if (currentOption && data.type === "rangeCheckbox") { + filtersChangedData.to = currentOption.to; + filtersChangedData.from = currentOption.from; + } + return filtersChangedData; +} + +/** + * + * @param {object} data + * @param {object} item + * @param {String} datatype + * @param {boolean} state + */ +function getFiltersChangeTreeItemData(data, item, datatype, remove) { + const filtersChangedData = {}; + filtersChangedData.view = data.type; + filtersChangedData.datatype = datatype; + filtersChangedData.key = data.labelId; + filtersChangedData.filterName = data.name; + filtersChangedData.value = getTreeOptionValueById(item.id); + filtersChangedData.status = "equals"; + filtersChangedData.treeCheckboxFlag = true; + filtersChangedData.diagnosisLevel = item.$level; + filtersChangedData.optionId = item.id; + filtersChangedData.viewId = `treeTable-${data.id}`; + filtersChangedData.remove = remove; + return filtersChangedData; +} + +function getTreeOptionValueById(id) { + const separator = "|"; + const array = id.split(separator); + return array.at(array.length - 1); } export default { @@ -489,7 +627,10 @@ export default { getFilterValue, getShowedFiltersCollection, getFiltersFromURL, - convertAppliedFiltersToParams + convertAppliedFiltersToParams, + getAppliedCollectionsForApi, + getFiltersChangedData, + getFiltersChangeTreeItemData, }; // TODO: rewrite example diff --git a/sources/models/collectionsModel.js b/sources/models/collectionsModel.js index 4f2b1cc..dc2809b 100644 --- a/sources/models/collectionsModel.js +++ b/sources/models/collectionsModel.js @@ -1,35 +1,7 @@ -import constants from "../constants"; -import filtersModel from "./appliedFilters"; - -const allCollections = []; -let allCollectionsNextLink = null; -let allCollectionsPrevLink = null; const pinnedCollections = []; let pinnedCollectionsNextLink = null; let pinnedCollectionsPrevLink = null; -function getAllCollections() { - return allCollections; -} - -function getAllCollectionsNextLink() { - return allCollectionsNextLink; -} - -function getAllCollectionsPrevLink() { - return allCollectionsPrevLink; -} - -function setAllCollectionsData(collectionsData) { - allCollections.push(...collectionsData.results); - allCollectionsNextLink = collectionsData.next; - allCollectionsPrevLink = collectionsData.previous; -} - -function clearAllCollections() { - allCollections.length = 0; -} - function getPinnedCollections() { return pinnedCollections; } @@ -59,25 +31,11 @@ function updateCollections(buckets) { }); } -function getAppliedCollectionsForApi() { - const appliedFilters = filtersModel.getFiltersArray(); - const appliedCollections = appliedFilters - .filter(filter => filter.key === constants.COLLECTION_KEY); - const result = appliedCollections.map(collection => collection.optionId); - return result.length > 0 ? result.join(",") : ""; -} - export default { - getAllCollections, - getAllCollectionsNextLink, - getAllCollectionsPrevLink, - setAllCollectionsData, - clearAllCollections, getPinnedCollections, getPinnedCollectionsNextLink, getPinnedCollectionsPrevLink, setPinnedCollections, clearPinnedCollections, updateCollections, - getAppliedCollectionsForApi }; diff --git a/sources/models/diagnosis.js b/sources/models/diagnosis.js new file mode 100644 index 0000000..c11b536 --- /dev/null +++ b/sources/models/diagnosis.js @@ -0,0 +1,124 @@ +/** + * @typedef {Object} Diagnosis + * @property {number} level + * @property {string | null} parent + * @property {string} concatenate + * @property {Array | null} children + */ +import diagnosisFlat from "./iddx-flat.json"; +import diagnosisTree from "./iddx-tree.json"; + +const CONCATENATE_SEPARATOR = "::"; +const diagnosisArray = []; +const displayDiagnosis = []; + +function getDiagnosisFlat() { + return diagnosisFlat; +} + +function getDiagnosisDataForFilters() { + const data = convertDiagnosisToTreeArray(diagnosisTree); + return data; +} + +function convertDiagnosisToTreeArray(tree) { + const dataForFilters = []; + const diagnosisKeys = Object.keys(tree); + diagnosisKeys.forEach((k) => { + if (displayDiagnosis.find(d => d === k)) { + const diagnosisItem = {}; + diagnosisItem.id = diagnosisFlat[k].concatenate.replaceAll(CONCATENATE_SEPARATOR, "|"); + diagnosisItem.name = k; + diagnosisItem.type = "treeCheckbox"; + diagnosisItem.datatype = "string"; + diagnosisItem.level = diagnosisFlat[k].level; + diagnosisItem.data = diagnosisFlat[k].children + ? convertDiagnosisToTreeArray(tree[k].children) + : null; + diagnosisItem.parent = diagnosisFlat[k].parent; + dataForFilters.push(diagnosisItem); + } + }); + return dataForFilters; +} + +function getDiagnosisConcatenateValue(id) { + return diagnosisFlat[id]?.concatenate.replaceAll(CONCATENATE_SEPARATOR, "|"); +} + +function getDiagnosisValuesByLevel(filterKey) { + const diagnosisValues = []; + if (diagnosisArray.length === 0) { + const diagnosisFlatKeys = Object.keys(diagnosisFlat); + diagnosisFlatKeys.forEach((k) => { + const diagnosisItem = {...diagnosisFlat[k]}; + diagnosisItem.id = k; + diagnosisArray.push(diagnosisItem); + }); + } + switch (filterKey) { + case "diagnosis_1": { + diagnosisValues.push( + ...diagnosisArray + .filter(d => d.level === 1) + .map(d => d.id) + ); + break; + } + case "diagnosis_2": { + diagnosisValues.push( + ...diagnosisArray + .filter(d => d.level === 2) + .map(d => d.id) + ); + break; + } + case "diagnosis_3": { + diagnosisValues.push( + ...diagnosisArray + .filter(d => d.level === 3) + .map(d => d.id) + ); + break; + } + case "diagnosis_4": { + diagnosisValues.push( + ...diagnosisArray + .filter(d => d.level === 4) + .map(d => d.id) + ); + break; + } + case "diagnosis_5": { + diagnosisValues.push( + ...diagnosisArray + .filter(d => d.level === 5) + .map(d => d.id) + ); + break; + } + default: { + break; + } + } + return diagnosisValues; +} + +function addDisplayDiagnosis(dArray) { + displayDiagnosis.push(...dArray); +} + +function getDisplayDiagnosis() { + return displayDiagnosis; +} + +const diagnosisModel = { + getDiagnosisFlat, + getDiagnosisDataForFilters, + getDiagnosisConcatenateValue, + getDiagnosisValuesByLevel, + addDisplayDiagnosis, + getDisplayDiagnosis, +}; + +export default diagnosisModel; diff --git a/sources/models/iddx-flat.json b/sources/models/iddx-flat.json new file mode 100644 index 0000000..c3d2117 --- /dev/null +++ b/sources/models/iddx-flat.json @@ -0,0 +1,3017 @@ +{ + "Benign": { + "level": 1, + "parent": null, + "concatenate": "Benign", + "children": [ + "Mast cell proliferations", + "Inflammatory or infectious diseases", + "Langerhans cell proliferations", + "Benign - Other", + "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "Benign adnexal epithelial proliferations - Follicular", + "Benign adnexal epithelial proliferations - Sebaceous", + "Benign epidermal proliferations", + "Benign soft tissue proliferations - Adipocytic", + "Benign soft tissue proliferations - Cartilagenous and ossifying", + "Benign soft tissue proliferations - Fibro-histiocytic", + "Benign melanocytic proliferations", + "Benign soft tissue proliferations - Myoepithelial", + "Benign soft tissue proliferations - Neural", + "Benign soft tissue proliferations - Vascular", + "Collision - Only benign proliferations", + "Cysts", + "Exogenous", + "Flat melanotic pigmentations - not melanocytic nevus", + "Benign soft tissue proliferations - Muscle tissue or myofibroblastic", + "Hemorrhagic lesions" + ] + }, + "Indeterminate": { + "level": 1, + "parent": null, + "concatenate": "Indeterminate", + "children": [ + "Indeterminate melanocytic proliferations", + "Indeterminate epidermal proliferations" + ] + }, + "Malignant": { + "level": 1, + "parent": null, + "concatenate": "Malignant", + "children": [ + "Collision - At least one malignant proliferation", + "Lymphocytic proliferations - B-Cell", + "Lymphocytic proliferations - T-Cell/NK", + "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "Malignant adnexal epithelial proliferations - Follicular", + "Malignant adnexal epithelial proliferations - Sebaceous", + "Malignant epidermal proliferations", + "Malignant soft tissue proliferations - Adipocytic", + "Malignant soft tissue proliferations - Cartilagenous and ossifying", + "Malignant soft tissue proliferations - Fibro-histiocytic", + "Malignant soft tissue proliferations - Muscle tissue or myofibroblastic", + "Malignant soft tissue proliferations - Myoepithelial", + "Malignant soft tissue proliferations - Neural", + "Malignant soft tissue proliferations - Unknown or other histiogenesis", + "Malignant soft tissue proliferations - Vascular", + "Merkel cell proliferation", + "Skin metastasis of internal solid cancer - non-hematological", + "Malignant melanocytic proliferations (Melanoma)" + ] + }, + "Indeterminate melanocytic proliferations": { + "level": 2, + "parent": "Indeterminate", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations", + "children": [ + "Atypical melanocytic neoplasm", + "Atypical intraepithelial melanocytic proliferation", + "Atypical Spitz tumor", + "Atypical pigmented spindle cell tumor", + "Atypical proliferative nodules in congenital melanocytic nevus", + "Superficial atypical melanocytic proliferation of uncertain significance", + "Melanocytic tumor of uncertain malignant potential" + ] + }, + "Collision - At least one malignant proliferation": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Collision - At least one malignant proliferation", + "children": null + }, + "Lymphocytic proliferations - B-Cell": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Lymphocytic proliferations - B-Cell", + "children": [ + "EBV positive mucocutaneous ulcer", + "Intravascular large B-cell lymphoma", + "Lymphocytic proliferation, B-Cell, other", + "Primary cutaneous follicle center lymphoma", + "Primary cutaneous large B-Cell lymphoma", + "Primary cutaneous marginal zone lymphoma" + ] + }, + "Lymphocytic proliferations - T-Cell/NK": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK", + "children": [ + "Chronic active EBV infection", + "Adult T-cell leukemia or lymphoma", + "Extranodal T-cell/NK lymphoma", + "Lymphocytic proliferation, T-Cell/NK", + "Mycosis fungoides", + "Primary cutaneous CD4+ small or medium T-cell lymphoproliferative disorder", + "Primary cutaneous peripheral T-cell lymphoma", + "Sezary syndrome", + "Subcutaneous panniculitis-like T-cell lymphoma", + "Primary cutaneous CD30+ lymphoproliferative disease" + ] + }, + "Malignant adnexal epithelial proliferations - Apocrine or Eccrine": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "children": [ + "Adenoid cystic carcinoma", + "Adnexal adenocarcinoma arising in association with spiradenoma, cylindroma, or spiradenocylindroma", + "Apocrine carcinoma", + "Digital papillary carcinoma", + "Hidradenocarcinoma", + "Malignant mixed tumor", + "Microcystic adnexal carcinoma", + "Mucinous carcinoma", + "Tubular carcinoma", + "Paget disease", + "Porocarcinoma" + ] + }, + "Malignant adnexal epithelial proliferations - Follicular": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular", + "children": [ + "Basal cell carcinoma", + "Baso-squamous carcinoma", + "Matrical or pilomatrical carcinoma", + "Proliferating trichilemmal carcinoma" + ] + }, + "Malignant adnexal epithelial proliferations - Sebaceous": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Sebaceous", + "children": [ + "Sebaceous carcinoma" + ] + }, + "Malignant epidermal proliferations": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant epidermal proliferations", + "children": [ + "Keratoacanthoma", + "Verrucous carcinoma", + "Squamous cell carcinoma, NOS", + "Bowenoid papulosis", + "Squamous cell carcinoma in situ", + "Squamous cell carcinoma, Invasive" + ] + }, + "Malignant soft tissue proliferations - Adipocytic": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant soft tissue proliferations - Adipocytic", + "children": [ + "Liposarcoma" + ] + }, + "Malignant soft tissue proliferations - Cartilagenous and ossifying": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant soft tissue proliferations - Cartilagenous and ossifying", + "children": [ + "Extraskeletal osteosarcoma" + ] + }, + "Malignant soft tissue proliferations - Fibro-histiocytic": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant soft tissue proliferations - Fibro-histiocytic", + "children": [ + "Atypical fibroxanthoma", + "Dermatofibrosarcoma protuberans", + "Epithelioid sarcoma", + "Fibrosarcoma", + "Pleomorphic undifferntiated sarcoma" + ] + }, + "Malignant soft tissue proliferations - Muscle tissue or myofibroblastic": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant soft tissue proliferations - Muscle tissue or myofibroblastic", + "children": [ + "Atypical intradermal smooth muscle tumor", + "Leiomyosarcoma, Cutaneous", + "Rhabdomyoscaroma, Cutaneous" + ] + }, + "Malignant soft tissue proliferations - Myoepithelial": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant soft tissue proliferations - Myoepithelial", + "children": [ + "Myoepithelial sarcoma" + ] + }, + "Malignant soft tissue proliferations - Neural": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant soft tissue proliferations - Neural", + "children": [ + "Malignant granular cell tumor", + "Malignant peripheral nerve sheath tumor" + ] + }, + "Malignant soft tissue proliferations - Unknown or other histiogenesis": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant soft tissue proliferations - Unknown or other histiogenesis", + "children": [ + "Ewing sarcoma, Primary cutaenous" + ] + }, + "Malignant soft tissue proliferations - Vascular": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant soft tissue proliferations - Vascular", + "children": [ + "Angiosarcoma cutaneous", + "Hemangioendothelioma", + "Kaposi sarcoma", + "Malignant glomus tumor" + ] + }, + "Merkel cell proliferation": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Merkel cell proliferation", + "children": [ + "Merkel cell carcinoma" + ] + }, + "Skin metastasis of internal solid cancer - non-hematological": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Skin metastasis of internal solid cancer - non-hematological", + "children": null + }, + "Indeterminate epidermal proliferations": { + "level": 2, + "parent": "Indeterminate", + "concatenate": "Indeterminate::Indeterminate epidermal proliferations", + "children": [ + "Solar or actinic cheilitis", + "Solar or actinic keratosis" + ] + }, + "Mast cell proliferations": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Mast cell proliferations", + "children": [ + "Maculopapular mastocytoma", + "Mastocytoma, Solitary or unifocal", + "Mastocytosis" + ] + }, + "Malignant melanocytic proliferations (Melanoma)": { + "level": 2, + "parent": "Malignant", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)", + "children": [ + "Melanoma metastasis", + "Melanoma, NOS", + "Melanoma in situ", + "Melanoma Invasive" + ] + }, + "Inflammatory or infectious diseases": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Inflammatory or infectious diseases", + "children": [ + "Verruca", + "Muluscum" + ] + }, + "Langerhans cell proliferations": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Langerhans cell proliferations", + "children": [ + "Mixed Langerhans cell histiocytosis and Erdheim Chester disease", + "Langerhans cell histiocytosis", + "Erdheim Chester disease", + "Indeterminate cell histiocytosis" + ] + }, + "Benign - Other": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign - Other", + "children": null + }, + "Benign adnexal epithelial proliferations - Apocrine or Eccrine": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "children": [ + "Apocrine tubular adenoma", + "Cylindoma", + "Cystadenoma", + "Fibroadenoma", + "Hidradenoma papilliferum", + "Hidradenoma, Apocrine", + "Hidradenoma", + "Mixed tumor", + "Poroma", + "Spiradenoma", + "Syringocystadenoma papilliferum", + "Syringofibroadenoma", + "Syringoma", + "Supernumerary nipple" + ] + }, + "Benign adnexal epithelial proliferations - Follicular": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular", + "children": [ + "Warty dyskeratoma", + "Tumor of follicular infundibulum", + "Tricholemmoma", + "Trichofolliculoma", + "Folliculosebaceous cystic hamartoma", + "Nevus comedonicus", + "Pilar sheath acanthoma", + "Pilomatricoma", + "Proliferating tricholemmal tumor", + "Trichoblastoma", + "Trichoepithelioma", + "Panfolliculoma" + ] + }, + "Benign adnexal epithelial proliferations - Sebaceous": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Sebaceous", + "children": [ + "Fibrofolliculoma", + "Fordyce spots", + "Nevus sebaceus", + "Sebaceoma", + "Sebaceous adenoma", + "Sebaceous hyperplasia", + "Trichodiscoma" + ] + }, + "Benign epidermal proliferations": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign epidermal proliferations", + "children": [ + "Acantholytic acanthoma", + "Clear cell acanthoma", + "Epidermal nevus", + "Epidermolytic acanthoma", + "Large cell acanthoma", + "Lichen planus like keratosis", + "Melanoacanthoma", + "Pigmented benign keratosis", + "Porokeratosis", + "Seborrheic keratosis", + "Solar lentigo" + ] + }, + "Benign soft tissue proliferations - Adipocytic": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign soft tissue proliferations - Adipocytic", + "children": [ + "Angiolipoma", + "Lipoma", + "Lipomatous nevus", + "Fibrolipoma" + ] + }, + "Benign soft tissue proliferations - Cartilagenous and ossifying": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign soft tissue proliferations - Cartilagenous and ossifying", + "children": [ + "Accessory tragus", + "Extraskeletal chondroma", + "Osteoma cutis", + "Subungual osteochodroma" + ] + }, + "Benign soft tissue proliferations - Fibro-histiocytic": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic", + "children": [ + "Angiofibroma", + "Dermatofibroma", + "Fibroepithelial polyp", + "Fibroma", + "Giant cell tumor of the tendon sheath", + "Juvenile xanthogranuloma", + "Cutaneous Myxoma", + "Non-Langerhans histiocytosis", + "Reticulohistiocytosis", + "Rosai-Dorfman disease", + "Scar" + ] + }, + "Benign melanocytic proliferations": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign melanocytic proliferations", + "children": [ + "Nevus", + "Dermal melanocytosis", + "Lentiginous melanocytic proliferation", + "Lentigo simplex", + "Pigmented epithelioid melanocytoma", + "Proliferative nodule in congenital melanocytic nevi without atypia" + ] + }, + "Benign soft tissue proliferations - Myoepithelial": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign soft tissue proliferations - Myoepithelial", + "children": [ + "Myoepithelioma" + ] + }, + "Benign soft tissue proliferations - Neural": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign soft tissue proliferations - Neural", + "children": [ + "Granular cell tumor", + "Nerve sheath myxoma", + "Neurofibroma", + "Plexiform Neurofibroma", + "Neuroma", + "Perineurioma", + "Schwannoma" + ] + }, + "Benign soft tissue proliferations - Vascular": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular", + "children": [ + "Verrucous hemangioma", + "Venous malformation", + "Venous lake", + "Vascular spider", + "Rapidly involuting congenital hemangioma", + "Telangiectasia", + "Acquired elastotic hemangioma", + "Acroangiodermatitis of Mali", + "Angiokeratoma", + "Angiolymphoid hyperplasia with eosinophilia", + "Glomangiomyoma", + "Glomeruloid hemangioma", + "Glomus tumor", + "Hemangioma", + "Lymphangioma", + "Nevus anemicus", + "Noninvoluting congenital hemangioma", + "Other vascular or lymphatic malformation or hamartoma", + "Pyogenic granuloma", + "Arterio-venous malformation", + "Capillary vascular malformation" + ] + }, + "Collision - Only benign proliferations": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Collision - Only benign proliferations", + "children": null + }, + "Cysts": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Cysts", + "children": [ + "Comedo", + "Digital mucous cyst", + "Dilated pore", + "Infundibular or epidermal cyst", + "Sebaceous cyst", + "Keratinous cyst", + "Milium", + "Steatocystoma", + "Trichilemmal or isthmic-catagen or pilar cyst" + ] + }, + "Exogenous": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Exogenous", + "children": [ + "Foreign body granuloma", + "Tattoo" + ] + }, + "Flat melanotic pigmentations - not melanocytic nevus": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Flat melanotic pigmentations - not melanocytic nevus", + "children": [ + "Cafe au lait macule or patch", + "Ephelis", + "Ink-spot lentigo", + "Lentigo NOS", + "Mucosal melanotic macule" + ] + }, + "Benign soft tissue proliferations - Muscle tissue or myofibroblastic": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Benign soft tissue proliferations - Muscle tissue or myofibroblastic", + "children": [ + "Smooth muscle hamartoma", + "Nodular Fasciitis", + "Piloleiomyoma", + "Dermatomyofibroma", + "Angioleiomyoma", + "Dartoic muscle leiomyoma" + ] + }, + "Hemorrhagic lesions": { + "level": 2, + "parent": "Benign", + "concatenate": "Benign::Hemorrhagic lesions", + "children": [ + "Hemorrhage" + ] + }, + "Maculopapular mastocytoma": { + "level": 3, + "parent": "Mast cell proliferations", + "concatenate": "Benign::Mast cell proliferations::Maculopapular mastocytoma", + "children": null + }, + "Atypical melanocytic neoplasm": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations::Atypical melanocytic neoplasm", + "children": null + }, + "Atypical intraepithelial melanocytic proliferation": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations::Atypical intraepithelial melanocytic proliferation", + "children": null + }, + "Atypical Spitz tumor": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations::Atypical Spitz tumor", + "children": [ + "Atypical Spitz tumor, Compound", + "Atypical Spitz tumor, Dermal", + "Atypical Spitz tumor, Junctional" + ] + }, + "Mastocytoma, Solitary or unifocal": { + "level": 3, + "parent": "Mast cell proliferations", + "concatenate": "Benign::Mast cell proliferations::Mastocytoma, Solitary or unifocal", + "children": null + }, + "Solar or actinic cheilitis": { + "level": 3, + "parent": "Indeterminate epidermal proliferations", + "concatenate": "Indeterminate::Indeterminate epidermal proliferations::Solar or actinic cheilitis", + "children": null + }, + "Mastocytosis": { + "level": 3, + "parent": "Mast cell proliferations", + "concatenate": "Benign::Mast cell proliferations::Mastocytosis", + "children": [ + "Mastocytosis, Diffuse or multifocal" + ] + }, + "Atypical pigmented spindle cell tumor": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations::Atypical pigmented spindle cell tumor", + "children": null + }, + "Solar or actinic keratosis": { + "level": 3, + "parent": "Indeterminate epidermal proliferations", + "concatenate": "Indeterminate::Indeterminate epidermal proliferations::Solar or actinic keratosis", + "children": [ + "Actinic keratosis, Lichenoid", + "Actinic keratosis, Hypertrophic", + "Actinic keratosis, Bowenoid", + "Actinic keratosis, Atrophic", + "Actinic keratosis, Acantholytic" + ] + }, + "Atypical proliferative nodules in congenital melanocytic nevus": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations::Atypical proliferative nodules in congenital melanocytic nevus", + "children": null + }, + "Chronic active EBV infection": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Chronic active EBV infection", + "children": null + }, + "Superficial atypical melanocytic proliferation of uncertain significance": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations::Superficial atypical melanocytic proliferation of uncertain significance", + "children": null + }, + "EBV positive mucocutaneous ulcer": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell", + "concatenate": "Malignant::Lymphocytic proliferations - B-Cell::EBV positive mucocutaneous ulcer", + "children": null + }, + "Intravascular large B-cell lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell", + "concatenate": "Malignant::Lymphocytic proliferations - B-Cell::Intravascular large B-cell lymphoma", + "children": null + }, + "Lymphocytic proliferation, B-Cell, other": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell", + "concatenate": "Malignant::Lymphocytic proliferations - B-Cell::Lymphocytic proliferation, B-Cell, other", + "children": null + }, + "Primary cutaneous follicle center lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell", + "concatenate": "Malignant::Lymphocytic proliferations - B-Cell::Primary cutaneous follicle center lymphoma", + "children": null + }, + "Primary cutaneous large B-Cell lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell", + "concatenate": "Malignant::Lymphocytic proliferations - B-Cell::Primary cutaneous large B-Cell lymphoma", + "children": null + }, + "Primary cutaneous marginal zone lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell", + "concatenate": "Malignant::Lymphocytic proliferations - B-Cell::Primary cutaneous marginal zone lymphoma", + "children": null + }, + "Adult T-cell leukemia or lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Adult T-cell leukemia or lymphoma", + "children": null + }, + "Extranodal T-cell/NK lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Extranodal T-cell/NK lymphoma", + "children": [ + "Extranodal T-cell/NK lymphoma, Nasal type" + ] + }, + "Mixed Langerhans cell histiocytosis and Erdheim Chester disease": { + "level": 3, + "parent": "Langerhans cell proliferations", + "concatenate": "Benign::Langerhans cell proliferations::Mixed Langerhans cell histiocytosis and Erdheim Chester disease", + "children": null + }, + "Melanocytic tumor of uncertain malignant potential": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations::Melanocytic tumor of uncertain malignant potential", + "children": null + }, + "Langerhans cell histiocytosis": { + "level": 3, + "parent": "Langerhans cell proliferations", + "concatenate": "Benign::Langerhans cell proliferations::Langerhans cell histiocytosis", + "children": [ + "Langerhans cell histiocytosis, Solitary or unifocal", + "Langerhans cell histiocytosis, Diffuse or multifocal" + ] + }, + "Verrucous hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Verrucous hemangioma", + "children": null + }, + "Erdheim Chester disease": { + "level": 3, + "parent": "Langerhans cell proliferations", + "concatenate": "Benign::Langerhans cell proliferations::Erdheim Chester disease", + "children": null + }, + "Venous malformation": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Venous malformation", + "children": null + }, + "Lymphocytic proliferation, T-Cell/NK": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Lymphocytic proliferation, T-Cell/NK", + "children": null + }, + "Comedo": { + "level": 3, + "parent": "Cysts", + "concatenate": "Benign::Cysts::Comedo", + "children": null + }, + "Digital mucous cyst": { + "level": 3, + "parent": "Cysts", + "concatenate": "Benign::Cysts::Digital mucous cyst", + "children": null + }, + "Dilated pore": { + "level": 3, + "parent": "Cysts", + "concatenate": "Benign::Cysts::Dilated pore", + "children": null + }, + "Infundibular or epidermal cyst": { + "level": 3, + "parent": "Cysts", + "concatenate": "Benign::Cysts::Infundibular or epidermal cyst", + "children": null + }, + "Sebaceous cyst": { + "level": 3, + "parent": "Cysts", + "concatenate": "Benign::Cysts::Sebaceous cyst", + "children": [ + "Epidermal, Sebaceous", + "Infundibular, Sebaceous" + ] + }, + "Keratinous cyst": { + "level": 3, + "parent": "Cysts", + "concatenate": "Benign::Cysts::Keratinous cyst", + "children": [ + "Epidermal, Keratinous", + "Infundibular, Keratinous" + ] + }, + "Milium": { + "level": 3, + "parent": "Cysts", + "concatenate": "Benign::Cysts::Milium", + "children": null + }, + "Steatocystoma": { + "level": 3, + "parent": "Cysts", + "concatenate": "Benign::Cysts::Steatocystoma", + "children": null + }, + "Trichilemmal or isthmic-catagen or pilar cyst": { + "level": 3, + "parent": "Cysts", + "concatenate": "Benign::Cysts::Trichilemmal or isthmic-catagen or pilar cyst", + "children": [ + "Pilar cyst", + "Trichilemmal cyst", + "Isthmic-catagen cyst" + ] + }, + "Foreign body granuloma": { + "level": 3, + "parent": "Exogenous", + "concatenate": "Benign::Exogenous::Foreign body granuloma", + "children": null + }, + "Tattoo": { + "level": 3, + "parent": "Exogenous", + "concatenate": "Benign::Exogenous::Tattoo", + "children": null + }, + "Cafe au lait macule or patch": { + "level": 3, + "parent": "Flat melanotic pigmentations - not melanocytic nevus", + "concatenate": "Benign::Flat melanotic pigmentations - not melanocytic nevus::Cafe au lait macule or patch", + "children": null + }, + "Ephelis": { + "level": 3, + "parent": "Flat melanotic pigmentations - not melanocytic nevus", + "concatenate": "Benign::Flat melanotic pigmentations - not melanocytic nevus::Ephelis", + "children": null + }, + "Ink-spot lentigo": { + "level": 3, + "parent": "Flat melanotic pigmentations - not melanocytic nevus", + "concatenate": "Benign::Flat melanotic pigmentations - not melanocytic nevus::Ink-spot lentigo", + "children": null + }, + "Lentigo NOS": { + "level": 3, + "parent": "Flat melanotic pigmentations - not melanocytic nevus", + "concatenate": "Benign::Flat melanotic pigmentations - not melanocytic nevus::Lentigo NOS", + "children": null + }, + "Mucosal melanotic macule": { + "level": 3, + "parent": "Flat melanotic pigmentations - not melanocytic nevus", + "concatenate": "Benign::Flat melanotic pigmentations - not melanocytic nevus::Mucosal melanotic macule", + "children": null + }, + "Hemorrhage": { + "level": 3, + "parent": "Hemorrhagic lesions", + "concatenate": "Benign::Hemorrhagic lesions::Hemorrhage", + "children": [ + "Subungual hemorrhage", + "Subcorneal and intracorneal hemorrhage", + "Mucosal hemorrhage", + "Dermal and subcutaneous hemorhage" + ] + }, + "Verruca": { + "level": 3, + "parent": "Inflammatory or infectious diseases", + "concatenate": "Benign::Inflammatory or infectious diseases::Verruca", + "children": null + }, + "Muluscum": { + "level": 3, + "parent": "Inflammatory or infectious diseases", + "concatenate": "Benign::Inflammatory or infectious diseases::Muluscum", + "children": null + }, + "Indeterminate cell histiocytosis": { + "level": 3, + "parent": "Langerhans cell proliferations", + "concatenate": "Benign::Langerhans cell proliferations::Indeterminate cell histiocytosis", + "children": null + }, + "Mycosis fungoides": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Mycosis fungoides", + "children": [ + "Mycosis fungoides, Folliculotropic", + "Mycosis fungoides, Pagetoid reticulosis", + "Mycosis fungoides, With large cell transformation", + "Mycosis fungoides, Granulomatous slack skin" + ] + }, + "Keratoacanthoma": { + "level": 3, + "parent": "Malignant epidermal proliferations", + "concatenate": "Malignant::Malignant epidermal proliferations::Keratoacanthoma", + "children": null + }, + "Primary cutaneous CD4+ small or medium T-cell lymphoproliferative disorder": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Primary cutaneous CD4+ small or medium T-cell lymphoproliferative disorder", + "children": null + }, + "Melanoma metastasis": { + "level": 3, + "parent": "Malignant melanocytic proliferations (Melanoma)", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma metastasis", + "children": null + }, + "Melanoma, NOS": { + "level": 3, + "parent": "Malignant melanocytic proliferations (Melanoma)", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma, NOS", + "children": null + }, + "Liposarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Adipocytic", + "concatenate": "Malignant::Malignant soft tissue proliferations - Adipocytic::Liposarcoma", + "children": [ + "Liposarcoma, Undifferentiated", + "Liposarcoma, Well differentiated" + ] + }, + "Extraskeletal osteosarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Cartilagenous and ossifying", + "concatenate": "Malignant::Malignant soft tissue proliferations - Cartilagenous and ossifying::Extraskeletal osteosarcoma", + "children": null + }, + "Atypical fibroxanthoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Malignant::Malignant soft tissue proliferations - Fibro-histiocytic::Atypical fibroxanthoma", + "children": null + }, + "Dermatofibrosarcoma protuberans": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Malignant::Malignant soft tissue proliferations - Fibro-histiocytic::Dermatofibrosarcoma protuberans", + "children": null + }, + "Epithelioid sarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Malignant::Malignant soft tissue proliferations - Fibro-histiocytic::Epithelioid sarcoma", + "children": null + }, + "Fibrosarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Malignant::Malignant soft tissue proliferations - Fibro-histiocytic::Fibrosarcoma", + "children": null + }, + "Pleomorphic undifferntiated sarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Malignant::Malignant soft tissue proliferations - Fibro-histiocytic::Pleomorphic undifferntiated sarcoma", + "children": null + }, + "Atypical intradermal smooth muscle tumor": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Muscle tissue or myofibroblastic", + "concatenate": "Malignant::Malignant soft tissue proliferations - Muscle tissue or myofibroblastic::Atypical intradermal smooth muscle tumor", + "children": null + }, + "Leiomyosarcoma, Cutaneous": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Muscle tissue or myofibroblastic", + "concatenate": "Malignant::Malignant soft tissue proliferations - Muscle tissue or myofibroblastic::Leiomyosarcoma, Cutaneous", + "children": null + }, + "Rhabdomyoscaroma, Cutaneous": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Muscle tissue or myofibroblastic", + "concatenate": "Malignant::Malignant soft tissue proliferations - Muscle tissue or myofibroblastic::Rhabdomyoscaroma, Cutaneous", + "children": null + }, + "Myoepithelial sarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Myoepithelial", + "concatenate": "Malignant::Malignant soft tissue proliferations - Myoepithelial::Myoepithelial sarcoma", + "children": null + }, + "Malignant granular cell tumor": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Neural", + "concatenate": "Malignant::Malignant soft tissue proliferations - Neural::Malignant granular cell tumor", + "children": null + }, + "Malignant peripheral nerve sheath tumor": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Neural", + "concatenate": "Malignant::Malignant soft tissue proliferations - Neural::Malignant peripheral nerve sheath tumor", + "children": null + }, + "Ewing sarcoma, Primary cutaenous": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Unknown or other histiogenesis", + "concatenate": "Malignant::Malignant soft tissue proliferations - Unknown or other histiogenesis::Ewing sarcoma, Primary cutaenous", + "children": null + }, + "Angiosarcoma cutaneous": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Vascular", + "concatenate": "Malignant::Malignant soft tissue proliferations - Vascular::Angiosarcoma cutaneous", + "children": [ + "Angiosarcoma cutaneous, Epithelioid", + "Angiosarcoma cutaneous, Face and scalp of elderly patients", + "Angiosarcoma cutaneous, Post-irradiation", + "Angiosarcoma cutaneous, With associated lymphedema" + ] + }, + "Hemangioendothelioma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Vascular", + "concatenate": "Malignant::Malignant soft tissue proliferations - Vascular::Hemangioendothelioma", + "children": [ + "Hemangioendothelioma, Kaposiform" + ] + }, + "Kaposi sarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Vascular", + "concatenate": "Malignant::Malignant soft tissue proliferations - Vascular::Kaposi sarcoma", + "children": null + }, + "Malignant glomus tumor": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Vascular", + "concatenate": "Malignant::Malignant soft tissue proliferations - Vascular::Malignant glomus tumor", + "children": null + }, + "Merkel cell carcinoma": { + "level": 3, + "parent": "Merkel cell proliferation", + "concatenate": "Malignant::Merkel cell proliferation::Merkel cell carcinoma", + "children": null + }, + "Melanoma in situ": { + "level": 3, + "parent": "Malignant melanocytic proliferations (Melanoma)", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma in situ", + "children": [ + "Melanoma in situ, Mucosal", + "Melanoma in situ, Acral or acral-lentiginous", + "Melanoma in situ, Lentigo maligna type", + "Melanoma in situ, Recurrent or persistent", + "Melanoma in situ, Superficial spreading", + "Melanoma in situ, associated with a nevus" + ] + }, + "Melanoma Invasive": { + "level": 3, + "parent": "Malignant melanocytic proliferations (Melanoma)", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive", + "children": [ + "Melanoma Invasive, Superficial spreading", + "Melanoma Invasive, Spitzoid", + "Melanoma Invasive, Recurrent or persistent", + "Melanoma Invasive, On chronically sun-exposed skin or lentigo maligna melanoma", + "Melanoma Invasive, Acral or Acral-lentiginous", + "Melanoma Invasive, Arising in a congenital nevus", + "Melanoma Invasive, Pigmented spindle cell nevus like", + "Melanoma Invasive, Associated with a nevus", + "Melanoma Invasive, Desmoplastic", + "Melanoma Invasive, Heavily pigmented", + "Melanoma Invasive, Mucosal", + "Melanoma Invasive, Neurotropic", + "Melanoma Invasive, Nevoid", + "Melanoma Invasive, Nodular", + "Melanoma Invasive, Blue nevus-like" + ] + }, + "Verrucous carcinoma": { + "level": 3, + "parent": "Malignant epidermal proliferations", + "concatenate": "Malignant::Malignant epidermal proliferations::Verrucous carcinoma", + "children": [ + "Verrucous carcinoma, Carcinoma cuniculatum type", + "Verrucous carcinoma, Giant condyloma type", + "Verrucous carcinoma, Oral florid papilomatosis type" + ] + }, + "Squamous cell carcinoma, NOS": { + "level": 3, + "parent": "Malignant epidermal proliferations", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, NOS", + "children": null + }, + "Primary cutaneous peripheral T-cell lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Primary cutaneous peripheral T-cell lymphoma", + "children": [ + "Primary cutaneous peripheral T-cell lymphoma, Rare subtype" + ] + }, + "Sezary syndrome": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Sezary syndrome", + "children": null + }, + "Subcutaneous panniculitis-like T-cell lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Subcutaneous panniculitis-like T-cell lymphoma", + "children": null + }, + "Adenoid cystic carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Adenoid cystic carcinoma", + "children": null + }, + "Adnexal adenocarcinoma arising in association with spiradenoma, cylindroma, or spiradenocylindroma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Adnexal adenocarcinoma arising in association with spiradenoma, cylindroma, or spiradenocylindroma", + "children": null + }, + "Apocrine carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Apocrine carcinoma", + "children": null + }, + "Digital papillary carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Digital papillary carcinoma", + "children": null + }, + "Hidradenocarcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Hidradenocarcinoma", + "children": null + }, + "Malignant mixed tumor": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Malignant mixed tumor", + "children": null + }, + "Microcystic adnexal carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Microcystic adnexal carcinoma", + "children": null + }, + "Primary cutaneous CD30+ lymphoproliferative disease": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Primary cutaneous CD30+ lymphoproliferative disease", + "children": [ + "Cutanous anaplastic large cell lymphoma", + "Lymphomatoid papulosis" + ] + }, + "Mucinous carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Mucinous carcinoma", + "children": null + }, + "Tubular carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Tubular carcinoma", + "children": null + }, + "Basal cell carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Follicular", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Basal cell carcinoma", + "children": [ + "Basal cell carcinoma, Fibroeipthelial", + "Basal cell carcinoma, Infiltrating", + "Basal cell carcinoma, Micronodular", + "Basal cell carcinoma, Nodular", + "Basal cell carcinoma, Sclerosing or morpheaform", + "Basal cell carcinoma, Combined subtypes", + "Basal cell carcinoma, Superficial", + "Basal cell carcinoma with sarcomatoid differentiation", + "Basal cell carcinoma with adnexal differentiation" + ] + }, + "Baso-squamous carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Follicular", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Baso-squamous carcinoma", + "children": null + }, + "Matrical or pilomatrical carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Follicular", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Matrical or pilomatrical carcinoma", + "children": null + }, + "Proliferating trichilemmal carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Follicular", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Proliferating trichilemmal carcinoma", + "children": null + }, + "Sebaceous carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Sebaceous", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Sebaceous::Sebaceous carcinoma", + "children": null + }, + "Bowenoid papulosis": { + "level": 3, + "parent": "Malignant epidermal proliferations", + "concatenate": "Malignant::Malignant epidermal proliferations::Bowenoid papulosis", + "children": null + }, + "Venous lake": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Venous lake", + "children": null + }, + "Squamous cell carcinoma in situ": { + "level": 3, + "parent": "Malignant epidermal proliferations", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma in situ", + "children": [ + "Squamous cell carcinoma in situ, Bowens disease" + ] + }, + "Squamous cell carcinoma, Invasive": { + "level": 3, + "parent": "Malignant epidermal proliferations", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive", + "children": [ + "Squamous cell carcinoma, Invasive, Adeno-squamous", + "Squamous cell carcinoma, Invasive, Acantholytic", + "Squamous cell carcinoma, Invasive, Clear cell", + "Squamous cell carcinoma, Invasive, Sarcomatoid", + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type", + "Squamous cell carcinoma, Invasive, Spindle cell", + "Squamous cell carcinoma, Invasive, Verrucous", + "Squamous cell carcinoma, Invasive, NOS, moderately differentiated", + "Squamous cell carcinoma, Invasive, NOS, well differentiated", + "Squamous cell carcinoma, Invasive, NOS, poorly differentiated" + ] + }, + "Paget disease": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Paget disease", + "children": [ + "Paget disease, Mammary", + "Paget disease, Extra-mammary" + ] + }, + "Vascular spider": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Vascular spider", + "children": null + }, + "Porocarcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Porocarcinoma", + "children": null + }, + "Rapidly involuting congenital hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Rapidly involuting congenital hemangioma", + "children": null + }, + "Fibrofolliculoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Sebaceous::Fibrofolliculoma", + "children": null + }, + "Fordyce spots": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Sebaceous::Fordyce spots", + "children": null + }, + "Nevus sebaceus": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Sebaceous::Nevus sebaceus", + "children": null + }, + "Sebaceoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Sebaceous::Sebaceoma", + "children": null + }, + "Sebaceous adenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Sebaceous::Sebaceous adenoma", + "children": null + }, + "Sebaceous hyperplasia": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Sebaceous::Sebaceous hyperplasia", + "children": null + }, + "Trichodiscoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Sebaceous::Trichodiscoma", + "children": null + }, + "Acantholytic acanthoma": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Acantholytic acanthoma", + "children": null + }, + "Clear cell acanthoma": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Clear cell acanthoma", + "children": null + }, + "Epidermal nevus": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Epidermal nevus", + "children": null + }, + "Epidermolytic acanthoma": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Epidermolytic acanthoma", + "children": null + }, + "Large cell acanthoma": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Large cell acanthoma", + "children": null + }, + "Lichen planus like keratosis": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Lichen planus like keratosis", + "children": null + }, + "Melanoacanthoma": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Melanoacanthoma", + "children": null + }, + "Pigmented benign keratosis": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Pigmented benign keratosis", + "children": null + }, + "Porokeratosis": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Porokeratosis", + "children": null + }, + "Seborrheic keratosis": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Seborrheic keratosis", + "children": [ + "Seborrheic keratosis, Clonal" + ] + }, + "Solar lentigo": { + "level": 3, + "parent": "Benign epidermal proliferations", + "concatenate": "Benign::Benign epidermal proliferations::Solar lentigo", + "children": null + }, + "Nevus": { + "level": 3, + "parent": "Benign melanocytic proliferations", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus", + "children": [ + "Nevus, Spitz", + "Nevus, Spilus", + "Nevus, Reed", + "Nevus, Recurrent or persistent", + "Nevus, Of special anatomic site", + "Nevus, NOS, Junctional", + "Nevus, NOS, Dermal", + "Nevus, NOS, Compound", + "Nevus, Meyerson", + "Nevus, Lentiginous", + "Nevus, Halo", + "Nevus, Deep penetrating", + "Nevus, Congenital", + "Nevus, Combined", + "Nevus, Balloon cell", + "Nevus, Acral", + "Nevus, Agminated", + "Nevus, Atypical, Dysplastic, or Clark", + "Blue nevus", + "Nevus, BAP-1 deficient" + ] + }, + "Dermal melanocytosis": { + "level": 3, + "parent": "Benign melanocytic proliferations", + "concatenate": "Benign::Benign melanocytic proliferations::Dermal melanocytosis", + "children": [ + "Mongolian spot", + "Nevus of Ito", + "Nevus of Ota" + ] + }, + "Lentiginous melanocytic proliferation": { + "level": 3, + "parent": "Benign melanocytic proliferations", + "concatenate": "Benign::Benign melanocytic proliferations::Lentiginous melanocytic proliferation", + "children": null + }, + "Warty dyskeratoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Warty dyskeratoma", + "children": null + }, + "Tumor of follicular infundibulum": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Tumor of follicular infundibulum", + "children": null + }, + "Tricholemmoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Tricholemmoma", + "children": [ + "Tricholemmoma, Desmoplastic" + ] + }, + "Trichofolliculoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Trichofolliculoma", + "children": null + }, + "Telangiectasia": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Telangiectasia", + "children": null + }, + "Apocrine tubular adenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Apocrine tubular adenoma", + "children": null + }, + "Cylindoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Cylindoma", + "children": null + }, + "Cystadenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Cystadenoma", + "children": null + }, + "Fibroadenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Fibroadenoma", + "children": null + }, + "Hidradenoma papilliferum": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Hidradenoma papilliferum", + "children": null + }, + "Hidradenoma, Apocrine": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Hidradenoma, Apocrine", + "children": [ + "Hidradenoma, Apocrine, Predominantly with clear cells" + ] + }, + "Hidradenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Hidradenoma", + "children": [ + "Hidradenoma, Poroid" + ] + }, + "Mixed tumor": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Mixed tumor", + "children": [ + "Mixed tumor, Apocrine type", + "Mixed tumor, Eccrine type" + ] + }, + "Poroma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Poroma", + "children": null + }, + "Lentigo simplex": { + "level": 3, + "parent": "Benign melanocytic proliferations", + "concatenate": "Benign::Benign melanocytic proliferations::Lentigo simplex", + "children": null + }, + "Spiradenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Spiradenoma", + "children": null + }, + "Syringocystadenoma papilliferum": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Syringocystadenoma papilliferum", + "children": null + }, + "Syringofibroadenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Syringofibroadenoma", + "children": null + }, + "Syringoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Syringoma", + "children": null + }, + "Folliculosebaceous cystic hamartoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Folliculosebaceous cystic hamartoma", + "children": null + }, + "Nevus comedonicus": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Nevus comedonicus", + "children": null + }, + "Pilar sheath acanthoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Pilar sheath acanthoma", + "children": null + }, + "Pilomatricoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Pilomatricoma", + "children": null + }, + "Proliferating tricholemmal tumor": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Proliferating tricholemmal tumor", + "children": null + }, + "Trichoblastoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Trichoblastoma", + "children": null + }, + "Trichoepithelioma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Trichoepithelioma", + "children": [ + "Trichoepithelioma, Desmoplastic" + ] + }, + "Supernumerary nipple": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Supernumerary nipple", + "children": null + }, + "Pigmented epithelioid melanocytoma": { + "level": 3, + "parent": "Benign melanocytic proliferations", + "concatenate": "Benign::Benign melanocytic proliferations::Pigmented epithelioid melanocytoma", + "children": null + }, + "Panfolliculoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Panfolliculoma", + "children": null + }, + "Angiolipoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Adipocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Adipocytic::Angiolipoma", + "children": null + }, + "Granular cell tumor": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Granular cell tumor", + "children": [ + "Granular cell tumor, neural and s100 positive", + "Granular cell tumor, non-neural and s100 negative" + ] + }, + "Nerve sheath myxoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Nerve sheath myxoma", + "children": null + }, + "Neurofibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Neurofibroma", + "children": null + }, + "Plexiform Neurofibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Plexiform Neurofibroma", + "children": null + }, + "Neuroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Neuroma", + "children": [ + "Neuroma, Palisaded and encapsulated", + "Neuroma, Traumatic" + ] + }, + "Perineurioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Perineurioma", + "children": null + }, + "Schwannoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Schwannoma", + "children": null + }, + "Acquired elastotic hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Acquired elastotic hemangioma", + "children": null + }, + "Acroangiodermatitis of Mali": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Acroangiodermatitis of Mali", + "children": null + }, + "Angiokeratoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Angiokeratoma", + "children": null + }, + "Myoepithelioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Myoepithelial", + "concatenate": "Benign::Benign soft tissue proliferations - Myoepithelial::Myoepithelioma", + "children": null + }, + "Angiolymphoid hyperplasia with eosinophilia": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Angiolymphoid hyperplasia with eosinophilia", + "children": null + }, + "Glomangiomyoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Glomangiomyoma", + "children": null + }, + "Glomeruloid hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Glomeruloid hemangioma", + "children": null + }, + "Glomus tumor": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Glomus tumor", + "children": null + }, + "Hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Hemangioma", + "children": [ + "Hemangioma, Infantile", + "Hemangioma, Tufted", + "Hemangioma, Cherry", + "Hemangioma, Hobnail" + ] + }, + "Lymphangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Lymphangioma", + "children": [ + "Lymphangioma, deep", + "Lymphangioma, superficial" + ] + }, + "Nevus anemicus": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Nevus anemicus", + "children": null + }, + "Noninvoluting congenital hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Noninvoluting congenital hemangioma", + "children": null + }, + "Other vascular or lymphatic malformation or hamartoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Other vascular or lymphatic malformation or hamartoma", + "children": null + }, + "Proliferative nodule in congenital melanocytic nevi without atypia": { + "level": 3, + "parent": "Benign melanocytic proliferations", + "concatenate": "Benign::Benign melanocytic proliferations::Proliferative nodule in congenital melanocytic nevi without atypia", + "children": null + }, + "Pyogenic granuloma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Pyogenic granuloma", + "children": null + }, + "Arterio-venous malformation": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Arterio-venous malformation", + "children": null + }, + "Smooth muscle hamartoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic", + "concatenate": "Benign::Benign soft tissue proliferations - Muscle tissue or myofibroblastic::Smooth muscle hamartoma", + "children": null + }, + "Capillary vascular malformation": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Capillary vascular malformation", + "children": null + }, + "Nodular Fasciitis": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic", + "concatenate": "Benign::Benign soft tissue proliferations - Muscle tissue or myofibroblastic::Nodular Fasciitis", + "children": null + }, + "Lipoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Adipocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Adipocytic::Lipoma", + "children": [ + "Lipoma, Spindle cell", + "Lipoma, Pleomorphic" + ] + }, + "Piloleiomyoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic", + "concatenate": "Benign::Benign soft tissue proliferations - Muscle tissue or myofibroblastic::Piloleiomyoma", + "children": null + }, + "Lipomatous nevus": { + "level": 3, + "parent": "Benign soft tissue proliferations - Adipocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Adipocytic::Lipomatous nevus", + "children": null + }, + "Accessory tragus": { + "level": 3, + "parent": "Benign soft tissue proliferations - Cartilagenous and ossifying", + "concatenate": "Benign::Benign soft tissue proliferations - Cartilagenous and ossifying::Accessory tragus", + "children": null + }, + "Extraskeletal chondroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Cartilagenous and ossifying", + "concatenate": "Benign::Benign soft tissue proliferations - Cartilagenous and ossifying::Extraskeletal chondroma", + "children": null + }, + "Osteoma cutis": { + "level": 3, + "parent": "Benign soft tissue proliferations - Cartilagenous and ossifying", + "concatenate": "Benign::Benign soft tissue proliferations - Cartilagenous and ossifying::Osteoma cutis", + "children": null + }, + "Angiofibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Angiofibroma", + "children": [ + "Angiofibroma, Facial", + "Angiofibroma, Periungual", + "Angiofibroma, Penile" + ] + }, + "Dermatofibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Dermatofibroma", + "children": [ + "Dermatofibroma, Atypical", + "Dermatofibroma, Aneurysmal", + "Dermatofibroma, Cellular", + "Dermatofibroma, Epithelioid", + "Dermatofibroma, Hemosiderotic" + ] + }, + "Fibroepithelial polyp": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Fibroepithelial polyp", + "children": null + }, + "Fibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Fibroma", + "children": [ + "Fibroma, Sclerotic", + "Fibroma, Pleomorphic" + ] + }, + "Giant cell tumor of the tendon sheath": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Giant cell tumor of the tendon sheath", + "children": null + }, + "Subungual osteochodroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Cartilagenous and ossifying", + "concatenate": "Benign::Benign soft tissue proliferations - Cartilagenous and ossifying::Subungual osteochodroma", + "children": null + }, + "Juvenile xanthogranuloma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Juvenile xanthogranuloma", + "children": null + }, + "Cutaneous Myxoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Cutaneous Myxoma", + "children": null + }, + "Non-Langerhans histiocytosis": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Non-Langerhans histiocytosis", + "children": null + }, + "Reticulohistiocytosis": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Reticulohistiocytosis", + "children": null + }, + "Dermatomyofibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic", + "concatenate": "Benign::Benign soft tissue proliferations - Muscle tissue or myofibroblastic::Dermatomyofibroma", + "children": null + }, + "Rosai-Dorfman disease": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Rosai-Dorfman disease", + "children": null + }, + "Scar": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Scar", + "children": [ + "Scar, Hypertrophic", + "Scar, Keloid" + ] + }, + "Angioleiomyoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic", + "concatenate": "Benign::Benign soft tissue proliferations - Muscle tissue or myofibroblastic::Angioleiomyoma", + "children": null + }, + "Fibrolipoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Adipocytic", + "concatenate": "Benign::Benign soft tissue proliferations - Adipocytic::Fibrolipoma", + "children": null + }, + "Dartoic muscle leiomyoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic", + "concatenate": "Benign::Benign soft tissue proliferations - Muscle tissue or myofibroblastic::Dartoic muscle leiomyoma", + "children": null + }, + "Basal cell carcinoma, Fibroeipthelial": { + "level": 4, + "parent": "Basal cell carcinoma", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Basal cell carcinoma::Basal cell carcinoma, Fibroeipthelial", + "children": null + }, + "Basal cell carcinoma, Infiltrating": { + "level": 4, + "parent": "Basal cell carcinoma", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Basal cell carcinoma::Basal cell carcinoma, Infiltrating", + "children": null + }, + "Basal cell carcinoma, Micronodular": { + "level": 4, + "parent": "Basal cell carcinoma", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Basal cell carcinoma::Basal cell carcinoma, Micronodular", + "children": null + }, + "Basal cell carcinoma, Nodular": { + "level": 4, + "parent": "Basal cell carcinoma", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Basal cell carcinoma::Basal cell carcinoma, Nodular", + "children": null + }, + "Basal cell carcinoma, Sclerosing or morpheaform": { + "level": 4, + "parent": "Basal cell carcinoma", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Basal cell carcinoma::Basal cell carcinoma, Sclerosing or morpheaform", + "children": null + }, + "Squamous cell carcinoma, Invasive, Adeno-squamous": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Adeno-squamous", + "children": [ + "Squamous cell carcinoma, Invasive, Adeno-squamous, poorly differentiated", + "Squamous cell carcinoma, Invasive, Adeno-squamous, well differentiated", + "Squamous cell carcinoma, Invasive, Adeno-squamous, moderately differentiated" + ] + }, + "Squamous cell carcinoma in situ, Bowens disease": { + "level": 4, + "parent": "Squamous cell carcinoma in situ", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma in situ::Squamous cell carcinoma in situ, Bowens disease", + "children": null + }, + "Squamous cell carcinoma, Invasive, Acantholytic": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Acantholytic", + "children": [ + "Squamous cell carcinoma, Invasive, Acantholytic, well differentiated", + "Squamous cell carcinoma, Invasive, Acantholytic, moderately differentiated", + "Squamous cell carcinoma, Invasive, Acantholytic, poorly differentiated" + ] + }, + "Squamous cell carcinoma, Invasive, Clear cell": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Clear cell", + "children": [ + "Squamous cell carcinoma, Invasive, Clear cell, moderately differentiated", + "Squamous cell carcinoma, Invasive, Clear cell, poorly differentiated", + "Squamous cell carcinoma, Invasive, Clear cell, well differentiated" + ] + }, + "Squamous cell carcinoma, Invasive, Sarcomatoid": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Sarcomatoid", + "children": [ + "Squamous cell carcinoma, Invasive, Sarcomatoid, well differentiated", + "Squamous cell carcinoma, Invasive, Sarcomatoid, moderately differentiated", + "Squamous cell carcinoma, Invasive, Sarcomatoid, poorly differentiated" + ] + }, + "Basal cell carcinoma, Combined subtypes": { + "level": 4, + "parent": "Basal cell carcinoma", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Basal cell carcinoma::Basal cell carcinoma, Combined subtypes", + "children": null + }, + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Keratoacanthoma-type", + "children": [ + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type, well differentiated", + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type, moderately differentiated", + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type, poorly differentiated" + ] + }, + "Basal cell carcinoma, Superficial": { + "level": 4, + "parent": "Basal cell carcinoma", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Basal cell carcinoma::Basal cell carcinoma, Superficial", + "children": null + }, + "Basal cell carcinoma with sarcomatoid differentiation": { + "level": 4, + "parent": "Basal cell carcinoma", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Basal cell carcinoma::Basal cell carcinoma with sarcomatoid differentiation", + "children": null + }, + "Mycosis fungoides, Folliculotropic": { + "level": 4, + "parent": "Mycosis fungoides", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Mycosis fungoides::Mycosis fungoides, Folliculotropic", + "children": null + }, + "Paget disease, Mammary": { + "level": 4, + "parent": "Paget disease", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Paget disease::Paget disease, Mammary", + "children": null + }, + "Actinic keratosis, Lichenoid": { + "level": 4, + "parent": "Solar or actinic keratosis", + "concatenate": "Indeterminate::Indeterminate epidermal proliferations::Solar or actinic keratosis::Actinic keratosis, Lichenoid", + "children": null + }, + "Actinic keratosis, Hypertrophic": { + "level": 4, + "parent": "Solar or actinic keratosis", + "concatenate": "Indeterminate::Indeterminate epidermal proliferations::Solar or actinic keratosis::Actinic keratosis, Hypertrophic", + "children": null + }, + "Squamous cell carcinoma, Invasive, Spindle cell": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Spindle cell", + "children": [ + "Squamous cell carcinoma, Invasive, Spindle cell, well differentiated", + "Squamous cell carcinoma, Invasive, Spindle cell, moderately differentiated", + "Squamous cell carcinoma, Invasive, Spindle cell, poorly differentiated" + ] + }, + "Atypical Spitz tumor, Compound": { + "level": 4, + "parent": "Atypical Spitz tumor", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations::Atypical Spitz tumor::Atypical Spitz tumor, Compound", + "children": null + }, + "Atypical Spitz tumor, Dermal": { + "level": 4, + "parent": "Atypical Spitz tumor", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations::Atypical Spitz tumor::Atypical Spitz tumor, Dermal", + "children": null + }, + "Atypical Spitz tumor, Junctional": { + "level": 4, + "parent": "Atypical Spitz tumor", + "concatenate": "Indeterminate::Indeterminate melanocytic proliferations::Atypical Spitz tumor::Atypical Spitz tumor, Junctional", + "children": null + }, + "Basal cell carcinoma with adnexal differentiation": { + "level": 4, + "parent": "Basal cell carcinoma", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Follicular::Basal cell carcinoma::Basal cell carcinoma with adnexal differentiation", + "children": null + }, + "Extranodal T-cell/NK lymphoma, Nasal type": { + "level": 4, + "parent": "Extranodal T-cell/NK lymphoma", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Extranodal T-cell/NK lymphoma::Extranodal T-cell/NK lymphoma, Nasal type", + "children": null + }, + "Mycosis fungoides, Pagetoid reticulosis": { + "level": 4, + "parent": "Mycosis fungoides", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Mycosis fungoides::Mycosis fungoides, Pagetoid reticulosis", + "children": null + }, + "Mycosis fungoides, With large cell transformation": { + "level": 4, + "parent": "Mycosis fungoides", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Mycosis fungoides::Mycosis fungoides, With large cell transformation", + "children": null + }, + "Cutanous anaplastic large cell lymphoma": { + "level": 4, + "parent": "Primary cutaneous CD30+ lymphoproliferative disease", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Primary cutaneous CD30+ lymphoproliferative disease::Cutanous anaplastic large cell lymphoma", + "children": null + }, + "Lymphomatoid papulosis": { + "level": 4, + "parent": "Primary cutaneous CD30+ lymphoproliferative disease", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Primary cutaneous CD30+ lymphoproliferative disease::Lymphomatoid papulosis", + "children": null + }, + "Primary cutaneous peripheral T-cell lymphoma, Rare subtype": { + "level": 4, + "parent": "Primary cutaneous peripheral T-cell lymphoma", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Primary cutaneous peripheral T-cell lymphoma::Primary cutaneous peripheral T-cell lymphoma, Rare subtype", + "children": null + }, + "Paget disease, Extra-mammary": { + "level": 4, + "parent": "Paget disease", + "concatenate": "Malignant::Malignant adnexal epithelial proliferations - Apocrine or Eccrine::Paget disease::Paget disease, Extra-mammary", + "children": null + }, + "Mycosis fungoides, Granulomatous slack skin": { + "level": 4, + "parent": "Mycosis fungoides", + "concatenate": "Malignant::Lymphocytic proliferations - T-Cell/NK::Mycosis fungoides::Mycosis fungoides, Granulomatous slack skin", + "children": null + }, + "Squamous cell carcinoma, Invasive, Verrucous": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Verrucous", + "children": [ + "Squamous cell carcinoma, Invasive, Verrucous, poorly differentiated", + "Squamous cell carcinoma, Invasive, Verrucous, well differentiated", + "Squamous cell carcinoma, Invasive, Verrucous, moderately differentiated" + ] + }, + "Melanoma in situ, Mucosal": { + "level": 4, + "parent": "Melanoma in situ", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma in situ::Melanoma in situ, Mucosal", + "children": null + }, + "Squamous cell carcinoma, Invasive, NOS, moderately differentiated": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, NOS, moderately differentiated", + "children": null + }, + "Melanoma Invasive, Superficial spreading": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Superficial spreading", + "children": null + }, + "Melanoma in situ, Acral or acral-lentiginous": { + "level": 4, + "parent": "Melanoma in situ", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma in situ::Melanoma in situ, Acral or acral-lentiginous", + "children": null + }, + "Melanoma in situ, Lentigo maligna type": { + "level": 4, + "parent": "Melanoma in situ", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma in situ::Melanoma in situ, Lentigo maligna type", + "children": null + }, + "Melanoma in situ, Recurrent or persistent": { + "level": 4, + "parent": "Melanoma in situ", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma in situ::Melanoma in situ, Recurrent or persistent", + "children": null + }, + "Melanoma in situ, Superficial spreading": { + "level": 4, + "parent": "Melanoma in situ", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma in situ::Melanoma in situ, Superficial spreading", + "children": null + }, + "Melanoma in situ, associated with a nevus": { + "level": 4, + "parent": "Melanoma in situ", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma in situ::Melanoma in situ, associated with a nevus", + "children": null + }, + "Melanoma Invasive, Spitzoid": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Spitzoid", + "children": null + }, + "Liposarcoma, Undifferentiated": { + "level": 4, + "parent": "Liposarcoma", + "concatenate": "Malignant::Malignant soft tissue proliferations - Adipocytic::Liposarcoma::Liposarcoma, Undifferentiated", + "children": null + }, + "Angiosarcoma cutaneous, Epithelioid": { + "level": 4, + "parent": "Angiosarcoma cutaneous", + "concatenate": "Malignant::Malignant soft tissue proliferations - Vascular::Angiosarcoma cutaneous::Angiosarcoma cutaneous, Epithelioid", + "children": null + }, + "Angiosarcoma cutaneous, Face and scalp of elderly patients": { + "level": 4, + "parent": "Angiosarcoma cutaneous", + "concatenate": "Malignant::Malignant soft tissue proliferations - Vascular::Angiosarcoma cutaneous::Angiosarcoma cutaneous, Face and scalp of elderly patients", + "children": null + }, + "Angiosarcoma cutaneous, Post-irradiation": { + "level": 4, + "parent": "Angiosarcoma cutaneous", + "concatenate": "Malignant::Malignant soft tissue proliferations - Vascular::Angiosarcoma cutaneous::Angiosarcoma cutaneous, Post-irradiation", + "children": null + }, + "Angiosarcoma cutaneous, With associated lymphedema": { + "level": 4, + "parent": "Angiosarcoma cutaneous", + "concatenate": "Malignant::Malignant soft tissue proliferations - Vascular::Angiosarcoma cutaneous::Angiosarcoma cutaneous, With associated lymphedema", + "children": null + }, + "Actinic keratosis, Bowenoid": { + "level": 4, + "parent": "Solar or actinic keratosis", + "concatenate": "Indeterminate::Indeterminate epidermal proliferations::Solar or actinic keratosis::Actinic keratosis, Bowenoid", + "children": null + }, + "Hemangioendothelioma, Kaposiform": { + "level": 4, + "parent": "Hemangioendothelioma", + "concatenate": "Malignant::Malignant soft tissue proliferations - Vascular::Hemangioendothelioma::Hemangioendothelioma, Kaposiform", + "children": null + }, + "Liposarcoma, Well differentiated": { + "level": 4, + "parent": "Liposarcoma", + "concatenate": "Malignant::Malignant soft tissue proliferations - Adipocytic::Liposarcoma::Liposarcoma, Well differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, NOS, well differentiated": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, NOS, well differentiated", + "children": null + }, + "Melanoma Invasive, Recurrent or persistent": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Recurrent or persistent", + "children": null + }, + "Melanoma Invasive, On chronically sun-exposed skin or lentigo maligna melanoma": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, On chronically sun-exposed skin or lentigo maligna melanoma", + "children": null + }, + "Squamous cell carcinoma, Invasive, NOS, poorly differentiated": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, NOS, poorly differentiated", + "children": null + }, + "Verrucous carcinoma, Carcinoma cuniculatum type": { + "level": 4, + "parent": "Verrucous carcinoma", + "concatenate": "Malignant::Malignant epidermal proliferations::Verrucous carcinoma::Verrucous carcinoma, Carcinoma cuniculatum type", + "children": null + }, + "Verrucous carcinoma, Giant condyloma type": { + "level": 4, + "parent": "Verrucous carcinoma", + "concatenate": "Malignant::Malignant epidermal proliferations::Verrucous carcinoma::Verrucous carcinoma, Giant condyloma type", + "children": null + }, + "Verrucous carcinoma, Oral florid papilomatosis type": { + "level": 4, + "parent": "Verrucous carcinoma", + "concatenate": "Malignant::Malignant epidermal proliferations::Verrucous carcinoma::Verrucous carcinoma, Oral florid papilomatosis type", + "children": null + }, + "Melanoma Invasive, Acral or Acral-lentiginous": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Acral or Acral-lentiginous", + "children": null + }, + "Melanoma Invasive, Arising in a congenital nevus": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Arising in a congenital nevus", + "children": null + }, + "Melanoma Invasive, Pigmented spindle cell nevus like": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Pigmented spindle cell nevus like", + "children": null + }, + "Melanoma Invasive, Associated with a nevus": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Associated with a nevus", + "children": null + }, + "Melanoma Invasive, Desmoplastic": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Desmoplastic", + "children": null + }, + "Melanoma Invasive, Heavily pigmented": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Heavily pigmented", + "children": [ + "Melanoma Invasive, Heavily pigmented, resembling epithelioid blue nevus or melanoma developing in animals" + ] + }, + "Melanoma Invasive, Mucosal": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Mucosal", + "children": null + }, + "Melanoma Invasive, Neurotropic": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Neurotropic", + "children": null + }, + "Melanoma Invasive, Nevoid": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Nevoid", + "children": null + }, + "Melanoma Invasive, Nodular": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Nodular", + "children": null + }, + "Melanoma Invasive, Blue nevus-like": { + "level": 4, + "parent": "Melanoma Invasive", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Blue nevus-like", + "children": [ + "Melanoma Invasive, resembling blue nevus", + "Melanoma Invasive, originating from blue nevus" + ] + }, + "Actinic keratosis, Atrophic": { + "level": 4, + "parent": "Solar or actinic keratosis", + "concatenate": "Indeterminate::Indeterminate epidermal proliferations::Solar or actinic keratosis::Actinic keratosis, Atrophic", + "children": null + }, + "Dermatofibroma, Atypical": { + "level": 4, + "parent": "Dermatofibroma", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Dermatofibroma::Dermatofibroma, Atypical", + "children": null + }, + "Mastocytosis, Diffuse or multifocal": { + "level": 4, + "parent": "Mastocytosis", + "concatenate": "Benign::Mast cell proliferations::Mastocytosis::Mastocytosis, Diffuse or multifocal", + "children": [ + "Telangiectasia macularis eruptiva perstans", + "Mastocytosis, Diffuse cutaenous" + ] + }, + "Lipoma, Spindle cell": { + "level": 4, + "parent": "Lipoma", + "concatenate": "Benign::Benign soft tissue proliferations - Adipocytic::Lipoma::Lipoma, Spindle cell", + "children": null + }, + "Nevus, Spitz": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Spitz", + "children": null + }, + "Nevus, Spilus": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Spilus", + "children": null + }, + "Nevus, Reed": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Reed", + "children": null + }, + "Nevus, Recurrent or persistent": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Recurrent or persistent", + "children": null + }, + "Nevus, Of special anatomic site": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Of special anatomic site", + "children": null + }, + "Nevus, NOS, Junctional": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, NOS, Junctional", + "children": null + }, + "Nevus, NOS, Dermal": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, NOS, Dermal", + "children": null + }, + "Nevus, NOS, Compound": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, NOS, Compound", + "children": null + }, + "Nevus, Meyerson": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Meyerson", + "children": null + }, + "Nevus, Lentiginous": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Lentiginous", + "children": null + }, + "Nevus, Halo": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Halo", + "children": null + }, + "Nevus, Deep penetrating": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Deep penetrating", + "children": null + }, + "Nevus, Congenital": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Congenital", + "children": [ + "Nevus, Congenital, by histopathological pattern", + "Nevus, Congenital, by history and histopathological pattern", + "Nevus, Congenital, by history" + ] + }, + "Nevus, Combined": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Combined", + "children": null + }, + "Nevus, Balloon cell": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Balloon cell", + "children": null + }, + "Actinic keratosis, Acantholytic": { + "level": 4, + "parent": "Solar or actinic keratosis", + "concatenate": "Indeterminate::Indeterminate epidermal proliferations::Solar or actinic keratosis::Actinic keratosis, Acantholytic", + "children": null + }, + "Hidradenoma, Apocrine, Predominantly with clear cells": { + "level": 4, + "parent": "Hidradenoma, Apocrine", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Hidradenoma, Apocrine::Hidradenoma, Apocrine, Predominantly with clear cells", + "children": null + }, + "Hidradenoma, Poroid": { + "level": 4, + "parent": "Hidradenoma", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Hidradenoma::Hidradenoma, Poroid", + "children": null + }, + "Mixed tumor, Apocrine type": { + "level": 4, + "parent": "Mixed tumor", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Mixed tumor::Mixed tumor, Apocrine type", + "children": null + }, + "Mixed tumor, Eccrine type": { + "level": 4, + "parent": "Mixed tumor", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Apocrine or Eccrine::Mixed tumor::Mixed tumor, Eccrine type", + "children": null + }, + "Trichoepithelioma, Desmoplastic": { + "level": 4, + "parent": "Trichoepithelioma", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Trichoepithelioma::Trichoepithelioma, Desmoplastic", + "children": null + }, + "Tricholemmoma, Desmoplastic": { + "level": 4, + "parent": "Tricholemmoma", + "concatenate": "Benign::Benign adnexal epithelial proliferations - Follicular::Tricholemmoma::Tricholemmoma, Desmoplastic", + "children": null + }, + "Lipoma, Pleomorphic": { + "level": 4, + "parent": "Lipoma", + "concatenate": "Benign::Benign soft tissue proliferations - Adipocytic::Lipoma::Lipoma, Pleomorphic", + "children": null + }, + "Seborrheic keratosis, Clonal": { + "level": 4, + "parent": "Seborrheic keratosis", + "concatenate": "Benign::Benign epidermal proliferations::Seborrheic keratosis::Seborrheic keratosis, Clonal", + "children": null + }, + "Mongolian spot": { + "level": 4, + "parent": "Dermal melanocytosis", + "concatenate": "Benign::Benign melanocytic proliferations::Dermal melanocytosis::Mongolian spot", + "children": null + }, + "Nevus of Ito": { + "level": 4, + "parent": "Dermal melanocytosis", + "concatenate": "Benign::Benign melanocytic proliferations::Dermal melanocytosis::Nevus of Ito", + "children": null + }, + "Nevus of Ota": { + "level": 4, + "parent": "Dermal melanocytosis", + "concatenate": "Benign::Benign melanocytic proliferations::Dermal melanocytosis::Nevus of Ota", + "children": null + }, + "Nevus, Acral": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Acral", + "children": null + }, + "Nevus, Agminated": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Agminated", + "children": null + }, + "Nevus, Atypical, Dysplastic, or Clark": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Atypical, Dysplastic, or Clark", + "children": [ + "Nevus, Atypical", + "Nevus, Dysplastic", + "Nevus, Clark" + ] + }, + "Blue nevus": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Blue nevus", + "children": [ + "Blue nevus, Common", + "Blue nevus, Cellular", + "Blue nevus, Epithelioid", + "Blue nevus, Plaque type", + "Blue nevus, Sclerosing" + ] + }, + "Angiofibroma, Facial": { + "level": 4, + "parent": "Angiofibroma", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Angiofibroma::Angiofibroma, Facial", + "children": null + }, + "Nevus, BAP-1 deficient": { + "level": 4, + "parent": "Nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, BAP-1 deficient", + "children": null + }, + "Angiofibroma, Periungual": { + "level": 4, + "parent": "Angiofibroma", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Angiofibroma::Angiofibroma, Periungual", + "children": null + }, + "Angiofibroma, Penile": { + "level": 4, + "parent": "Angiofibroma", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Angiofibroma::Angiofibroma, Penile", + "children": null + }, + "Langerhans cell histiocytosis, Solitary or unifocal": { + "level": 4, + "parent": "Langerhans cell histiocytosis", + "concatenate": "Benign::Langerhans cell proliferations::Langerhans cell histiocytosis::Langerhans cell histiocytosis, Solitary or unifocal", + "children": null + }, + "Langerhans cell histiocytosis, Diffuse or multifocal": { + "level": 4, + "parent": "Langerhans cell histiocytosis", + "concatenate": "Benign::Langerhans cell proliferations::Langerhans cell histiocytosis::Langerhans cell histiocytosis, Diffuse or multifocal", + "children": null + }, + "Subungual hemorrhage": { + "level": 4, + "parent": "Hemorrhage", + "concatenate": "Benign::Hemorrhagic lesions::Hemorrhage::Subungual hemorrhage", + "children": null + }, + "Subcorneal and intracorneal hemorrhage": { + "level": 4, + "parent": "Hemorrhage", + "concatenate": "Benign::Hemorrhagic lesions::Hemorrhage::Subcorneal and intracorneal hemorrhage", + "children": null + }, + "Mucosal hemorrhage": { + "level": 4, + "parent": "Hemorrhage", + "concatenate": "Benign::Hemorrhagic lesions::Hemorrhage::Mucosal hemorrhage", + "children": null + }, + "Dermal and subcutaneous hemorhage": { + "level": 4, + "parent": "Hemorrhage", + "concatenate": "Benign::Hemorrhagic lesions::Hemorrhage::Dermal and subcutaneous hemorhage", + "children": null + }, + "Pilar cyst": { + "level": 4, + "parent": "Trichilemmal or isthmic-catagen or pilar cyst", + "concatenate": "Benign::Cysts::Trichilemmal or isthmic-catagen or pilar cyst::Pilar cyst", + "children": null + }, + "Trichilemmal cyst": { + "level": 4, + "parent": "Trichilemmal or isthmic-catagen or pilar cyst", + "concatenate": "Benign::Cysts::Trichilemmal or isthmic-catagen or pilar cyst::Trichilemmal cyst", + "children": null + }, + "Epidermal, Keratinous": { + "level": 4, + "parent": "Keratinous cyst", + "concatenate": "Benign::Cysts::Keratinous cyst::Epidermal, Keratinous", + "children": null + }, + "Infundibular, Keratinous": { + "level": 4, + "parent": "Keratinous cyst", + "concatenate": "Benign::Cysts::Keratinous cyst::Infundibular, Keratinous", + "children": null + }, + "Epidermal, Sebaceous": { + "level": 4, + "parent": "Sebaceous cyst", + "concatenate": "Benign::Cysts::Sebaceous cyst::Epidermal, Sebaceous", + "children": null + }, + "Infundibular, Sebaceous": { + "level": 4, + "parent": "Sebaceous cyst", + "concatenate": "Benign::Cysts::Sebaceous cyst::Infundibular, Sebaceous", + "children": null + }, + "Lymphangioma, deep": { + "level": 4, + "parent": "Lymphangioma", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Lymphangioma::Lymphangioma, deep", + "children": null + }, + "Lymphangioma, superficial": { + "level": 4, + "parent": "Lymphangioma", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Lymphangioma::Lymphangioma, superficial", + "children": null + }, + "Isthmic-catagen cyst": { + "level": 4, + "parent": "Trichilemmal or isthmic-catagen or pilar cyst", + "concatenate": "Benign::Cysts::Trichilemmal or isthmic-catagen or pilar cyst::Isthmic-catagen cyst", + "children": null + }, + "Hemangioma, Infantile": { + "level": 4, + "parent": "Hemangioma", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Hemangioma::Hemangioma, Infantile", + "children": null + }, + "Dermatofibroma, Aneurysmal": { + "level": 4, + "parent": "Dermatofibroma", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Dermatofibroma::Dermatofibroma, Aneurysmal", + "children": null + }, + "Hemangioma, Tufted": { + "level": 4, + "parent": "Hemangioma", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Hemangioma::Hemangioma, Tufted", + "children": null + }, + "Dermatofibroma, Cellular": { + "level": 4, + "parent": "Dermatofibroma", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Dermatofibroma::Dermatofibroma, Cellular", + "children": null + }, + "Dermatofibroma, Epithelioid": { + "level": 4, + "parent": "Dermatofibroma", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Dermatofibroma::Dermatofibroma, Epithelioid", + "children": null + }, + "Dermatofibroma, Hemosiderotic": { + "level": 4, + "parent": "Dermatofibroma", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Dermatofibroma::Dermatofibroma, Hemosiderotic", + "children": null + }, + "Fibroma, Sclerotic": { + "level": 4, + "parent": "Fibroma", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Fibroma::Fibroma, Sclerotic", + "children": null + }, + "Scar, Hypertrophic": { + "level": 4, + "parent": "Scar", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Scar::Scar, Hypertrophic", + "children": null + }, + "Fibroma, Pleomorphic": { + "level": 4, + "parent": "Fibroma", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Fibroma::Fibroma, Pleomorphic", + "children": null + }, + "Granular cell tumor, neural and s100 positive": { + "level": 4, + "parent": "Granular cell tumor", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Granular cell tumor::Granular cell tumor, neural and s100 positive", + "children": null + }, + "Granular cell tumor, non-neural and s100 negative": { + "level": 4, + "parent": "Granular cell tumor", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Granular cell tumor::Granular cell tumor, non-neural and s100 negative", + "children": null + }, + "Neuroma, Palisaded and encapsulated": { + "level": 4, + "parent": "Neuroma", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Neuroma::Neuroma, Palisaded and encapsulated", + "children": null + }, + "Neuroma, Traumatic": { + "level": 4, + "parent": "Neuroma", + "concatenate": "Benign::Benign soft tissue proliferations - Neural::Neuroma::Neuroma, Traumatic", + "children": null + }, + "Hemangioma, Cherry": { + "level": 4, + "parent": "Hemangioma", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Hemangioma::Hemangioma, Cherry", + "children": null + }, + "Hemangioma, Hobnail": { + "level": 4, + "parent": "Hemangioma", + "concatenate": "Benign::Benign soft tissue proliferations - Vascular::Hemangioma::Hemangioma, Hobnail", + "children": null + }, + "Scar, Keloid": { + "level": 4, + "parent": "Scar", + "concatenate": "Benign::Benign soft tissue proliferations - Fibro-histiocytic::Scar::Scar, Keloid", + "children": null + }, + "Squamous cell carcinoma, Invasive, Clear cell, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Clear cell", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Clear cell::Squamous cell carcinoma, Invasive, Clear cell, moderately differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Sarcomatoid, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Sarcomatoid", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Sarcomatoid::Squamous cell carcinoma, Invasive, Sarcomatoid, well differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Clear cell, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Clear cell", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Clear cell::Squamous cell carcinoma, Invasive, Clear cell, poorly differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Keratoacanthoma-type", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Keratoacanthoma-type::Squamous cell carcinoma, Invasive, Keratoacanthoma-type, well differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Keratoacanthoma-type", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Keratoacanthoma-type::Squamous cell carcinoma, Invasive, Keratoacanthoma-type, moderately differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Keratoacanthoma-type", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Keratoacanthoma-type::Squamous cell carcinoma, Invasive, Keratoacanthoma-type, poorly differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Sarcomatoid, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Sarcomatoid", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Sarcomatoid::Squamous cell carcinoma, Invasive, Sarcomatoid, moderately differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Verrucous, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Verrucous", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Verrucous::Squamous cell carcinoma, Invasive, Verrucous, poorly differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Spindle cell, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Spindle cell", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Spindle cell::Squamous cell carcinoma, Invasive, Spindle cell, well differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Spindle cell, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Spindle cell", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Spindle cell::Squamous cell carcinoma, Invasive, Spindle cell, moderately differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Spindle cell, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Spindle cell", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Spindle cell::Squamous cell carcinoma, Invasive, Spindle cell, poorly differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Verrucous, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Verrucous", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Verrucous::Squamous cell carcinoma, Invasive, Verrucous, well differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Verrucous, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Verrucous", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Verrucous::Squamous cell carcinoma, Invasive, Verrucous, moderately differentiated", + "children": null + }, + "Melanoma Invasive, resembling blue nevus": { + "level": 5, + "parent": "Melanoma Invasive, Blue nevus-like", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Blue nevus-like::Melanoma Invasive, resembling blue nevus", + "children": null + }, + "Squamous cell carcinoma, Invasive, Clear cell, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Clear cell", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Clear cell::Squamous cell carcinoma, Invasive, Clear cell, well differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Sarcomatoid, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Sarcomatoid", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Sarcomatoid::Squamous cell carcinoma, Invasive, Sarcomatoid, poorly differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Adeno-squamous, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Adeno-squamous", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Adeno-squamous::Squamous cell carcinoma, Invasive, Adeno-squamous, poorly differentiated", + "children": null + }, + "Blue nevus, Common": { + "level": 5, + "parent": "Blue nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Blue nevus::Blue nevus, Common", + "children": null + }, + "Squamous cell carcinoma, Invasive, Adeno-squamous, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Adeno-squamous", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Adeno-squamous::Squamous cell carcinoma, Invasive, Adeno-squamous, well differentiated", + "children": null + }, + "Melanoma Invasive, originating from blue nevus": { + "level": 5, + "parent": "Melanoma Invasive, Blue nevus-like", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Blue nevus-like::Melanoma Invasive, originating from blue nevus", + "children": null + }, + "Blue nevus, Cellular": { + "level": 5, + "parent": "Blue nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Blue nevus::Blue nevus, Cellular", + "children": null + }, + "Blue nevus, Epithelioid": { + "level": 5, + "parent": "Blue nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Blue nevus::Blue nevus, Epithelioid", + "children": null + }, + "Blue nevus, Plaque type": { + "level": 5, + "parent": "Blue nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Blue nevus::Blue nevus, Plaque type", + "children": null + }, + "Blue nevus, Sclerosing": { + "level": 5, + "parent": "Blue nevus", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Blue nevus::Blue nevus, Sclerosing", + "children": null + }, + "Nevus, Atypical": { + "level": 5, + "parent": "Nevus, Atypical, Dysplastic, or Clark", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Atypical, Dysplastic, or Clark::Nevus, Atypical", + "children": null + }, + "Nevus, Dysplastic": { + "level": 5, + "parent": "Nevus, Atypical, Dysplastic, or Clark", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Atypical, Dysplastic, or Clark::Nevus, Dysplastic", + "children": null + }, + "Squamous cell carcinoma, Invasive, Adeno-squamous, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Adeno-squamous", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Adeno-squamous::Squamous cell carcinoma, Invasive, Adeno-squamous, moderately differentiated", + "children": null + }, + "Nevus, Clark": { + "level": 5, + "parent": "Nevus, Atypical, Dysplastic, or Clark", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Atypical, Dysplastic, or Clark::Nevus, Clark", + "children": null + }, + "Nevus, Congenital, by histopathological pattern": { + "level": 5, + "parent": "Nevus, Congenital", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Congenital::Nevus, Congenital, by histopathological pattern", + "children": null + }, + "Nevus, Congenital, by history and histopathological pattern": { + "level": 5, + "parent": "Nevus, Congenital", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Congenital::Nevus, Congenital, by history and histopathological pattern", + "children": null + }, + "Telangiectasia macularis eruptiva perstans": { + "level": 5, + "parent": "Mastocytosis, Diffuse or multifocal", + "concatenate": "Benign::Mast cell proliferations::Mastocytosis::Mastocytosis, Diffuse or multifocal::Telangiectasia macularis eruptiva perstans", + "children": null + }, + "Mastocytosis, Diffuse cutaenous": { + "level": 5, + "parent": "Mastocytosis, Diffuse or multifocal", + "concatenate": "Benign::Mast cell proliferations::Mastocytosis::Mastocytosis, Diffuse or multifocal::Mastocytosis, Diffuse cutaenous", + "children": null + }, + "Squamous cell carcinoma, Invasive, Acantholytic, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Acantholytic", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Acantholytic::Squamous cell carcinoma, Invasive, Acantholytic, well differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Acantholytic, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Acantholytic", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Acantholytic::Squamous cell carcinoma, Invasive, Acantholytic, moderately differentiated", + "children": null + }, + "Squamous cell carcinoma, Invasive, Acantholytic, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Acantholytic", + "concatenate": "Malignant::Malignant epidermal proliferations::Squamous cell carcinoma, Invasive::Squamous cell carcinoma, Invasive, Acantholytic::Squamous cell carcinoma, Invasive, Acantholytic, poorly differentiated", + "children": null + }, + "Nevus, Congenital, by history": { + "level": 5, + "parent": "Nevus, Congenital", + "concatenate": "Benign::Benign melanocytic proliferations::Nevus::Nevus, Congenital::Nevus, Congenital, by history", + "children": null + }, + "Melanoma Invasive, Heavily pigmented, resembling epithelioid blue nevus or melanoma developing in animals": { + "level": 5, + "parent": "Melanoma Invasive, Heavily pigmented", + "concatenate": "Malignant::Malignant melanocytic proliferations (Melanoma)::Melanoma Invasive::Melanoma Invasive, Heavily pigmented::Melanoma Invasive, Heavily pigmented, resembling epithelioid blue nevus or melanoma developing in animals", + "children": null + } +} \ No newline at end of file diff --git a/sources/models/iddx-tree.json b/sources/models/iddx-tree.json new file mode 100644 index 0000000..e6e3f0b --- /dev/null +++ b/sources/models/iddx-tree.json @@ -0,0 +1,1858 @@ +{ + "Benign": { + "level": 1, + "parent": null, + "children": { + "Mast cell proliferations": { + "level": 2, + "parent": "Benign", + "children": { + "Maculopapular mastocytoma": { + "level": 3, + "parent": "Mast cell proliferations" + }, + "Mastocytoma, Solitary or unifocal": { + "level": 3, + "parent": "Mast cell proliferations" + }, + "Mastocytosis": { + "level": 3, + "parent": "Mast cell proliferations", + "children": { + "Mastocytosis, Diffuse or multifocal": { + "level": 4, + "parent": "Mastocytosis", + "children": { + "Telangiectasia macularis eruptiva perstans": { + "level": 5, + "parent": "Mastocytosis, Diffuse or multifocal" + }, + "Mastocytosis, Diffuse cutaenous": { + "level": 5, + "parent": "Mastocytosis, Diffuse or multifocal" + } + } + } + } + } + } + }, + "Inflammatory or infectious diseases": { + "level": 2, + "parent": "Benign", + "children": { + "Verruca": { + "level": 3, + "parent": "Inflammatory or infectious diseases" + }, + "Muluscum": { + "level": 3, + "parent": "Inflammatory or infectious diseases" + } + } + }, + "Langerhans cell proliferations": { + "level": 2, + "parent": "Benign", + "children": { + "Mixed Langerhans cell histiocytosis and Erdheim Chester disease": { + "level": 3, + "parent": "Langerhans cell proliferations" + }, + "Langerhans cell histiocytosis": { + "level": 3, + "parent": "Langerhans cell proliferations", + "children": { + "Langerhans cell histiocytosis, Solitary or unifocal": { + "level": 4, + "parent": "Langerhans cell histiocytosis" + }, + "Langerhans cell histiocytosis, Diffuse or multifocal": { + "level": 4, + "parent": "Langerhans cell histiocytosis" + } + } + }, + "Erdheim Chester disease": { + "level": 3, + "parent": "Langerhans cell proliferations" + }, + "Indeterminate cell histiocytosis": { + "level": 3, + "parent": "Langerhans cell proliferations" + } + } + }, + "Benign - Other": { + "level": 2, + "parent": "Benign" + }, + "Benign adnexal epithelial proliferations - Apocrine or Eccrine": { + "level": 2, + "parent": "Benign", + "children": { + "Apocrine tubular adenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Cylindoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Cystadenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Fibroadenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Hidradenoma papilliferum": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Hidradenoma, Apocrine": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "children": { + "Hidradenoma, Apocrine, Predominantly with clear cells": { + "level": 4, + "parent": "Hidradenoma, Apocrine" + } + } + }, + "Hidradenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "children": { + "Hidradenoma, Poroid": { + "level": 4, + "parent": "Hidradenoma" + } + } + }, + "Mixed tumor": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine", + "children": { + "Mixed tumor, Apocrine type": { + "level": 4, + "parent": "Mixed tumor" + }, + "Mixed tumor, Eccrine type": { + "level": 4, + "parent": "Mixed tumor" + } + } + }, + "Poroma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Spiradenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Syringocystadenoma papilliferum": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Syringofibroadenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Syringoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Supernumerary nipple": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Apocrine or Eccrine" + } + } + }, + "Benign adnexal epithelial proliferations - Follicular": { + "level": 2, + "parent": "Benign", + "children": { + "Warty dyskeratoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular" + }, + "Tumor of follicular infundibulum": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular" + }, + "Tricholemmoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "children": { + "Tricholemmoma, Desmoplastic": { + "level": 4, + "parent": "Tricholemmoma" + } + } + }, + "Trichofolliculoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular" + }, + "Folliculosebaceous cystic hamartoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular" + }, + "Nevus comedonicus": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular" + }, + "Pilar sheath acanthoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular" + }, + "Pilomatricoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular" + }, + "Proliferating tricholemmal tumor": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular" + }, + "Trichoblastoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular" + }, + "Trichoepithelioma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular", + "children": { + "Trichoepithelioma, Desmoplastic": { + "level": 4, + "parent": "Trichoepithelioma" + } + } + }, + "Panfolliculoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Follicular" + } + } + }, + "Benign adnexal epithelial proliferations - Sebaceous": { + "level": 2, + "parent": "Benign", + "children": { + "Fibrofolliculoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous" + }, + "Fordyce spots": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous" + }, + "Nevus sebaceus": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous" + }, + "Sebaceoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous" + }, + "Sebaceous adenoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous" + }, + "Sebaceous hyperplasia": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous" + }, + "Trichodiscoma": { + "level": 3, + "parent": "Benign adnexal epithelial proliferations - Sebaceous" + } + } + }, + "Benign epidermal proliferations": { + "level": 2, + "parent": "Benign", + "children": { + "Acantholytic acanthoma": { + "level": 3, + "parent": "Benign epidermal proliferations" + }, + "Clear cell acanthoma": { + "level": 3, + "parent": "Benign epidermal proliferations" + }, + "Epidermal nevus": { + "level": 3, + "parent": "Benign epidermal proliferations" + }, + "Epidermolytic acanthoma": { + "level": 3, + "parent": "Benign epidermal proliferations" + }, + "Large cell acanthoma": { + "level": 3, + "parent": "Benign epidermal proliferations" + }, + "Lichen planus like keratosis": { + "level": 3, + "parent": "Benign epidermal proliferations" + }, + "Melanoacanthoma": { + "level": 3, + "parent": "Benign epidermal proliferations" + }, + "Pigmented benign keratosis": { + "level": 3, + "parent": "Benign epidermal proliferations" + }, + "Porokeratosis": { + "level": 3, + "parent": "Benign epidermal proliferations" + }, + "Seborrheic keratosis": { + "level": 3, + "parent": "Benign epidermal proliferations", + "children": { + "Seborrheic keratosis, Clonal": { + "level": 4, + "parent": "Seborrheic keratosis" + } + } + }, + "Solar lentigo": { + "level": 3, + "parent": "Benign epidermal proliferations" + } + } + }, + "Benign soft tissue proliferations - Adipocytic": { + "level": 2, + "parent": "Benign", + "children": { + "Angiolipoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Adipocytic" + }, + "Lipoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Adipocytic", + "children": { + "Lipoma, Spindle cell": { + "level": 4, + "parent": "Lipoma" + }, + "Lipoma, Pleomorphic": { + "level": 4, + "parent": "Lipoma" + } + } + }, + "Lipomatous nevus": { + "level": 3, + "parent": "Benign soft tissue proliferations - Adipocytic" + }, + "Fibrolipoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Adipocytic" + } + } + }, + "Benign soft tissue proliferations - Cartilagenous and ossifying": { + "level": 2, + "parent": "Benign", + "children": { + "Accessory tragus": { + "level": 3, + "parent": "Benign soft tissue proliferations - Cartilagenous and ossifying" + }, + "Extraskeletal chondroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Cartilagenous and ossifying" + }, + "Osteoma cutis": { + "level": 3, + "parent": "Benign soft tissue proliferations - Cartilagenous and ossifying" + }, + "Subungual osteochodroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Cartilagenous and ossifying" + } + } + }, + "Benign soft tissue proliferations - Fibro-histiocytic": { + "level": 2, + "parent": "Benign", + "children": { + "Angiofibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "children": { + "Angiofibroma, Facial": { + "level": 4, + "parent": "Angiofibroma" + }, + "Angiofibroma, Periungual": { + "level": 4, + "parent": "Angiofibroma" + }, + "Angiofibroma, Penile": { + "level": 4, + "parent": "Angiofibroma" + } + } + }, + "Dermatofibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "children": { + "Dermatofibroma, Atypical": { + "level": 4, + "parent": "Dermatofibroma" + }, + "Dermatofibroma, Aneurysmal": { + "level": 4, + "parent": "Dermatofibroma" + }, + "Dermatofibroma, Cellular": { + "level": 4, + "parent": "Dermatofibroma" + }, + "Dermatofibroma, Epithelioid": { + "level": 4, + "parent": "Dermatofibroma" + }, + "Dermatofibroma, Hemosiderotic": { + "level": 4, + "parent": "Dermatofibroma" + } + } + }, + "Fibroepithelial polyp": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic" + }, + "Fibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "children": { + "Fibroma, Sclerotic": { + "level": 4, + "parent": "Fibroma" + }, + "Fibroma, Pleomorphic": { + "level": 4, + "parent": "Fibroma" + } + } + }, + "Giant cell tumor of the tendon sheath": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic" + }, + "Juvenile xanthogranuloma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic" + }, + "Cutaneous Myxoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic" + }, + "Non-Langerhans histiocytosis": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic" + }, + "Reticulohistiocytosis": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic" + }, + "Rosai-Dorfman disease": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic" + }, + "Scar": { + "level": 3, + "parent": "Benign soft tissue proliferations - Fibro-histiocytic", + "children": { + "Scar, Hypertrophic": { + "level": 4, + "parent": "Scar" + }, + "Scar, Keloid": { + "level": 4, + "parent": "Scar" + } + } + } + } + }, + "Benign melanocytic proliferations": { + "level": 2, + "parent": "Benign", + "children": { + "Nevus": { + "level": 3, + "parent": "Benign melanocytic proliferations", + "children": { + "Nevus, Spitz": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Spilus": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Reed": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Recurrent or persistent": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Of special anatomic site": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, NOS, Junctional": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, NOS, Dermal": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, NOS, Compound": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Meyerson": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Lentiginous": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Halo": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Deep penetrating": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Congenital": { + "level": 4, + "parent": "Nevus", + "children": { + "Nevus, Congenital, by histopathological pattern": { + "level": 5, + "parent": "Nevus, Congenital" + }, + "Nevus, Congenital, by history and histopathological pattern": { + "level": 5, + "parent": "Nevus, Congenital" + }, + "Nevus, Congenital, by history": { + "level": 5, + "parent": "Nevus, Congenital" + } + } + }, + "Nevus, Combined": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Balloon cell": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Acral": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Agminated": { + "level": 4, + "parent": "Nevus" + }, + "Nevus, Atypical, Dysplastic, or Clark": { + "level": 4, + "parent": "Nevus", + "children": { + "Nevus, Atypical": { + "level": 5, + "parent": "Nevus, Atypical, Dysplastic, or Clark" + }, + "Nevus, Dysplastic": { + "level": 5, + "parent": "Nevus, Atypical, Dysplastic, or Clark" + }, + "Nevus, Clark": { + "level": 5, + "parent": "Nevus, Atypical, Dysplastic, or Clark" + } + } + }, + "Blue nevus": { + "level": 4, + "parent": "Nevus", + "children": { + "Blue nevus, Common": { + "level": 5, + "parent": "Blue nevus" + }, + "Blue nevus, Cellular": { + "level": 5, + "parent": "Blue nevus" + }, + "Blue nevus, Epithelioid": { + "level": 5, + "parent": "Blue nevus" + }, + "Blue nevus, Plaque type": { + "level": 5, + "parent": "Blue nevus" + }, + "Blue nevus, Sclerosing": { + "level": 5, + "parent": "Blue nevus" + } + } + }, + "Nevus, BAP-1 deficient": { + "level": 4, + "parent": "Nevus" + } + } + }, + "Dermal melanocytosis": { + "level": 3, + "parent": "Benign melanocytic proliferations", + "children": { + "Mongolian spot": { + "level": 4, + "parent": "Dermal melanocytosis" + }, + "Nevus of Ito": { + "level": 4, + "parent": "Dermal melanocytosis" + }, + "Nevus of Ota": { + "level": 4, + "parent": "Dermal melanocytosis" + } + } + }, + "Lentiginous melanocytic proliferation": { + "level": 3, + "parent": "Benign melanocytic proliferations" + }, + "Lentigo simplex": { + "level": 3, + "parent": "Benign melanocytic proliferations" + }, + "Pigmented epithelioid melanocytoma": { + "level": 3, + "parent": "Benign melanocytic proliferations" + }, + "Proliferative nodule in congenital melanocytic nevi without atypia": { + "level": 3, + "parent": "Benign melanocytic proliferations" + } + } + }, + "Benign soft tissue proliferations - Myoepithelial": { + "level": 2, + "parent": "Benign", + "children": { + "Myoepithelioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Myoepithelial" + } + } + }, + "Benign soft tissue proliferations - Neural": { + "level": 2, + "parent": "Benign", + "children": { + "Granular cell tumor": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural", + "children": { + "Granular cell tumor, neural and s100 positive": { + "level": 4, + "parent": "Granular cell tumor" + }, + "Granular cell tumor, non-neural and s100 negative": { + "level": 4, + "parent": "Granular cell tumor" + } + } + }, + "Nerve sheath myxoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural" + }, + "Neurofibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural" + }, + "Plexiform Neurofibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural" + }, + "Neuroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural", + "children": { + "Neuroma, Palisaded and encapsulated": { + "level": 4, + "parent": "Neuroma" + }, + "Neuroma, Traumatic": { + "level": 4, + "parent": "Neuroma" + } + } + }, + "Perineurioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural" + }, + "Schwannoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Neural" + } + } + }, + "Benign soft tissue proliferations - Vascular": { + "level": 2, + "parent": "Benign", + "children": { + "Verrucous hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Venous malformation": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Venous lake": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Vascular spider": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Rapidly involuting congenital hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Telangiectasia": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Acquired elastotic hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Acroangiodermatitis of Mali": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Angiokeratoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Angiolymphoid hyperplasia with eosinophilia": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Glomangiomyoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Glomeruloid hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Glomus tumor": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "children": { + "Hemangioma, Infantile": { + "level": 4, + "parent": "Hemangioma" + }, + "Hemangioma, Tufted": { + "level": 4, + "parent": "Hemangioma" + }, + "Hemangioma, Cherry": { + "level": 4, + "parent": "Hemangioma" + }, + "Hemangioma, Hobnail": { + "level": 4, + "parent": "Hemangioma" + } + } + }, + "Lymphangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular", + "children": { + "Lymphangioma, deep": { + "level": 4, + "parent": "Lymphangioma" + }, + "Lymphangioma, superficial": { + "level": 4, + "parent": "Lymphangioma" + } + } + }, + "Nevus anemicus": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Noninvoluting congenital hemangioma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Other vascular or lymphatic malformation or hamartoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Pyogenic granuloma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Arterio-venous malformation": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + }, + "Capillary vascular malformation": { + "level": 3, + "parent": "Benign soft tissue proliferations - Vascular" + } + } + }, + "Collision - Only benign proliferations": { + "level": 2, + "parent": "Benign" + }, + "Cysts": { + "level": 2, + "parent": "Benign", + "children": { + "Comedo": { + "level": 3, + "parent": "Cysts" + }, + "Digital mucous cyst": { + "level": 3, + "parent": "Cysts" + }, + "Dilated pore": { + "level": 3, + "parent": "Cysts" + }, + "Infundibular or epidermal cyst": { + "level": 3, + "parent": "Cysts" + }, + "Sebaceous cyst": { + "level": 3, + "parent": "Cysts", + "children": { + "Epidermal, Sebaceous": { + "level": 4, + "parent": "Sebaceous cyst" + }, + "Infundibular, Sebaceous": { + "level": 4, + "parent": "Sebaceous cyst" + } + } + }, + "Keratinous cyst": { + "level": 3, + "parent": "Cysts", + "children": { + "Epidermal, Keratinous": { + "level": 4, + "parent": "Keratinous cyst" + }, + "Infundibular, Keratinous": { + "level": 4, + "parent": "Keratinous cyst" + } + } + }, + "Milium": { + "level": 3, + "parent": "Cysts" + }, + "Steatocystoma": { + "level": 3, + "parent": "Cysts" + }, + "Trichilemmal or isthmic-catagen or pilar cyst": { + "level": 3, + "parent": "Cysts", + "children": { + "Pilar cyst": { + "level": 4, + "parent": "Trichilemmal or isthmic-catagen or pilar cyst" + }, + "Trichilemmal cyst": { + "level": 4, + "parent": "Trichilemmal or isthmic-catagen or pilar cyst" + }, + "Isthmic-catagen cyst": { + "level": 4, + "parent": "Trichilemmal or isthmic-catagen or pilar cyst" + } + } + } + } + }, + "Exogenous": { + "level": 2, + "parent": "Benign", + "children": { + "Foreign body granuloma": { + "level": 3, + "parent": "Exogenous" + }, + "Tattoo": { + "level": 3, + "parent": "Exogenous" + } + } + }, + "Flat melanotic pigmentations - not melanocytic nevus": { + "level": 2, + "parent": "Benign", + "children": { + "Cafe au lait macule or patch": { + "level": 3, + "parent": "Flat melanotic pigmentations - not melanocytic nevus" + }, + "Ephelis": { + "level": 3, + "parent": "Flat melanotic pigmentations - not melanocytic nevus" + }, + "Ink-spot lentigo": { + "level": 3, + "parent": "Flat melanotic pigmentations - not melanocytic nevus" + }, + "Lentigo NOS": { + "level": 3, + "parent": "Flat melanotic pigmentations - not melanocytic nevus" + }, + "Mucosal melanotic macule": { + "level": 3, + "parent": "Flat melanotic pigmentations - not melanocytic nevus" + } + } + }, + "Benign soft tissue proliferations - Muscle tissue or myofibroblastic": { + "level": 2, + "parent": "Benign", + "children": { + "Smooth muscle hamartoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic" + }, + "Nodular Fasciitis": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic" + }, + "Piloleiomyoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic" + }, + "Dermatomyofibroma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic" + }, + "Angioleiomyoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic" + }, + "Dartoic muscle leiomyoma": { + "level": 3, + "parent": "Benign soft tissue proliferations - Muscle tissue or myofibroblastic" + } + } + }, + "Hemorrhagic lesions": { + "level": 2, + "parent": "Benign", + "children": { + "Hemorrhage": { + "level": 3, + "parent": "Hemorrhagic lesions", + "children": { + "Subungual hemorrhage": { + "level": 4, + "parent": "Hemorrhage" + }, + "Subcorneal and intracorneal hemorrhage": { + "level": 4, + "parent": "Hemorrhage" + }, + "Mucosal hemorrhage": { + "level": 4, + "parent": "Hemorrhage" + }, + "Dermal and subcutaneous hemorhage": { + "level": 4, + "parent": "Hemorrhage" + } + } + } + } + } + } + }, + "Indeterminate": { + "level": 1, + "parent": null, + "children": { + "Indeterminate melanocytic proliferations": { + "level": 2, + "parent": "Indeterminate", + "children": { + "Atypical melanocytic neoplasm": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations" + }, + "Atypical intraepithelial melanocytic proliferation": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations" + }, + "Atypical Spitz tumor": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations", + "children": { + "Atypical Spitz tumor, Compound": { + "level": 4, + "parent": "Atypical Spitz tumor" + }, + "Atypical Spitz tumor, Dermal": { + "level": 4, + "parent": "Atypical Spitz tumor" + }, + "Atypical Spitz tumor, Junctional": { + "level": 4, + "parent": "Atypical Spitz tumor" + } + } + }, + "Atypical pigmented spindle cell tumor": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations" + }, + "Atypical proliferative nodules in congenital melanocytic nevus": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations" + }, + "Superficial atypical melanocytic proliferation of uncertain significance": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations" + }, + "Melanocytic tumor of uncertain malignant potential": { + "level": 3, + "parent": "Indeterminate melanocytic proliferations" + } + } + }, + "Indeterminate epidermal proliferations": { + "level": 2, + "parent": "Indeterminate", + "children": { + "Solar or actinic cheilitis": { + "level": 3, + "parent": "Indeterminate epidermal proliferations" + }, + "Solar or actinic keratosis": { + "level": 3, + "parent": "Indeterminate epidermal proliferations", + "children": { + "Actinic keratosis, Lichenoid": { + "level": 4, + "parent": "Solar or actinic keratosis" + }, + "Actinic keratosis, Hypertrophic": { + "level": 4, + "parent": "Solar or actinic keratosis" + }, + "Actinic keratosis, Bowenoid": { + "level": 4, + "parent": "Solar or actinic keratosis" + }, + "Actinic keratosis, Atrophic": { + "level": 4, + "parent": "Solar or actinic keratosis" + }, + "Actinic keratosis, Acantholytic": { + "level": 4, + "parent": "Solar or actinic keratosis" + } + } + } + } + } + } + }, + "Malignant": { + "level": 1, + "parent": null, + "children": { + "Collision - At least one malignant proliferation": { + "level": 2, + "parent": "Malignant" + }, + "Lymphocytic proliferations - B-Cell": { + "level": 2, + "parent": "Malignant", + "children": { + "EBV positive mucocutaneous ulcer": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell" + }, + "Intravascular large B-cell lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell" + }, + "Lymphocytic proliferation, B-Cell, other": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell" + }, + "Primary cutaneous follicle center lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell" + }, + "Primary cutaneous large B-Cell lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell" + }, + "Primary cutaneous marginal zone lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - B-Cell" + } + } + }, + "Lymphocytic proliferations - T-Cell/NK": { + "level": 2, + "parent": "Malignant", + "children": { + "Chronic active EBV infection": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK" + }, + "Adult T-cell leukemia or lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK" + }, + "Extranodal T-cell/NK lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "children": { + "Extranodal T-cell/NK lymphoma, Nasal type": { + "level": 4, + "parent": "Extranodal T-cell/NK lymphoma" + } + } + }, + "Lymphocytic proliferation, T-Cell/NK": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK" + }, + "Mycosis fungoides": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "children": { + "Mycosis fungoides, Folliculotropic": { + "level": 4, + "parent": "Mycosis fungoides" + }, + "Mycosis fungoides, Pagetoid reticulosis": { + "level": 4, + "parent": "Mycosis fungoides" + }, + "Mycosis fungoides, With large cell transformation": { + "level": 4, + "parent": "Mycosis fungoides" + }, + "Mycosis fungoides, Granulomatous slack skin": { + "level": 4, + "parent": "Mycosis fungoides" + } + } + }, + "Primary cutaneous CD4+ small or medium T-cell lymphoproliferative disorder": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK" + }, + "Primary cutaneous peripheral T-cell lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "children": { + "Primary cutaneous peripheral T-cell lymphoma, Rare subtype": { + "level": 4, + "parent": "Primary cutaneous peripheral T-cell lymphoma" + } + } + }, + "Sezary syndrome": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK" + }, + "Subcutaneous panniculitis-like T-cell lymphoma": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK" + }, + "Primary cutaneous CD30+ lymphoproliferative disease": { + "level": 3, + "parent": "Lymphocytic proliferations - T-Cell/NK", + "children": { + "Cutanous anaplastic large cell lymphoma": { + "level": 4, + "parent": "Primary cutaneous CD30+ lymphoproliferative disease" + }, + "Lymphomatoid papulosis": { + "level": 4, + "parent": "Primary cutaneous CD30+ lymphoproliferative disease" + } + } + } + } + }, + "Malignant adnexal epithelial proliferations - Apocrine or Eccrine": { + "level": 2, + "parent": "Malignant", + "children": { + "Adenoid cystic carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Adnexal adenocarcinoma arising in association with spiradenoma, cylindroma, or spiradenocylindroma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Apocrine carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Digital papillary carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Hidradenocarcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Malignant mixed tumor": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Microcystic adnexal carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Mucinous carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Tubular carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine" + }, + "Paget disease": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine", + "children": { + "Paget disease, Mammary": { + "level": 4, + "parent": "Paget disease" + }, + "Paget disease, Extra-mammary": { + "level": 4, + "parent": "Paget disease" + } + } + }, + "Porocarcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Apocrine or Eccrine" + } + } + }, + "Malignant adnexal epithelial proliferations - Follicular": { + "level": 2, + "parent": "Malignant", + "children": { + "Basal cell carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Follicular", + "children": { + "Basal cell carcinoma, Fibroeipthelial": { + "level": 4, + "parent": "Basal cell carcinoma" + }, + "Basal cell carcinoma, Infiltrating": { + "level": 4, + "parent": "Basal cell carcinoma" + }, + "Basal cell carcinoma, Micronodular": { + "level": 4, + "parent": "Basal cell carcinoma" + }, + "Basal cell carcinoma, Nodular": { + "level": 4, + "parent": "Basal cell carcinoma" + }, + "Basal cell carcinoma, Sclerosing or morpheaform": { + "level": 4, + "parent": "Basal cell carcinoma" + }, + "Basal cell carcinoma, Combined subtypes": { + "level": 4, + "parent": "Basal cell carcinoma" + }, + "Basal cell carcinoma, Superficial": { + "level": 4, + "parent": "Basal cell carcinoma" + }, + "Basal cell carcinoma with sarcomatoid differentiation": { + "level": 4, + "parent": "Basal cell carcinoma" + }, + "Basal cell carcinoma with adnexal differentiation": { + "level": 4, + "parent": "Basal cell carcinoma" + } + } + }, + "Baso-squamous carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Follicular" + }, + "Matrical or pilomatrical carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Follicular" + }, + "Proliferating trichilemmal carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Follicular" + } + } + }, + "Malignant adnexal epithelial proliferations - Sebaceous": { + "level": 2, + "parent": "Malignant", + "children": { + "Sebaceous carcinoma": { + "level": 3, + "parent": "Malignant adnexal epithelial proliferations - Sebaceous" + } + } + }, + "Malignant epidermal proliferations": { + "level": 2, + "parent": "Malignant", + "children": { + "Keratoacanthoma": { + "level": 3, + "parent": "Malignant epidermal proliferations" + }, + "Verrucous carcinoma": { + "level": 3, + "parent": "Malignant epidermal proliferations", + "children": { + "Verrucous carcinoma, Carcinoma cuniculatum type": { + "level": 4, + "parent": "Verrucous carcinoma" + }, + "Verrucous carcinoma, Giant condyloma type": { + "level": 4, + "parent": "Verrucous carcinoma" + }, + "Verrucous carcinoma, Oral florid papilomatosis type": { + "level": 4, + "parent": "Verrucous carcinoma" + } + } + }, + "Squamous cell carcinoma, NOS": { + "level": 3, + "parent": "Malignant epidermal proliferations" + }, + "Bowenoid papulosis": { + "level": 3, + "parent": "Malignant epidermal proliferations" + }, + "Squamous cell carcinoma in situ": { + "level": 3, + "parent": "Malignant epidermal proliferations", + "children": { + "Squamous cell carcinoma in situ, Bowens disease": { + "level": 4, + "parent": "Squamous cell carcinoma in situ" + } + } + }, + "Squamous cell carcinoma, Invasive": { + "level": 3, + "parent": "Malignant epidermal proliferations", + "children": { + "Squamous cell carcinoma, Invasive, Adeno-squamous": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "children": { + "Squamous cell carcinoma, Invasive, Adeno-squamous, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Adeno-squamous" + }, + "Squamous cell carcinoma, Invasive, Adeno-squamous, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Adeno-squamous" + }, + "Squamous cell carcinoma, Invasive, Adeno-squamous, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Adeno-squamous" + } + } + }, + "Squamous cell carcinoma, Invasive, Acantholytic": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "children": { + "Squamous cell carcinoma, Invasive, Acantholytic, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Acantholytic" + }, + "Squamous cell carcinoma, Invasive, Acantholytic, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Acantholytic" + }, + "Squamous cell carcinoma, Invasive, Acantholytic, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Acantholytic" + } + } + }, + "Squamous cell carcinoma, Invasive, Clear cell": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "children": { + "Squamous cell carcinoma, Invasive, Clear cell, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Clear cell" + }, + "Squamous cell carcinoma, Invasive, Clear cell, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Clear cell" + }, + "Squamous cell carcinoma, Invasive, Clear cell, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Clear cell" + } + } + }, + "Squamous cell carcinoma, Invasive, Sarcomatoid": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "children": { + "Squamous cell carcinoma, Invasive, Sarcomatoid, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Sarcomatoid" + }, + "Squamous cell carcinoma, Invasive, Sarcomatoid, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Sarcomatoid" + }, + "Squamous cell carcinoma, Invasive, Sarcomatoid, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Sarcomatoid" + } + } + }, + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "children": { + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Keratoacanthoma-type" + }, + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Keratoacanthoma-type" + }, + "Squamous cell carcinoma, Invasive, Keratoacanthoma-type, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Keratoacanthoma-type" + } + } + }, + "Squamous cell carcinoma, Invasive, Spindle cell": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "children": { + "Squamous cell carcinoma, Invasive, Spindle cell, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Spindle cell" + }, + "Squamous cell carcinoma, Invasive, Spindle cell, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Spindle cell" + }, + "Squamous cell carcinoma, Invasive, Spindle cell, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Spindle cell" + } + } + }, + "Squamous cell carcinoma, Invasive, Verrucous": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive", + "children": { + "Squamous cell carcinoma, Invasive, Verrucous, poorly differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Verrucous" + }, + "Squamous cell carcinoma, Invasive, Verrucous, well differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Verrucous" + }, + "Squamous cell carcinoma, Invasive, Verrucous, moderately differentiated": { + "level": 5, + "parent": "Squamous cell carcinoma, Invasive, Verrucous" + } + } + }, + "Squamous cell carcinoma, Invasive, NOS, moderately differentiated": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive" + }, + "Squamous cell carcinoma, Invasive, NOS, well differentiated": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive" + }, + "Squamous cell carcinoma, Invasive, NOS, poorly differentiated": { + "level": 4, + "parent": "Squamous cell carcinoma, Invasive" + } + } + } + } + }, + "Malignant soft tissue proliferations - Adipocytic": { + "level": 2, + "parent": "Malignant", + "children": { + "Liposarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Adipocytic", + "children": { + "Liposarcoma, Undifferentiated": { + "level": 4, + "parent": "Liposarcoma" + }, + "Liposarcoma, Well differentiated": { + "level": 4, + "parent": "Liposarcoma" + } + } + } + } + }, + "Malignant soft tissue proliferations - Cartilagenous and ossifying": { + "level": 2, + "parent": "Malignant", + "children": { + "Extraskeletal osteosarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Cartilagenous and ossifying" + } + } + }, + "Malignant soft tissue proliferations - Fibro-histiocytic": { + "level": 2, + "parent": "Malignant", + "children": { + "Atypical fibroxanthoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Fibro-histiocytic" + }, + "Dermatofibrosarcoma protuberans": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Fibro-histiocytic" + }, + "Epithelioid sarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Fibro-histiocytic" + }, + "Fibrosarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Fibro-histiocytic" + }, + "Pleomorphic undifferntiated sarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Fibro-histiocytic" + } + } + }, + "Malignant soft tissue proliferations - Muscle tissue or myofibroblastic": { + "level": 2, + "parent": "Malignant", + "children": { + "Atypical intradermal smooth muscle tumor": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Muscle tissue or myofibroblastic" + }, + "Leiomyosarcoma, Cutaneous": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Muscle tissue or myofibroblastic" + }, + "Rhabdomyoscaroma, Cutaneous": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Muscle tissue or myofibroblastic" + } + } + }, + "Malignant soft tissue proliferations - Myoepithelial": { + "level": 2, + "parent": "Malignant", + "children": { + "Myoepithelial sarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Myoepithelial" + } + } + }, + "Malignant soft tissue proliferations - Neural": { + "level": 2, + "parent": "Malignant", + "children": { + "Malignant granular cell tumor": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Neural" + }, + "Malignant peripheral nerve sheath tumor": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Neural" + } + } + }, + "Malignant soft tissue proliferations - Unknown or other histiogenesis": { + "level": 2, + "parent": "Malignant", + "children": { + "Ewing sarcoma, Primary cutaenous": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Unknown or other histiogenesis" + } + } + }, + "Malignant soft tissue proliferations - Vascular": { + "level": 2, + "parent": "Malignant", + "children": { + "Angiosarcoma cutaneous": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Vascular", + "children": { + "Angiosarcoma cutaneous, Epithelioid": { + "level": 4, + "parent": "Angiosarcoma cutaneous" + }, + "Angiosarcoma cutaneous, Face and scalp of elderly patients": { + "level": 4, + "parent": "Angiosarcoma cutaneous" + }, + "Angiosarcoma cutaneous, Post-irradiation": { + "level": 4, + "parent": "Angiosarcoma cutaneous" + }, + "Angiosarcoma cutaneous, With associated lymphedema": { + "level": 4, + "parent": "Angiosarcoma cutaneous" + } + } + }, + "Hemangioendothelioma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Vascular", + "children": { + "Hemangioendothelioma, Kaposiform": { + "level": 4, + "parent": "Hemangioendothelioma" + } + } + }, + "Kaposi sarcoma": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Vascular" + }, + "Malignant glomus tumor": { + "level": 3, + "parent": "Malignant soft tissue proliferations - Vascular" + } + } + }, + "Merkel cell proliferation": { + "level": 2, + "parent": "Malignant", + "children": { + "Merkel cell carcinoma": { + "level": 3, + "parent": "Merkel cell proliferation" + } + } + }, + "Skin metastasis of internal solid cancer - non-hematological": { + "level": 2, + "parent": "Malignant" + }, + "Malignant melanocytic proliferations (Melanoma)": { + "level": 2, + "parent": "Malignant", + "children": { + "Melanoma metastasis": { + "level": 3, + "parent": "Malignant melanocytic proliferations (Melanoma)" + }, + "Melanoma, NOS": { + "level": 3, + "parent": "Malignant melanocytic proliferations (Melanoma)" + }, + "Melanoma in situ": { + "level": 3, + "parent": "Malignant melanocytic proliferations (Melanoma)", + "children": { + "Melanoma in situ, Mucosal": { + "level": 4, + "parent": "Melanoma in situ" + }, + "Melanoma in situ, Acral or acral-lentiginous": { + "level": 4, + "parent": "Melanoma in situ" + }, + "Melanoma in situ, Lentigo maligna type": { + "level": 4, + "parent": "Melanoma in situ" + }, + "Melanoma in situ, Recurrent or persistent": { + "level": 4, + "parent": "Melanoma in situ" + }, + "Melanoma in situ, Superficial spreading": { + "level": 4, + "parent": "Melanoma in situ" + }, + "Melanoma in situ, associated with a nevus": { + "level": 4, + "parent": "Melanoma in situ" + } + } + }, + "Melanoma Invasive": { + "level": 3, + "parent": "Malignant melanocytic proliferations (Melanoma)", + "children": { + "Melanoma Invasive, Superficial spreading": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Spitzoid": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Recurrent or persistent": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, On chronically sun-exposed skin or lentigo maligna melanoma": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Acral or Acral-lentiginous": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Arising in a congenital nevus": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Pigmented spindle cell nevus like": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Associated with a nevus": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Desmoplastic": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Heavily pigmented": { + "level": 4, + "parent": "Melanoma Invasive", + "children": { + "Melanoma Invasive, Heavily pigmented, resembling epithelioid blue nevus or melanoma developing in animals": { + "level": 5, + "parent": "Melanoma Invasive, Heavily pigmented" + } + } + }, + "Melanoma Invasive, Mucosal": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Neurotropic": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Nevoid": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Nodular": { + "level": 4, + "parent": "Melanoma Invasive" + }, + "Melanoma Invasive, Blue nevus-like": { + "level": 4, + "parent": "Melanoma Invasive", + "children": { + "Melanoma Invasive, resembling blue nevus": { + "level": 5, + "parent": "Melanoma Invasive, Blue nevus-like" + }, + "Melanoma Invasive, originating from blue nevus": { + "level": 5, + "parent": "Melanoma Invasive, Blue nevus-like" + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/sources/models/imagesFilters.js b/sources/models/imagesFilters.js index 4ffca0b..415f7be 100644 --- a/sources/models/imagesFilters.js +++ b/sources/models/imagesFilters.js @@ -1,10 +1,11 @@ +import constants from "../constants"; +import diagnosisModel from "./diagnosis"; import state from "./state"; let filtersData; const filtersIds = { pinnedCollections: "collections", - benignMelignant: "benign_malignant", lesionDiagnosis: "diagnosis", approximateAge: "age_approx", generalAnatomicSite: "anatom_site_general", @@ -28,61 +29,17 @@ const filtersIds = { }; function getFiltersDataValues() { + const diagnosisData = diagnosisModel.getDiagnosisDataForFilters(); const filtersDataValues = [ - { - label: "Pinned Collections", - data: [ - { - id: filtersIds.pinnedCollections, - name: "Collection", - type: "checkbox", - datatype: "string", - options: state.imagesTotalCounts[filtersIds.pinnedCollections] ?? [] - } - ] - }, { label: "Diagnostic Attributes", data: [ - { - id: filtersIds.benignMelignant, - name: "Benign or Malignant", - type: "checkbox", - datatype: "string", - options: state.imagesTotalCounts[filtersIds.benignMelignant] - }, { id: filtersIds.lesionDiagnosis, - name: "Lesion Diagnosis", - type: "checkbox", + name: "Lesion diagnosis", + type: constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX, datatype: "string", - options: state.imagesTotalCounts[filtersIds.lesionDiagnosis] - }, - ] - }, - { - label: "Clinical Attributes", - data: [ - { - id: filtersIds.approximateAge, - name: "Approximate Age", - type: "rangeCheckbox", - datatype: "number", - options: state.imagesTotalCounts[filtersIds.approximateAge] - }, - { - id: filtersIds.generalAnatomicSite, - name: "General Anatomic Site", - type: "checkbox", - datatype: "string", - options: state.imagesTotalCounts[filtersIds.generalAnatomicSite] - }, - { - id: filtersIds.clinicalSize, - name: "Clinical Size - Longest Diameter (mm)", - type: "rangeCheckbox", - datatype: "number", - options: state.imagesTotalCounts[filtersIds.clinicalSize] + options: diagnosisData }, { id: filtersIds.typeDiagnosis, @@ -92,25 +49,11 @@ function getFiltersDataValues() { options: state.imagesTotalCounts[filtersIds.typeDiagnosis] }, { - id: filtersIds.familyHistoryMelanoma, - name: "Family History of Melanoma", + id: filtersIds.melanocytic, + name: "Melanocytic", type: "checkbox", datatype: "boolean", - options: state.imagesTotalCounts[filtersIds.familyHistoryMelanoma] - }, - { - id: filtersIds.fitzpatrickSkinType, - name: "Fitzpatrick Skin Type", - type: "checkbox", - datatype: "string", - options: state.imagesTotalCounts[filtersIds.fitzpatrickSkinType] - }, - { - id: filtersIds.melanomaClass, - name: "Melanoma Class", - type: "checkbox", - datatype: "string", - options: state.imagesTotalCounts[filtersIds.melanomaClass] + options: state.imagesTotalCounts[filtersIds.melanocytic] }, { id: filtersIds.melanomaMitoticIndex, @@ -126,13 +69,6 @@ function getFiltersDataValues() { datatype: "number", options: state.imagesTotalCounts[filtersIds.melanomaThickness] }, - { - id: filtersIds.melanomaType, - name: "Melanoma Type", - type: "checkbox", - datatype: "string", - options: state.imagesTotalCounts[filtersIds.melanomaType] - }, { id: filtersIds.melanomaUlceration, name: "Melanoma Ulceration", @@ -140,19 +76,52 @@ function getFiltersDataValues() { datatype: "boolean", options: state.imagesTotalCounts[filtersIds.melanomaUlceration] }, + ] + }, + { + label: "Clinical Attributes", + data: [ { - id: filtersIds.melanocytic, - name: "Melanocytic", + id: filtersIds.sex, + name: "Sex", type: "checkbox", - datatype: "boolean", - options: state.imagesTotalCounts[filtersIds.melanocytic] + datatype: "string", + options: state.imagesTotalCounts[filtersIds.sex] + }, + { + id: filtersIds.approximateAge, + name: "Approximate Age", + type: "rangeCheckbox", + datatype: "number", + options: state.imagesTotalCounts[filtersIds.approximateAge] + }, + { + id: filtersIds.generalAnatomicSite, + name: "General Anatomic Site", + type: "checkbox", + datatype: "string", + options: state.imagesTotalCounts[filtersIds.generalAnatomicSite] }, { - id: filtersIds.nevusType, - name: "Nevus Type", + id: filtersIds.fitzpatrickSkinType, + name: "Fitzpatrick Skin Type", type: "checkbox", datatype: "string", - options: state.imagesTotalCounts[filtersIds.nevusType] + options: state.imagesTotalCounts[filtersIds.fitzpatrickSkinType] + }, + { + id: filtersIds.clinicalSize, + name: "Clinical Size - Longest Diameter (mm)", + type: "rangeCheckbox", + datatype: "number", + options: state.imagesTotalCounts[filtersIds.clinicalSize] + }, + { + id: filtersIds.familyHistoryMelanoma, + name: "Family History of Melanoma", + type: "checkbox", + datatype: "boolean", + options: state.imagesTotalCounts[filtersIds.familyHistoryMelanoma] }, { id: filtersIds.personalHistoryMelanoma, @@ -161,38 +130,43 @@ function getFiltersDataValues() { datatype: "boolean", options: state.imagesTotalCounts[filtersIds.personalHistoryMelanoma] }, - { - id: filtersIds.sex, - name: "Sex", - type: "checkbox", - datatype: "string", - options: state.imagesTotalCounts[filtersIds.sex] - } ] }, { label: "Technological Attributes", data: [ { - id: filtersIds.dermoscopicType, - name: "Dermoscopic Type", + id: filtersIds.imageType, + name: "Image Type", type: "checkbox", datatype: "string", - options: state.imagesTotalCounts[filtersIds.dermoscopicType] + options: state.imagesTotalCounts[filtersIds.imageType] }, { - id: filtersIds.imageType, - name: "Image Type", + id: filtersIds.dermoscopicType, + name: "Dermoscopic Type", type: "checkbox", datatype: "string", - options: state.imagesTotalCounts[filtersIds.imageType] + options: state.imagesTotalCounts[filtersIds.dermoscopicType] }, + ] + }, + { + label: "Other Attributes", + data: [ { id: filtersIds.license, name: "License", type: "checkbox", datatype: "string", options: state.imagesTotalCounts[filtersIds.license] + }, + { + id: filtersIds.pinnedCollections, + name: "Collection", + type: "checkbox", + datatype: "string", + options: state.imagesTotalCounts[filtersIds.pinnedCollections] ?? [] } ] } diff --git a/sources/models/state.js b/sources/models/state.js index 5253075..e677a32 100644 --- a/sources/models/state.js +++ b/sources/models/state.js @@ -35,6 +35,7 @@ const state = { filteredImagesCount: 0 }, imagesTotalCounts: {}, + filtersTreeData: new Map(), // for applied filters }; export default state; diff --git a/sources/services/ajaxActions.js b/sources/services/ajaxActions.js index 2652a6f..ce62788 100644 --- a/sources/services/ajaxActions.js +++ b/sources/services/ajaxActions.js @@ -84,11 +84,14 @@ class AjaxActions { url: `${API_URL}users/me/`, headers }; - return axios(axiosConfig) - .then(result => result?.data || {}, (e) => { - webix.message({type: "error", text: e.response.data.detail}); - return Promise.reject(e); - }); + try { + const userInfoResponse = await axios(axiosConfig); + return userInfoResponse?.data || {}; + } + catch (e) { + webix.message({type: "error", text: e.response.data.detail}); + throw new Error(e.message, {cause: e}); + } } async putUserTermsOfUse() { diff --git a/sources/services/auth.js b/sources/services/auth.js index e1da70c..fcfb93e 100644 --- a/sources/services/auth.js +++ b/sources/services/auth.js @@ -1,4 +1,5 @@ import IsicClient from "@isic/client"; +import {AxiosError} from "axios"; import constants from "../constants"; import appliedFilters from "../models/appliedFilters"; @@ -40,8 +41,8 @@ class OAuthISIC { state.app.callEvent("login"); } }) - .catch(() => { - logger.error("Authentication: Something went wrong"); + .catch((e) => { + this.errorHandler(e); }); } webix.attachEvent("onRotate", (landscape) => { @@ -94,6 +95,9 @@ class OAuthISIC { if (userInfo && userInfo.accepted_terms) { webix.storage.local.put("user", user); } + }) + .catch((e) => { + this.errorHandler(e); }); } return new Promise((resolve) => { @@ -116,6 +120,9 @@ class OAuthISIC { }); } return userInfo; + }) + .catch((e) => { + this.errorHandler(e); }); } @@ -186,6 +193,21 @@ class OAuthISIC { get isLoginRestored() { return this.#isLoginRestored; } + + errorHandler(e) { + logger.error(e); + if (e.cause instanceof AxiosError) { + if (e.cause.response.status === 401) { + this.logout(); + } + else { + logger.error("Authentication: bad response"); + } + } + else { + logger.error("Authentication: Something went wrong"); + } + } } const instance = new OAuthISIC(); diff --git a/sources/services/gallery/filter.js b/sources/services/gallery/filter.js index b0d4689..79d380f 100644 --- a/sources/services/gallery/filter.js +++ b/sources/services/gallery/filter.js @@ -1,6 +1,7 @@ import constants from "../../constants"; import appliedFiltersModel from "../../models/appliedFilters"; import collectionsModel from "../../models/collectionsModel"; +import diagnosisModel from "../../models/diagnosis"; import state from "../../models/state"; import util from "../../utils/util"; @@ -71,6 +72,42 @@ function _setFilterCounts(controlView, totalCount, currentCount) { controlView.refresh(); } +function _setDiagnosisFilterCounts(treeView, option, totalCount, currentCount) { + const oldLabel = option.name; + const lastBracketIndex = oldLabel.lastIndexOf("("); // counts is in () in label. We should remove old counts and set new counts + const baseLabelText = lastBracketIndex === -1 + ? oldLabel + : oldLabel.substring(0, lastBracketIndex); + let firstNumberHtml; + if (totalCount === currentCount) { + firstNumberHtml = ""; + } + else if (!currentCount) { + firstNumberHtml = "0 / "; + } + else { + firstNumberHtml = `${currentCount} / `; + } + const newLabel = `${baseLabelText} (${firstNumberHtml}${totalCount})`; + option.name = newLabel; + treeView.updateItem(option.id, option); +} + +function _setDiagnosisFilterState(treeView, option, totalCount, currentCount) { + if ( + currentCount !== null + && currentCount < totalCount + && treeView.isBranch(option.id) + && !option.indeterminate + ) { + treeView.blockEvent(); + treeView.add({id: `${option.id}|empty`, hidden: true, name: ""}, 0, option.id); + treeView.uncheckItem(`${option.id}|empty`); + treeView.remove(`${option.id}|empty`); + treeView.unblockEvent(); + } +} + function updateFiltersFormControl(data) { if (!data) { return; @@ -91,6 +128,11 @@ function updateFiltersFormControl(data) { } break; } + case constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX: + { + updateTreeCheckboxControl(data); + break; + } case "rangeFilter": { break; @@ -102,10 +144,42 @@ function updateFiltersFormControl(data) { } } +function updateTreeCheckboxControl(data) { + /** @type {webix.ui.treetable} */ + const treeView = $$(data.viewId); + if (treeView) { + // we do not need to call onChange event for the control. so we block event + treeView.blockEvent(); + /* remove key is from "filtersChanged" event parameters. + Its value is inverse for checkbox value */ + if (!treeView.isVisible()) { + treeView.show(); + } + treeView.checkItem(data.id); + treeView.open(data.id); + const parentId = treeView.getParentId(data.id); + if (parentId) { + const parent = treeView.getItem(parentId); + changeParentState(treeView, parent); + } + treeView.unblockEvent(); + } +} + +function changeParentState(treeView, option) { + treeView.open(option.id); + const parentId = treeView.getParentId(option.id); + if (parentId) { + const parentOption = treeView.getItem(parentId); + changeParentState(treeView, parentOption); + } +} + function _setLabelCount(foundCurrentCount, docCount) { const appliedFiltersArray = appliedFiltersModel.getFiltersArray(); + const flatFiltersArray = appliedFiltersArray.filter(f => f.view !== "treeCheckbox"); const filtersKeys = []; - appliedFiltersArray.forEach((filter) => { + flatFiltersArray.forEach((filter) => { if (!filtersKeys.includes(filter.key)) { filtersKeys.push(filter.key); } @@ -136,38 +210,83 @@ function updateFiltersCounts(countsAfterFiltration) { const docCounts = {}; filterKeys.forEach((filterKey) => { if (filterKey !== "passedFilters") { - const values = state.imagesTotalCounts[filterKey]; + const imagesTotalCounts = state.imagesTotalCounts[filterKey]; filteredCounts[filterKey] = 0; docCounts[filterKey] = 0; - values.forEach((value) => { - let currentCount; - if (countsAfterFiltration && countsAfterFiltration[filterKey]) { - currentCount = _findCurrentCount(countsAfterFiltration[filterKey], value.key, filterKey); - } - else { - currentCount = value.doc_count; - } - if (value.key !== constants.MISSING_KEY_VALUE) { - filteredCounts[filterKey] += currentCount; - } - docCounts[filterKey] += value.key !== constants.MISSING_KEY_VALUE - ? value.doc_count - : 0; - const controlId = util.getOptionId(filterKey, prepareOptionName(value.key, filterKey)); - const controlView = $$(controlId); - if (controlView) { - if (filterKey !== constants.COLLECTION_KEY) { - _setFilterCounts(controlView, value.doc_count, currentCount); + const diagnosisRegex = /^diagnosis_\d$/; + if (diagnosisRegex.test(filterKey)) { + const controlKey = "diagnosis"; + const diagnosisValues = diagnosisModel.getDiagnosisValuesByLevel(filterKey); + const displayDiagnosis = diagnosisModel.getDisplayDiagnosis(); + const treeView = $$(`treeTable-${controlKey}`); + diagnosisValues.forEach((v) => { + let value = imagesTotalCounts.find(item => item.key === v); + if (!value) { + value = { + key: v, + doc_count: 0 + }; } - } - }); + let currentCount; + value.fullKey = value.key !== constants.MISSING_KEY_VALUE + ? diagnosisModel.getDiagnosisConcatenateValue(value.key) + : constants.MISSING_KEY_VALUE; + if (countsAfterFiltration && countsAfterFiltration[filterKey]) { + currentCount = _findCurrentCount( + countsAfterFiltration[filterKey], + value.key, + filterKey + ); + } + else { + currentCount = value.doc_count; + } + if (value.key !== constants.MISSING_KEY_VALUE) { + filteredCounts[filterKey] += currentCount; + } + docCounts[filterKey] += value.key !== constants.MISSING_KEY_VALUE + ? value.doc_count + : 0; + const optionId = prepareOptionName(value.fullKey, filterKey); + const option = treeView?.getItem(optionId); + if (option) { + _setDiagnosisFilterCounts(treeView, option, value.doc_count, currentCount); + _setDiagnosisFilterState(treeView, option, value.doc_count, currentCount); + if (!displayDiagnosis.find(item => item === v)) { + treeView.remove(optionId); + } + } + }); + } + else { + imagesTotalCounts.forEach((value) => { + let currentCount; + if (countsAfterFiltration && countsAfterFiltration[filterKey]) { + currentCount = _findCurrentCount( + countsAfterFiltration[filterKey], + value.key, + filterKey + ); + } + else { + currentCount = value.doc_count; + } + if (value.key !== constants.MISSING_KEY_VALUE) { + filteredCounts[filterKey] += currentCount; + } + docCounts[filterKey] += value.key !== constants.MISSING_KEY_VALUE + ? value.doc_count + : 0; + const controlId = util.getOptionId(filterKey, prepareOptionName(value.key, filterKey)); + const controlView = $$(controlId); + if (controlView) { + if (filterKey !== constants.COLLECTION_KEY) { + _setFilterCounts(controlView, value.doc_count, currentCount); + } + } + }); + } } - // else if (filterKey === constants.COLLECTION_KEY) { - // let values = state.imagesTotalCounts[filterKey]; - // values.forEach((value) => { - - // }) - // } }); _setLabelCount(filteredCounts, docCounts); } @@ -176,5 +295,6 @@ export default { NULL_OPTION_VALUE, prepareOptionName, updateFiltersCounts, - updateFiltersFormControl + updateFiltersFormControl, + changeParentState, }; diff --git a/sources/services/gallery/gallery.js b/sources/services/gallery/gallery.js index a10dc2b..f6dd373 100644 --- a/sources/services/gallery/gallery.js +++ b/sources/services/gallery/gallery.js @@ -4,6 +4,7 @@ import WZoom from "vanilla-js-wheel-zoom"; import constants from "../../constants"; import appliedFilterModel from "../../models/appliedFilters"; import collectionsModel from "../../models/collectionsModel"; +import diagnosisModel from "../../models/diagnosis"; import facetsModel from "../../models/facets"; import galleryImagesUrls from "../../models/galleryImagesUrls"; import filtersData from "../../models/imagesFilters"; @@ -64,6 +65,7 @@ class GalleryService { portraitClearAllFiltersTemplate, landscapeClearAllFiltersTemplate, searchSuggest, + leftPanelResizer, ) { this._view = view; this._pager = pager; @@ -79,6 +81,7 @@ class GalleryService { this._appliedFiltersList = appliedFiltersList; this._imagesSelectionTemplate = unselectLink; this._downloadingMenu = downloadingMenu; + /** @type {webix.ui.search} */ this._searchInput = searchInput; this._clearAllFiltersTemplate = clearAllFiltersTemplate; this._allPagesTemplate = allPagesTemplate; @@ -96,7 +99,9 @@ class GalleryService { this._enlargeContextMenu = enlargeContextMenu; this._portraitClearAllFiltersTemplate = portraitClearAllFiltersTemplate; this._landscapeClearAllFiltersTemplate = landscapeClearAllFiltersTemplate; + /** @type {webix.ui.suggest} */ this._searchSuggest = searchSuggest; + this._leftPanelResizer = leftPanelResizer; this._init(); } @@ -129,10 +134,21 @@ class GalleryService { } } }); + const treeDataElements = this._filtersForm.queryView({view: "treetable"}, "all"); + let foundTreeDataElementFlag = false; + treeDataElements.forEach((e) => { + e.data.each((i) => { + const labelLowerCase = i.name.replace(/\([\/ 0-9]*\)$/, ""); + if (labelLowerCase.indexOf(searchValue.toLowerCase()) > -1) { + e.checkItem(i.id); + foundTreeDataElementFlag = true; + } + }); + }); if (filtersInfo.length > 0) { filtersBySearchCollection.parse(filtersInfo); } - else { + else if (!foundTreeDataElementFlag) { webix.alert(`"There are no filters which include "${searchValue}"`); } this._view.$scope.app.callEvent("filtersChanged", [filtersInfo]); @@ -273,7 +289,7 @@ class GalleryService { } tooltipText = "Clear name filter"; - this._searchEventsMethods(this._searchHandlerByName.bind(this)); + this._searchEventsMethods(this._searchHandlerByName.bind(this), true); searchButtonModel.createTimesSearchButton( this._searchInput, appliedFilterModel, @@ -336,22 +352,21 @@ class GalleryService { this._dataviewYCountSelection?.setValue(dataviewSelectionId); this._dataviewYCountSelection?.unblockEvent(); - const resizeHandler = util.debounce((event) => { - const contentWidth = event[0].contentRect.width; - const minCurrentTargetInnerWidth = searchButtonModel.getMinCurrentTargetInnerWidth(); - if (contentWidth >= minCurrentTargetInnerWidth) { - dataviewSelectionId = util.getDataviewSelectionId(); - this._dataviewYCountSelection?.callEvent("onChange", [dataviewSelectionId]); - } + const dataTableResizeHandler = util.debounce((/* event */) => { + dataviewSelectionId = util.getDataviewSelectionId(); + this._dataviewYCountSelection?.callEvent("onChange", [dataviewSelectionId, null, false]); }); - const resizeObserver = new ResizeObserver(resizeHandler); - const galleryNode = this._view.getNode(); - resizeObserver.observe(galleryNode); + const dataTableResizeObserver = new ResizeObserver(dataTableResizeHandler); + const dataTableNode = this._imagesDataview.getNode(); + dataTableResizeObserver.observe(dataTableNode); this._dataviewYCountSelection?.attachEvent("onChange", (id, oldId, doNotCallUpdatePager) => { let newItemWidth; let newImageWidth; let newInnerImageNameSize; + if (id !== oldId) { + state.imagesOffset = 0; + } const previousItemHeight = this._imagesDataview.type.height; let multiplier = constants.DEFAULT_GALLERY_IMAGE_HEIGHT / constants.DEFAULT_GALLERY_IMAGE_WIDTH; @@ -386,7 +401,7 @@ class GalleryService { } case constants.DEFAULT_DATAVIEW_COLUMNS: { const minGalleryWidth = window.innerWidth - - this._galleryLeftPanel.config.width + - this._galleryLeftPanel.config.maxWidth ?? this._galleryLeftPanel.config.width - this._activeCartList.config.width; const cols = Math.floor(minGalleryWidth / constants.DEFAULT_GALLERY_IMAGE_WIDTH); newItemWidth = Math.floor(dataviewWidth / cols); @@ -406,7 +421,6 @@ class GalleryService { util.setDataviewSelectionId(id); this._setDataviewColumns(newItemWidth, previousItemHeight, newImageWidth, newImageHeight); if (!doNotCallUpdatePager) { - state.imagesOffset = 0; this._imagesDataview.$scope.updatePagerSize(); } }); @@ -728,7 +742,7 @@ class GalleryService { let isNeedShowAlert = true; let countSelectedFilteredImages = 0; let filter = appliedFilterModel.getConditionsForApi(); - const collections = collectionsModel.getAppliedCollectionsForApi(); + const collections = appliedFilterModel.getAppliedCollectionsForApi(); let imagesLimit = constants.MAX_COUNT_IMAGES_SELECTION; let arrayOfImagesLength = selectedImages.countForStudies(); const sourceParams = { @@ -849,7 +863,10 @@ class GalleryService { const appliedFiltersArray = appliedFilterModel.getFiltersArray(); this._updateFiltersFormControls(appliedFiltersArray); }); - const element = this._filtersForm.queryView({id: `${data?.key}|${data?.value}`})?.config; + const item = Array.isArray(data) ? data[0] : data; + const element = item?.treeCheckboxFlag + ? this._filtersForm.queryView({id: `${item?.viewId}`})?.getItem(item?.optionId) + : this._filtersForm.queryView({id: `${item?.key}|${item?.value}`})?.config; await this._reload(0, this._pager?.data?.size || 10); if (util.isMobilePhone()) { // Fix scrollView @@ -858,6 +875,12 @@ class GalleryService { this._scrollToFilterFormElement(element); } } + else if (item?.treeCheckboxFlag) { + const treeView = $$(item?.viewId); + if (treeView) { + this._scrollToFilterFormElementFromTree(element, treeView); + } + } }); const clearAllFilters = () => { @@ -1084,6 +1107,36 @@ class GalleryService { this._view.$scope.app.callEvent("filtersChanged", [appliedFiltersArray]); } }); + + this._imagesDataview.attachEvent("onAfterRender", () => { + if (this._galleryLeftPanel.isVisible()) { + this._leftPanelResizer?.show(); + // resize left panel after initialization to fix the resizer + const leftPanelWidth = this._leftPanelWithCollapser.$width; + this._leftPanelWithCollapser.define("width", leftPanelWidth); + this._leftPanelWithCollapser.define("minWidth", 451); + this._leftPanelWithCollapser.define("maxWidth", 700); + this._leftPanelWithCollapser.resize(); + this._leftPanelResizer.resize(); + } + else { + this._leftPanelResizer?.hide(); + // resize left panel after initialization to fix the resizer + this._leftPanelWithCollapser.define("width", 0); + this._leftPanelWithCollapser.define("minWidth", 0); + this._leftPanelWithCollapser.define("maxWidth", 0); + this._leftPanelWithCollapser.resize(); + this._leftPanelResizer.resize(); + } + }); + + // resize left panel after initialization to fix the resizer + const leftPanelWidth = this._leftPanelWithCollapser.$width; + this._leftPanelWithCollapser.define("width", leftPanelWidth); + this._leftPanelWithCollapser.define("minWidth", leftPanelWidth); + this._leftPanelWithCollapser.define("maxWidth", 700); + this._leftPanelWithCollapser.resize(); + this._leftPanelResizer.resize(); } async load() { @@ -1094,7 +1147,7 @@ class GalleryService { const pinnedCollectionOptions = { limit: 0, pinned: true, - sort: "name" + sort: "name", }; const pinnedCollectionsData = await ajax.getCollections(pinnedCollectionOptions); collectionsModel.clearPinnedCollections(); @@ -1109,9 +1162,10 @@ class GalleryService { } ); this._updatePagerCount(state.imagesTotalCounts.passedFilters.count); + const diagnosisRegex = /^diagnosis_\d$/; const facets = await ajax.getFacets(); - const ids = Object.keys(facets); - ids.forEach((id) => { + const facetsIds = Object.keys(facets); + facetsIds.forEach((id) => { state.imagesTotalCounts[id] = webix.copy(facets[id].buckets); if (id !== constants.COLLECTION_KEY) { state.imagesTotalCounts[id].push({ @@ -1128,6 +1182,9 @@ class GalleryService { }); }); } + if (diagnosisRegex.test(id)) { + diagnosisModel.addDisplayDiagnosis(facets[id].buckets.map(d => d.key)); + } const facetValues = state.imagesTotalCounts[id].map( f => f.key ); @@ -1222,7 +1279,7 @@ class GalleryService { async _updateCounts() { try { const filterQuery = appliedFilterModel.getConditionsForApi(); - const appliedCollections = collectionsModel.getAppliedCollectionsForApi(); + const appliedCollections = appliedFilterModel.getAppliedCollectionsForApi(); const params = {}; params.conditions = filterQuery; params.collections = appliedCollections; @@ -1240,7 +1297,8 @@ class GalleryService { // update form controls values(true/false for checkboxes, etc) _updateFiltersFormControls(data) { if (Array.isArray(data)) { - data.forEach((item) => { + // For treetable elements sorting from highest level to lowest + [...data].sort((a, b) => a.diagnosisLevel > b.diagnosisLevel).forEach((item) => { filterService.updateFiltersFormControl(item); }); } @@ -1265,7 +1323,12 @@ class GalleryService { _createFilters(expandedFilters, forceRebuild) { let expandedFiltersKeys = []; if (expandedFilters && expandedFilters.length) { - expandedFiltersKeys = expandedFilters.map(item => item.key); + expandedFiltersKeys = expandedFilters.map((item) => { + if (item.view === constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX) { + return item.id; + } + return item.key; + }); } return filtersData.getFiltersData(forceRebuild).then((data) => { const elements = filtersFormElements.transformToFormFormat(data, expandedFiltersKeys); @@ -1291,6 +1354,9 @@ class GalleryService { _updatePagerCount(count) { count = count || 1; if (count) { + if (!this._pager?.$master?.setPage) { + this._pager.$master.setPage = () => {}; + } this._pager.define("count", count); this._pager.refresh(); } @@ -1326,7 +1392,7 @@ class GalleryService { return; } const filter = appliedFilterModel.getConditionsForApi(); - const collections = collectionsModel.getAppliedCollectionsForApi(); + const collections = appliedFilterModel.getAppliedCollectionsForApi(); const images = url ? await ajax.getImagesByUrl(url) : await ajax.getImages({ @@ -1335,7 +1401,7 @@ class GalleryService { collections }); state.imagesTotalCounts.passedFilters.currentCount = images.count; - const start = offset !== 0 ? offset : 1; + const start = offset > 0 ? offset : 1; if (filter || collections) { state.imagesTotalCounts.passedFilters.filtered = true; state.imagesTotalCounts.passedFilters.currentCount = images.count; @@ -1549,10 +1615,12 @@ class GalleryService { this._toggleHeaders(false); } - _searchEventsMethods(eventMethod) { + _searchEventsMethods(eventMethod, attachEnterFlag) { this._searchInput.detachEvent("onEnter"); this._searchInput.on_click["gallery-search-filter"] = eventMethod; - this._searchInput.attachEvent("onEnter", eventMethod); + if (attachEnterFlag) { + this._searchInput.attachEvent("onEnter", eventMethod); + } } _clearNameFilter() { @@ -1602,6 +1670,17 @@ class GalleryService { currentFilterScrollView.callEvent("onAfterScroll"); } + _scrollToFilterFormElementFromTree(element, tree) { + const currentFilterScrollView = this._view.$scope.getFilterScrollView + ? this._view.$scope.getFilterScrollView() + : this._filterScrollView; + const elementNode = tree.getItemNode(element.id); + const elementOffsetTop = elementNode.offsetTop; + const filterScrollViewOffsetTop = currentFilterScrollView.$view.offsetTop / 2; + const positionToScroll = elementOffsetTop - filterScrollViewOffsetTop; + currentFilterScrollView.scrollTo(0, positionToScroll); + } + resizeFilterScrollView() { const currentFilterScrollView = this._view.$scope.getFilterScrollView ? this._view.$scope.getFilterScrollView() diff --git a/sources/services/gallery/searchButtonModel.js b/sources/services/gallery/searchButtonModel.js index 75d699b..06760b4 100644 --- a/sources/services/gallery/searchButtonModel.js +++ b/sources/services/gallery/searchButtonModel.js @@ -1,5 +1,3 @@ -let minCurrentTargetInnerWidth; - function removeTootipDiv(elementNode, tooltipClassName) { elementNode.removeAttribute("tooltip"); const tooltipDiv = document.querySelector(`.${tooltipClassName}`); @@ -71,19 +69,9 @@ function removeTimesSearchButton(inputNode) { inputNode.lastChild.style.paddingRight = "0px"; } -function getMinCurrentTargetInnerWidth() { - return minCurrentTargetInnerWidth; -} - -function setMinCurrentTargetInnerWidth(minWidth) { - minCurrentTargetInnerWidth = minWidth; -} - export default { removeTootipDiv, createTimesSearchButton, removeTimesSearchButton, createHintForSearchTimesButton, - getMinCurrentTargetInnerWidth, - setMinCurrentTargetInnerWidth }; diff --git a/sources/services/gallery/searchSuggest.js b/sources/services/gallery/searchSuggest.js index 2538586..7e9b5af 100644 --- a/sources/services/gallery/searchSuggest.js +++ b/sources/services/gallery/searchSuggest.js @@ -1,4 +1,3 @@ -import constants from "../../constants"; import appliedFiltersModel from "../../models/appliedFilters"; import util from "../../utils/util"; @@ -23,10 +22,32 @@ function attachEvents(searchSuggest, searchInput, toggleButton) { body: foundCountTemplateConfig, }); + foundCountPopup.attachEvent("onShow", () => { + foundCountPopup.define("width", searchSuggest.$width); + foundCountPopup.resize(); + }); + const foundCountTemplate = webix.$$(foundCountTemplateID); searchSuggest.attachEvent("onBeforeShow", () => { + const list = searchSuggest.getList(); const searchValue = searchInput.getValue(); + list.filter(item => searchSuggest.config.filter.call(searchSuggest, item, searchValue)); + const texts = []; + list.data.each((obj) => { + texts.push(obj.value); + }); + // searchSuggest.config.master does not work in some cases + const masterView = searchInput; + const maxWidth = Math.max( + webix.html.getTextSize(texts, "webix_list_item").width + 30, + masterView.getInputNode().getBoundingClientRect().width + ); + const width = maxWidth < window.innerWidth + ? maxWidth + : masterView.getInputNode().getBoundingClientRect().width; + searchSuggest.define("width", width); + searchSuggest.resize(); if (searchValue.length < 3 || toggleButton.getValue() === 1) { searchSuggest.hide(); return false; @@ -34,17 +55,42 @@ function attachEvents(searchSuggest, searchInput, toggleButton) { return true; }); - + // remove default behavior suggestList.detachEvent("onItemClick"); + // add new behavior suggestList.attachEvent("onItemClick", (id, event) => { const item = suggestList.getItem(id); - const controlId = util.getOptionId(item.key, item.value); - /** @type {webix.ui.checkbox} */ - const control = $$(controlId); - if (control) { - const controlValue = control.getValue(); - control.setValue(!controlValue); + const appliedFilters = appliedFiltersModel.getFiltersArray(); + const filterIds = appliedFilters.map(a => a.id); + if (item.key === "diagnosis") { + /** @type {webix.ui.treetable} */ + const diagnosisTree = $$(`treeTable-${item.key}`); + const controlId = item.optionId; + const control = diagnosisTree.getItem(controlId); + if (control) { + if (diagnosisTree.isChecked(controlId)) { + diagnosisTree.uncheckItem(controlId); + } + else if (filterIds.includes(controlId)) { + diagnosisTree.blockEvent(); + diagnosisTree.checkItem(controlId); + diagnosisTree.unblockEvent(); + diagnosisTree.uncheckItem(controlId); + } + else { + diagnosisTree.checkItem(controlId); + } + } + } + else { + const controlId = item.optionId; + /** @type {webix.ui.checkbox} */ + const control = $$(controlId); + if (control) { + const controlValue = control.getValue(); + control.setValue(!controlValue); + } } if (!event.metaKey && !event.ctrlKey) { suggestList.hide(); @@ -57,13 +103,15 @@ function attachEvents(searchSuggest, searchInput, toggleButton) { const selectedItems = []; filters.forEach((f) => { const found = suggestData.find((item) => { - if (f.id === item.id) { + if (f.id === item.optionId) { return true; } return false; }); if (found) { - selectedItems.push(f.id); + // for checkbox we use f.id, for other cases we use f.key|f.id + const id = f.view === "checkbox" ? f.id : `${f.key}|${f.id}`; + selectedItems.push(id); } }); suggestList.blockEvent(); diff --git a/sources/services/gallery/suggest.js b/sources/services/gallery/suggest.js index de6d7fa..0950f48 100644 --- a/sources/services/gallery/suggest.js +++ b/sources/services/gallery/suggest.js @@ -1,6 +1,5 @@ import constants from "../../constants"; import collectionsModel from "../../models/collectionsModel"; -import facetsModel from "../../models/facets"; import imagesFilters from "../../models/imagesFilters"; const filterSuggestions = []; @@ -10,39 +9,102 @@ function getSuggestionsForFilter() { } async function buildSuggestionsForFilter() { - const facets = facetsModel.getFacets(); - const collections = collectionsModel.getPinnedCollections(); - const newSuggestions = []; const filtersData = await imagesFilters.getFiltersData(); - const filterArray = []; - filterArray.push(...filtersData.map(f => f.data).flat(Infinity)); - const facetsKeys = filterArray.map(f => f.id); - facetsKeys.forEach((key) => { - const values = facets[key].map((v) => { - if (key === constants.COLLECTION_KEY) { - const item = collections.find(c => c.id === v); - return { - id: `${key}|${v}`, - key, - value: item?.name ?? "", - optionId: v, - isCollection: true, - }; - } - return { - id: `${key}|${v}`, - key, - value: v, - }; - }).flat(); - newSuggestions.push(...values); - }); + const filters = [...filtersData.map(f => f.data)].flat(Infinity); + const newSuggestions = getSuggestionsFromFacetsFilters(filters); if (newSuggestions.length > 0) { filterSuggestions.length = 0; filterSuggestions.push(...newSuggestions); } } +function getSuggestionsFromFacetsFilters(filters) { + const suggestions = []; + filters.forEach((f) => { + suggestions.push(...formSuggestionsFromOptions(f)); + }); + return suggestions; +} + +function formSuggestionsFromOptions(parent) { + const suggestions = []; + if (parent.id === constants.COLLECTION_KEY) { + parent?.options?.forEach((o) => { + const collections = collectionsModel.getPinnedCollections(); + const currentCollection = collections.find(c => c.id === o.key); + suggestions.push({ + id: `${parent.id}|${o.key}`, + key: parent.id, + name: "Collections", + value: currentCollection.name ?? "", + optionId: `${parent.id}|${currentCollection.id}`, + isCollection: true, + }); + }); + } + else if (parent.id === "diagnosis") { + parent.options?.forEach((o) => { + const namesArray = o.id.split("|"); + const value = namesArray.reduce((name, currentValue, currentIndex) => { + let result; + switch (currentIndex) { + case 0: + case 1: { + result = name === "" ? currentValue.toUpperCase() : `${name} | ${currentValue.toUpperCase()}`; + break; + } + default: { + result = `${name} | ${currentValue}`; + } + } + return result; + }, ""); + + suggestions.push({ + id: `${parent.id}|${o.name}`, + key: "diagnosis", + value, + level: o.level, + optionId: o.id, + }); + if (o.data) { + suggestions.push(...formSuggestionsFromData(o)); + } + }); + } + else { + parent.options?.forEach((o) => { + suggestions.push({ + id: `${parent.id}|${o.key}`, + key: parent.id, + value: `${parent.name}: ${o.key}` ?? "", + optionId: `${parent.id}|${o.key}`, + }); + if (o.options) { + suggestions.push(...formSuggestionsFromOptions(o)); + } + }); + } + return suggestions; +} + +function formSuggestionsFromData(parent) { + const suggestions = []; + parent.data?.forEach((d) => { + const valueArray = d.id.split("|").map((v, index) => (index < 2 ? v.toUpperCase() : v)); + suggestions.push({ + id: `diagnosis|${d.id}`, + key: "diagnosis", + optionId: d.id, + value: valueArray.join("|") ?? "", + }); + if (d.data) { + suggestions.push(...formSuggestionsFromData(d)); + } + }); + return suggestions; +} + const suggestService = { buildSuggestionsForFilter, getSuggestionsForFilter, diff --git a/sources/styles/forms.less b/sources/styles/forms.less index c4f3163..4371374 100644 --- a/sources/styles/forms.less +++ b/sources/styles/forms.less @@ -27,7 +27,7 @@ input::-ms-clear { } /* checkboxes */ -.checkbox-ctrl { +.checkbox-ctrl, .checkbox-tree-control { height: 30px; .webix_label_right { color: @main-color-light; @@ -36,8 +36,9 @@ input::-ms-clear { cursor: pointer; text-overflow: ellipsis; overflow: hidden; - max-width: 275px; + max-width: 550px; white-space: nowrap; + width: calc(100% - 20px); /* line-height: 16px; padding: 10px 0 0 10px;*/ } diff --git a/sources/styles/pages.less b/sources/styles/pages.less index 2530974..444431c 100644 --- a/sources/styles/pages.less +++ b/sources/styles/pages.less @@ -1018,6 +1018,7 @@ border-color: @select-color; .box-shadow(none); } + padding-right: 52px // space for search icon } input[type="text"]::-webkit-input-placeholder {color: rgba(110,116,128,0.6); opacity: 1; transition: opacity 0.3s ease;} input[type="text"]::-moz-placeholder {color: rgba(110,116,128,0.6); opacity: 1; transition: opacity 0.3s ease;} @@ -1035,14 +1036,49 @@ border-color: @lines-color; .webix_list_item { - background-color: @select-color; - color: #FFFFFF; + background-color: @main-bg; font-size: 14px; font-weight: 500; padding-right: 38px; position: relative; } + .applied-filters-item-hierarchy_container { + display: flex; + .applied-filters-item-hierarchy-item { + background-color: #FAFBFD; + overflow: hidden; + white-space: nowrap; + padding-left: 5px; + padding-right: 5px; + text-overflow: ellipsis; + border-right: 1px solid #E8EBF0;; + box-sizing: border-box; + max-width: max-content; + min-width: 65px; + } + .applied-filters-item-hierarchy-item:not(:last-child) { + flex: 1; + padding-right: 5px; + } + .applied-filters-item-hierarchy-item:last-child { + flex: 10; + } + .applied-filters-item-hierarchy-item:first-child { + text-transform: uppercase; + background-color: transparent; + } + .applied-filters-item-hierarchy-item:nth-child(2) { + text-transform: uppercase; + background-color: transparent; + } + .applied-filters-item-hierarchy-item:hover { + flex: 10; + } + } + .applied-filters-item-hierarchy_container:hover .applied-filters-item-hierarchy-item:not(:hover) { + flex: 1; + } .applied-filters-item { white-space: nowrap; overflow: hidden; @@ -1088,7 +1124,7 @@ border-color: @lines-color; } -.collapssible-filter { +.collapssible-filter, .collapssible-filter-tree { padding-left: 19px; position: relative; text-transform: uppercase; @@ -1121,6 +1157,54 @@ } } +.collapssible-filter-tree { + padding-left: 0px; + border-width: 0px !important; + padding-left: 19px; + position: relative; + text-transform: uppercase; + cursor: pointer; +} + +.filter-tree-table { + .webix_cell { + border-width: 0px; + } + .webix_tree_open::before { + content: "\F027" !important; + } + + .webix_tree_close::before { + content: "\F028" !important; + } + [aria-level="5"], [aria-level="4"], [aria-level="3"] { + .webix_tree_open, .webix_tree_close, .webix_tree_checkbox, span { + background-color: #FAFBFD !important; + } + } + .webix_column>div.webix_row_select { + background: #fafafd; + color: rgb(110, 116, 128) + } + .webix_tree_checkbox, .webix_tree_checkbox.webix_indeterminate { + width: 18px; + background-size: 100%; + } + span { + display: block; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + max-width: 100%; + } + .webix_ss_center_scroll { + width: 100% !important; + .webix_column { + width: 100% !important; + } + } +} + .select-all-template, .select-none-template { .webix_template { @@ -1994,7 +2078,6 @@ width: 95px; margin-top: -30px; margin-left: 12px; - overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } diff --git a/sources/views/authWindows/signUpWindow.js b/sources/views/authWindows/signUpWindow.js index c6bb393..e2d0af0 100644 --- a/sources/views/authWindows/signUpWindow.js +++ b/sources/views/authWindows/signUpWindow.js @@ -102,6 +102,7 @@ const signupForm = { borderless: true, autoheight: true, onClick: { + // eslint-disable-next-line func-names "login-link": function () { // close current window this.getTopParentView().hide(); diff --git a/sources/views/subviews/gallery/gallery.js b/sources/views/subviews/gallery/gallery.js index 2f5b41e..7de25a3 100644 --- a/sources/views/subviews/gallery/gallery.js +++ b/sources/views/subviews/gallery/gallery.js @@ -32,6 +32,7 @@ const ID_DOWNLOADING_MENU = constants.DOWNLOAD_MENU_ID; const ID_RIGHT_PANEL = constants.ID_GALLERY_RIGHT_PANEL; const ID_GALLERY_CONTEXT_MENU = "gallery-context-menu"; const ID_ENLARGE_CONTEXT_MENU = `enlarge-context-menu-id-${webix.uid()}`; +const ID_LEFT_PANEL_RESIZER = `resizer-${webix.uid()}`; const NAME_GALLERY_HEADER = `galleryHeaderName-${webix.uid()}`; const NAME_SELECT_ALL_IMAGES_ON_ALL_PAGES_TEMPLATE = `selectAllImagesOnAllPagesTemplateName-${webix.uid()}`; const NAME_CLONED_PAGER_FOR_NAME_SEARCH = "clonedPagerForNameSearchName"; @@ -54,10 +55,11 @@ export default class GalleryView extends JetView { const leftPanelConfig = { id: ID_LEFT_PANEL, - width: 400, + minWidth: 400, + maxWidth: 700, paddingX: 15, paddingY: 15, - margin: 20 + margin: 20, }; const leftPanel = filterPanel.getConfig(leftPanelConfig); @@ -144,7 +146,10 @@ export default class GalleryView extends JetView { css: "centered", id: ID_CONTENT_HEADER, template(obj) { - const rangeHtml = `Shown images: ${obj.rangeStart || ""}-${obj.rangeFinish || ""}.`; + const rangeFinish = obj.filtered + ? Math.min(obj.rangeFinish, state.filteredImages.filteredImagesCount) + : obj.rangeFinish; + const rangeHtml = `Shown images: ${obj.rangeStart || ""}-${rangeFinish || ""}.`; const totalAmountHtml = `Total amount of images: ${obj.totalCount || ""}.`; const filteredAmountHtml = `Filtered images: ${state.filteredImages.filteredImagesCount || 0}`; let result = ""; @@ -293,8 +298,8 @@ export default class GalleryView extends JetView { ] }, {height: 10} - ] - + ], + gravity: 10, }; const leftCollapser = collapser.getConfig(ID_LEFT_PANEL, { @@ -305,8 +310,9 @@ export default class GalleryView extends JetView { name: "leftPanelWithCollapser", cols: [ leftPanel, - leftCollapser - ] + leftCollapser, + ], + gravity: 1 }; const ui = { @@ -315,7 +321,11 @@ export default class GalleryView extends JetView { { cols: [ leftPanelWithCollapser, - content + { + view: "resizer", + id: ID_LEFT_PANEL_RESIZER, + }, + content, ] } ] @@ -354,6 +364,7 @@ export default class GalleryView extends JetView { const imageWindowTemplate = $$(imageWindow.getViewerId()); const imageWindowTemplateWithoutControls = $$(imageWindow.getViewerWithoutControlsId()); const searchSuggest = $$(filterPanel.getSearchSuggestID()); + const leftPanelResizer = $$(ID_LEFT_PANEL_RESIZER); this._galleryService = new GalleryService( view, $$(ID_PAGER), @@ -387,6 +398,7 @@ export default class GalleryView extends JetView { null, // portraitClearAllFiltersTemplate null, // landscapeClearAllFiltersTemplate searchSuggest, + leftPanelResizer, ); // multi lesion @@ -629,7 +641,7 @@ export default class GalleryView extends JetView { } case constants.DEFAULT_DATAVIEW_COLUMNS: { const minGalleryWidth = window.innerWidth - - this.$$(ID_LEFT_PANEL).config.width + - this.$$(ID_LEFT_PANEL).config.maxWidth ?? $$(ID_LEFT_PANEL).config.width - galleryCartList.config.width; cols = Math.floor(minGalleryWidth / constants.DEFAULT_GALLERY_IMAGE_WIDTH); break; @@ -647,7 +659,7 @@ export default class GalleryView extends JetView { const maxDataviewHeight = galleryDataviewHeight + (downloadingMenu.isVisible() ? downloadingMenu.$height : 0); const maxImageHeight = Math.floor(maxImageWidth * multiplier); - const rows = Math.floor(maxDataviewHeight / maxImageHeight); + const rows = Math.floor(maxDataviewHeight / maxImageHeight) || 1; const elementWidth = util.getDataviewItemWidth(); const elementHeight = Math.round(galleryDataviewHeight / rows); dataWindowView.define("type", {width: elementWidth, height: elementHeight}); diff --git a/sources/views/subviews/gallery/galleryMobile.js b/sources/views/subviews/gallery/galleryMobile.js index cf45f7d..760b952 100644 --- a/sources/views/subviews/gallery/galleryMobile.js +++ b/sources/views/subviews/gallery/galleryMobile.js @@ -138,7 +138,7 @@ export default class GalleryMobileView extends JetView { css: "gallery-header-mobile-context", width: 1, template(obj) { - const result = obj?.filtered ? `(${obj.currentCount})` : ""; + const result = obj?.filtered ? `(${state.filteredImages.filteredImagesCount})` : ""; return result; }, borderless: true, @@ -580,6 +580,7 @@ export default class GalleryMobileView extends JetView { portraitClearAllFiltersTemplate, landscapeClearAllFiltersTemplate, null, // searchSuggest + null, // leftPanelResizer ); this.heaaderService = new MobileHeaderService( diff --git a/sources/views/subviews/gallery/parts/appliedFiltersList.js b/sources/views/subviews/gallery/parts/appliedFiltersList.js index 0e4deae..217c7aa 100644 --- a/sources/views/subviews/gallery/parts/appliedFiltersList.js +++ b/sources/views/subviews/gallery/parts/appliedFiltersList.js @@ -22,13 +22,25 @@ const list = { height: 100, scroll: "auto", template(obj) { + if (obj.treeCheckboxFlag) { + const result = getTreeCheckboxFilterName(obj); + return `
+ ${result} + + + + + +
`; + } const filterName = _prepareFilterName(obj); return `
${filterName} - + -
`; + + `; }, onClick: { // eslint-disable-next-line func-names @@ -134,6 +146,19 @@ function getIdFromConfig() { return list.id; } +function getTreeCheckboxFilterName(obj) { + let result = ["
"]; + const namesArray = obj.optionId.split("|"); + namesArray.forEach((n, index) => { + const lastBlockClass = index === namesArray.length - 1 + ? " last-block" + : ""; + result.push(`
${n}
`); + }); + result.push("
"); + return result.join(" "); +} + export default { getConfig, getIdFromConfig, diff --git a/sources/views/subviews/gallery/parts/filterPanel.js b/sources/views/subviews/gallery/parts/filterPanel.js index b528b76..2e4b4d0 100644 --- a/sources/views/subviews/gallery/parts/filterPanel.js +++ b/sources/views/subviews/gallery/parts/filterPanel.js @@ -36,9 +36,15 @@ function getConfig(config) { hidden: true }; - /** @type {webix.ui.suggestConfig} */ - const searchSuggestView = searchSuggest.getConfig(ID_SEARCH_SUGGESTION); - searchSuggestView.body.template = obj => `${obj.key}: ${obj.value}`; + const searchSuggestConfig = { + id: ID_SEARCH_SUGGESTION, + fitMaster: false, + css: "filters-suggest", + }; + const searchSuggestView = searchSuggest.getConfig(searchSuggestConfig); + searchSuggestView.body.template = obj => (obj.name + ? `${obj.name}: ${obj.value}` + : `${obj.value}`); searchSuggestView.filter = (obj, value) => { const result = `${obj.id}: ${obj.value}`.toLowerCase().includes(value.toLowerCase()); return result; @@ -56,9 +62,6 @@ function getConfig(config) { suggest: searchSuggestView, on: { onAfterRender: () => { - const searchInputWidth = $$(ID_SEARCH_FIELD).$width; - const dataviewMinWidth = 800; - searchButtonModel.setMinCurrentTargetInnerWidth(dataviewMinWidth + searchInputWidth); const inputNode = $$(ID_SEARCH_FIELD).$view.getElementsByClassName("webix_el_box")[0]; const tooltipText = "Clear search value"; searchButtonModel.createTimesSearchButton( @@ -70,7 +73,6 @@ function getConfig(config) { }, onChange() { let searchValue = this.getValue(); - searchValue = searchValue.trim(); searchValue = searchValue.replace(/\s+/g, " "); this.setValue(searchValue); } diff --git a/sources/views/subviews/gallery/parts/filters.js b/sources/views/subviews/gallery/parts/filters.js index 9dd6e95..8766e26 100644 --- a/sources/views/subviews/gallery/parts/filters.js +++ b/sources/views/subviews/gallery/parts/filters.js @@ -1,6 +1,8 @@ import constants from "../../../../constants"; import appliedFilters from "../../../../models/appliedFilters"; import collectionsModel from "../../../../models/collectionsModel"; +import diagnosisModel from "../../../../models/diagnosis"; +import globalState from "../../../../models/state"; import filterService from "../../../../services/gallery/filter"; import util from "../../../../utils/util"; @@ -9,6 +11,8 @@ const NAME_SELECT_ALL_FILTERS_MOBILE = "filter-images-select-all-mobile-name"; const NAME_SELECT_NONE_FILTERS = "filter-images-select-none-name"; const NAME_SELECT_NONE_FILTERS_MOBILE = "filter-images-select-none-mobile-name"; +const showedFiltersCollection = appliedFilters.getShowedFiltersCollection(); + function getLabelUI(label) { const view = { view: "label", @@ -19,7 +23,62 @@ function getLabelUI(label) { return view; } -function getCheckboxUI(data, collapsed) { +const expandedParentsFilters = []; + +function _attachCollapseToTreeFilter(filter, dataForCreatingControl, expandedFilters) { + const collapsibleFilter = webix.copy(filter); + const collapseElement = collapsibleFilter.rows[0]; + const collapsibleFilterFunction = function () { + const children = this.getParentView().getChildViews(); + const collapser = children[0]; + const controls = children[1]; + if (!controls.isVisible()) { + webix.html.addCss(collapser.getNode(), "showed-filter"); + webix.html.removeCss(collapser.getNode(), "hidden-filter"); + this.config.isRowsVisible = true; + controls.show(); + showedFiltersCollection.add({ + id: dataForCreatingControl.id + }); + } + else { + webix.html.removeCss(collapser.getNode(), "showed-filter"); + webix.html.addCss(collapser.getNode(), "hidden-filter"); + this.config.isRowsVisible = false; + if (showedFiltersCollection.exists(dataForCreatingControl.id)) { + showedFiltersCollection.remove(dataForCreatingControl.id); + } + controls.hide(); + } + }; + collapseElement.onClick = { + "collapssible-filter-tree": collapsibleFilterFunction + }; + if (expandedFilters?.length === 0) { + collapseElement.css = "collapssible-filter-tree hidden-filter"; + collapsibleFilter.rows[1].hidden = true; + } + else { + collapseElement.css = "collapssible-filter-tree showed-filter"; + collapsibleFilter.rows[1].hidden = false; + if (!showedFiltersCollection.exists(dataForCreatingControl.id)) { + showedFiltersCollection.add({ + id: dataForCreatingControl.id + }); + } + if (dataForCreatingControl.parent) { + const parentValue = diagnosisModel.getDiagnosisConcatenateValue( + dataForCreatingControl.parent + ); + const parentId = util.getOptionId("diagnosis", parentValue); + expandedParentsFilters.push(parentId); + } + } + + return collapsibleFilter; +} + +function getCheckboxUI(data, collapsed, expandedFilters) { const isMobile = util.isMobilePhone(); const handleAggregateButton = function (controlData, elements, newValue, app) { const filtersInfo = []; @@ -161,114 +220,296 @@ function getCheckboxUI(data, collapsed) { ] }; - data?.options?.forEach((currentOption) => { - if (data.id === constants.COLLECTION_KEY) { - if (!currentOption.updated) { - const pinnedCollections = collectionsModel - .getPinnedCollections() - .map(collection => ({name: collection.name, id: collection.id})); - const currentCollection = pinnedCollections - .find(collection => collection.id === currentOption.key); - if (currentCollection) { - currentOption.updated = true; - currentOption.optionId = currentCollection.id; - currentOption.key = currentCollection.id; - currentOption.collectionName = currentCollection.name; + if (data.type === constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX) { + expandedParentsFilters.length = 0; + data.options?.forEach((currentOption) => { + view.rows[1].rows.push(getTreeCheckboxUI(currentOption, data.id, expandedFilters)); + }); + } + else { + data?.options?.forEach((currentOption) => { + if (data.id === constants.COLLECTION_KEY) { + if (!currentOption.updated) { + const pinnedCollections = collectionsModel + .getPinnedCollections() + .map(collection => ({name: collection.name, id: collection.id})); + const currentCollection = pinnedCollections + .find(collection => collection.id === currentOption.key); + if (currentCollection) { + currentOption.updated = true; + currentOption.optionId = currentCollection.id; + currentOption.key = currentCollection.id; + currentOption.collectionName = currentCollection.name; + } } } - } - const optionName = data.id === constants.COLLECTION_KEY - ? filterService.prepareOptionName(currentOption.name, data.id) - : filterService.prepareOptionName(currentOption.key, data.id); - const id = util.getOptionId(data.id, optionName); - const filtersChangedData = { - view: data.type, - datatype: data.datatype, - key: data.id, - filterName: data.name, - value: optionName, - optionId: currentOption.optionId, - status: "equals" - }; - if (currentOption && data.type === "rangeCheckbox") { - filtersChangedData.to = currentOption.to; - filtersChangedData.from = currentOption.from; - } - if (data.id === constants.COLLECTION_KEY) { - view.rows[1].rows.push( - { - cols: [ - { - id, - view: "checkbox", - css: "checkbox-ctrl", - label: "", - labelRight: optionName, - value: 0, - name: id, - height: 28, - gravity: 3, - attributes: { - title: `${optionName}`, - dataOptionId: currentOption.optionId ? `${currentOption.optionId}` : null - }, - labelWidth: 0, - filtersChangedData, - on: { - onChange(status) { - let params = webix.copy(this.config.filtersChangedData); - if (currentOption && data.type === "rangeCheckbox") { - webix.extend(this.config.filtersChangedData, { - to: currentOption.to, - from: currentOption.from - }); + const optionName = data.id === constants.COLLECTION_KEY + ? filterService.prepareOptionName(currentOption.name, data.id) + : filterService.prepareOptionName(currentOption.key, data.id); + const id = util.getOptionId(data.id, optionName); + const filtersChangedData = appliedFilters.getFiltersChangedData( + data, + currentOption, + optionName + ); + if (data.id === constants.COLLECTION_KEY) { + view.rows[1].rows.push( + { + cols: [ + { + id, + view: "checkbox", + css: "checkbox-ctrl", + label: "", + labelRight: optionName, + value: 0, + name: id, + height: 28, + gravity: 3, + attributes: { + title: `${optionName}`, + dataOptionId: currentOption.optionId ? `${currentOption.optionId}` : null + }, + labelWidth: 0, + filtersChangedData, + on: { + onChange(status) { + let params = webix.copy(this.config.filtersChangedData); + if (currentOption && data.type === "rangeCheckbox") { + webix.extend(this.config.filtersChangedData, { + to: currentOption.to, + from: currentOption.from + }); + } + params.remove = !status; + params.optionId = currentOption.optionId; + this.getTopParentView().$scope.app.callEvent("filtersChanged", [params]); } - params.remove = !status; - params.optionId = currentOption.optionId; - this.getTopParentView().$scope.app.callEvent("filtersChanged", [params]); } + }, + ] + } + ); + } + else { + view.rows[1].rows.push( + { + id, + view: "checkbox", + css: "checkbox-ctrl", + label: "", + labelRight: `${optionName} (0)`, + value: 0, + name: id, + height: 28, + attributes: { + title: `${optionName} (0)`, + dataOptionId: currentOption.optionId ? `${currentOption.optionId}` : null + }, + labelWidth: 0, + filtersChangedData, + on: { + onChange(status) { + let params = webix.copy(this.config.filtersChangedData); + if (currentOption && data.type === "rangeCheckbox") { + webix.extend(this.config.filtersChangedData, { + to: currentOption.to, + from: currentOption.from + }); + } + params.remove = !status; + params.optionId = currentOption.optionId; + this.getTopParentView().$scope.app.callEvent("filtersChanged", [params]); } + } + } + ); + } + }); + } + return view; +} + +function getTreeCheckboxUI(data, collapsed, expandedFilters) { + const elementsToOpen = [...expandedFilters]; + const labelId = data.id; + const treeTableId = `treeTable-${data.id}`; + const treeTableDataForFilters = { + type: data.type, + name: data.name, + id: data.id, + labelId + }; + if (!globalState.filtersTreeData.has(treeTableId)) { + globalState.filtersTreeData.set(treeTableId, treeTableDataForFilters); + } + const view = { + rows: [ + { + id: util.getFilterLabelId(data.id), + view: "template", + css: "checkbox-label", + autoheight: true, + template: data.name, + borderless: true + }, + { + paddingsX: 20, + id: treeTableId, + view: "treetable", + css: "filter-tree-table", + columns: [ + { + id: "name", + template: (obj, common) => { + const name = obj.$level < 3 ? obj.name.toUpperCase() : obj.name; + return `${common.space(obj, common)}${common.icon(obj, common)} ${common.treecheckbox(obj, common)}${name}`; }, - ] - } - ); - } - else { - view.rows[1].rows.push( - { - id, - view: "checkbox", - css: "checkbox-ctrl", - label: "", - labelRight: `${optionName} (0)`, - value: 0, - name: id, - height: 28, - attributes: { - title: `${optionName} (0)`, - dataOptionId: currentOption.optionId ? `${currentOption.optionId}` : null - }, - labelWidth: 0, - filtersChangedData, - on: { - onChange(status) { - let params = webix.copy(this.config.filtersChangedData); - if (currentOption && data.type === "rangeCheckbox") { - webix.extend(this.config.filtersChangedData, { - to: currentOption.to, - from: currentOption.from - }); + fillspace: true, + select: false + } + ], + header: false, + threeState: true, + data: data.options, + autoheight: true, + scrollX: false, + rowHeight: 28, + borderless: true, + on: { + onItemCheck(id, state, event) { + const item = this.getItem(id); + const treeData = globalState.filtersTreeData.get(treeTableId); + const filtersChangedData = []; + filtersChangedData.push(appliedFilters.getFiltersChangeTreeItemData( + treeData, + item, + item.datatype, + !state, + )); + if (state) { + const children = getChildrenIds(this, id, item.$level); + children.forEach((c) => { + filtersChangedData.push(appliedFilters.getFiltersChangeTreeItemData( + treeData, + c, + item.datatype, + true, + )); + }); + } + else { + const parents = getParentsIds(this, id, item.$level); + parents.forEach((p) => { + filtersChangedData.push(appliedFilters.getFiltersChangeTreeItemData( + treeData, + p, + item.datatype, + true, + )); + }); + const currentParent = this.getItem(this.getParentId(id)); + const firstChildId = currentParent ? this.getFirstChildId(currentParent.id) : null; + const firstChildItem = firstChildId ? this.getItem(firstChildId) : null; + if (firstChildItem) { + filtersChangedData.push(appliedFilters.getFiltersChangeTreeItemData( + treeData, + firstChildItem, + item.datatype, + true, + )); + let nextSiblingId = this.getNextSiblingId(firstChildId); + while (nextSiblingId) { + const nextSiblingItem = this.getItem(nextSiblingId); + filtersChangedData.push(appliedFilters.getFiltersChangeTreeItemData( + treeData, + nextSiblingItem, + item.dataType, + !nextSiblingItem.checked, + )); + const children = getChildrenIds(this, nextSiblingId, nextSiblingItem.$level); + children.forEach((c) => { + filtersChangedData.push(appliedFilters.getFiltersChangeTreeItemData( + treeData, + c, + item.datatype, + true, + )); + }); + const currentId = nextSiblingId; + nextSiblingId = this.getNextSiblingId(currentId); + } } - params.remove = !status; - params.optionId = currentOption.optionId; - this.getTopParentView().$scope.app.callEvent("filtersChanged", [params]); + const allCheckedItems = this.getChecked(); + allCheckedItems.forEach((checkedItemId) => { + const checkedItem = this.getItem(checkedItemId); + const parentForCheckedItem = this.getItem(this.getParentId(checkedItemId)); + if (!parentForCheckedItem.checked) { + filtersChangedData.push(appliedFilters.getFiltersChangeTreeItemData( + treeData, + checkedItem, + checkedItem.datatype, + false, + )); + } + }); } + this.getTopParentView().$scope.app.callEvent("filtersChanged", [filtersChangedData]); + }, + onAfterRender() { + elementsToOpen.forEach((e) => { + if (this.getItem(e)) { + this.open(e); + } + }); + elementsToOpen.length = 0; } - } - ); + }, + } + ] + }; + return _attachCollapseToTreeFilter(view, data, expandedFilters); +} + +function getParentsIds(treeView, optionId, level) { + const parents = []; + const parentId = treeView.getParentId(optionId); + if (parentId) { + parents.push({id: parentId, level: level - 1}); + const parentIds = getParentsIds(treeView, parentId, level - 1); + if (parentIds.length > 0) { + parents.push(...parentIds); + } + } + return parents; +} + +function getChildrenIds(treeView, optionId, level) { + const childIds = []; + const firstChildId = treeView.getFirstChildId(optionId); + if (!firstChildId) { + return childIds; + } + childIds.push({id: firstChildId, level: level + 1}); + let nextSiblingId = treeView.getNextSiblingId(firstChildId); + while (nextSiblingId) { + const currentId = nextSiblingId; + childIds.push({id: currentId, level: level + 1}); + nextSiblingId = treeView.getNextSiblingId(currentId); + } + childIds.forEach((c) => { + const ids = getChildrenIds(treeView, c.id, level + 1); + if (ids.length > 0) { + childIds.push(...ids); } }); - return view; + return childIds; +} + +function getTreeOptionValueById(id) { + const separator = "|"; + const array = id.split(separator); + return array.at(array.length - 1); } /* @@ -391,5 +632,6 @@ export default { getLabelUI, getCheckboxUI, getSelectAllFilersName, - getSelectNoneFiltersName + getSelectNoneFiltersName, + getTreeCheckboxUI, }; diff --git a/sources/views/subviews/gallery/parts/filtersFormElements.js b/sources/views/subviews/gallery/parts/filtersFormElements.js index 18e65a0..c407989 100644 --- a/sources/views/subviews/gallery/parts/filtersFormElements.js +++ b/sources/views/subviews/gallery/parts/filtersFormElements.js @@ -1,3 +1,4 @@ +import constants from "../../../../constants"; import appliedFilters from "../../../../models/appliedFilters"; import util from "../../../../utils/util"; import filtersViewHelper from "./filters"; @@ -10,55 +11,56 @@ const NAME_SELECT_NONE_FILTER = filtersViewHelper.getSelectNoneFiltersName(); function _attachCollapseToFilter(filter, collapsed, dataForCreatingControl) { const collapsibleFilter = webix.copy(filter); const isMobile = util.isMobilePhone(); - const template = isMobile + const template = isMobile || filter.type === constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX ? collapsibleFilter.rows[0].cols[0] : collapsibleFilter.rows[0]; - template.onClick = { - // eslint-disable-next-line func-names - "collapssible-filter": function () { - const currentMobile = util.isMobilePhone(); - const selectAllFiltersButton = this.getParentView().queryView({ - name: NAME_SELECT_ALL_FILTER - }); - const selectNoneFiltersButton = this.getParentView().queryView({ - name: NAME_SELECT_NONE_FILTER + const collapsibleFilterFunction = function () { + const currentMobile = util.isMobilePhone(); + const selectAllFiltersButton = this.getParentView().queryView({ + name: NAME_SELECT_ALL_FILTER + }); + const selectNoneFiltersButton = this.getParentView().queryView({ + name: NAME_SELECT_NONE_FILTER + }); + const children = currentMobile + ? this.getParentView().getParentView().getChildViews() + : this.getParentView().getChildViews(); + const labelObject = currentMobile + ? children[0].getChildViews()[0] + : children[0]; + const controls = children[1]; + if (!controls.isVisible()) { + selectAllFiltersButton.show(); + selectNoneFiltersButton.show(); + showOrHideAggregateButton(filter, controls, dataForCreatingControl, currentMobile); + webix.html.addCss(labelObject.getNode(), "showed-filter"); + webix.html.removeCss(labelObject.getNode(), "hidden-filter"); + this.config.isRowsVisible = true; + controls.show(); + // scroll into collapsed controls + // TODO: fix mobile view + // const filtersNode = controls.getParentView().getNode(); + // filtersNode.scrollIntoView(); + showedFiltersCollection.add({ + id: dataForCreatingControl.id }); - const children = currentMobile - ? this.getParentView().getParentView().getChildViews() - : this.getParentView().getChildViews(); - const labelObject = currentMobile - ? children[0].getChildViews()[0] - : children[0]; - const controls = children[1]; - if (!controls.isVisible()) { - selectAllFiltersButton.show(); - selectNoneFiltersButton.show(); - showOrHideAggregateButton(filter, controls, dataForCreatingControl, currentMobile); - webix.html.addCss(labelObject.getNode(), "showed-filter"); - webix.html.removeCss(labelObject.getNode(), "hidden-filter"); - this.config.isRowsVisible = true; - controls.show(); - // scroll into collapsed controls - // TODO: fix mobile view - // const filtersNode = controls.getParentView().getNode(); - // filtersNode.scrollIntoView(); - showedFiltersCollection.add({ - id: dataForCreatingControl.id - }); - } - else { - selectAllFiltersButton?.hide(); - selectNoneFiltersButton?.hide(); - webix.html.removeCss(labelObject.getNode(), "showed-filter"); - webix.html.addCss(labelObject.getNode(), "hidden-filter"); - this.config.isRowsVisible = false; - if (showedFiltersCollection.exists(dataForCreatingControl.id)) { - showedFiltersCollection.remove(dataForCreatingControl.id); - } - controls.hide(); + } + else { + selectAllFiltersButton?.hide(); + selectNoneFiltersButton?.hide(); + webix.html.removeCss(labelObject.getNode(), "showed-filter"); + webix.html.addCss(labelObject.getNode(), "hidden-filter"); + this.config.isRowsVisible = false; + if (showedFiltersCollection.exists(dataForCreatingControl.id)) { + showedFiltersCollection.remove(dataForCreatingControl.id); } + controls.hide(); } }; + template.onClick = { + // eslint-disable-next-line func-names + "collapssible-filter": collapsibleFilterFunction + }; if (collapsed) { template.css += " collapssible-filter hidden-filter"; collapsibleFilter.rows[1].hidden = true; @@ -97,16 +99,37 @@ function transformToFormFormat(data, expandedFilters) { case "checkbox": case "rangeCheckbox": filtersConfig = filtersViewHelper.getCheckboxUI(dataForCreatingControl, collapsed); + if (filtersConfig) { + elems.push(_attachCollapseToFilter(filtersConfig, collapsed, dataForCreatingControl)); + } break; /* case "range_slider": t = filtersViewHelper.getRangeSliderUI(data[key].data[i]); break; */ + case constants.FILTER_ELEMENT_TYPE.TREE_CHECKBOX: { + if (util.isMobilePhone()) { + break; + } + const openedItems = getOpenElementFromTreeTable(`treeTable-${dataForCreatingControl.id}`); + expandedFilters.push(...openedItems); + const diagnosisRegex = /^diagnosis\|.*/; + const diagnosisFilter = expandedFilters.find(f => diagnosisRegex.test(f)); + collapsed = !diagnosisFilter; + filtersConfig = filtersViewHelper.getTreeCheckboxUI( + dataForCreatingControl, + collapsed, + expandedFilters + ); + if (filtersConfig) { + elems.push(filtersConfig); + } + break; + } default: { break; } } - elems.push(_attachCollapseToFilter(filtersConfig, collapsed, dataForCreatingControl)); } } }); @@ -144,6 +167,14 @@ function showOrHideAggregateButton(filter, controls, dataForCreatingControl, isC } } +function getOpenElementFromTreeTable(id) { + const treeTableView = $$(id); + if (treeTableView) { + return treeTableView.getOpenItems(); + } + return []; +} + export default { transformToFormFormat }; diff --git a/sources/views/subviews/gallery/parts/mobileFilterPanel.js b/sources/views/subviews/gallery/parts/mobileFilterPanel.js index a7c5bb0..bfd6715 100644 --- a/sources/views/subviews/gallery/parts/mobileFilterPanel.js +++ b/sources/views/subviews/gallery/parts/mobileFilterPanel.js @@ -76,9 +76,6 @@ function getConfig(config) { hidden: true, on: { onAfterRender: () => { - const searchInputWidth = $$(ID_SEARCH_FIELD).$width; - const dataviewMinWidth = 800; - searchButtonModel.setMinCurrentTargetInnerWidth(dataviewMinWidth + searchInputWidth); const inputNode = $$(ID_SEARCH_FIELD).$view.getElementsByClassName("webix_el_box")[0]; const tooltipText = "Clear search value"; searchButtonModel.createTimesSearchButton( diff --git a/sources/views/subviews/gallery/parts/searchSuggest.js b/sources/views/subviews/gallery/parts/searchSuggest.js index b091cb9..e04aada 100644 --- a/sources/views/subviews/gallery/parts/searchSuggest.js +++ b/sources/views/subviews/gallery/parts/searchSuggest.js @@ -4,7 +4,6 @@ function getView() { /** @type {webix.ui.suggestConfig} */ const view = { view: "suggest", - width: 70, yCount: 10, keyPressTimeout: 500, body: { @@ -21,9 +20,9 @@ function getView() { return view; } -function getConfig(id) { - const config = getView(); - config.id = id; +function getConfig(customConfig) { + const config = {...getView(), ...customConfig}; + return config; }