Skip to content

Commit

Permalink
Merge pull request #4 from yudin-s/PTcollab
Browse files Browse the repository at this point in the history
Make GitIgnore file working correct 
+ some vitalsigns fixes
  • Loading branch information
tony-shannon authored Jun 29, 2020
2 parents 60c34e8 + a918fbb commit a3b4dcb
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 92 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
start
stop
start_debug
start_p
yottadb/*
package-lock.json
.idea
node_modules
configuration
13 changes: 0 additions & 13 deletions start

This file was deleted.

15 changes: 0 additions & 15 deletions start_debug

This file was deleted.

13 changes: 0 additions & 13 deletions start_p

This file was deleted.

14 changes: 0 additions & 14 deletions stop

This file was deleted.

88 changes: 51 additions & 37 deletions www/pt-wc-q/js/extended/vitals.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,57 +45,71 @@ export function vitals_extended_crud(QEWD) {
QEWD.reply({
type: state.summary.qewd.getSummary,
params: {
properties: state.summary.data_properties
properties: ['heartrate', 'resprate', 'systolic_bp', 'score']
}
})
.then((responseObj) => {
console.log(responseObj);

let data = responseObj.message.summary;
let result = data.map(el => {
return {
x: parseInt(el.systolic_bp),
y: el.id,
}
let heartrate = [], resprate = [], systolic_rate = [];


let result = data.forEach(el => {
heartrate.push({
x: el.id,
y: el.heartrate,
})
resprate.push({
x: el.id,
y: el.resprate,
})
systolic_rate.push({
x: el.id,
y: el.systolic_bp,
})
});

console.log(heartrate);
console.log(resprate);
console.log(systolic_rate);
let config = {
type: 'line',
type: 'scatter',
data: {
datasets: [{
data: result,
backgroundColor: ['#4e73df', '#1cc88a', '#36b9cc'],
hoverBackgroundColor: ['#2e59d9', '#17a673', '#2c9faf'],
hoverBorderColor: "rgba(234, 236, 244, 1)",
label: 'Heart Rate',
backgroundColor: 'rgba(226,57,57,0.5)',
borderColor: '#e23939',
fill: false,
showLine: true,

data: heartrate,
}, {
label: 'Resp Rate',
backgroundColor: 'rgba(57,171,226,0.5)',
borderColor: '#39abe2',
fill: false,
showLine: true,

data: resprate,
}, {
label: 'Systolic Rate',
backgroundColor: 'rgba(226,57,220,0.5)',
borderColor: '#e239dc',
fill: false,
showLine: true,

data: systolic_rate,
}],
},
options: {
maintainAspectRatio: false,
tooltips: {
backgroundColor: "rgb(255,255,255)",
bodyFontColor: "#858796",
borderColor: '#dddfeb',
borderWidth: 1,
xPadding: 15,
yPadding: 15,
displayColors: false,
caretPadding: 10,
callbacks: {
label: function (tooltipItem, data) {
var label = "Score: " + data.score + "\r\n";
label += "Systolic BP: " + data.y + "\r\n";
return label;
}
}
},
legend: {
display: false
options: {
responsive: true,
maintainAspectRatio: false

},
cutoutPercentage: 80,
},
}
};

this.canvas.height = '500px';
this.draw(config);

});

let card = this.getComponentByName('adminui-row', 'adminui-row-chart');
Expand Down
Binary file removed yottadb/yottadb.dat
Binary file not shown.
Binary file removed yottadb/yottadb.gld
Binary file not shown.
Binary file removed yottadb/yottadb.mjl
Binary file not shown.

0 comments on commit a3b4dcb

Please sign in to comment.