Skip to content

Commit

Permalink
Merge pull request #27 from fair4health/v1.1.0
Browse files Browse the repository at this point in the history
V1.1.0
  • Loading branch information
sinaci authored May 27, 2021
2 parents 9a4dca7 + 73185eb commit 2c37011
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 31 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fair4health-data-privacy-tool",
"productName": "FAIR4Health Privacy Tool",
"version": "1.0.1",
"version": "1.1.0",
"private": true,
"author": "SRDC Corporation <[email protected]>",
"description": "FAIR4Health | Data Privacy Tool",
Expand Down
4 changes: 2 additions & 2 deletions src/components/AttributeSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{ $t('COMMON.ATTRIBUTE_SELECTOR') }}
</q-toolbar-title>
<div class="q-gutter-md">
<q-btn unelevated :label="$t('BUTTONS.SELECT')" color="white" text-color="primary" @click="selectSavedConfigurations" icon="fas fa-archive" no-caps>
<q-btn unelevated :label="$t('BUTTONS.SELECT_CONFIGURATION')" color="white" text-color="primary" @click="selectSavedConfigurations" icon="fas fa-archive" no-caps>
<q-tooltip anchor="bottom middle" self="top middle"> {{ $t('TOOLTIPS.SELECT_SAVED_CONFIGURATION') }} </q-tooltip>
</q-btn>
<q-btn unelevated :label="$t('BUTTONS.IMPORT')" color="white" text-color="primary" @click="importSavedConfigurations" icon="fas fa-file-import" no-caps>
Expand All @@ -30,7 +30,7 @@
</q-card-section>
<q-card-section v-if="savedConfigs && savedConfigs.length">
<q-list bordered class="rounded-borders">
<q-item v-for="(saved, index) of savedConfigs" class="q-ma-sm" >
<q-item v-for="(saved, index) of savedConfigs" :key="index" class="q-ma-sm" >
<q-item-section avatar top>
<q-icon name="save" color="black" size="26px" class="q-mt-xs" />
</q-item-section>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Deidentifier.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
{{ $t('COMMON.DEIDENTIFIER') }}
</q-toolbar-title>
<div class="q-gutter-md">
<q-btn unelevated :label="$t('BUTTONS.SAVE')" color="white" text-color="primary" @click="saveConfigurations" icon="save" no-caps >
<q-btn unelevated :label="$t('BUTTONS.SAVE_CONFIGURATION')" color="white" text-color="primary" @click="saveConfigurations" icon="save" no-caps >
<q-tooltip anchor="bottom middle" self="top middle"> {{ $t('TOOLTIPS.SAVE_CONFIGURATION') }} </q-tooltip>
</q-btn>
<q-btn unelevated :label="$t('BUTTONS.EXPORT')" color="white" text-color="primary" @click="exportConfigurations" icon="publish" no-caps >
<q-btn unelevated :label="$t('BUTTONS.EXPORT_CONFIGURATION')" color="white" text-color="primary" @click="exportConfigurations" icon="publish" no-caps >
<q-tooltip anchor="bottom middle" self="top middle"> {{ $t('TOOLTIPS.EXPORT_CONFIGURATION') }} </q-tooltip>
</q-btn>
</div>
Expand Down Expand Up @@ -203,7 +203,7 @@
<div class="row content-end q-gutter-sm">
<q-space />
<q-btn v-if="isSuccess(deidentificationStatus) || isError(deidentificationStatus)"
:disable="disableSave()" label="Save" color="positive" icon="save"
:disable="disableSave()" :label="$t('BUTTONS.SAVE_TO_REPOSITORY')" color="positive" icon="save"
class="q-mt-lg" @click="saveDialog = true" no-caps>
<q-tooltip anchor="bottom middle" self="top middle"> {{ $t('TOOLTIPS.SAVE_DEIDENTIFIED_DATA') }} </q-tooltip>
</q-btn>
Expand Down
24 changes: 20 additions & 4 deletions src/components/tables/FhirAttributeTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,36 @@
<q-tooltip v-if="splitterModel<100">{{$t('TABLE.TYPE')}}</q-tooltip>
</div>
<div class="text-right col-1 ellipsis">
<q-icon name="help" color="white" class="cursor-pointer" size="xs">
<q-tooltip content-class="bg-primary text-white text-size-lg" :content-style="{ width: '200px' }">
{{ $t('INFO.ATTR_TYPE_DESC_ID') }}
</q-tooltip>
</q-icon>
{{attributeTypes.ID}}
<q-tooltip v-if="splitterModel<100">{{attributeTypes.ID}}</q-tooltip>
</div>
<div class="text-center col-2 ellipsis">
<q-icon name="help" color="white" class="cursor-pointer" size="xs">
<q-tooltip content-class="bg-primary text-white text-size-lg" :content-style="{ width: '200px' }">
{{ $t('INFO.ATTR_TYPE_DESC_QUASI') }}
</q-tooltip>
</q-icon>
{{attributeTypes.QUASI}}
<q-tooltip v-if="splitterModel<100">{{attributeTypes.QUASI}}</q-tooltip>
</div>
<div class="col-1 ellipsis">
<q-icon name="help" color="white" class="cursor-pointer" size="xs">
<q-tooltip content-class="bg-primary text-white text-size-lg" :content-style="{ width: '200px' }">
{{ $t('INFO.ATTR_TYPE_DESC_SENSITIVE') }}
</q-tooltip>
</q-icon>
{{attributeTypes.SENSITIVE}}
<q-tooltip v-if="splitterModel<100">{{attributeTypes.SENSITIVE}}</q-tooltip>
</div>
<div class="col-1 ellipsis">
<q-icon name="help" color="white" class="cursor-pointer" size="xs">
<q-tooltip content-class="bg-primary text-white text-size-lg" :content-style="{ width: '200px' }">
{{ $t('INFO.ATTR_TYPE_DESC_INSENSITIVE') }}
</q-tooltip>
</q-icon>
{{attributeTypes.INSENSITIVE}}
<q-tooltip v-if="splitterModel<100">{{attributeTypes.INSENSITIVE}}</q-tooltip>
</div>
</div>
<q-scroll-area class="overflow-hidden">
Expand Down
23 changes: 23 additions & 0 deletions src/components/tables/QuasiIdentifierTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
</q-item-section>
<q-item-section>
<q-item-label v-html="scope.opt" />
<q-item-label caption lines="2">{{getDescriptionOfAlgorithm(scope.opt)}}</q-item-label>
</q-item-section>
</q-item>
</template>
Expand Down Expand Up @@ -284,6 +285,28 @@ export default class QuasiIdentifierTable extends Vue {
(this.typeMappings[node.value] && this.typeMappings[node.value].toLowerCase().includes(filt));
}
getDescriptionOfAlgorithm (name: string) {
if (name === environment.algorithms.PASS_THROUGH.name) {
return String(this.$t('ALGORITHM_INFO.PASS_THROUGH'));
} else if (name === environment.algorithms.REDACTION.name) {
return String(this.$t('ALGORITHM_INFO.REDACTION'));
} else if (name === environment.algorithms.RECOVERABLE_SUBSTITUTION.name) {
return String(this.$t('ALGORITHM_INFO.RECOVERABLE_SUBSTITUTION'));
} else if (name === environment.algorithms.SUBSTITUTION.name) {
return String(this.$t('ALGORITHM_INFO.SUBSTITUTION'));
} else if (name === environment.algorithms.FUZZING.name) {
return String(this.$t('ALGORITHM_INFO.FUZZING'));
} else if (name === environment.algorithms.GENERALIZATION.name) {
return String(this.$t('ALGORITHM_INFO.GENERALIZATION'));
} else if (name === environment.algorithms.DATE_SHIFTING.name) {
return String(this.$t('ALGORITHM_INFO.DATE_SHIFTING'));
} else if (name === environment.algorithms.REPLACE.name) {
return String(this.$t('ALGORITHM_INFO.REPLACE'));
} else {
return '';
}
}
}
</script>

Expand Down
24 changes: 20 additions & 4 deletions src/layouts/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@
:name="step.stepId"
:title="$t(step.title)"
:icon="step.icon"
:done-icon="step.icon"
done-icon="check"
:done="currentStep > step.stepId"
active-color="grey-8"
done-color="primary"
:active-icon="step.icon"
active-color="primary"
done-color="secondary"
/>
</q-stepper>
</q-item>
Expand All @@ -69,10 +70,20 @@
<img src="../assets/github-logo.png" />
</q-avatar>
</q-item-section>
<q-item-section class="text-grey-7">
<q-item-section v-if="!isCollapsed" class="text-grey-7">
<span>{{ $t('MENU.VIEW_ON') }} <span class="text-weight-bold">GitHub</span></span>
</q-item-section>
</q-item>
<q-separator />
<q-item clickable @click="toggleSidebar">
<q-item-section avatar>
<q-icon :name="isCollapsed ? 'fas fa-angle-double-right' : 'fas fa-angle-double-left'"
size="xs" color="grey-9" />
</q-item-section>
<q-item-section v-if="!isCollapsed" class="text-grey-7">
<span>{{ $t('MENU.COLLAPSE_SIDEBAR') }} </span>
</q-item-section>
</q-item>
</q-list>
</q-drawer>

Expand Down Expand Up @@ -126,6 +137,11 @@ export default class MainLayout extends Vue {
shell.openExternal(url);
}
toggleSidebar () {
if (this.$q.screen.lt.lg || !this.drawerOpen) this.drawerOpen = !this.drawerOpen
else this.drawerMiniState = !this.drawerMiniState
}
}
</script>

Expand Down
40 changes: 25 additions & 15 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"ALGORITHM_INFO": {
"DATE_SHIFTING": "Date will be shifted randomly within a range that you provide.",
"FUZZING": "A noise will be added to the attribute within the range of the percentage you provide.",
"GENERALIZATION": "The field will be generalized e.g. date unit as year, rounded floating numbers.",
"GENERALIZATION_DATE": "Only the information of the date unit that you provide will be kept.",
"GENERALIZATION_FLOAT": "Decimal places of the floating number will be rounded by your choice. '0' means rounding to an integer.",
"GENERALIZATION_INTEGER": "Last digits of the integer will be rounded by your choice.",
"PASS_THROUGH": "The attribute will be saved with no change.",
"RARE_VALUES": "You should provide the rare values for this attribute below. ",
"RARE_VALUES": "You should provide the rare values for this attribute below.",
"RECOVERABLE_SUBSTITUTION": "New value will be generated automatically.",
"REDACTION": "The attribute will be completely removed.",
"REPLACE": "You should provide the rare values and their new values for this attribute below.",
Expand All @@ -19,25 +20,29 @@
"CLOSE": "Close",
"DETAILS": "Details",
"EXPORT": "Export",
"EXPORT_CONFIGURATION": "Export Configuration",
"IMPORT": "Import",
"MAXIMIZE": "Maximize",
"MINIMIZE": "Minimize",
"NEXT": "Next",
"OK": "Ok",
"QUICK_START": "Quick Start",
"SAVE": "Save",
"SAVE_CONFIGURATION": "Save Configuration",
"SAVE_TO_REPOSITORY": "Save to Repository",
"SELECT": "Select",
"SELECT_CONFIGURATION": "Select Configuration",
"VERIFY": "Verify"
},
"COMMON": {
"APP_NAME": "Data Privacy Tool",
"ATTRIBUTE_SELECTOR": "Select Attribute Types",
"COMPLETED": "Completed",
"CONFIGURATION_MANAGER": "Configure Algorithms",
"DEIDENTIFIER": "De-identify Data",
"DEIDENTIFY": "De-identify",
"ERROR": "Error",
"FILE": "File",
"ATTRIBUTE_SELECTOR": "Select Attribute Types",
"ONFHIR_VERIFIER": "Verify FHIR Repository",
"PENDING": "Pending",
"SAVING_RESOURCES": "Saving resources...",
Expand All @@ -60,9 +65,14 @@
"X_RESOURCE_ELEMENTS_COULDNT_BE_LOADED": "{resource} Resource elements couldn't be loaded"
},
"INFO": {
"CONFIG_DELETED": "{configName} is deleted",
"ATTRIBUTE_SELECTOR_HOME_INFO": "Attributes of FHIR resources are categorized in a privacy point of view.",
"ATTR_TYPE_DESC_ID": "If an attribute is an identifier, it is removed directly from the resource.",
"ATTR_TYPE_DESC_INSENSITIVE": "If an attribute is insensitive, it remains the same.",
"ATTR_TYPE_DESC_QUASI": "A quasi identifier is a piece of information that does not itself identify an individual, but can do so when combined with other quasi-identifiers.",
"ATTR_TYPE_DESC_SENSITIVE": "A sensitive attribute is an attribute whose value may not be wanted to be disclosed. Some of the rare values, but not all, need to be anonymized, e.g. HIV in Condition.",
"CONFIGURATION_MANAGER_HOME_INFO": "De-identification algorithms and their parameters are configured accordingly.",
"CONFIGURATION_MANAGER_INFO": "Configure de-identification parameters.",
"CONFIG_DELETED": "{configName} is deleted",
"DEIDENTIFIED_JSONS": "These resources are de-identified and their re-identification risks are low. They are labeled in their meta.security as 'low'.",
"DEIDENTIFIER_HOME_INFO_1": "Resources are de-identified according to configurations made.",
"DEIDENTIFIER_HOME_INFO_2": "New de-identified FHIR resources are versioned and labeled accordingly and then saved to a FHIR Repository.",
Expand All @@ -71,7 +81,6 @@
"EVALUATION_LOSS": "Evaluation results are shown here after de-identification is completed.",
"FHIR_ATTRIBUTE_TABLE": "Select types of attributes from privacy point of view. Note that you can only configure primitive types.",
"INFORMATION_LOSS_INFO": "Percentage of information loss according to Expected Equivalence Class Size metric. Restricted resources are excluded.",
"ATTRIBUTE_SELECTOR_HOME_INFO": "Attributes of FHIR resources are categorized in a privacy point of view.",
"NO_SAVED_CONFIGURATIONS": "No saved configuration exists right now.",
"ONFHIR_VERIFIER_HOME_INFO": "Provided FHIR repository is verified.",
"RARE_VALUES_PLACEHOLDER": "Enter rare values here...",
Expand All @@ -94,9 +103,9 @@
"FIXED_LENGTH": "Fixed Length",
"FOLLOW_US": "Follow us on social media!",
"HIGHEST_PROSECUTOR": "Highest Prosecutor Risk",
"INFORMATION_LOSS": "Information Loss",
"LAST_DIGITS_TO_BE_ROUNDED": "Last digits to be rounded:",
"LOWEST_PROSECUTOR": "Lowest Prosecutor Risk",
"INFORMATION_LOSS": "Information Loss",
"NO_QUASI_IDENTIFIER": "No quasi-identifier was selected",
"NO_RESULT": "No result found",
"NO_SENSITIVE_ATTRIBUTE": "No sensitive attribute was selected",
Expand All @@ -115,19 +124,21 @@
"RECORDS_AFFECTED_BY_LOWEST": "Records Affected By Lowest Risk",
"RESOURCES": "Resources",
"RETURN_HOME": "Return Home",
"ROUNDING_PRECISION": "Rounding precision:",
"ROUND_TO_CEILING": "Round to Ceiling",
"ROUND_TO_FLOOR": "Round to Floor",
"ROUNDING_PRECISION": "Rounding precision:",
"SAVE_AS_NEW_DATA": "Save As New Data",
"SENSITIVE_ATTRIBUTES": "Sensitive Attributes",
"SHORT": "Short",
"SHIFT_WITHIN": "Shift within:",
"SHORT": "Short",
"STATUS": "@:COMMON.STATUS",
"SUBSTITUTION_CHARACTER": "Substitution Character:",
"WELCOME_TO": "Welcome to"
},
"MENU": {
"ABOUT": "About",
"ATTRIBUTE_SELECTOR": "@:COMMON.ATTRIBUTE_SELECTOR",
"COLLAPSE_SIDEBAR": "Collapse sidebar",
"CONFIGURATION_MANAGER": "@:COMMON.CONFIGURATION_MANAGER",
"DEIDENTIFICATION": "De-identification",
"DEIDENTIFIER": "@:COMMON.DEIDENTIFIER",
Expand All @@ -137,7 +148,6 @@
"HELP": "Help",
"HOME": "Home",
"LANGUAGE": "Language",
"ATTRIBUTE_SELECTOR": "@:COMMON.ATTRIBUTE_SELECTOR",
"ONFHIR_VERIFIER": "@:COMMON.ONFHIR_VERIFIER",
"TOGGLE_DEVELOPER_TOOLS": "Toggle Developer Tools",
"TOGGLE_FULL_SCREEN": "Toggle Full Screen",
Expand All @@ -155,12 +165,12 @@
},
"SUCCESS": {
"CONFIGURATION_IS_LOADED": "Configuration is loaded successfully",
"RECOMMENDATIONS_RESETTED": "Recommendations are resetted successfully",
"RESOURCES_ARE_DEIDENTIFIED": "Resources are de-identified successfully",
"RESOURCES_ARE_SAVED": "Resources are saved successfully",
"FHIR_URL_VERIFIED": "FHIR Repository URL is verified",
"FILE_IS_EXPORTED": "File is exported successfully",
"FILE_IS_IMPORTED": "File is imported successfully",
"RECOMMENDATIONS_RESETTED": "Recommendations are resetted successfully",
"RESOURCES_ARE_DEIDENTIFIED": "Resources are de-identified successfully",
"RESOURCES_ARE_SAVED": "Resources are saved successfully",
"SAVED": "Saved"
},
"TABLE": {
Expand All @@ -185,17 +195,17 @@
"OUTCOME_DETAILS": "Outcome Details",
"REMOVE_SAVED_CONFIGURATION": "Remove Saved Configuration",
"RESTRICTED_RESOURCES": "Restricted {selectedResource} Resources",
"SAVE_DEIDENTIFIED": "Save De-identified Data",
"SAVED_CONFIGURATIONS": "Saved Configurations"
"SAVED_CONFIGURATIONS": "Saved Configurations",
"SAVE_DEIDENTIFIED": "Save De-identified Data"
},
"TOOLTIPS": {
"DEIDENTIFYING": "De-identifying...",
"EXPORT_CONFIGURATION": "Export Configuration",
"EXPORT_CONFIGURATION": "@:BUTTONS.EXPORT_CONFIGURATION",
"IMPORT_CONFIGURATION": "Import Configuration",
"LOADING": "Loading...",
"RESET_RECOMMENDED_ATTRIBUTES": "Reset Recommended Attributes",
"SAVE_CONFIGURATION": "@:BUTTONS.SAVE_CONFIGURATION",
"SAVE_DEIDENTIFIED_DATA": "Save De-identified Data to Repository",
"SAVE_CONFIGURATION": "Save Configuration",
"SELECT_SAVED_CONFIGURATION": "Select Saved Configuration"
},
"WARNING": {
Expand Down
2 changes: 1 addition & 1 deletion src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Vue.use(Vuex);
export default new Vuex.Store({
state: {
drawerOpen: true,
drawerMiniState: true,
drawerMiniState: false,
privacyStep: 1
},
getters: {
Expand Down

0 comments on commit 2c37011

Please sign in to comment.