Files
FE_CPONE/test/vuex/cpone-sampling-electromedis-mobile/index.php
2026-04-27 10:13:31 +07:00

442 lines
18 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CPONE</title>
<link rel="stylesheet" href="../../../libs/vendor/css/google-fonts.css">
<link rel="stylesheet" href="../../../libs/vendor/css/icomoon-fonts.css">
<link rel="stylesheet" href="../../../libs/vendor/css/vuetify.min.css">
</head>
<body>
<div v-cloak id="app">
<v-app id="smartApp" >
<!--<one-navbar></one-navbar>-->
<v-content style="background:#F5E8DF!important" >
<v-container fluid >
<template>
<div
id="e3"
style="max-width: 400px; margin:auto"
>
<v-toolbar
class="primary" dark
>
<v-btn icon>
<v-icon>colorize</v-icon>
</v-btn>
<v-toolbar-title>Antrian Dokter</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn @click="logout()" icon>
<v-icon color="black">remove_circle</v-icon>
</v-btn>
</v-toolbar>
<v-card>
<v-card-text>
<v-container
fluid
grid-list-lg
>
<v-layout row>
<v-flex xs12>
<v-select
class="mini-select ml-1"
:items="stations"
item-text="name"
return-object
style="font-size: 14px"
v-model="selected_station"
label="Station"
outline
hide-details
></v-select>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12>
<v-select
class="mini-select ml-1"
:items="locations"
item-text="locationName"
return-object
style="font-size: 14px"
v-model="selected_location"
label="Lokasi"
outline
hide-details
></v-select>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12>
<v-divider></v-divider>
</v-flex>
</v-layout>
<v-layout v-if="_.isEmpty(data_patient)" row wrap>
<v-flex xs12>
<v-card color="primary" class="white--text">
<v-card-text>
<v-img :src="imageSrc"></v-img>
</v-card-text>
<v-card-actions>
<v-btn block @click="openscanner()">
Scan QR Code Pasien
</v-btn>
</v-card-actions>
</v-card>
</v-flex>
</v-layout>
<v-layout v-if="!_.isEmpty(data_patient)" row>
<v-flex xs12>
<v-card color="primary" class="white--text">
<v-layout row>
<v-flex xs7>
<v-card-title primary-title>
<div>
<div class="headline">{{data_patient.labnumber}}</div>
<div>{{data_patient.patient_name}}</div>
<div class="caption">{{data_patient.order_date}}</div>
</div>
</v-card-title>
</v-flex>
<v-flex xs5>
<v-img
class="mt-2"
:src="data_patient.photo"
height="115px"
contain
></v-img>
</v-flex>
</v-layout>
<v-divider light></v-divider>
<v-card-actions class="pa-3">
{{data_patient.gender}}
<v-spacer></v-spacer>
{{data_patient.patient_age}}
</v-card-actions>
</v-card>
<v-list v-if="data_patient" class="mt-4" subheader>
<v-subheader>Pemeriksaan</v-subheader>
<v-list-group
v-if="data_packet.length > 0"
v-for="item in data_packet"
:key="item.packet_name"
v-model="item.active"
:prepend-icon="item.action"
no-action
>
<template v-slot:activator>
<v-list-tile>
<v-list-tile-content>
<v-list-tile-title>{{ item.packet_name }}</v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
</template>
<v-list-tile
v-for="subItem in item.details"
:key="subItem.test_name"
@click=""
>
<v-list-tile-content>
<v-list-tile-title>{{ subItem.test_name }}</v-list-tile-title>
</v-list-tile-content>
<v-list-tile-action>
<v-icon>{{ subItem.action }}</v-icon>
</v-list-tile-action>
</v-list-tile>
</v-list-group>
<v-card v-if="data_tests.length > 0" flat>
<v-form>
<v-text-field
v-for="(test,k_test) in data_tests"
:key="test.test_name"
label=""
prepend-inner-icon="label_important"
:value="test.test_name"
single-line
full-width
hide-details
></v-text-field>
<v-divider v-if="k_test <= data.tests.length - 1"></v-divider>
<!--<v-text-field
prepend-inner-icon="label_important"
label="Subject"
value="Nebeng boy"
single-line
full-width
hide-details
></v-text-field>-->
</v-form>
</v-card>
</v-list>
<v-list-tile
v-if="data_sample_lab.length > 0"
v-for="sample in data_sample_lab"
:key="sample.barcode"
avatar
@click=""
>
<v-list-tile-avatar>
<v-icon class="blue white--text">colorize</v-icon>
</v-list-tile-avatar>
<v-list-tile-content>
<v-list-tile-title>{{ sample.sampletype_name }}</v-list-tile-title>
<v-list-tile-sub-title>{{ sample.receive_date }} {{ sample.receive_time }}</v-list-tile-sub-title>
</v-list-tile-content>
<v-list-tile-action>
<v-btn icon ripple>
<v-icon v-if="sample.status == 'N'" color="grey lighten-1">info</v-icon>
<v-icon v-if="sample.status == 'P'" color="yellow lighten-1">info</v-icon>
<v-icon v-if="sample.status == 'D'" color="success lighten-1">check_circle</v-icon>
</v-btn>
</v-list-tile-action>
</v-list-tile>
<!-- <v-subheader v-if="data_sample_radiodiagnostic.length > 0" inset>Radiodiagnostik</v-subheader>
<v-list-tile
v-if="data_sample_radiodiagnostic.length > 0"
v-for="sample in data_sample_radiodiagnostic"
:key="sample.barcode"
avatar
@click=""
>
<v-list-tile-avatar>
<v-icon class="amber white--text">assignment_ind</v-icon>
</v-list-tile-avatar>
<v-list-tile-content>
<v-list-tile-title>{{ sample.sampletype_name }}</v-list-tile-title>
<v-list-tile-sub-title>{{ sample.receive_date }} {{ sample.receive_time }}</v-list-tile-sub-title>
</v-list-tile-content>
<v-list-tile-action>
<v-btn icon ripple>
<v-icon v-if="sample.is_sampling == 'N' || sample.is_received == 'N'" color="grey lighten-1">info</v-icon>
<v-icon v-if="sample.is_sampling == 'Y' && sample.is_received == 'Y'" color="success lighten-1">check_circle</v-icon>
</v-btn>
</v-list-tile-action>
</v-list-tile>
-->
</v-flex>
</v-layout>
</v-container>
</v-card-text>
<v-divider v-if="!_.isEmpty(data_patient)"></v-divider>
<v-card-actions v-if="!_.isEmpty(data_patient) && isdone != 'Y'">
<v-btn @click="skipAction()" dark color="black ligthen-2"><v-icon left>fast_rewind</v-icon> SKIP</v-btn>
<v-spacer></v-spacer>
<v-btn @click="scanSample()" dark color="blue"> SCAN BARCODE <v-icon right>camera</v-icon></v-btn>
</v-card-actions>
</v-card>
<qr-scanner></qr-scanner>
</div>
</template>
</v-container>
</v-content>
<!--<one-footer> </one-footer>-->
</v-app>
</div>
<!-- Vendor -->
<script src="../../../libs/vendor/html5-qrcode.min.js"></script>
<script src="../../../libs/vendor/moment.min.js"></script>
<script src="../../../libs/vendor/numeral.min.js"></script>
<script src="../../../libs/vendor/moment-locale-id.js"></script>
<script src="../../../libs/vendor/lodash.js"></script>
<script src="../../../libs/vendor/axios.min.js"></script>
<script src="../../../libs/vendor/vue.js"></script>
<script src="../../../libs/vendor/vuex.js"></script>
<script src="../../../libs/vendor/vuetify.js"></script>
<script src="../../../libs/vendor/httpVueLoader.js"></script>
<script src="../../../libs/one_global.js"></script>
<script src="../../../libs/one_print_barcode.js"></script>
<script src="../../../libs/one_print_robo.js"></script>
<!-- App Script -->
<?php
$ts = "?ts=" . Date("ymdhis");
?>
<script type="module">
window.calculate_age = function (inp_dob) {
var now = moment(new Date())
var dob = moment(new Date(inp_dob))
var year = now.diff(dob,'years')
dob.add(year,'years')
var month = now.diff(dob,'months')
dob.add(month,'months')
var day = now.diff(dob,'days')
if (isNaN(year)) return ''
return `${year} tahun ${month} bulan ${day} hari`
}
import { store } from './store.js<?php echo $ts ?>';
//for testing
window.store = store;
new Vue({
store,
el: '#app',
methods: {
tab_selected : function(tab) {
return this.$store.state.tab_selected == tab
}
},
components: {
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
'one-patient-list': httpVueLoader('./components/onePatientList.vue'),
'qr-scanner': httpVueLoader('./components/oneQRscanner.vue')
},
mounted: function() {
var url_string = window.location.href
var url = new URL(url_string);
//var id = url.searchParams.get("nolab");
var labnumber = url.searchParams.get("labnumber");
//this.$store.commit('patient/update_order_id', id)
//this.$store.commit('patient/update_noreg', noreg)
if(labnumber)
this.$store.commit('patient/update_url_labnumber', labnumber)
//this.$store.dispatch("patient/scan_patient",{'labnumber':labnumber})
this.$store.dispatch("patient/getstations")
},
methods : {
logout () {
window.one_logout('/one-ui/test/vuex/one-login')
},
openscanner(){
this.$store.commit("patient/update_act_scan",'qrpatient')
this.dialog_scanner = true
},
skipAction(){
this.$store.dispatch("patient/skipaction")
},
scanSample(){
this.$store.commit("patient/update_act_scan",'scanbarcode')
this.dialog_scanner = true
}
},
computed: {
isdone() {
return this.$store.state.patient.isdone
},
stations() {
return this.$store.state.patient.stations
},
selected_station: {
get() {
return this.$store.state.patient.selected_station
},
set(val) {
this.$store.commit("patient/update_selected_station",val)
}
},
locations() {
return this.$store.state.patient.locations
},
selected_location: {
get() {
return this.$store.state.patient.selected_location
},
set(val) {
this.$store.commit("patient/update_selected_location",val)
}
},
data_patient() {
return this.$store.state.patient.data_patient
},
dialog_scanner: {
get() {
return this.$store.state.patient.dialog_scanner
},
set(val) {
this.$store.commit("patient/update_dialog_scanner",val)
}
},
data_patient() {
return this.$store.state.patient.data_patient
},
data_packet() {
return this.$store.state.patient.data_packet
},
data_tests() {
return this.$store.state.patient.data_tests
},
data_sample_lab() {
return this.$store.state.patient.data_sample_lab
},
data_sample_radiodiagnostic() {
return this.$store.state.patient.data_sample_radiodiagnostic
},
data_sample_electromedic() {
return this.$store.state.patient.data_sample_electromedic
},
data_sample_other() {
return this.$store.state.patient.data_sample_other
},
},
data () {
return {
imageSrc: './images/undraw_the_search_s0xf.png' ,
items2: [
{ icon: 'assignment', iconClass: 'blue white--text', title: 'Vacation itinerary', subtitle: 'Jan 20, 2014' },
{ icon: 'call_to_action', iconClass: 'amber white--text', title: 'Kitchen remodel', subtitle: 'Jan 10, 2014' }
],
items: [
{
action: 'healing',
title: 'Paket Pria 2024',
items: [
{ title: 'List Item' },
{ title: 'List Item' },
{ title: 'List Item' }
]
}
]
}
}
})
</script>
<style>
[v-cloak] {
display: none
}
.left {
}
.right {
}
</style>
</body>
</html>