Skip to content

Commit

Permalink
[CREATE] Assistant Several Improvements closes #21 closes #20 closes #18
Browse files Browse the repository at this point in the history
 closes #16 closes #15 closes #14 closes #13 closes 12 closes #11 closes #8
  • Loading branch information
FMCalisto committed May 2, 2019
1 parent f2be096 commit 18505e0
Show file tree
Hide file tree
Showing 13 changed files with 7,085 additions and 6,560 deletions.
13,032 changes: 6,675 additions & 6,357 deletions package-lock.json

Large diffs are not rendered by default.

47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prototype-multi-modality-assistant",
"version": "1.2.4",
"version": "1.2.1",
"main": "src/js/index.js",
"description": "MIDA Prototype Multi-Modality Assistant",
"keywords": [
Expand Down Expand Up @@ -39,52 +39,53 @@
"start": "npm run server"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-core": "^6.26.3",
"babel-loader": "^8.0.5",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"browserify": "^16.2.3",
"fs": "^0.0.1-security",
"grunt-contrib-clean": "^0.5.0",
"grunt-contrib-concat": "^0.3.0",
"grunt-contrib-copy": "0.4.x",
"grunt-contrib-jshint": "^2.0.0",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-jshint": "^2.1.0",
"grunt-contrib-qunit": "^3.1.0",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-uglify": "^4.0.1",
"grunt-contrib-watch": "^1.1.0",
"html-webpack-plugin": "^3.0.4",
"jest": "^22.4.3",
"jshint": "^2.9.7",
"html-webpack-plugin": "^3.2.0",
"jest": "^24.7.1",
"jshint": "^2.10.2",
"jshint-loader": "^0.8.4",
"load-grunt-tasks": "^4.0.0",
"node-libs-browser": "^2.1.0",
"rimraf": "^2.6.2",
"webdash": "^1.3.4",
"node-libs-browser": "^2.2.0",
"rimraf": "^2.6.3",
"webdash": "^1.5.0",
"webdash-npm-scripts": "^1.3.0",
"webdash-package-json": "^1.3.1",
"webdash-performance-budget": "^1.3.0",
"webdash-pwa-manifest": "^1.3.0",
"webpack": "^3.11.0",
"webpack-dev-server": "^3.1.14"
"webpack": "^4.30.0",
"webpack-dev-server": "^3.3.1"
},
"dependencies": {
"catta": "^2.1.1",
"Package": "0.0.1",
"catta": "^2.2.0",
"common-js": "^0.3.8",
"connect": "^3.6.6",
"cors": "^2.8.4",
"cors": "^2.8.5",
"cors-middleware": "^3.0.0",
"corsproxy": "^1.5.0",
"ecstatic": "^3.1.1",
"ecstatic": "^4.1.2",
"esdoc": "^1.1.0",
"esdoc-standard-plugin": "^1.0.0",
"express": "^4.16.3",
"express": "^4.16.4",
"finalhandler": "^1.1.1",
"fs": "^0.0.1-security",
"grunt": "^1.0.3",
"grunt": "^1.0.4",
"http-server": "^0.11.1",
"merry": "^5.5.2",
"requirejs": "^2.3.5",
"semver": "^5.5.0",
"requirejs": "^2.3.6",
"semver": "^6.0.0",
"serve-static": "^1.13.2"
}
}
Empty file modified src/INSTALL.md
100755 → 100644
Empty file.
22 changes: 22 additions & 0 deletions src/client/assistant.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@






// Assistant Avatar Animation
function assistant_animation() {
// $(".assistant_block").fadeIn();
alert('".assistant_block"');
}

// Assistant switch
// function assistantSwitch() {
// alert("Enter")
// var checkBox = document.getElementById("switchInput");
// if(checkBox.checked == true){
// // alert("Yes");
// } else {
// alert("No");
// }
// }
100 changes: 86 additions & 14 deletions src/client/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -192,21 +192,37 @@ a.list-group-item.active:focus {
}


/* Assistant Modification */
.med_ass_pre_test {
/* Assistant Modification- By Abdus Samad- Freelancer.com/55samad */
#assistant{
position: fixed;
right: -100px;
bottom: 15%;
z-index: 999;
}
.assistant_block{
width: 270px;
background: rgba(29, 28, 28, 0.66);
border: 1px solid #5f5f5f;;
padding: 4px;
position: fixed;
}
.info_n_btn{
color: #ffffffad;
border: 2px dotted #ffffffad;
border-style: dotted solid;
border-radius: 25px 0px 60px 9px;
padding: 10px 11px 4px 4px;
width: 75%;
height: 100%;
display: inline-block;
align-items: center;
}
.logo_n_Btn {
width: 25%;
height: 100%;
float: right;
margin-bottom: -8px;
width: 329.55px;
direction: rtl;
margin: auto;
}

.assistance_img {
float: right;
margin-right: -10px;

}
.cancer_parcentage,.cancerBirads {
color: red ;
Expand All @@ -219,11 +235,67 @@ a.list-group-item.active:focus {
.nav>#assistance:hover {
opacity: 100% !important;
}
.cancer_parcentage{
color: red;
}

@media only screen and (max-width: 970px) {
.assistant_information{
.assistant_block{
display: none !important;
}
}

/* Assistant Switch @Abdus */
.switch {
position: relative;
display: inline-block;
width: 55px;
height: 28px;
}

.switch input {
opacity: 0;
width: 0;
height: 0;
}

.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #dc3a3a;
-webkit-transition: .4s;
transition: .4s;
}

.slider:before {
position: absolute;
content: "";
height: 22px;
width: 22px;
left: 4px;
bottom: 3px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
.slider.round {
border-radius: 34px;
}

.slider.round:before {
border-radius: 50%;
}
input:checked + .slider {
background-color: #2196F3;
}

input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
52 changes: 35 additions & 17 deletions src/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ var fileName = '../common/studyList';
var fileFormat = '.json';
var studyListFile = fileName + fileFormat;

$("#assistant_information").hide();
$(".assistance_img").hide();
// $("#assistant_information").hide();
// $(".assistance_img").hide();

var viewportTemplate; // the viewport template
loadTemplate(viewportPath, function(element) {
Expand Down Expand Up @@ -40,7 +40,7 @@ var v012 = "% </span> ";
var v013 = "!! <br />";
var v014 = ": <span style='color:red'>";
var v015 = "</span>";
var v016 = "Sorry i have no infomation about the patient! <br />";
var v016 = "Sorry i have no infomation about the patient! ";
var v017 = " <span />";

/* ================================================== */
Expand Down Expand Up @@ -93,15 +93,18 @@ $.getJSON(studyListFile, function(data) {
let msg3 = messageText.assisMessage[0].message_003;
let msg4 = messageText.assisMessage[0].message_004;
let msg5 = messageText.assisMessage[0].message_005;
$('.assistant_information').css({display:"block"});

// Show the accept and reject buttons & the assistant block @Abdus Samad--
$(".accept-btn, .reject-btn").show();
$('.assistant_block').css({display:"block"});
var p005 = msg1 + v011 + msg2 + v009 + msg3 + v010;
var p006 = v012 + msg4 + v013 + msg5 + v014;
let assistantText = p005 + cancerChance + p006 + biradsPhys + v015;
// display text if any data for the patient
document.getElementById("assistant_information").innerHTML = assistantText;
avator_animation();
assistant_animation_in();
})

})
.fail(function(jqXHR, textStatus) {
if (textStatus == 'parsererror') {
Expand All @@ -110,10 +113,15 @@ $.getJSON(studyListFile, function(data) {
let warn1 = messageText.assisWarning[0].warning_001;
let warn2 = messageText.assisWarning[0].warning_002;
let warn3 = messageText.assisWarning[0].warning_003;
$('.assistant_information').css({display:"block"});
$('.assistant_block').css({display:"block"});
let failAssistantText = v016 + warn1 + v017 + warn2 + warn3;
document.getElementById("assistant_information").innerHTML = failAssistantText;
avator_animation();

// Hide the Approve and Reject Btn
$(".accept-btn, .reject-btn").hide();

// Transition of assistant block---
assistant_animation_in();
})
}
})
Expand Down Expand Up @@ -154,10 +162,9 @@ $.getJSON(studyListFile, function(data) {
if($(tabDataElement).length > 0){
$(tabDataElement)[0].remove();
}
// Close Assistant
// $('.assistant_information').css({display:'none'});
$("#assistant_information").hide();
$(".assistance_img").hide();
// Close Assistant block
$('.assistant_block').css({display:'none'});
assistant_animation_out();

});

Expand All @@ -177,7 +184,6 @@ $('#tabs a').click (function(e) {
e.preventDefault();
$(this).tab('show');
});

// Resize main
function resizeMain() {
var height = $(window).height();
Expand All @@ -197,7 +203,19 @@ document.body.addEventListener('touchmove', function(e) {
});

// Assistant Avatar Animation
function avator_animation () {
$("#assistant_information").fadeIn();
$(".assistance_img").fadeIn()
}
function assistant_animation_in() {
$(".assistant_block").delay(800).animate({
right: '20px',
opacity: '1'

});
}
// Assistant Avatar Animation
function assistant_animation_out() {
$(".assistant_block").delay(1).animate({
opacity: '0',
right: '-150px'
});
}
// Assistant switch -------

9 changes: 9 additions & 0 deletions src/common/dataset/14037AA3-EA86-4E80-A0FF-14A2AA70B648.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"patient" : [
{
"biradsAssis" : 2.1 ,
"biradsPhys" : 2.2,
"cancerChance" : 2.3
}
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"patient" : [
{
"biradsAssis" : 1.1 ,
"biradsAssis" : 1.1,
"biradsPhys" : 1.2,
"cancerChance" : 1.3
}
Expand Down
6 changes: 3 additions & 3 deletions src/common/dataset/9AF6DD70-51D7-457E-AF53-30CCDC5D7126.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"patient" : [
{
"biradsAssis" : 2.1 ,
"biradsPhys" : 2.2,
"cancerChance" : 2.3
"biradsAssis" : "2",
"biradsPhys" : "2",
"cancerChance" : "0.9967"
}
]
}
9 changes: 9 additions & 0 deletions src/common/dataset/F73F6796-6640-4484-9D83-5B3E3A7C4AE4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"patient" : [
{
"biradsAssis" : 1.1 ,
"biradsPhys" : 1.2,
"cancerChance" : 1.3
}
]
}
2 changes: 1 addition & 1 deletion src/common/messages/assistant_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"assisWarning" : [
{
"warning_001": "Do you need help?",
"warning_002": "Please contact the admin of the system.",
"warning_002": "Please contact to the admin of the system.",
"warning_003": "Thanks!"
}
]
Expand Down
Loading

0 comments on commit 18505e0

Please sign in to comment.