Compare commits

...

4 Commits

Author SHA1 Message Date
d2e68031c3 Appointment list summary 2023-05-05 01:51:22 -04:00
3e1bce8693 Revert "Fix persistent schedule view filter"
This reverts commit 73cfbd5bbd.
2023-05-05 01:12:03 -04:00
a64edff176 Manual differential calculations 2023-05-04 09:34:11 -04:00
666c917472 Schedule view datalist element 2023-05-04 09:33:57 -04:00
2 changed files with 40 additions and 7 deletions

View File

@ -4,6 +4,7 @@
<div v-else-if="age >= 90000" class="alert alert-warning">⚠ last updated <template v-if="age < 3600000">{{ts.toLocaleString()}}</template><template v-else>{{ts.toLocaleString()}}</template></div>
</template>
<div v-if="filter_array.length > 0"><span class="tag badge bg-primary" @click="filter = {}">CLEAR {{filter_array.length}} TAG{{filter_array.length > 1 ? 'S' : ''}}</span><span v-for="key in filter_array" class="tag badge" :style="{ backgroundColor: strHashHSL(key, '50%') }" @click="delete filter[key]"> {{key.toUpperCase()}}</span></div>
<datalist :id="'datalist-' + uid"><option v-for="item in practitioner_list" :value="item" /></datalist>
<table class="table" style="font-family: monospace;" v-if="appointments && appointments.length > 0">
<thead>
<tr><th style="width: 7rem;">Time</th><th>Clinic</th><th>Patient</th><th>Note</th><th style="width: 16rem;">Assignee</th></tr>
@ -18,9 +19,10 @@
<td>{{row.RESOURCENAME}}</td>
<td><router-link :to="'/patient/' + row.PATIENTID">{{row.PATIENTNAME}} <span :title="row.HRN">{{row.HRN.slice(-4)}}</span></router-link></td>
<td>{{row.NOTE}}<span v-for="(value, key) in gettags(row)" class="tag badge" :style="{ backgroundColor: strHashHSL(key, '50%') }" @click="filter[key] = true">{{value}}</span></td>
<td><Autocomplete :modelValue="practitioner[row.PATIENTNAME]" @update:modelValue="x => practitioner[row.PATIENTNAME] = x" :items="practitioner_list" /></td>
<td><input class="form-control" :list="'datalist-' + uid" :value="practitioner[row.PATIENTNAME]" @input="e => practitioner[row.PATIENTNAME] = e.target.value" /></td>
</tr>
</tbody>
<caption style="text-align: center;">{{appointments.length || 'no'}} appointment{{appointments.length != 1 ? 's' : ''}} <template v-if="date_begin.toLocaleDateString('sv-SE') == date_end.toLocaleDateString('sv-SE')">on {{date_begin.toLocaleDateString('sv-SE')}}</template><template v-else>from {{date_begin.toLocaleDateString('sv-SE')}} to {{date_end.toLocaleDateString('sv-SE')}}</template></caption>
</table>
</template>
@ -60,8 +62,6 @@
<script>
import { uniq, strHashHSL, strfdate_vista, debounce } from './util.mjs';
import Autocomplete from './Autocomplete.vue';
function clearTimeouts(timers) {
if(timers.length > 1) console.warn('Clearing multiple timeouts', timers.slice());
for(var i = 0; i < timers.length; ++i) window.clearTimeout(timers[i]);
@ -69,9 +69,6 @@
}
export default {
components: {
Autocomplete
},
props: {
client: Object,
selection: {
@ -83,6 +80,7 @@
},
data() {
return {
uid: Math.random()*0x7fffffff|0,
appointments: [],
timers: [],
ts: null,
@ -142,7 +140,6 @@
this.$watch(
() => (this.client, this.selection, this.date_begin, this.date_end, {}),
debounce(async () => {
this.filter = {};
this.update();
}, 500)
);

View File

@ -101,6 +101,42 @@ function lab_parse1default(data) {
flag: (x < 1.4 ? 'L' : x > 6.5 ? 'H' : undefined)
});
}
if(results.hasOwnProperty('EOSINO')) {
results.push(results['EOSINOPHIL%'] = {
name: 'EOSINOPHIL%', unit: '%', range: '0.0 - 10.0',
value: x = +results.EOSINO.value,
flag: (x < 0 ? 'L' : x > 10 ? 'H' : undefined)
});
results.push(results['EOSINOPHIL#'] = {
name: 'EOSINOPHIL#', unit: 'K/cmm', range: '0.0 - 0.7',
value: +(x = 0.01*x*results.WBC.value).toFixed(3),
flag: (x < 0 ? 'L' : x > 0.7 ? 'H' : undefined)
});
}
if(results.hasOwnProperty('BASO')) {
results.push(results['BASOPHIL%'] = {
name: 'BASOPHIL%', unit: '%', range: '0.0 - 2.0',
value: x = +results.BASO.value,
flag: (x < 0 ? 'L' : x > 2 ? 'H' : undefined)
});
results.push(results['BASOPHIL#'] = {
name: 'BASOPHIL#', unit: 'K/cmm', range: '0.0 - 0.2',
value: +(x = 0.01*x*results.WBC.value).toFixed(3),
flag: (x < 0 ? 'L' : x > 0.2 ? 'H' : undefined)
});
}
if(results.hasOwnProperty('MONOS')) {
results.push(results['MONOCYTE%'] = {
name: 'MONOCYTE%', unit: '%', range: '1.7 - 9.3',
value: x = +results.MONOS.value,
flag: (x < 1.7 ? 'L' : x > 9.3 ? 'H' : undefined)
});
results.push(results['MONOCYTE#'] = {
name: 'MONOCYTE#', unit: 'K/cmm', range: '0.11 - 0.59',
value: +(x = 0.01*x*results.WBC.value).toFixed(3),
flag: (x < 0.11 ? 'L' : x > 0.59 ? 'H' : undefined)
});
}
if((results.hasOwnProperty('LYMPHS')) || (results.hasOwnProperty('ATYPICAL LYMPHOCYTES'))) {
results.push(results['LYMPHOCYTE%'] = {
name: 'LYMPHOCYTE%', unit: '%', range: '15.0 - 41.0',