Skip to content

Commit

Permalink
Merge pull request #59 from fair4health/v1.2.2
Browse files Browse the repository at this point in the history
V1.2.2
  • Loading branch information
sinaci authored Apr 20, 2021
2 parents 3258429 + 323fb43 commit 5106af7
Show file tree
Hide file tree
Showing 21 changed files with 847 additions and 330 deletions.
48 changes: 9 additions & 39 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fair4health-data-curation-tool",
"productName": "FAIR4Health Data Curation Tool",
"version": "1.2.1",
"version": "1.2.2",
"private": true,
"author": "SRDC Corporation <[email protected]>",
"description": "FAIR4Health | Data Curation and Validation Tool",
Expand All @@ -25,7 +25,7 @@
"dependencies": {
"@quasar/extras": "^1.0.0",
"@types/lodash": "^4.14.150",
"axios": "^0.19.0",
"axios": "^0.21.1",
"core-js": "^3.3.2",
"crypto-js": "^4.0.0",
"electron-log": "^4.2.2",
Expand All @@ -34,7 +34,7 @@
"isomorphic-fetch": "^2.2.1",
"ng-fhir": "^2.3.0",
"pg": "^8.5.1",
"quasar": "^1.9.12",
"quasar": "^1.15.10",
"readline-sync": "^1.4.10",
"spectron": "^11.1.0",
"typeorm": "^0.2.29",
Expand Down
1 change: 1 addition & 0 deletions src/common/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export let environment = {
langs: ['en'],
databaseTypes: ['postgres'],
hl7: hl7Base,
FHIRBatchOperationSize: 1000,
codesystems: {
ATC: 'http://www.whocc.no/atc',
SNOMED: 'http://snomed.info/sct',
Expand Down
44 changes: 31 additions & 13 deletions src/common/model/data-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,59 @@

import { QTable } from 'quasar'

interface FAIRTable extends QTable {
columns: Array<{
name: string
label: string
field: string | (() => void)
required?: boolean
icon?: string
align?: string
sortable?: boolean
style?: string
classes?: string
headerStyle?: string
headerClasses?: string
format? (): void
sort? (): void
}>
}

export const cellType = {
s: 'Text',
b: 'Boolean',
d: 'Date',
n: 'Number'
}
export const savedMappingTable: QTable = {
export const savedMappingTable: FAIRTable = {
columns: [
{ name: 'date', label: 'TABLE.DATE_MODIFIED', align: 'left', field: 'date', icon: 'today', sortable: true },
{ name: 'action', label: 'TABLE.ACTIONS', align: 'right' }
{ name: 'action', label: 'TABLE.ACTIONS', align: 'right', field: 'action' }
],
pagination: { sortBy: 'date', descending: true, page: 1, rowsPerPage: 5 }
} as QTable
} as FAIRTable

export const sourceDataTable: QTable = {
export const sourceDataTable: FAIRTable = {
columns: [
{ name: 'attr', required: true, label: 'TABLE.ATTRIBUTE', align: 'left', field: 'value', icon: 'fas fa-bars', sortable: true },
{ name: 'type', required: true, label: 'TABLE.TYPE', align: 'left', field: 'type', icon: 'fas fa-spell-check' },
{ name: 'target', label: 'TABLE.TARGET', align: 'left', field: 'target' },
{ name: 'conceptMap', label: 'TABLE.CONCEPT_MAP', align: 'right', field: 'conceptMap' }
],
pagination: { page: 1, rowsPerPage: 10 }
} as QTable
} as FAIRTable

export const validatorTable: QTable = {
export const validatorTable: FAIRTable = {
columns: [
{ name: 'status', align: 'center', label: 'TABLE.STATUS', field: 'status', icon: 'fas fa-info-circle', classes: 'bg-grey-2', headerClasses: 'bg-primary text-white' },
{ name: 'file', align: 'left', label: 'TABLE.FILE', field: 'file', icon: 'fas fa-file', sortable: true },
{ name: 'sheet', align: 'left', label: 'TABLE.SHEET', field: 'sheet', icon: 'far fa-file-alt', sortable: true },
{ name: 'targets', align: 'center', label: 'TABLE.TARGET_MAPPINGS', field: 'targets', icon: 'fas fa-hashtag', sortable: true }
],
pagination: { page: 1, rowsPerPage: 0 }
} as QTable
} as FAIRTable

export const transformerTable: QTable = {
export const transformerTable: FAIRTable = {
columns: [
{ name: 'status', label: 'TABLE.STATUS', field: 'status', align: 'left', icon: 'fas fa-info-circle', classes: 'bg-grey-2' },
{ name: 'resourceType', label: 'TABLE.RESOURCE_TYPE', field: 'resourceType', align: 'left', sortable: true },
Expand All @@ -47,9 +65,9 @@ export const transformerTable: QTable = {
{ name: 'action', label: 'TABLE.ACTIONS', align: 'right' }
],
pagination: { page: 1, rowsPerPage: 0 }
} as QTable
} as FAIRTable

export const mappingDetailTable: QTable = {
export const mappingDetailTable: FAIRTable = {
columns: [
{ name: 'sourceField', label: 'TABLE.SOURCE_FIELD', field: 'value', align: 'left', sortable: true },
{ name: 'targetField', label: 'TABLE.TARGET_FIELD', field: 'targetField', align: 'left', sortable: true },
Expand All @@ -59,9 +77,9 @@ export const mappingDetailTable: QTable = {
{ name: 'conceptMap', label: 'TABLE.CONCEPT_MAP', field: 'conceptMap', align: 'left', sortable: true }
],
pagination: { page: 1, rowsPerPage: 5 }
} as QTable
} as FAIRTable

export const outcomeDetailTable: QTable = {
export const outcomeDetailTable: FAIRTable = {
columns: [
{ name: 'status', label: 'TABLE.STATUS', field: 'status', align: 'center', icon: 'fas fa-info-circle',
classes: 'bg-grey-2', headerClasses: 'bg-primary text-white col-1 outcome-table-column' },
Expand All @@ -70,4 +88,4 @@ export const outcomeDetailTable: QTable = {
{ name: 'message', label: 'TABLE.DETAILS', field: 'message', align: 'left', sortable: true }
],
pagination: { page: 1, rowsPerPage: 10 }
} as QTable
} as FAIRTable
3 changes: 3 additions & 0 deletions src/common/model/resource-generators/Observation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ export class Observation implements Generator {
if (resource.has('Observation.value[x].boolean')) {
observation.valueBoolean = String(resource.get('Observation.value[x].boolean').value).toLowerCase() === 'true'
}
if (resource.has('Observation.value[x].integer')) {
observation.valueInteger = Number(resource.get('Observation.value[x].integer').value)
}
if (resource.has('Observation.value[x].dateTime')) {
const item = resource.get('Observation.value[x].dateTime')
try {
Expand Down
Loading

0 comments on commit 5106af7

Please sign in to comment.