Skip to content

Commit

Permalink
Merge pull request #5 from luktinghin/luktinghin-preview-ml
Browse files Browse the repository at this point in the history
preview ML change update 2
  • Loading branch information
luktinghin committed Dec 2, 2023
2 parents de2a1e5 + eba5500 commit 8085edf
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
Binary file modified .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h1>SimTIVA is a computer simulation program to simulate delivery of total intra
<br><b>Written by Terence Luk, 2023</b>. This work is licensed under GNU General Public License v3.0. Read more about the project <a href='https://simtiva.blogspot.com/' target='_blank'>here</a>, or contact me on <a href='https://twitter.com/simtiva_app' target='_blank'>Twitter/X</a> for ideas, suggestions or comments. Your advice is greatly appreciated!
<br>
<br>This is an open source project and the source code is published on <a href='https://github.com/luktinghin/simtiva/' target='_blank'>GitHub</a>.
<br>Last updated 15/11/2023 (V4.1) Build 89.
<br>Last updated 1/11/2023 (V4.1) Build 90.
<br>
<br>The purposes are: (1) <i> To simulate TCI/TIVA for educational purposes</i>, and (2) <i>Potentially, to help deliver TCI/TIVA in a low resource setting with no TCI pumps available.</i>
<br>Coding is done in Javascript. The code to the mathematical calculations are based on "STANPUMP", which is freely available from the link below. The pharmacokinetic models available in this program are Marsh, Schnider, Paedfusor and Eleveld for propofol, and Minto and Eleveld for remifentanil. For instructions on using this app, visit the 'Help' page. For documentation of the pharmacological details, visit the 'Documentation' page.
Expand Down Expand Up @@ -1151,8 +1151,8 @@ <h1>SimTIVA is a computer simulation program to simulate delivery of total intra
<div class="prompts_close" onclick="hide_prompts(this.parentElement)"><i class="fas fa-times-circle"></i></div>
<div id="previewleft"><i class="fas fa-arrow-circle-up" id="previewicon"></i></div>
<div id="previewright">
<div style="font-size:80%; font-weight:bold; border-bottom:1px solid #a9c5e4; padding-bottom:2px">PREVIEW: To achieve target <div id="preview_cpt"></div></div>
<div style="padding-top:5px font-size:90%" id="preview_msg"></div>
<div style="font-size:80%; font-weight:bold; border-bottom:1px solid #a9c5e4; padding-bottom:2px; line-height:1.2">PREVIEW: To achieve target <div id="preview_cpt"></div></div>
<div style="padding-top:5px; font-size:90%; line-height:1.2" id="preview_msg"></div>
</div>
</div>
<div class="prompts_card" id="prompt" style="border-color:#9bc99d">
Expand Down
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ function displaypreview2(x,ind) {
preview_cpt(x,ind);
document.getElementById("preview_cpt").innerHTML = "CP " + x + drug_sets[ind].conc_units + "/ml";
if (drug_sets[ind].preview_bolus>0) {
document.getElementById("preview_msg").innerHTML = "Bolus " + drug_sets[ind].preview_bolus + drug_sets[ind].infused_units + " then infuse at " + drug_sets[ind].preview_rate + "ml/h";
document.getElementById("preview_msg").innerHTML = "Bolus " + drug_sets[ind].preview_bolus + drug_sets[ind].infused_units + " (" + Math.round(drug_sets[ind].preview_bolus / drug_sets[ind].infusate_concentration * 10)/10 + "ml) then infuse at " + drug_sets[ind].preview_rate + "ml/h";
document.getElementById("previewicon").className = "fas fa-arrow-circle-up";
} else if (drug_sets[ind].preview_rate>0) {
document.getElementById("preview_msg").innerHTML = "Change infusion rate to " + drug_sets[ind].preview_rate + "ml/h";
Expand All @@ -1745,7 +1745,7 @@ function displaypreview2(x,ind) {
preview_cet(x,ind);
document.getElementById("preview_cpt").innerHTML = "CE " + x + drug_sets[ind].conc_units + "/ml";
if (drug_sets[ind].preview_bolus > 0) {
document.getElementById("preview_msg").innerHTML = "Bolus " + (drug_sets[ind].preview_bolus / drug_sets[ind].infusate_concentration).toFixed(1) + "ml (" + drug_sets[ind].preview_bolus + drug_sets[ind].infused_units + ") then pause infusion";
document.getElementById("preview_msg").innerHTML = "Bolus " + drug_sets[ind].preview_bolus + drug_sets[ind].infused_units + " (" + Math.round(drug_sets[ind].preview_bolus / drug_sets[ind].infusate_concentration * 10)/10 + "ml) then pause infusion";
document.getElementById("previewicon").className = "fas fa-arrow-circle-up";
} else if (drug_sets[ind].preview_rate>0) {
document.getElementById("preview_msg").innerHTML = "Change infusion rate to " + drug_sets[ind].preview_rate + "ml/h";
Expand Down Expand Up @@ -7650,7 +7650,7 @@ function displayDisclaimer() {
}

function displayAbout() {
text = "<h1>SimTIVA is a computer simulation program to simulate delivery of total intravenous anaesthesia (TIVA) using a target-controlled infusion (TCI) pump. This progressive web app (PWA) is designed for use on smartphones, tablets and computers.</h1><br><b>Written by Terence Luk, 2023</b>. This work is licensed under GNU General Public License v3.0. Read more about the project <a href='https://simtiva.blogspot.com/2021/10/welcome.html' target='_blank'>here</a>, or contact me on <a href='https://twitter.com/simtiva_app' target='_blank'>Twitter/X</a> for ideas, suggestions or comments. Your advice is greatly appreciated!<br><br>This is an open source project and the source code is published on <a href='https://github.com/luktinghin/simtiva/' target='_blank'>GitHub</a>.<br>Last updated 15/11/2023 (V4.1) Build 89.<br><br>The purposes are: (1) <i> To simulate TCI/TIVA for educational purposes</i>, and (2) <i>Potentially, to help deliver TCI/TIVA in a low resource setting with no TCI pumps available.</i><br>Coding is done in Javascript. The code to the mathematical calculations are based on 'STANPUMP', which is freely available from the link below. The pharmacokinetic models available in this program are Marsh, Schnider, Paedfusor and Eleveld for propofol, and Minto and Eleveld for remifentanil. For instructions on using this app, visit the 'Help' page. For documentation of the pharmacological details, visit the 'Documentation' page.<br><br>Contact us via our <a href='https://simtiva.blogspot.com/p/feedback.html' target='_blank'>blog</a> page; or get in touch on <a href='https://twitter.com/simtiva_app' target='_blank'>Twitter/X</a>.<div class='' style='width:100%; margin-top:2rem; margin-bottom:1rem; background:rgba(128,128,128,0.4); border-bottom:1px solid #198964; font-weight:bold'>Licenses & Legal</div><div class=''>Acknowledgments: this project is made possible with the following-<br><br><b>STANPUMP by Steven L. Shafer</b><br>Freely available at <a href='http://opentci.org/code/stanpump' target='_blank'>OpenTCI-STANPUMP</a><br><br><b>Chart.js</b><br><a href='http://chartjs.org' target='_blank'>Chart.js</a> is open source and available under the MIT license.<br><br><b>Font Awesome Free</b><br>SIL OFL 1.1 license applies to all icons packaged as font files. <a href='https://github.com/FortAwesome/Font-Awesome' target='_blank'>Source/License</a><br><br><b>WHO Child Growth Standards</b><br>Copyright World Health Organization (WHO), 2021; all rights reserved. Growth chart data (weight & length for age and BMI) from <a href='https://www.who.int/tools/child-growth-standards/standards' target='_blank'>WHO website</a> used for data validation. Computational method using LMS method described <a href='https://www.who.int/growthref/computation.pdf' target='_blank'>here</a>.<br><br><b>LZ-String</b><br>Copyright Pieroxy (2013) under MIT license, from <a href='https://pieroxy.net/blog/pages/lz-string/index.html' target='_blank'>pieroxy.net</a>, used for Javascript string compression.<br><br><span style='color:#ccc'>Source Sans font: Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries, licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).</span></div><div style='padding-top:1rem;'></div>";
text = "<h1>SimTIVA is a computer simulation program to simulate delivery of total intravenous anaesthesia (TIVA) using a target-controlled infusion (TCI) pump. This progressive web app (PWA) is designed for use on smartphones, tablets and computers.</h1><br><b>Written by Terence Luk, 2023</b>. This work is licensed under GNU General Public License v3.0. Read more about the project <a href='https://simtiva.blogspot.com/2021/10/welcome.html' target='_blank'>here</a>, or contact me on <a href='https://twitter.com/simtiva_app' target='_blank'>Twitter/X</a> for ideas, suggestions or comments. Your advice is greatly appreciated!<br><br>This is an open source project and the source code is published on <a href='https://github.com/luktinghin/simtiva/' target='_blank'>GitHub</a>.<br>Last updated 2/12/2023 (V4.1) Build 90.<br><br>The purposes are: (1) <i> To simulate TCI/TIVA for educational purposes</i>, and (2) <i>Potentially, to help deliver TCI/TIVA in a low resource setting with no TCI pumps available.</i><br>Coding is done in Javascript. The code to the mathematical calculations are based on 'STANPUMP', which is freely available from the link below. The pharmacokinetic models available in this program are Marsh, Schnider, Paedfusor and Eleveld for propofol, and Minto and Eleveld for remifentanil. For instructions on using this app, visit the 'Help' page. For documentation of the pharmacological details, visit the 'Documentation' page.<br><br>Contact us via our <a href='https://simtiva.blogspot.com/p/feedback.html' target='_blank'>blog</a> page; or get in touch on <a href='https://twitter.com/simtiva_app' target='_blank'>Twitter/X</a>.<div class='' style='width:100%; margin-top:2rem; margin-bottom:1rem; background:rgba(128,128,128,0.4); border-bottom:1px solid #198964; font-weight:bold'>Licenses & Legal</div><div class=''>Acknowledgments: this project is made possible with the following-<br><br><b>STANPUMP by Steven L. Shafer</b><br>Freely available at <a href='http://opentci.org/code/stanpump' target='_blank'>OpenTCI-STANPUMP</a><br><br><b>Chart.js</b><br><a href='http://chartjs.org' target='_blank'>Chart.js</a> is open source and available under the MIT license.<br><br><b>Font Awesome Free</b><br>SIL OFL 1.1 license applies to all icons packaged as font files. <a href='https://github.com/FortAwesome/Font-Awesome' target='_blank'>Source/License</a><br><br><b>WHO Child Growth Standards</b><br>Copyright World Health Organization (WHO), 2021; all rights reserved. Growth chart data (weight & length for age and BMI) from <a href='https://www.who.int/tools/child-growth-standards/standards' target='_blank'>WHO website</a> used for data validation. Computational method using LMS method described <a href='https://www.who.int/growthref/computation.pdf' target='_blank'>here</a>.<br><br><b>LZ-String</b><br>Copyright Pieroxy (2013) under MIT license, from <a href='https://pieroxy.net/blog/pages/lz-string/index.html' target='_blank'>pieroxy.net</a>, used for Javascript string compression.<br><br><span style='color:#ccc'>Source Sans font: Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries, licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).</span></div><div style='padding-top:1rem;'></div>";
displayWarning("About", text);
}

Expand Down
2 changes: 1 addition & 1 deletion serviceworker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const cacheName = "simtiva-v4-89";
const cacheName = "simtiva-v4-90";
const assets = [
"/",
"/index.html",
Expand Down
Binary file removed sourcesanspro-bold.otf
Binary file not shown.
Binary file removed sourcesanspro-boldit.otf
Binary file not shown.
Binary file removed sourcesanspro-it.otf
Binary file not shown.
Binary file removed sourcesanspro-regular.otf
Binary file not shown.
4 changes: 2 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1817,7 +1817,7 @@ a.interactionstab.active {
font-size:40px;
}
#warningright {
padding-left:15px;
padding-left:10px;
flex-basis:calc(100% - 40px);
}
#warningcounter {
Expand Down Expand Up @@ -2182,7 +2182,7 @@ body.dark .loadduration {
font-size:40px;
}
#previewright {
padding-left:15px;
padding-left:9px;
flex-basis:calc(100% - 40px);
}
#prompt {
Expand Down

0 comments on commit 8085edf

Please sign in to comment.