Skip to content

Commit

Permalink
feat: update myocardial
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanzavisic committed Nov 7, 2023
1 parent fee3d51 commit e070a29
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions packages/demo/src/mock-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ export class MockService implements Service {
P21xmin: "0.176",
P21yourscore: "0.201",
P22: "10.7184385730859",
P22percentile: "99",
P22percentile: "49",
P22xaverage: "0.117",
P22xmax: "0.154",
P22xmin: "0.084",
P22yourscore: "0.120",
P22yourscore: "0.116",
P23: "4.1967011171428",
P23percentile: "12",
P23xaverage: "0.062",
Expand Down Expand Up @@ -118,7 +118,7 @@ export class MockService implements Service {
trrd: "20231017",
type: "regular",
userId: "FiLdM3UZ9PVT1zH9N72PMj8IHWg2",
sex: "M"
sex: "F"
});
}
}
22 changes: 11 additions & 11 deletions packages/lib/src/myocardial/myocardial.wc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@
if (perc1 === 50) {
return '#00AA44';
}
if (res1 > mid1) {
if (res1 < mid1) {
return '#CC0000';
}
if (res1 < mid1) {
if (res1 > mid1) {
return '#00AA44';
}
return '#00AA44';
Expand All @@ -98,10 +98,10 @@
if (perc1 === 50) {
return 'rgba(0,170,68,0.15)';
}
if (res1 > mid1) {
if (res1 < mid1) {
return 'rgba(204,0,0,0.15)';
}
if (res1 < mid1) {
if (res1 > mid1) {
return 'rgba(0,170,68,0.15)';
}
return 'rgba(0,170,68,0.15)';
Expand All @@ -126,10 +126,10 @@
if (perc1 === 50) {
return 'rgba(0,170,68,0.05)';
}
if (res1 > mid1) {
if (res1 < mid1) {
return 'rgba(204,0,0,0.05)';
}
if (res1 < mid1) {
if (res1 > mid1) {
return 'rgba(0,170,68,0.05)';
}
return 'rgba(0,170,68,0.05)';
Expand All @@ -154,11 +154,11 @@
if (perc1 === 50) {
return 'no significant overlap';
}
if (res1 > mid1) {
if (res1 < mid1) {
return 'a significant overlap';
}
if (res1 < mid1) {
if (res1 > mid1) {
return 'no significant overlap';
}
Expand Down Expand Up @@ -228,13 +228,13 @@
showSummary = true;
return;
}
if (res1 > mid1) {
if (res1 < mid1) {
overlap = true;
showSummary = true;
return;
}
if (res1 < mid1) {
if (res1 > mid1) {
noOverlap = true;
showSummary = true;
return;
Expand Down Expand Up @@ -417,7 +417,7 @@
<div class="middleParent">
<div class="xAxis"></div>
<div class="yAxis"></div>
<div class="diseaseArea" style="border-radius: 0 6px 6px 0; left: 50.3%;"></div>
<div class="diseaseArea" style="border-radius: 6px 0 0 6px; right: 50.3%;"></div>
<div class="result"
style="padding: {getPadding(res1, mid1, perc1)}; margin: {getMargin(res1, mid1, perc1)}; border-radius: {getBorderRadius(res1, mid1, perc1)}">
<div class="resultDisplay" style="right: {moveDiv(res1, mid1, perc1)};">
Expand Down

0 comments on commit e070a29

Please sign in to comment.