Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
INB
eTRANSAFE
pretox-app
Commits
9f6b3a76
Commit
9f6b3a76
authored
Nov 09, 2021
by
Javi Corvi
Browse files
new draft version
parent
a6052ec7
Pipeline
#25736
passed with stage
in 1 minute and 7 seconds
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/app-routing.module.ts
View file @
9f6b3a76
...
...
@@ -20,7 +20,7 @@ const routes: Routes = [
{
path
:
'
find/:id
'
,
component
:
DocumentDetailComponent
,
children
:
[
{
path
:
''
,
redirectTo
:
'
third
'
,
pathMatch
:
'
full
'
},
{
path
:
''
,
redirectTo
:
'
first
'
,
pathMatch
:
'
full
'
},
{
path
:
'
first
'
,
component
:
PretoxsentencesTabulatorComponent
},
{
path
:
'
second
'
,
component
:
FindingTabulatorComponent
},
{
path
:
'
third
'
,
component
:
SrdomaintemplateTabulatorComponent
},
...
...
src/app/app.module.ts
View file @
9f6b3a76
...
...
@@ -24,6 +24,10 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import
{
SrdomainLevelComponent
}
from
'
./srdomain-level/srdomain-level.component
'
;
import
{
LogoutComponent
}
from
'
./logout/logout.component
'
;
import
{
HistoryTrackingComponent
}
from
'
./history-tracking/history-tracking.component
'
;
import
{
MatProgressSpinnerModule
,
MatProgressBarModule
}
from
'
@angular/material
'
@
NgModule
({
declarations
:
[
AppComponent
,
...
...
@@ -50,7 +54,10 @@ import { HistoryTrackingComponent } from './history-tracking/history-tracking.co
HttpModule
,
MatTabsModule
,
BrowserAnimationsModule
,
MatToolbarModule
MatToolbarModule
,
MatProgressSpinnerModule
,
MatProgressBarModule
],
providers
:
[
LoginService
,
CookieService
,
{
provide
:
HTTP_INTERCEPTORS
,
...
...
src/app/document-detail/document-detail.component.css
View file @
9f6b3a76
.loader
{
position
:
absolute
;
top
:
0px
;
right
:
0px
;
width
:
100%
;
height
:
100%
;
background-color
:
#eceaea
;
background-image
:
url('loader.gif')
;
background-size
:
100px
;
background-repeat
:
no-repeat
;
background-position
:
center
;
z-index
:
10000000
;
opacity
:
0.4
;
filter
:
alpha
(
opacity
=
40
);
}
.FixedHeightContainer
{
}
.brat_div
{
overflow
:
auto
;
}
\ No newline at end of file
src/app/document-detail/document-detail.component.html
View file @
9f6b3a76
...
...
@@ -56,11 +56,10 @@
</div>
</div>
<div
id=
"data2"
class=
"w3-container"
>
<div
id=
"data1"
data-ng-init=
"clear()"
>
</div>
</div>
<div
id=
"commentpopup"
></div>
<!-- <mat-spinner></mat-spinner>
<div id="loadingDiv8" class="loader"></div> -->
<!-- <nav class="navbar navbar-light bg-light">
...
...
@@ -89,14 +88,17 @@
<a
href=
"#data2"
style=
"text-decoration:none;cursor: pointer;"
data-toggle=
"collapse"
>
<i
class=
"fa fa-angle-down"
style=
"color:black;padding: 10px 30px; font-size: 3rem;"
title=
"Minimize Evidence"
></i>
</a>
<a
(click)=
"clear()"
style=
"text-decoration:none;cursor: pointer;"
>
<!--
<a (click)="clear()" style="text-decoration:none;cursor: pointer;">
<i class="fa fa-eraser" style="color:black;padding: 10px 30px; font-size: 2rem;" title="Clear Evidence"></i>
</a>
</a>
-->
<!-- <a title="Export Findings" (click)="exportDocument" download="download.json">
<i class="fa fa-file-export" style="color:black;padding: 10px 30px; font-size: 2rem;"></i>
</a> -->
<a
(click)=
"getAllEvidence()"
style=
"text-decoration:none;cursor: pointer;"
>
<!--
<a (click)="getAllEvidence()" style="text-decoration:none;cursor: pointer;">
<i class="fa fa-eye" style="color:black;padding: 10px 30px; font-size: 2rem;" title="Show All Evidence"> </i>
</a> -->
<a
(click)=
"findDocumentText()"
style=
"text-decoration:none;cursor: pointer;"
>
<i
class=
"fa fa-eye"
style=
"color:black;padding: 10px 30px; font-size: 2rem;"
title=
"Show Plain Text"
>
</i>
</a>
<a
(click)=
"exportDocument()"
style=
"text-decoration:none;cursor: pointer;"
>
<i
class=
"fa fa-download"
style=
"color:black;padding: 10px 30px; font-size: 2rem;"
title=
"Export Findings"
>
</i>
...
...
@@ -104,7 +106,12 @@
<a
routerLink=
"./tracking"
style=
"text-decoration:none;cursor: pointer;"
>
<i
class=
"fa fa-history"
style=
"color:black;padding: 10px 30px; font-size: 2rem;"
title=
"History changes"
>
</i>
</a>
<div
id=
"data2"
>
<div
id=
"loadingDiv"
></div>
<div
id=
"data1"
data-ng-init=
"clear()"
>
</div>
</div>
<div
id=
"commentpopup"
></div>
<!-- <a mat-tab-link md-align-tabs="right" style="padding-left: 650px;"
routerLink="./tracking"
routerLinkActive #rla="routerLinkActive"
...
...
@@ -174,6 +181,9 @@
<app-srdomaintemplate-tabulator [tableData]=tableDataSRDomainTemplate (rowClickEventSRDomainTemplateEvidence)="rowClickSRDomainTemplateEvidence($event)" (rowClickExportSRDomainEvent)="setExportSRDomain($event)"></app-srdomaintemplate-tabulator>
</div> -->
</div>
<!-- <div>
<app-pretoxsentences-tabulator [columnNames]=columnNamesPretoxSentences [tableData]=tableDataPretoxSentences (rowClickEventFinding)="rowClick($event)" (rowClickEvent)="rowClickSentence($event)" (rowClickAcceptFindingEvent)="acceptFinding($event)" (rowClickRejectFindingEvent)="rejectFinding($event)" (rowClickExportFindingEvent)="setExportFinding($event)">></app-pretoxsentences-tabulator>
</div> -->
...
...
src/app/document-detail/document-detail.component.ts
View file @
9f6b3a76
...
...
@@ -8,12 +8,14 @@ import { Finding } from '../finding';
import
{
Annotation
}
from
'
../annotation
'
;
import
{
environment
}
from
'
./../../environments/environment
'
;
import
{
MatToolbarModule
}
from
'
@angular/material/toolbar
'
;
import
{
Router
}
from
'
@angular/router
'
;
//brat
declare
var
head
:
any
;
declare
var
Util
:
any
;
declare
var
Visualizer
:
any
;
var
displaySpanComment
=
function
(
evt
,
target
,
spanId
,
spanType
,
mods
,
spanText
,
commentText
,
commentType
,
normalizations
)
{
var
left
=
evt
.
clientX
+
"
px
"
;
...
...
@@ -159,36 +161,68 @@ export class DocumentDetailComponent implements OnInit {
this
.
navLinks
=
[
{
label
:
'
Sentence
Level
'
,
label
:
'
Relevant
Sentence
s
'
,
link
:
'
./first
'
,
index
:
0
},
{
}
/*
, {
label: 'Findings Level',
link: './second',
index: 1
},
{
label
:
'
SR-Domain Level
'
,
}
*/
,
{
label
:
'
Findings
'
,
link
:
'
./third
'
,
index
:
2
index
:
1
}
];
this
.
nextStatus
=
[
'
DRAFT
'
,
'
IN_PROGRESS
'
,
'
FINISHED
'
];
;
}
loadBratVisualizer
():
void
{
const
bratLocation
=
environment
.
bratUrl
;
//const bratLocation = 'http://10.32.6.2:8001';
head
.
js
(
// External libraries
bratLocation
+
'
/client/lib/jquery.min.js
'
,
bratLocation
+
'
/client/lib/jquery.svg.min.js
'
,
bratLocation
+
'
/client/lib/jquery.svgdom.min.js
'
,
// brat helper modules
bratLocation
+
'
/client/src/configuration.js
'
,
bratLocation
+
'
/client/src/util.js
'
,
bratLocation
+
'
/client/src/annotation_log.js
'
,
bratLocation
+
'
/client/lib/webfont.js
'
,
// brat modules
bratLocation
+
'
/client/src/dispatcher.js
'
,
bratLocation
+
'
/client/src/url_monitor.js
'
,
bratLocation
+
'
/client/src/visualizer.js
'
);
}
// ngOnInit() {
// this.getDocument();
// }
loaded
():
void
{
alert
(
'
loaded
'
);
var
loading
=
document
.
getElementById
(
'
loadingDiv
'
);
loading
.
style
.
display
=
'
none
'
;
}
ngOnInit
():
void
{
this
.
router
.
events
.
subscribe
((
res
)
=>
{
this
.
activeLinkIndex
=
this
.
navLinks
.
indexOf
(
this
.
navLinks
.
find
(
tab
=>
tab
.
link
===
'
.
'
+
this
.
router
.
url
));
});
this
.
getDocument
();
this
.
getAllEvidence
();
}
save
():
void
{
this
.
documentService
.
updateDocument
(
this
.
document
)
.
subscribe
(()
=>
this
.
goBack
());
...
...
@@ -201,26 +235,26 @@ export class DocumentDetailComponent implements OnInit {
.
subscribe
(
document
=>
{
this
.
document
=
document
;
this
.
setNextStatus
(
this
.
document
.
status
);
var
data
=
[];
//
var data = [];
var
data_relevant_sentences
=
[];
document
.
findings
.
forEach
(
find
=>
{
data
.
push
({
id
:
find
.
findingId
,
finding
:
find
.
finding
!=
null
?
find
.
finding
.
value
:
''
,
study_testcd
:
find
.
study_testcd
!=
null
?
find
.
study_testcd
.
value
:
''
,
manifestation_finding
:
find
.
manifestation_finding
!=
null
?
find
.
manifestation_finding
.
value
:
''
,
study_domain
:
find
.
study_domain
!=
null
?
find
.
study_domain
.
value
:
''
,
specimen
:
find
.
specimen
!=
null
?
find
.
specimen
.
value
:
''
,
sex
:
find
.
sex
!=
null
?
find
.
sex
.
value
:
''
,
dose
:
find
.
dose
!=
null
?
find
.
dose
.
value
:
''
,
group
:
find
.
group
!=
null
?
find
.
group
.
value
:
''
,
is_trf
:
find
.
is_treatment_related
!=
null
?
find
.
is_treatment_related
.
value
:
''
});
});
//
document.findings.forEach(find => {
//
data.push({
//
id : find.findingId,
//
finding: find.finding != null ? find.finding.value : '',
//
study_testcd: find.study_testcd != null ? find.study_testcd.value : '',
//
manifestation_finding: find.manifestation_finding != null ? find.manifestation_finding.value : '',
//
study_domain: find.study_domain != null ? find.study_domain.value : '',
//
specimen: find.specimen != null ? find.specimen.value : '',
//
sex: find.sex != null ? find.sex.value : '',
//
dose: find.dose != null ? find.dose.value : '',
//
group: find.group != null ? find.group.value : '',
//
is_trf: find.is_treatment_related != null ? find.is_treatment_related.value : ''
//
});
//
});
//alert(data);
//alert(JSON.stringify(data));
this
.
tableData
=
data
;
//
this.tableData = data;
//this.clear();
//alert(JSON.stringify(document.findings));
//var j = JSON.parse('{ text:' + document.text + '}');
...
...
@@ -338,39 +372,136 @@ export class DocumentDetailComponent implements OnInit {
findingSelected
(
finding
):
void
{
this
.
documentService
.
findingSelected
(
this
.
document
.
documentId
,
finding
)
.
subscribe
(
text
=>
{
this
.
docData
=
text
;
console
.
log
(
this
.
docData
);
var
loading
=
document
.
getElementById
(
'
loadingDiv
'
);
//loading.style.display='block';
loading
.
addEventListener
(
"
load
"
,
this
.
loaded
);
this
.
docData
=
text
;
//console.log(this.docData);
// console.log(JSON.parse(this.docData));
document
.
getElementById
(
'
data2
'
).
className
=
'
collapse show
'
;
document
.
getElementById
(
'
data1
'
).
innerHTML
=
''
;
document
.
getElementById
(
'
data1
'
).
className
=
''
;
document
.
getElementById
(
'
loadingDiv
'
).
className
=
'
loader
'
;
var
j
=
JSON
.
parse
(
this
.
docData
);
this
.
loadBratVisualizer
();
head
.
ready
(
function
()
{
const
dispatcher
=
Util
.
embed
(
'
data1
'
,
DocumentDetailComponent
.
collData
,
j
,
DocumentDetailComponent
.
webFontURLs
);
dispatcher
.
on
(
'
displaySpanComment
'
,
displaySpanComment
);
dispatcher
.
on
(
'
hideComment
'
,
hideComment
);
setTimeout
(()
=>
{
document
.
getElementById
(
'
loadingDiv
'
).
className
=
''
;
},
4000
);
});
});
}
pretoxSentenceSelected
(
pretoxSentence
):
void
{
this
.
documentService
.
pretoxSentenceSelected
(
this
.
document
.
documentId
,
pretoxSentence
)
.
subscribe
(
text
=>
{
this
.
docData
=
text
;
console
.
log
(
this
.
docData
);
//
console.log(this.docData);
// console.log(JSON.parse(this.docData));
document
.
getElementById
(
'
data2
'
).
className
=
'
collapse show
'
;
document
.
getElementById
(
'
data1
'
).
innerHTML
=
''
;
document
.
getElementById
(
'
data1
'
).
className
=
''
;
document
.
getElementById
(
'
loadingDiv
'
).
className
=
'
loader
'
;
var
j
=
JSON
.
parse
(
this
.
docData
);
this
.
loadBratVisualizer
();
head
.
ready
(
function
()
{
const
dispatcher
=
Util
.
embed
(
'
data1
'
,
DocumentDetailComponent
.
collData
,
j
,
DocumentDetailComponent
.
webFontURLs
);
//dispatcher.post('resetData');
//dispatcher.post('collectionChanged');
//dispatcher.post('triggerRender');
dispatcher
.
on
(
'
displaySpanComment
'
,
displaySpanComment
);
dispatcher
.
on
(
'
hideComment
'
,
hideComment
);
setTimeout
(()
=>
{
document
.
getElementById
(
'
loadingDiv
'
).
className
=
''
;
},
4000
);
});
});
}
findDocumentText
():
void
{
this
.
documentService
.
findDocumentText
(
this
.
document
.
documentId
)
.
subscribe
(
text
=>
{
this
.
docData
=
text
;
//console.log(this.docData);
document
.
getElementById
(
'
data2
'
).
className
=
'
collapse show
'
;
document
.
getElementById
(
'
data1
'
).
innerHTML
=
''
;
document
.
getElementById
(
'
data1
'
).
className
=
''
;
document
.
getElementById
(
'
loadingDiv
'
).
className
=
'
loader
'
;
var
j
=
JSON
.
parse
(
this
.
docData
);
this
.
loadBratVisualizer
();
head
.
ready
(
function
()
{
const
dispatcher
=
Util
.
embed
(
'
data1
'
,
DocumentDetailComponent
.
collData
,
j
,
DocumentDetailComponent
.
webFontURLs
);
dispatcher
.
on
(
'
displaySpanComment
'
,
displaySpanComment
);
dispatcher
.
on
(
'
hideComment
'
,
hideComment
);
setTimeout
(()
=>
{
document
.
getElementById
(
'
loadingDiv
'
).
className
=
''
;
},
4000
);
});
});
}
getAllEvidence
()
{
const
id
=
+
this
.
route
.
snapshot
.
paramMap
.
get
(
'
id
'
);
//this.documentService.getAllEvidence(this.document.documentId)
this
.
documentService
.
getAllEvidence
(
id
)
.
subscribe
(
text
=>
{
this
.
docData
=
text
;
//console.log(this.docData);
// console.log(JSON.parse(this.docData));
document
.
getElementById
(
'
data2
'
).
className
=
'
collapse show
'
;
document
.
getElementById
(
'
data1
'
).
innerHTML
=
''
;
document
.
getElementById
(
'
data1
'
).
className
=
''
;
document
.
getElementById
(
'
loadingDiv
'
).
className
=
'
loader
'
;
var
j
=
JSON
.
parse
(
this
.
docData
);
this
.
loadBratVisualizer
();
head
.
ready
(
function
()
{
const
dispatcher
=
Util
.
embed
(
'
data1
'
,
DocumentDetailComponent
.
collData
,
j
,
DocumentDetailComponent
.
webFontURLs
);
dispatcher
.
on
(
'
displaySpanComment
'
,
displaySpanComment
);
dispatcher
.
on
(
'
hideComment
'
,
hideComment
);
setTimeout
(()
=>
{
document
.
getElementById
(
'
loadingDiv
'
).
className
=
''
;
},
4000
);
});
});
}
getSentencesEvidence
()
{
const
id
=
+
this
.
route
.
snapshot
.
paramMap
.
get
(
'
id
'
);
//this.documentService.getAllEvidence(this.document.documentId)
this
.
documentService
.
getSentencesEvidence
(
id
)
.
subscribe
(
text
=>
{
this
.
docData
=
text
;
//console.log(this.docData);
// console.log(JSON.parse(this.docData));
document
.
getElementById
(
'
data2
'
).
className
=
'
collapse show
'
;
document
.
getElementById
(
'
data1
'
).
innerHTML
=
''
;
document
.
getElementById
(
'
data1
'
).
className
=
''
;
document
.
getElementById
(
'
loadingDiv
'
).
className
=
'
loader
'
;
var
j
=
JSON
.
parse
(
this
.
docData
);
this
.
loadBratVisualizer
();
head
.
ready
(
function
()
{
const
dispatcher
=
Util
.
embed
(
'
data1
'
,
DocumentDetailComponent
.
collData
,
j
,
DocumentDetailComponent
.
webFontURLs
);
dispatcher
.
on
(
'
displaySpanComment
'
,
displaySpanComment
);
dispatcher
.
on
(
'
hideComment
'
,
hideComment
);
document
.
getElementById
(
'
data2
'
).
className
=
'
FixedHeightContainer
'
;
document
.
getElementById
(
'
data1
'
).
className
=
'
brat_div
'
;
setTimeout
(()
=>
{
document
.
getElementById
(
'
loadingDiv
'
).
className
=
''
;
},
4000
);
});
});
}
setExportSRDomain
(
data
)
{
const
id
=
+
this
.
route
.
snapshot
.
paramMap
.
get
(
'
id
'
);
//alert(data);
...
...
@@ -426,28 +557,18 @@ export class DocumentDetailComponent implements OnInit {
}
getAllEvidence
()
{
const
id
=
+
this
.
route
.
snapshot
.
paramMap
.
get
(
'
id
'
);
this
.
documentService
.
getAllEvidence
(
this
.
document
.
documentId
)
.
subscribe
(
text
=>
{
this
.
docData
=
text
;
console
.
log
(
this
.
docData
);
// console.log(JSON.parse(this.docData));
document
.
getElementById
(
'
data2
'
).
className
=
'
collapse show
'
;
document
.
getElementById
(
'
data1
'
).
innerHTML
=
''
;
document
.
getElementById
(
'
data1
'
).
className
=
''
;
var
j
=
JSON
.
parse
(
this
.
docData
);
head
.
ready
(
function
()
{
const
dispatcher
=
Util
.
embed
(
'
data1
'
,
DocumentDetailComponent
.
collData
,
j
,
DocumentDetailComponent
.
webFontURLs
);
dispatcher
.
on
(
'
displaySpanComment
'
,
displaySpanComment
);
dispatcher
.
on
(
'
hideComment
'
,
hideComment
);
});
});
}
onActivate
(
componentReference
)
{
console
.
log
(
componentReference
)
componentReference
.
activation
(
this
.
document
);
if
(
componentReference
.
constructor
.
name
==
'
PretoxsentencesTabulatorComponent
'
){
this
.
getSentencesEvidence
();
}
else
if
(
componentReference
.
constructor
.
name
==
'
SrdomaintemplateTabulatorComponent
'
){
this
.
getAllEvidence
();
}
else
if
(
componentReference
.
constructor
.
name
==
'
FindingTabulatorComponent
'
){
this
.
getAllEvidence
();
}
//Below will subscribe to the searchItem emitter
if
(
componentReference
.
rowClickEventFinding
!=
undefined
){
componentReference
.
rowClickEventFinding
.
subscribe
((
data
)
=>
{
...
...
src/app/document-detail/loader.gif
0 → 100644
View file @
9f6b3a76
8.03 KB
src/app/document.service.ts
View file @
9f6b3a76
...
...
@@ -117,6 +117,17 @@ export class DocumentService {
catchError
(
this
.
handleError
<
string
>
(
`getFinding id=
${
finding
.
findingId
}
`
))
);
}
/** GET Snipped of the full text with no annotations */
findDocumentText
(
id
:
number
):
Observable
<
string
>
{
const
url
=
`
${
this
.
documentsUrl
}${
id
}
/text/`
;
return
this
.
http
.
get
(
url
,
{
responseType
:
'
text
'
}).
pipe
(
tap
(
_
=>
this
.
log
(
`fetched text id=
${
id
}
`
)),
catchError
(
this
.
handleError
<
string
>
(
`getText id=
${
id
}
`
))
);
}
/** GET Snipped of findings selected just in case is needed, is not complete only the calls againt rest api is done*/
findingsSelected
(
id
:
number
,
finding
:
Finding
):
Observable
<
string
>
{
...
...
@@ -137,6 +148,14 @@ export class DocumentService {
);
}
/** GET Snipped of sentences evidence */
getSentencesEvidence
(
id
:
number
):
Observable
<
string
>
{
const
url
=
`
${
this
.
documentsUrl
}${
id
}
/evidence/sentences`
;
return
this
.
http
.
get
(
url
,
{
responseType
:
'
text
'
}).
pipe
(
tap
(
_
=>
this
.
log
(
`fetched all sentences evidence id=
${
id
}
`
)),
catchError
(
this
.
handleError
<
string
>
(
`getSentencesEvidence id=
${
id
}
`
))
);
}
pretoxSentenceSelected
(
id
:
number
,
pretoxSentence
:
Annotation
):
Observable
<
string
>
{
const
url
=
`
${
this
.
documentsUrl
}${
id
}
/sentence/
${
pretoxSentence
.
id
}
`
;
...
...
src/app/finding-tabulator/finding-tabulator.component.ts
View file @
9f6b3a76
...
...
@@ -49,26 +49,26 @@ export class FindingTabulatorComponent implements OnChanges {
this
.
documentService
.
getDocument
(
id
)
.
subscribe
(
document
=>
{
this
.
document
=
document
;
var
data
=
[];
//
var data = [];
var
data_relevant_sentences
=
[];
document
.
findings
.
forEach
(
find
=>
{
data
.
push
({
id
:
find
.
findingId
,
finding
:
find
.
finding
!=
null
?
find
.
finding
.
value
:
''
,
study_testcd
:
find
.
study_testcd
!=
null
?
find
.
study_testcd
.
value
:
''
,
manifestation_finding
:
find
.
manifestation_finding
!=
null
?
find
.
manifestation_finding
.
value
:
''
,
study_domain
:
find
.
study_domain
!=
null
?
find
.
study_domain
.
value
:
''
,
specimen
:
find
.
specimen
!=
null
?
find
.
specimen
.
value
:
''
,
sex
:
find
.
sex
!=
null
?
find
.
sex
.
value
:
''
,
dose
:
find
.
dose
!=
null
?
find
.
dose
.
value
:
''
,
group
:
find
.
group
!=
null
?
find
.
group
.
value
:
''
,
is_trf
:
find
.
is_treatment_related
!=
null
?
find
.
is_treatment_related
.
value
:
''
});
});
//
document.findings.forEach(find => {
//
data.push({
//
id : find.findingId,
//
finding: find.finding != null ? find.finding.value : '',
//
study_testcd: find.study_testcd != null ? find.study_testcd.value : '',
//
manifestation_finding: find.manifestation_finding != null ? find.manifestation_finding.value : '',
//
study_domain: find.study_domain != null ? find.study_domain.value : '',
//
specimen: find.specimen != null ? find.specimen.value : '',
//
sex: find.sex != null ? find.sex.value : '',
//
dose: find.dose != null ? find.dose.value : '',
//
group: find.group != null ? find.group.value : '',
//
is_trf: find.is_treatment_related != null ? find.is_treatment_related.value : ''
//
});
//
});
//alert(data);
//alert(JSON.stringify(data));
this
.
tableData
=
data
;
//
this.tableData = data;
//this.clear();
//alert(JSON.stringify(document.findings));
//var j = JSON.parse('{ text:' + document.text + '}');
...
...
@@ -219,11 +219,11 @@ export class FindingTabulatorComponent implements OnChanges {
//responsiveLayout: 'collapse',
//responsiveLayoutCollapseStartOpen: false,
//resizableColumns: true,
//
pagination: 'local',
pagination
:
'
local
'
,
//movableColumns: true,
//
selectable: 1,
//
paginationSize: 10,
//
paginationSizeSelector: [5, 10, 20, 40],
selectable
:
1
,
paginationSize
:
10
,
paginationSizeSelector
:
[
5
,
10
,
20
,
40
],
data
:
row
.
getData
().
srDomainFindings
,
rowClick
:
function
(
e
:
any
,
row
:
any
)
{
//pretoxSentencesTab.rowClickEventFinding.emit(row.getData());
...
...
src/app/pretoxsentences-tabulator/pretoxsentences-tabulator.component.ts
View file @
9f6b3a76
...
...
@@ -52,26 +52,26 @@ export class PretoxsentencesTabulatorComponent implements OnInit {
this
.
documentService
.
getDocument
(
id
)
.
subscribe
(
document
=>
{
this
.
document
=
document
;
var
data
=
[];
//
var data = [];
var
data_relevant_sentences
=
[];
document
.
findings
.
forEach
(
find
=>
{
data
.
push
({
id
:
find
.
findingId
,
finding
:
find
.
finding
!=
null
?
find
.
finding
.
value
:
''
,
study_testcd
:
find
.
study_testcd
!=
null
?
find
.
study_testcd
.
value
:
''
,
manifestation_finding
:
find
.
manifestation_finding
!=
null
?
find
.
manifestation_finding
.
value
:
''
,
study_domain
:
find
.
study_domain
!=
null
?
find
.
study_domain
.
value
:
''
,
specimen
:
find
.
specimen
!=
null
?
find
.
specimen
.
value
:
''
,
sex
:
find
.
sex
!=
null
?
find
.
sex
.
value
:
''
,
dose
:
find
.
dose
!=
null
?
find
.
dose
.
value
:
''
,
group
:
find
.
group
!=
null
?
find
.
group
.
value
:
''
,
is_trf
:
find
.
is_treatment_related
!=
null
?
find
.
is_treatment_related
.
value
:
''
});
});
//
document.findings.forEach(find => {
//
data.push({
//
id : find.findingId,
//
finding: find.finding != null ? find.finding.value : '',
//
study_testcd: find.study_testcd != null ? find.study_testcd.value : '',
//
manifestation_finding: find.manifestation_finding != null ? find.manifestation_finding.value : '',
//
study_domain: find.study_domain != null ? find.study_domain.value : '',
//
specimen: find.specimen != null ? find.specimen.value : '',
//
sex: find.sex != null ? find.sex.value : '',
//
dose: find.dose != null ? find.dose.value : '',
//
group: find.group != null ? find.group.value : '',
//
is_trf: find.is_treatment_related != null ? find.is_treatment_related.value : ''
//
});
//
});
//alert(data);
//alert(JSON.stringify(data));
this
.
tableData
=
data
;
//
this.tableData = data;
//this.clear();
//alert(JSON.stringify(document.findings));
//var j = JSON.parse('{ text:' + document.text + '}');
...
...
src/app/srdomainfinding.ts
View file @
9f6b3a76
...
...
@@ -16,11 +16,16 @@ export class SRDomainFinding {
srenphse
:
String
;
srobendy
:
String
;
srdomain
:
String
;
srdomain_value
:
String
;
srspec
:
String
;
srspec_value
:
String
;
srtstcd
:
String
;
srtstcd_value
:
String
;
srfndg
:
String
;
srfndg_value
:
String
;
srores
:
String
;
srobsv
:
String
;
srobsv_value
:
String
;