add slicing worklist
This commit is contained in:
106
worklist/components/filter.vue
Normal file
106
worklist/components/filter.vue
Normal file
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-container class="bg-white rounded-lg" fluid>
|
||||
<v-row>
|
||||
<v-col cols="3">
|
||||
<div class="d-flex align-center ga-2">
|
||||
<v-menu
|
||||
v-model="menuStartDate"
|
||||
:close-on-content-click="false"
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
min-width="auto"
|
||||
max-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-text-field
|
||||
:model-value="formatDate()"
|
||||
:label="$t('message.filter.date')"
|
||||
prepend-inner-icon="mdi-calendar"
|
||||
hide-details
|
||||
readonly
|
||||
variant="outlined"
|
||||
density="compact"
|
||||
v-bind="props"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker
|
||||
hide-header
|
||||
show-adjacent-months
|
||||
rounded="lg"
|
||||
color="primary"
|
||||
v-model="date"
|
||||
@update:modelValue="menuStartDate=false"
|
||||
></v-date-picker>
|
||||
</v-menu>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col cols="9">
|
||||
<div class="d-flex justify-end ga-6">
|
||||
<v-select
|
||||
:label="$t('message.filter.worklist')"
|
||||
variant="outlined"
|
||||
hide-details
|
||||
density="compact"
|
||||
menu-icon="mdi-chevron-down"
|
||||
:items="['California', 'Colorado', 'Florida', 'Georgia', 'Texas', 'Wyoming']"
|
||||
></v-select>
|
||||
<v-btn
|
||||
variant="flat"
|
||||
style="height: auto; width: 40px;"
|
||||
class="bg-primary rounded-lg">
|
||||
<iconify-icon
|
||||
style="font-size: 1.5rem;"
|
||||
icon="fluent:search-20-regular"
|
||||
></iconify-icon>
|
||||
</v-btn>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<script type="module">
|
||||
export default {
|
||||
name: "Filter",
|
||||
data() {
|
||||
return {
|
||||
menuStartDate: false,
|
||||
menuEndDate: false,
|
||||
visible: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
date: {
|
||||
get() {
|
||||
return this.$store.state.worklist.date;
|
||||
},
|
||||
set(val) {
|
||||
console.log(val)
|
||||
this.$store.commit("worklist/setDate", val);
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
formatDate() {
|
||||
if (!this.date) return null;
|
||||
|
||||
return moment(this.date).format("DD-MM-YYYY");
|
||||
},
|
||||
deFormatedDate(date) {
|
||||
if (!date) return null;
|
||||
|
||||
const [day, month, year] = date.split("-");
|
||||
return `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
|
||||
},
|
||||
},
|
||||
wacth: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
131
worklist/components/listWorklist.vue
Normal file
131
worklist/components/listWorklist.vue
Normal file
@@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-container class="bg-white rounded-lg" fluid>
|
||||
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xpatients"
|
||||
return-object
|
||||
hide-default-footer
|
||||
>
|
||||
<template v-slot:headers="{ columns }">
|
||||
<tr>
|
||||
<td width="15%" class="pa-4 bg-secondary-lighten font-weight-bold">
|
||||
{{ $t('message.headerWorklist.test') }}
|
||||
</td>
|
||||
<td class="pa-1 bg-secondary-lighten font-weight-bold">
|
||||
<span class="position-relative" style="top:6px;">
|
||||
{{ $t('message.headerWorklist.patient') }}
|
||||
</span>
|
||||
<span class="text-black float-right mr-3" style="font-size:20px;">
|
||||
{{ staff }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:item="{ item }">
|
||||
<tr>
|
||||
<td>
|
||||
<p class="mt-2 font-weight-medium text-uppercase">{{ item.T_TestName }}</p>
|
||||
<p class="text-grey">{{ item.T_TestCode }}</p>
|
||||
<p class="mb-2 text-black">Total pasien : {{ item.patients.length }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<v-row class="flex-wrap">
|
||||
<v-sheet v-for="(p, i) in item.patients" v-bind:key="i" class="pr-3 row-pointer">
|
||||
<v-sheet :class="p.is_received == 'Y' ? 'text-uppercase bg-primary-lighten text-primary box-y':'text-uppercase text-black box-n'">
|
||||
<p class="font-weight-medium">{{ p.name }}</p>
|
||||
<p >{{ p.number }}</p>
|
||||
</v-sheet>
|
||||
</v-sheet>
|
||||
</v-row>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.row-pointer :hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.v-table .v-table__wrapper > table > tbody > tr:not(:last-child) > td,
|
||||
.v-table .v-table__wrapper > table > tbody > tr:not(:last-child) > th,
|
||||
.v-table .v-table__wrapper > table > thead > tr > th {
|
||||
border-bottom: dashed 1px #EEEEEE;
|
||||
}
|
||||
|
||||
.box-y {
|
||||
display: flex;
|
||||
width: 202px;
|
||||
padding: 8px 12px;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #E3F2FD;
|
||||
}
|
||||
.box-n {
|
||||
display: flex;
|
||||
width: 202px;
|
||||
padding: 8px 12px;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #E0E0E0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="module">
|
||||
export default {
|
||||
name: "ListPatient",
|
||||
data() {
|
||||
return {
|
||||
staff: "BELUM ADA STAFF",
|
||||
headers: [
|
||||
{
|
||||
align: 'start',
|
||||
key: 'test',
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
title: this.$t('message.headerWorklist.test'),
|
||||
class: "bg-secondary-lighten font-weight-bold",
|
||||
},
|
||||
{
|
||||
align: 'start',
|
||||
key: 'patient',
|
||||
sortable: false,
|
||||
width: "85%",
|
||||
title: this.$t('message.headerWorklist.patient'),
|
||||
class: "bg-secondary-lighten font-weight-bold",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
xpatients() {
|
||||
return this.$store.state.worklist.patients
|
||||
},
|
||||
selected_patient: {
|
||||
get() {
|
||||
return this.$store.state.worklist.selected_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("worklist/setSelectedPatient", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
wacth: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
50
worklist/components/mainWorklist.vue
Normal file
50
worklist/components/mainWorklist.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<v-app id="inspire">
|
||||
<one-navbar></one-navbar>
|
||||
<v-main>
|
||||
<div class="pa-5 bg-primary-lighten ml-2 rounded-xl h-100">
|
||||
<v-row>
|
||||
<v-col cols="12" md="12" sm="12" xs="12">
|
||||
<filter-component></filter-component>
|
||||
</v-col>
|
||||
<v-col cols="12" md="12" sm="12" xs="12">
|
||||
<list-worklist-component></list-worklist-component>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</v-main>
|
||||
</v-app>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<script type="module">
|
||||
import NavbarComponent from "../../globalcomponent/one-navbar.vue";
|
||||
import filterComponent from "./filter.vue";
|
||||
import listWorklistComponent from "./listWorklist.vue";
|
||||
export default {
|
||||
name: "MainWorklist",
|
||||
components: {
|
||||
"one-navbar": NavbarComponent,
|
||||
"filter-component": filterComponent,
|
||||
"list-worklist-component": listWorklistComponent
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
wacth: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
116
worklist/index.html
Normal file
116
worklist/index.html
Normal file
@@ -0,0 +1,116 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>WESTONE</title>
|
||||
<!-- Vuetify CSS -->
|
||||
<link href="../css/vuetify.css" rel="stylesheet" />
|
||||
<!-- Local Stylesheet for Fonts -->
|
||||
<link rel="stylesheet" href="../css/styles.css" />
|
||||
<link href="../css/materialdesignicon.css" rel="stylesheet" />
|
||||
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<!-- Moment -->
|
||||
<script src="../libraries/moment.js"></script>
|
||||
<!-- Vue.js -->
|
||||
<!-- DEV -->
|
||||
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
||||
<!-- PROD -->
|
||||
<!-- <script src="../libraries/vue3.4.36.global.prod.js"></script> -->
|
||||
<!-- Vuex -->
|
||||
<script src="../libraries/vuex.js"></script>
|
||||
<!-- Vuetify -->
|
||||
<script src="../libraries/vuetify3.js"></script>
|
||||
<!-- vue-i18n -->
|
||||
<script src="../libraries/vue-i18n.global.js"></script>
|
||||
<!-- Axios -->
|
||||
<script src="../libraries/axios.js"></script>
|
||||
|
||||
<script src="../globalscript/theme.js"></script>
|
||||
<!-- loader single file component -->
|
||||
<script src="../libraries/vue3-sfc-loader.js"></script>
|
||||
<script src="./language.js"></script>
|
||||
|
||||
<script type="module">
|
||||
const { loadModule } = window["vue3-sfc-loader"];
|
||||
|
||||
import worklist from "./modules/worklist.js";
|
||||
import system from "../globalstore/globalstore.js";
|
||||
|
||||
const store = Vuex.createStore({
|
||||
modules: {
|
||||
system: system,
|
||||
worklist: worklist,
|
||||
},
|
||||
});
|
||||
const options = {
|
||||
moduleCache: {
|
||||
vue: Vue,
|
||||
},
|
||||
getFile(url) {
|
||||
return fetch(url).then((response) =>
|
||||
response.ok ? response.text() : Promise.reject(response)
|
||||
);
|
||||
},
|
||||
addStyle(textContent) {
|
||||
const style = document.createElement("style");
|
||||
style.textContent = textContent;
|
||||
const ref = document.head.getElementsByTagName("style")[0] || null;
|
||||
document.head.insertBefore(style, ref);
|
||||
},
|
||||
};
|
||||
// Locale messages
|
||||
const messages = CustomMessages;
|
||||
|
||||
// Get the browser's preferred language
|
||||
const browserLocale = navigator.language || navigator.languages[0];
|
||||
|
||||
// Initialize vue-i18n
|
||||
const i18n = VueI18n.createI18n({
|
||||
locale: browserLocale.startsWith("id") ? "id" : "en", // Set locale based on browser setting
|
||||
fallbackLocale: "en", // Set fallback locale
|
||||
messages, // Set locale messages
|
||||
});
|
||||
|
||||
// Vue App
|
||||
const app = Vue.createApp({
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
|
||||
template: `
|
||||
<main-worklist-component></main-worklist-component>
|
||||
`,
|
||||
});
|
||||
|
||||
const vuetify = Vuetify.createVuetify({
|
||||
theme: {
|
||||
themes: CustomTheme,
|
||||
},
|
||||
});
|
||||
|
||||
app.use(store);
|
||||
app.use(vuetify);
|
||||
app.use(i18n);
|
||||
const components = {
|
||||
"main-worklist-component": "./components/mainWorklist.vue",
|
||||
};
|
||||
Promise.all(
|
||||
Object.entries(components).map(([name, path]) => {
|
||||
return loadModule(path, options).then((component) => {
|
||||
app.component(name, component);
|
||||
});
|
||||
})
|
||||
)
|
||||
.then(() => {
|
||||
app.mount("#app");
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error loading components:", error);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
26
worklist/language.js
Normal file
26
worklist/language.js
Normal file
@@ -0,0 +1,26 @@
|
||||
var CustomMessages = {
|
||||
en: {
|
||||
message: {
|
||||
filter: {
|
||||
date: "Date",
|
||||
worklist: "Worklist",
|
||||
},
|
||||
headerWorklist: {
|
||||
test: "EXAMINATION NAME",
|
||||
patient: "PATIENT"
|
||||
}
|
||||
},
|
||||
},
|
||||
id: {
|
||||
message: {
|
||||
filter: {
|
||||
date: "Tanggal",
|
||||
worklist: "Daftar kerja",
|
||||
},
|
||||
headerWorklist: {
|
||||
test: "NAMA PEMERIKSAAN",
|
||||
patient: "PASIEN"
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
162
worklist/modules/worklist.js
Normal file
162
worklist/modules/worklist.js
Normal file
@@ -0,0 +1,162 @@
|
||||
|
||||
const store = {
|
||||
namespaced: true,
|
||||
state() {
|
||||
return {
|
||||
date: new Date(),
|
||||
patients: [
|
||||
{
|
||||
"T_TestID": "4095",
|
||||
"Nat_TestID": "4095",
|
||||
"T_TestCode": "10110100",
|
||||
"T_TestName": "Hematologi Lengkap",
|
||||
"T_WorklistID": "40",
|
||||
"patients": [
|
||||
{
|
||||
"name": "Tn COCOBA / 654545 ",
|
||||
"id": "132258",
|
||||
"did": "1626215",
|
||||
"number": "05600003LA",
|
||||
"is_rujukan": "N",
|
||||
"T_SampleTypeID": 2,
|
||||
"speciment_receive": "N",
|
||||
"speciment_handling": "N",
|
||||
"is_cito": "N",
|
||||
"is_received": "N",
|
||||
"is_confirm": "N",
|
||||
"barcode": "05600003LAEL",
|
||||
"requirements": null
|
||||
},
|
||||
{
|
||||
"name": "Tn COCOBA / 654545 ",
|
||||
"id": "132259",
|
||||
"did": "1626279",
|
||||
"number": "05600004LA",
|
||||
"is_rujukan": "N",
|
||||
"T_SampleTypeID": 2,
|
||||
"speciment_receive": "Y",
|
||||
"speciment_handling": "Y",
|
||||
"is_cito": "N",
|
||||
"is_received": "Y",
|
||||
"is_confirm": "N",
|
||||
"barcode": "05600004LAEL",
|
||||
"requirements": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"T_TestID": "4099",
|
||||
"Nat_TestID": "4099",
|
||||
"T_TestCode": "10110500",
|
||||
"T_TestName": "Leukosit",
|
||||
"T_WorklistID": "40",
|
||||
"patients": [
|
||||
{
|
||||
"name": "Tn COCOBA / 654545 ",
|
||||
"id": "132258",
|
||||
"did": "1626217",
|
||||
"number": "05600003LA",
|
||||
"is_rujukan": "N",
|
||||
"T_SampleTypeID": 2,
|
||||
"speciment_receive": "N",
|
||||
"speciment_handling": "N",
|
||||
"is_cito": "N",
|
||||
"is_received": "N",
|
||||
"is_confirm": "N",
|
||||
"barcode": "05600003LAEL",
|
||||
"requirements": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"T_TestID": "4108",
|
||||
"Nat_TestID": "4108",
|
||||
"T_TestCode": "10110800",
|
||||
"T_TestName": "Trombosit",
|
||||
"T_WorklistID": "40",
|
||||
"patients": [
|
||||
{
|
||||
"name": "Tn COCOBA / 654545 ",
|
||||
"id": "132258",
|
||||
"did": "1626226",
|
||||
"number": "05600003LA",
|
||||
"is_rujukan": "N",
|
||||
"T_SampleTypeID": 2,
|
||||
"speciment_receive": "N",
|
||||
"speciment_handling": "N",
|
||||
"is_cito": "N",
|
||||
"is_received": "N",
|
||||
"is_confirm": "N",
|
||||
"barcode": "05600003LAEL",
|
||||
"requirements": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"T_TestID": "4110",
|
||||
"Nat_TestID": "4110",
|
||||
"T_TestCode": "10111000",
|
||||
"T_TestName": "Erytrosit",
|
||||
"T_WorklistID": "40",
|
||||
"patients": [
|
||||
{
|
||||
"name": "Tn COCOBA / 654545 ",
|
||||
"id": "132258",
|
||||
"did": "1626228",
|
||||
"number": "05600003LA",
|
||||
"is_rujukan": "N",
|
||||
"T_SampleTypeID": 2,
|
||||
"speciment_receive": "N",
|
||||
"speciment_handling": "N",
|
||||
"is_cito": "N",
|
||||
"is_received": "N",
|
||||
"is_confirm": "N",
|
||||
"barcode": "05600003LAEL",
|
||||
"requirements": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"T_TestID": "4633",
|
||||
"Nat_TestID": "4633",
|
||||
"T_TestCode": "10510100",
|
||||
"T_TestName": "SGOT",
|
||||
"T_WorklistID": "40",
|
||||
"patients": [
|
||||
{
|
||||
"name": "Ny COBA HENY LAGI ",
|
||||
"id": "132261",
|
||||
"did": "1626344",
|
||||
"number": "05600006LA",
|
||||
"is_rujukan": "N",
|
||||
"T_SampleTypeID": 35,
|
||||
"speciment_receive": "N",
|
||||
"speciment_handling": "N",
|
||||
"is_cito": "N",
|
||||
"is_received": "N",
|
||||
"is_confirm": "N",
|
||||
"barcode": null,
|
||||
"requirements": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
selected_patient: {}
|
||||
};
|
||||
},
|
||||
mutations: {
|
||||
setDate(state, data) {
|
||||
state.date = data;
|
||||
},
|
||||
setPatients(state, data) {
|
||||
state.patients = data
|
||||
},
|
||||
setSelectedPatient(state, data) {
|
||||
state.selected_patient = data
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
|
||||
}
|
||||
};
|
||||
export default store
|
||||
Reference in New Issue
Block a user