Flatten nested repos
This commit is contained in:
491
test/vuex/cpone-control-card/index.php
Normal file
491
test/vuex/cpone-control-card/index.php
Normal file
@@ -0,0 +1,491 @@
|
||||
<!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-dialog
|
||||
v-model="status_selesai"
|
||||
max-width="290"
|
||||
persistent>
|
||||
<v-card>
|
||||
<v-card-title class="headline">Selamat !</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
Anda telah selesai melakukan seluruh pemeriksaan medical check up, silahkan mengisi survey
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn
|
||||
color="primary darken-1"
|
||||
flat="flat"
|
||||
@click="goToSurvey()">
|
||||
Klik untuk isi surve
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-content style="background:#F5E8DF!important">
|
||||
<v-container fluid>
|
||||
<template>
|
||||
<div
|
||||
id="e3"
|
||||
style="max-width: 400px; margin:auto"
|
||||
class="grey lighten-3">
|
||||
<v-toolbar>
|
||||
<v-btn icon>
|
||||
<v-icon>assignment</v-icon>
|
||||
</v-btn>
|
||||
<v-toolbar-title>Kartu Kontrol</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<!--<v-btn icon>
|
||||
<v-icon>search</v-icon>
|
||||
</v-btn>-->
|
||||
</v-toolbar>
|
||||
|
||||
<v-card>
|
||||
<v-container
|
||||
fluid
|
||||
grid-list-lg>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-card flat class="pb-4">
|
||||
<v-img
|
||||
class="mt-2"
|
||||
:src="photo_qr"
|
||||
height="115px"
|
||||
contain></v-img>
|
||||
</v-card>
|
||||
<v-card color="primary" class="white--text">
|
||||
<v-layout row>
|
||||
<v-flex xs7>
|
||||
<v-card-title primary-title>
|
||||
<div>
|
||||
<div class="headline mb-1">{{data_patient.labnumber}}</div>
|
||||
<p class="mb-0">{{data_patient.patient_name}} <span v-if="data_patient.nip">/ {{data_patient.nip}}</span></p>
|
||||
<p class="mb-0 caption">{{data_patient.patient_age}}</p>
|
||||
<!--<div class="caption">{{data_patient.order_date}}</div>-->
|
||||
<p class="mb-0 caption font-weight-bold">{{data_patient.corporate_name}}</p>
|
||||
|
||||
</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>
|
||||
|
||||
<p class="mb-0">{{data_patient.dob}}</p>
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
|
||||
|
||||
<v-list 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-form>
|
||||
</v-card> -->
|
||||
|
||||
<v-card v-if="data_tests.length > 0" flat>
|
||||
<v-form>
|
||||
<template v-for="(test, k_test) in data_tests">
|
||||
<v-text-field
|
||||
: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>
|
||||
</template>
|
||||
</v-form>
|
||||
</v-card>
|
||||
|
||||
</v-list>
|
||||
|
||||
|
||||
<v-subheader>Pemeriksaan / Pengambilan Sample</v-subheader>
|
||||
<!--<v-subheader v-if="data_sample_lab.length > 0" inset>Laboratorium</v-subheader>-->
|
||||
|
||||
<v-list-tile
|
||||
v-if="data_sample_lab.length > 0"
|
||||
v-for="sample in data_sample_lab"
|
||||
:key="sample.barcode"
|
||||
avatar
|
||||
@click=""
|
||||
three-line
|
||||
class="mb-2">
|
||||
<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-sub-title class="font-weight-bold">{{sample.staff_name}}</v-list-tile-sub-title>
|
||||
<v-list-tile-sub-title class="caption">{{ 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-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=""
|
||||
three-line
|
||||
class="mb-2">
|
||||
<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 class="font-weight-bold">{{sample.staff_name}}</v-list-tile-sub-title>
|
||||
<v-list-tile-sub-title class="caption">{{ 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-subheader v-if="data_sample_electromedic.length > 0" inset>Elektromedik</v-subheader>-->
|
||||
|
||||
<v-list-tile
|
||||
v-if="data_sample_electromedic.length > 0"
|
||||
v-for="sample in data_sample_electromedic"
|
||||
:key="sample.barcode"
|
||||
avatar
|
||||
@click=""
|
||||
three-line
|
||||
class="mb-2">
|
||||
<v-list-tile-avatar>
|
||||
<v-icon class="teal white--text">contacts</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 class="font-weight-bold">{{sample.staff_name}}</v-list-tile-sub-title>
|
||||
<v-list-tile-sub-title class="caption">{{ 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-subheader v-if="data_sample_other.length > 0" inset>Layanan Klinik</v-subheader>-->
|
||||
|
||||
<v-list-tile
|
||||
v-if="data_sample_other.length > 0"
|
||||
v-for="sample in data_sample_other"
|
||||
:key="sample.barcode"
|
||||
avatar
|
||||
@click=""
|
||||
three-line
|
||||
class="mb-2">
|
||||
<v-list-tile-avatar>
|
||||
<v-icon class="orange darken-2 white--text">accessibility</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 class="font-weight-bold">{{sample.staff_name}}</v-list-tile-sub-title>
|
||||
<v-list-tile-sub-title class="caption">{{ 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-list-tile
|
||||
|
||||
|
||||
avatar
|
||||
@click="goToSurvey()">
|
||||
<v-list-tile-avatar>
|
||||
<v-icon class="purple darken-2 white--text">assignment</v-icon>
|
||||
</v-list-tile-avatar>
|
||||
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ data_survey.sampletype_name }}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ data_survey.receive_date }} {{ data_survey.receive_time }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
|
||||
<v-list-tile-action>
|
||||
<v-btn icon ripple>
|
||||
<v-icon v-if="data_survey.is_sampling == 'N' || data_survey.is_received == 'N'" color="grey lighten-1">info</v-icon>
|
||||
<v-icon v-if="data_survey.is_sampling == 'Y' && data_survey.is_received == 'Y'" color="success lighten-1">check_circle</v-icon>
|
||||
</v-btn>
|
||||
</v-list-tile-action>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-card>
|
||||
<v-card class="mt-1 pt-1 pa-2">
|
||||
<v-btn block color="primary" @click="openscanner()">
|
||||
Refresh
|
||||
</v-btn>
|
||||
<qr-scanner></qr-scanner>
|
||||
</v-card>
|
||||
</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',
|
||||
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("id");
|
||||
var noreg = url.searchParams.get("noreg");
|
||||
|
||||
this.$store.commit('patient/update_order_id', id)
|
||||
this.$store.commit('patient/update_noreg', noreg)
|
||||
|
||||
this.$store.dispatch('patient/load_data')
|
||||
|
||||
},
|
||||
methods: {
|
||||
goToSurvey: function() {
|
||||
console.log('aloha')
|
||||
let order_id = this.$store.state.patient.order_id
|
||||
let noreg = this.$store.state.patient.noreg
|
||||
window.location = "/one-ui/test/vuex/cpone-control-card-survey/?noreg=" + noreg + "&id=" + order_id
|
||||
},
|
||||
openscanner() {
|
||||
//this.dialog_scanner = true
|
||||
location.reload()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
photo_qr() {
|
||||
return this.$store.state.patient.photo_qr
|
||||
},
|
||||
status_selesai() {
|
||||
return this.$store.state.patient.status_selesai
|
||||
},
|
||||
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_survey() {
|
||||
return this.$store.state.patient.data_survey
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
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>
|
||||
Reference in New Issue
Block a user