resolved conflicts

This commit is contained in:
2025-03-31 03:46:05 +03:00
6454 changed files with 1520539 additions and 9 deletions
+315
View File
@@ -0,0 +1,315 @@
/*
Created on : Aug 24, 2017, 4:14:20 PM
Author : Davis
*/
select.compulsory,
input.compulsory,
textarea.compulsory {
border-left: 3px solid #F08080;
/*border-right:3px solid #F08080;*/
}
/* trying to make original grey background of old streamline */
body>.container_fluid {
background: #708090 !important;
}
/*.btn{
margin-bottom: 0;
font-size: 14px;
line-height: 20px;
vertical-align: middle;
cursor: pointer;
border-radius: 4px;
font-weight: 600;
border-radius: 4px;
}*/
/*.btn:hover{
text-decoration: none;
transition: background-position 0.1s linear;
}
.btn-success{
background-color: #9dce6e;
background-image: linear-gradient(to bottom, #79ae69, #609450);
background-repeat: repeat-x;
border: 1px solid #609450;
-webkit-box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.3) inset, 0 0 0 1px #74af3b;
color: #fff;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}*/
/*.btn-success:hover {
color: #fff;
background-color: #609450;
border-color: #4b733e;
}
.btn-success.disabled {
background: #8ec657;
border: 1px solid #8ec657;
}
.btn-success.disabled:hover {
background: #8ec657;
border: 1px solid #8ec657;
}
.btn-info{
background: #93B9D8;
border: 1px solid #93B9D8;
color: #fff;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
.btn-info:hover{
background: #93B9D8;
}*/
/*.color-bordered-table.success-bordered-table thead th {
background-color: #8ec657;
reduce table header height
height: 15px;
line-height: 15px;
}
.color-bordered-table.success-bordered-table {
border: 2px solid #8ec657;
}
.color-table.success-table thead th {
border-color: #8ec657;
background-color: #8ec657;
color: #fff;
font-size: 14px;
reduce table header height
height: 8px;
line-height: 8px;
}*/
/*.alert {
border-radius: 4px;
}*/
/*.alert-warning {
border-color: #ab7a4b;
background: #ab7a4b;
}*/
.position-relative {
position: relative !important;
}
.position-absolute {
position: absolute;
}
.right-0 {
right: 0 !important;
}
.top-0 {
top: 0 !important;
}
.left-0 {
left: 0 !important;
}
.label {
border-radius: 3px;
padding: 4px 5px;
}
.label-info {
background-color: #2d6987;
}
.alert.alert-info {
background: #dff3f8;
color: #7399b9;
border-color: #93b9d8;
}
.alert-danger,
.alert-error {
background-color: #f2dede;
border-color: #eed3d7;
color: #b94a48;
font-size: 13px;
}
.android-input {
border-top: none;
border-left: none;
border-right: none;
border-bottom: 2px solid #dddddd;
box-sizing: border-box;
outline: none;
font-size: 1em;
padding: 0.2em 0.2em;
width: 100%;
}
.android-input {
position: relative;
}
.android-input:before,
.android-input:after {
content: '';
display: block;
position: absolute;
bottom: 2px;
height: 6px;
border-left: 2px solid #0099CC;
}
.android-input:before {
left: 0;
}
.android-input:after {
right: 0;
}
.android-input-select {
border-top: none;
border-left: none;
border-right: none;
border-bottom: 2px solid #dddddd;
box-sizing: border-box;
outline: none;
font-size: 1em;
color: #7c7c7c;
padding: 0em 0em;
width: 100%;
}
.android-input-select {
position: relative;
}
.android-input-select:before,
.android-input:after {
content: '';
display: block;
position: absolute;
bottom: 2px;
height: 6px;
border-left: 2px solid #0099CC;
}
.android-input-select:before {
left: 0;
}
.android-input-select:after {
right: 0;
}
.total {
background-color: #34394D !important;
color: #fff !important;
}
/* CUSTOM STYLES */
div.consultation-pat {
border-radius: 5px;
}
.consultation-pat-table {
display: flex;
align-items: stretch;
margin: 0;
border-radius: 5px;
}
.consultation-pat-table .card {
border-radius: 0;
}
.consultation-pat-table .col:first-child .card {
border-radius: 5px 0 0 5px;
}
.consultation-pat-table .col:last-child .card {
border-radius: 0 5px 5px 0;
}
.consultation-pat-table .card-header {
min-height: 50%;
display: flex;
align-items: end;
font-weight: bold;
font-size: initial;
}
.consultation-pat-table .card-body {
border-radius: 0;
padding: 1rem;
}
.br-5 {
border-radius: 5px;
}
.tt-none {
text-transform: none;
}
.clinic-buttons a.btn {
white-space: normal;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: center;
font-size: larger !important;
box-shadow: 0px 5px 10px 13px rgba(229, 229, 229, 0.68);
-webkit-box-shadow: 0px 5px 10px 13px rgba(229, 229, 229, 0.68);
-moz-box-shadow: 0px 5px 10px 13px rgba(229, 229, 229, 0.68);
}
/*
.consultation-pat-table tr th,
.consultation-pat-table tr td {
min-width: 125px;
white-space: normal;
} */
@media screen and (min-width: 991px) {
.img-pat-profile {
background-position: left !important;
}
}
@media screen and (max-width: 990px) {
.consultation-pat-row {
margin: 0;
padding: 0;
}
.consultation-pat-table .card-header {
padding: .5rem;
font-size: 12px;
}
.consultation-pat-table .card-body {
padding: .5rem;
}
.img-pat-profile {
min-height: 200px !important;
}
}
File diff suppressed because it is too large Load Diff
+174
View File
@@ -0,0 +1,174 @@
$('#primary_diagnosis').on('change', function () {
var data = 'diagnosis_id=' + $(this).val();
$.ajax({
type: "get",
url: "/diagnoses/get_diagnosis",
data: data,
cache: false,
success: function (result) {
var prompt_and_references = result.split('&&');
$('#primary_diagnosis_prompt').html(prompt_and_references[0]);
$('#primary_diagnosis_reference').html(prompt_and_references[1]);
}
});
});
$('#wrapper').on( 'change', '[id^=left_eye_diagnosis_id_]', function () {
var data = 'diagnosis_id=' + $(this).val();
var other_diagnosis_id = $(this).attr('id');
var nth = other_diagnosis_id.substring(22); //remove "other_diagnosis_id_" from strg to remain with the no e.g 1003
var prompt_id = parseInt(nth) - 1000;
var reference_id = prompt_id + 100;
$.ajax({
type: "get",
url: "/diagnoses/get_diagnosis_categories",
data: data,
cache: false,
success: function (result) { console.log(result)
$('#right_diagnosis_category_'+prompt_id).html("<select class='form-control select'>"+ result +"</select>");
$('#other_diagnosis_id_'+reference_id).html("<select class='form-control select'></select>");
}
});
});
$('#wrapper').on( 'change', '[id^=other_diagnosis_id_]', function () {
var data = 'diagnosis_id=' + $(this).val();
var other_diagnosis_id = $(this).attr('id');
var nth = other_diagnosis_id.substring(19); //remove "other_diagnosis_id_" from strg to remain with the no e.g 1003
var prompt_id = parseInt(nth) - 1000;
var reference_id = prompt_id + 100;
$.ajax({
type: "get",
url: "/diagnoses/get_diagnosis",
data: data,
cache: false,
success: function (result) {
var prompt_and_references = result.split('&&');
if (nth < 1000) {
$('#secondary_diagnosis_prompt1').html(prompt_and_references[0]);
$('#secondary_diagnosis_reference1').html(prompt_and_references[1]);
}
else{
// this is for prompts and references added dynamically using the addrow button
$('#secondary_diagnosis_prompt'+prompt_id).html(prompt_and_references[0]);
$('#secondary_diagnosis_reference'+reference_id).html(prompt_and_references[1]);
}
}
});
});
$("#outcome").change(function () {
var id = $(this).val();
switch (id) {
case "1": // Admitted
$('#admitted_div').show();
$('#home_with_followup_div').hide();
$('#referred_div').hide();
break;
case "3": // Home with follow up
$('#home_with_followup_div').show();
$('#admitted_div').hide();
$('#referred_div').hide();
break;
case "4": // Referred
$('#referred_div').show();
$('#home_with_followup_div').hide();
$('#admitted_div').hide();
break;
default:
$('#admitted_div').hide();
$('#home_with_followup_div').hide();
$('#referred_div').hide();
break;
}
});
jQuery('.datepicker-autoclose').datepicker({
autoclose: true,
format: 'yyyy-mm-dd',
});
function select2set(id) {
$('#'+id).select2();
}
function addRow(tableID) {
var table = document.getElementById(tableID);
var rowCount = table.rows.length;
var row = table.insertRow(rowCount);
var colCount = table.rows[0].cells.length;
for (var i = 0; i < colCount; i++) {
var newcell = row.insertCell(i);
newcell.innerHTML = table.rows[1].cells[i].innerHTML;
/* set new id for the symptom select tag which is found in the first cell of every row
* this makes the symptom select tag id dynamic and different for each table row
* the id should be the rowCount +1000 to avoid a similar id with prompt div tag id set below
*/
if (i == 1) {
newcell.childNodes[1].id = 'other_diagnosis_id_'+(rowCount + 1000);
select2set('other_diagnosis_id_'+(rowCount + 1000));
}
/*
* set new value for the prompt div tag
*/
if (i == 2) {
table.rows[rowCount].cells[2].innerHTML = '';
table.rows[rowCount].cells[2].innerHTML = '<div class="well well-sm" id="secondary_diagnosis_prompt' + rowCount + '">&nbsp;</div>';
}
if (i == 3) {
// var myid = (rowCount + 100);
table.rows[rowCount].cells[3].innerHTML = '';
table.rows[rowCount].cells[3].innerHTML = '<div class="well well-sm" id="secondary_diagnosis_reference' + (rowCount + 100) + '">&nbsp;</div>';
// alert(myid);
}
switch (newcell.childNodes[0].type) {
case "text":
// newcell.childNodes[0].value = "";
break;
case "checkbox":
newcell.childNodes[0].checked = false;
break;
case "select":
newcell.childNodes[0].selectedIndex = 0;
break;
}
}
}
function deleteRow(tableID) {
try {
var table = document.getElementById(tableID);
var rowCount = table.rows.length;
for (var i = 0; i < rowCount; i++) {
var row = table.rows[i];
var chkbox = row.cells[0].childNodes[0];
if (null != chkbox && true == chkbox.checked) {
if (rowCount <= 2) {
alert("Cannot delete all the rows.");
break;
}
table.deleteRow(i);
rowCount--;
i--;
}
}
} catch (e) {
alert(e);
}
}
@@ -0,0 +1,178 @@
//Validating the temperature values
$('#temperature').change(function () {
let tempValue = $('#temperature').val();
if (between(tempValue, 36.1, 38.0)) {
$('#temperatureNewsText').css({
"color": "green",
"font-size": "bold"
}).text('0');
$('#temperatureNews').val('0');
} else if (between(tempValue, 35.1, 36.0) || between(tempValue, 38.1, 39.0)) {
$('#temperatureNewsText').css({
'color': 'red'
}).text('1');
$('#temperatureNews').val('1');
} else if (tempValue >= 39.1) {
$('#temperatureNewsText').css({
'color': 'red'
}).text('2');
$('#temperatureNews').val('2');
} else if (tempValue <= 35.0) {
$('#temperatureNewsText').css({
'color': 'red'
}).text('3');
$('#temperatureNews').text('3');
}
});
//Validating the pulse value / heart rate
$('#pulse').change(function () {
let pulseValue = $('#4Value').val();
if (between(pulseValue, 51, 90)) {
$('#pulseNewsText').css({
"color": "green",
"font-weight": "thick"
}).text('0');
$('#pulseNews').val('0');
} else if (between(pulseValue, 41, 50) || between(pulseValue, 91, 110)) {
$('#pulseNewsText').css({
"color": "red",
"font-size": "thick"
}).text('1');
$('#pulseNews').val('1');
} else if (between(pulseValue, 111, 130)) {
$('#pulseNewsText').css({
"color": "red",
"font-size": "thick"
}).text('2');
$('#pulseNews').val('2');
} else if (pulseValue >= 131 || pulseValue <= 40) {
$('#pulseNewsText').css({
"color": "red",
"font-size": "thick"
}).text('3');
$('#pulseNews').val('3');
}
});
//Validating the respirations
$('#respirations').change(function () {
let respValue = $('#respirations').val();
if (between(respValue, 12, 20)) {
$('#respirationsNewsText').css({
"color": "green"
}).text("0");
$('#respirationsNews').val("0");
} else if (between(respValue, 9, 11)) {
$('#respirationsNewsText').css({
"color": "red"
}).text("1");
$('#respirationsNews').val("1");
} else if (between(respValue, 21, 24)) {
$('#respirationsNewsText').css({
"color": "red"
}).text("2");
$('#respirationsNews').val("2");
} else if (respValue >= 25 || respValue <= 8) {
$('#respirationsNewsText').css({
"color": "red"
}).text("3");
$('#respirationsNews').val("3");
}
});
//Validating the oxygen saturations (SaO2(%))
$('#sao2').change(function () {
let saValue = $('#sao2').val();
if (saValue >= 96) {
$('#sao2NewsText').css({
"color": "green"
}).text("0");
$('#sao2News').val("0");
} else if (between(saValue, 94, 95)) {
$('#sao2NewsText').css({
"color": "red"
}).text("1");
$('#sao2News').val("1");
} else if (between(saValue, 92, 93)) {
$('#sao2NewsText').css({
"color": "red"
}).text("2");
$('#sao2News').val("2");
} else if (saValue <= 91) {
$('#sao2NewsText').css({
"color": "red"
}).text("3");
$('#sao2News').val("3");
}
});
//Validating Systolic bp
$('#systolic_bp').change(function () {
let sysValue = $('#systolic_bp').val();
if (between(sysValue, 111, 219)) {
$('#systolic_bpNewsText').css({
"color": "green"
}).text('0');
$('#systolic_bpNews').val('0');
} else if (between(sysValue, 101, 110)) {
$('#systolic_bpNewsText').css({
"color": "red"
}).text('1');
$('#systolic_bpNews').val('1');
} else if (between(sysValue, 91, 100)) {
$('#systolic_bpNewsText').css({
"color": "red"
}).text('2');
$('#systolic_bpNews').val('2');
} else if (sysValue >= 220 || sysValue <= 90) {
$('#systolic_bpNewsText').css({
"color": "red"
}).text('3');
$('#systolic_bpNews').val('3');
}
});
//Validating the concious level
$('#conscious_level').change(function () {
let conValue = $('#conscious_level').val();
if (conValue === "alert") {
$('#conscious_levelNewsText').css({
"color": "green"
}).text('0');
$('#conscious_levelNews').val('0');
} else if (conValue === "responds to voice/irritated" || conValue === "responds to pain" || conValue === "unresponsive") {
$('#conscious_levelNewsText').css({
"color": "red",
"font-color": "red"
}).text('3');
$('#conscious_levelNews').val('3');
}
});
//Validating the supplementary oxygen
$('#supplementary_oxygen').change(function () {
let suOxValue = $('#supplementary_oxygen').val();
if (suOxValue === "No") {
$('#supplementary_oxygenNewsText').css({
"color": "green"
}).text('0');
$('#supplementary_oxygenNews').val('0');
} else if (suOxValue === "Yes") {
$('#supplementary_oxygenNewsText').css({
"color": "red",
"font-color": "red"
}).text('2');
$('#supplementary_oxygenNews').val('2');
}
});
function between(currentValue, low, high) {
if (currentValue < low) {
return false;
} else if (currentValue > high) {
return false;
} else {
return true;
}
}
@@ -0,0 +1,56 @@
import json
import socket
import requests
HOST = "192.168.1.215" # Standard loopback interface address (localhost)
PORT = 5100 # Port to listen on (non-privileged ports are > 1023)
bytes_to_decode = b''
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind((HOST, PORT))
s.listen()
conn, addr = s.accept()
with conn:
# print(f"Connected by {addr}")
while True:
data = conn.recv(1024)
if data:
bytes_to_decode += data
if 'END_RESULT' in data.decode():
results_dict = {}
decoded_data = bytes_to_decode.decode()
data_lists = [line.split(";") for line in decoded_data.split("\r\n")]
data_list = []
for row in data_lists:
if row[0] in ['SID', 'PID', 'ID']:
results_dict[row[0]] = row[1]
elif row[0] in ['WBC', 'LYMP', 'MONP', 'NEUP', 'EOSP', 'BASP', 'IMMP', 'ALYP', 'LYM', 'RDW-SD',
'MON', 'NEU', 'EOS', 'BAS', 'IMM', 'ALY', 'RBC', 'HGB', 'HCT', 'MCV', 'MCH',
'MCHC', 'RDW-CV', 'PLCR', 'PDW', 'PCT', 'MPV', 'PLT']:
try:
flag = row[3]
except:
flag = ''
try:
result = row[1]
except:
result = ''
data_list.append([row[0], result, flag])
results_dict["results"] = json.dumps(data_list)
results_dict["machine_id"] = '1'
requests.post('http://192.168.1.215/lab_machines/receive_results_mispa', data=results_dict)
bytes_to_decode = b''
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB