diff --git a/src/adonisjs/public/author/index.html b/src/adonisjs/public/author/index.html
index 241f4169..de375219 100644
--- a/src/adonisjs/public/author/index.html
+++ b/src/adonisjs/public/author/index.html
@@ -449,9 +449,13 @@
Created by {{author_grade}}: {{username}} ({{institut
diff --git a/src/adonisjs/public/author/js/artifacts.js b/src/adonisjs/public/author/js/artifacts.js
index e04bfc4d..c510a334 100644
--- a/src/adonisjs/public/author/js/artifacts.js
+++ b/src/adonisjs/public/author/js/artifacts.js
@@ -20,8 +20,10 @@ class Artifacts {
}
async _uploadArtifacts () {
+ this._artifactClass = {}
let files = document.querySelector('#artifacts-select').files
let progSpace = document.querySelector('#progress-artifacts')
+ const classify = document.querySelector('#auto-classify').checked
let a = 0
for (let f of files) {
let art = document.createElement('div')
@@ -39,11 +41,15 @@ class Artifacts {
{
file: f,
caseid: Basic.service.currentCaseId,
+ classify: (classify) ? 'true' : 'false',
progress: prMsg
}, null, true)
- ref.innerHTML = '' +
- f.name + ''
+ const html = `${f.name}`
+ ref.innerHTML = html
+
this._insertArtifactReference(artifact.message.filename, f.name)
+ if (artifact.message.classification != null)
+ this._artifactClass[artifact.message.filename] = artifact.message.classification
}
progSpace.innerHTML = ''
this.showArtifacts()
@@ -103,7 +109,8 @@ class Artifacts {
document.querySelector('#artifact-controls').style.display = 'none'
ArtifactKnotGenerator.activate(
compiled.artifacts, compiled.generators['artifact-knot'],
- document.querySelector('#case-artifacts'))
+ document.querySelector('#case-artifacts'),
+ this._artifactClass)
}
}
diff --git a/src/adonisjs/public/author/js/dcc-author-server-proxy.js b/src/adonisjs/public/author/js/dcc-author-server-proxy.js
index 02e6f2c8..1cf53339 100644
--- a/src/adonisjs/public/author/js/dcc-author-server-proxy.js
+++ b/src/adonisjs/public/author/js/dcc-author-server-proxy.js
@@ -369,6 +369,7 @@ class DCCAuthorServer {
data.append('image', this.b64toBlob(message.b64))
}
data.append('caseId', message.caseid)
+ data.append('classify', message.classify)
const config = {
method: 'POST',
url: DCCCommonServer.managerAddressAPI + 'artifact',
diff --git a/src/adonisjs/public/author/js/generator/artifact-knot.js b/src/adonisjs/public/author/js/generator/artifact-knot.js
index 9ec5390b..3e7600c3 100644
--- a/src/adonisjs/public/author/js/generator/artifact-knot.js
+++ b/src/adonisjs/public/author/js/generator/artifact-knot.js
@@ -3,14 +3,14 @@
*/
class ArtifactKnotGenerator {
- static activate (artifacts, candidates, html) {
+ static activate (artifacts, candidates, html, classification) {
if (ArtifactKnotGenerator.i == null)
ArtifactKnotGenerator.i = new ArtifactKnotGenerator()
- ArtifactKnotGenerator.i.buildGenerator(artifacts, candidates, html)
+ ArtifactKnotGenerator.i.buildGenerator(artifacts, candidates, html, classification)
}
- buildGenerator (artifacts, candidates, html) {
+ buildGenerator (artifacts, candidates, html, classification) {
MessageBus.i.publish('control/elements/wide')
this._prepareSubgroup = this._prepareSubgroup.bind(this)
@@ -42,7 +42,10 @@ class ArtifactKnotGenerator {
''
for (let c in candidates)
artHTML += ''
- artHTML += ''
+ artHTML += ''
+ if (classification[a] != null)
+ artHTML += `suggestion: ${classification[a]} - ${ArtifactKnotGenerator._classDescription[classification[a]]}
`
+ artHTML += ''
artHTML += ' | '
}
@@ -139,3 +142,14 @@ class ArtifactKnotGenerator {
MessageBus.i.publish('generator/finished/artifact-knot')
}
}
+
+ArtifactKnotGenerator._classDescription = {
+ 'SX': 'Sub-xifóide ou Subcostal',
+ 'PL': 'Para-esternal Longa',
+ 'A4': 'Apical de 4 câmaras',
+ 'PM': 'Paraesternal curta nível mitral',
+ 'PV': 'Paraesternal curta nível V. aortica',
+ 'PP': 'Paraesternal curta nível papilares',
+ 'VI': 'Other',
+ 'UN': 'Unidentified'
+}