enter tests
This commit is contained in:
parent
d220e3f509
commit
671e8d5ca5
58
src/store.js
58
src/store.js
@ -162,7 +162,7 @@ export function Reducer(inState, inAction)
|
|||||||
export const Initial = Reducer(
|
export const Initial = Reducer(
|
||||||
{
|
{
|
||||||
Chan: { Min:0, Max:1, Value:0, Step:1 },
|
Chan: { Min:0, Max:1, Value:0, Step:1 },
|
||||||
Freq: { Min:2, Max:8, Value:2, Step:1 },
|
Freq: { Min:2, Max:8, Value:3, Step:1 },
|
||||||
Stim: { Min:-10, Max:120, Value:30, Step:5 },
|
Stim: { Min:-10, Max:120, Value:30, Step:5 },
|
||||||
Live:
|
Live:
|
||||||
{
|
{
|
||||||
@ -188,26 +188,52 @@ export const Initial = Reducer(
|
|||||||
Name: "Patient A Asymmetric Notch",
|
Name: "Patient A Asymmetric Notch",
|
||||||
Plot:
|
Plot:
|
||||||
[
|
[
|
||||||
{ Hz: 500, TestL: { Stim: 30, Resp: true }, TestR: { Stim: 50, Resp: true } },
|
{ Hz: 500, TestL: { Stim: 15, Resp: true }, TestR: { Stim: 10, Resp: true } },
|
||||||
{ Hz: 1000, TestL: { Stim: 50, Resp: true }, TestR: { Stim: 55, Resp: true } },
|
{ Hz: 1000, TestL: { Stim: 10, Resp: true }, TestR: { Stim: 10, Resp: true } },
|
||||||
{ Hz: 2000, TestL: { Stim: 50, Resp: true }, TestR: { Stim: 55, Resp: true } },
|
{ Hz: 2000, TestL: { Stim: 15, Resp: true }, TestR: { Stim: 20, Resp: true } },
|
||||||
{ Hz: 3000, TestL: { Stim: 50, Resp: true }, TestR: { Stim: 55, Resp: true } },
|
{ Hz: 3000, TestL: { Stim: 30, Resp: true }, TestR: { Stim: 40, Resp: true } },
|
||||||
{ Hz: 4000, TestL: { Stim: 50, Resp: true }, TestR: { Stim: 55, Resp: true } },
|
{ Hz: 4000, TestL: { Stim: 40, Resp: true }, TestR: { Stim: 55, Resp: true } },
|
||||||
{ Hz: 6000, TestL: { Stim: 50, Resp: true }, TestR: { Stim: 55, Resp: true } },
|
{ Hz: 6000, TestL: { Stim: 35, Resp: true }, TestR: { Stim: 40, Resp: true } },
|
||||||
{ Hz: 8000, TestL: { Stim: 50, Resp: true }, TestR: { Stim: 55, Resp: true } }
|
{ Hz: 8000, TestL: { Stim: 20, Resp: true }, TestR: { Stim: 15, Resp: true } }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Patient B Asymmetric Notch",
|
Name: "Patient B High Freq Hearing Loss",
|
||||||
Plot:
|
Plot:
|
||||||
[
|
[
|
||||||
{ Hz: 500, TestL: { Stim: 50, Resp: true }, TestR: { Stim: 70, Resp: true } },
|
{ Hz: 500, TestL: { Stim: 10, Resp: true }, TestR: { Stim: 10, Resp: true } },
|
||||||
{ Hz: 1000, TestL: { Stim: 30, Resp: true }, TestR: { Stim: 25, Resp: true } },
|
{ Hz: 1000, TestL: { Stim: 15, Resp: true }, TestR: { Stim: 10, Resp: true } },
|
||||||
{ Hz: 2000, TestL: { Stim: 30, Resp: true }, TestR: { Stim: 25, Resp: true } },
|
{ Hz: 2000, TestL: { Stim: 10, Resp: true }, TestR: { Stim: 15, Resp: true } },
|
||||||
{ Hz: 3000, TestL: { Stim: 30, Resp: true }, TestR: { Stim: 25, Resp: true } },
|
{ Hz: 3000, TestL: { Stim: 25, Resp: true }, TestR: { Stim: 20, Resp: true } },
|
||||||
{ Hz: 4000, TestL: { Stim: 30, Resp: true }, TestR: { Stim: 25, Resp: true } },
|
{ Hz: 4000, TestL: { Stim: 35, Resp: true }, TestR: { Stim: 35, Resp: true } },
|
||||||
{ Hz: 6000, TestL: { Stim: 30, Resp: true }, TestR: { Stim: 25, Resp: true } },
|
{ Hz: 6000, TestL: { Stim: 50, Resp: true }, TestR: { Stim: 55, Resp: true } },
|
||||||
{ Hz: 8000, TestL: { Stim: 30, Resp: true }, TestR: { Stim: 25, Resp: true } }
|
{ Hz: 8000, TestL: { Stim: 80, Resp: true }, TestR: { Stim: 75, Resp: true } }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "Patient C Unilateral Hearing Loss",
|
||||||
|
Plot:
|
||||||
|
[
|
||||||
|
{ Hz: 500, TestL: { Stim: 15, Resp: true }, TestR: { Stim: 40, Resp: true } },
|
||||||
|
{ Hz: 1000, TestL: { Stim: 15, Resp: true }, TestR: { Stim: 50, Resp: true } },
|
||||||
|
{ Hz: 2000, TestL: { Stim: 20, Resp: true }, TestR: { Stim: 65, Resp: true } },
|
||||||
|
{ Hz: 3000, TestL: { Stim: 15, Resp: true }, TestR: { Stim: 70, Resp: true } },
|
||||||
|
{ Hz: 4000, TestL: { Stim: 20, Resp: true }, TestR: { Stim: 65, Resp: true } },
|
||||||
|
{ Hz: 6000, TestL: { Stim: 25, Resp: true }, TestR: { Stim: 60, Resp: true } },
|
||||||
|
{ Hz: 8000, TestL: { Stim: 20, Resp: true }, TestR: { Stim: 45, Resp: true } }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "Patient D Normal Hearing",
|
||||||
|
Plot:
|
||||||
|
[
|
||||||
|
{ Hz: 500, TestL: { Stim: 5, Resp: true }, TestR: { Stim: 10, Resp: true } },
|
||||||
|
{ Hz: 1000, TestL: { Stim: 0, Resp: true }, TestR: { Stim: 5, Resp: true } },
|
||||||
|
{ Hz: 2000, TestL: { Stim: 5, Resp: true }, TestR: { Stim: 5, Resp: true } },
|
||||||
|
{ Hz: 3000, TestL: { Stim: 15, Resp: true }, TestR: { Stim: 10, Resp: true } },
|
||||||
|
{ Hz: 4000, TestL: { Stim: 15, Resp: true }, TestR: { Stim: 15, Resp: true } },
|
||||||
|
{ Hz: 6000, TestL: { Stim: 5, Resp: true }, TestR: { Stim: 10, Resp: true } },
|
||||||
|
{ Hz: 8000, TestL: { Stim: 0, Resp: true }, TestR: { Stim: 5, Resp: true } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -284,7 +284,7 @@ export function Chart({children})
|
|||||||
Store.ColumnMapping.forEach(([label, position, normal])=>
|
Store.ColumnMapping.forEach(([label, position, normal])=>
|
||||||
{
|
{
|
||||||
rules.push(html`
|
rules.push(html`
|
||||||
<span class="block absolute top-[-${inset}px] left-[${position*100}%] w-0 h-[calc(100%+${inset*2}px)] border-r(1 zinc-300) ${!normal && "border-dashed"}">
|
<span class="block absolute top-[-${inset}px] left-[${position*100}%] w-0 h-[calc(100%+${inset*2}px)] border-r(1 zinc-400) ${!normal && "border-dashed"}">
|
||||||
<span class="block absolute top-0 left-0 -translate-x-1/2 -translate-y-full pb-${normal ? 4 : 1}">${label}</span>
|
<span class="block absolute top-0 left-0 -translate-x-1/2 -translate-y-full pb-${normal ? 4 : 1}">${label}</span>
|
||||||
</span>`
|
</span>`
|
||||||
);
|
);
|
||||||
@ -293,16 +293,16 @@ export function Chart({children})
|
|||||||
for(let db = State.Stim.Min; db <= State.Stim.Max; db+=10)
|
for(let db = State.Stim.Min; db <= State.Stim.Max; db+=10)
|
||||||
{
|
{
|
||||||
rules.push(html`
|
rules.push(html`
|
||||||
<span class="block absolute left-[-${inset}px] top-[${((db-State.Stim.Min) / (State.Stim.Max-State.Stim.Min))*100}%] h-0 w-[calc(100%+${inset*2}px)] border-b(${db == 0 ? "2 black" : "1 zinc-300"})">
|
<span class="block absolute left-[-${inset}px] top-[${((db-State.Stim.Min) / (State.Stim.Max-State.Stim.Min))*100}%] h-0 w-[calc(100%+${inset*2}px)] border-b(${db == 0 ? "2 black" : "1 zinc-400"})">
|
||||||
<span class="block absolute top-0 left-0 -translate-x-full -translate-y-1/2 pr-2">${db}</span>
|
<span class="block absolute top-0 left-0 -translate-x-full -translate-y-1/2 pr-2">${db}</span>
|
||||||
</span>`
|
</span>`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return html`
|
return html`
|
||||||
<div class="relative w-full h-[800px] font(sans medium) text(xs)">
|
<div class="relative w-full h-[800px] font(sans medium) text(xs)">
|
||||||
<div class="absolute right-0 bottom-0 w-[calc(100%-100px)] h-[calc(100%-100px)] border(1 slate-300)">
|
<div class="absolute right-0 bottom-0 w-[calc(100%-60px)] h-[calc(100%-50px)] border(1 zinc-300)">
|
||||||
<span class="block absolute top-[-65px] left-0 w-full text(sm center) font-black">Frequency in Hz</span>
|
<span class="block absolute top-[-65px] left-0 w-full text(sm center) font-black">Frequency in Hz</span>
|
||||||
<span class="inline-block absolute top-[50%] left-[-65px] ">
|
<span class="inline-block absolute top-[50%] left-[-50px] ">
|
||||||
<span class="inline-block -rotate-90 origin-top -translate-x-1/2 text(sm center) font-black">
|
<span class="inline-block -rotate-90 origin-top -translate-x-1/2 text(sm center) font-black">
|
||||||
Hearing Level (dbHL)
|
Hearing Level (dbHL)
|
||||||
</span>
|
</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user