Flatten nested repos

This commit is contained in:
sas.fajri
2026-04-27 10:13:31 +07:00
parent 01c2963a43
commit 8347aef8f4
17935 changed files with 5015229 additions and 3 deletions

View File

@@ -0,0 +1,211 @@
<template>
<v-dialog
v-model="dialog"
:overlay="true"
max-width="300px"
>
<v-card>
<v-card-title primary-title class="headline grey lighten-2">
Ambil / Upload Foto
</v-card-title>
<v-card-text>
<v-layout row wrap>
<v-flex xs12>
<v-card fill-height flat>
<v-card-text class="pb-0">
<v-card
class="photo_box"
id="photo_box"
elevation="24"
>
<div class="photo_inside" id="photo_inside" v-show="camera">
asasdasd ads asd ad ad as da sd a das d sa das d ad as d as dsa ds ad asd sa das d asd as da sd sad as das das d asd sa das d sad as da sd
</div>
<div class="photo_inside" id="photo_inside_2" v-show="!camera">
<v-img
:src="imageUrl"
aspect-ratio="1.34"
class="grey lighten-2 elevation-2"
contain
>
<!-- <img :src="imageUrl" height="150" v-if="imageUrl"/> -->
</div>
</v-card>
<v-btn color="success" block @click="snap_photo" v-show="camera">Ambil Foto</v-btn>
<v-btn color="orange" dark block @click="camera = true" v-show="!camera">Gunakan Kamera</v-btn>
<v-divider>xxxx</v-divider>
<v-flex xs12 class="text-xs-center">
atau
</v-flex>
<v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center">
<v-text-field label="Pilih Gambar" hide-details @click='pickFile' v-model='imageName' prepend-icon='attach_file' class="mt-2"></v-text-field>
<input
type="file"
style="display: none"
ref="image"
accept="image/*"
@change="onFilePicked"
>
</v-flex>
<v-flex xs12>
<v-btn color="success" block @click="upload" :disabled="camera" :dark="!camera">Simpan</v-btn>
</v-flex>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
flat
@click="dialog = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style>
.photo_box {
overflow-x: hidden;
}
.photo_inside {
/* position: absolute;
top: 0;
left: 0; */
width: 100%;
height: 100%;
overflow: hidden;
}
#photo_inside_2 {
min-height: 201px;
}
</style>
<script>
module.exports = {
data () {
return {
title: "Image Upload",
imageName: '',
imageUrl: '',
imageFile: '',
camera: true
}
},
computed : {
dialog : {
get () { return this.$store.state.photo.dialog_photo },
set (v) { this.$store.commit('photo/update_dialog_photo', v) }
}
},
methods : {
snap_photo() {
var str = this.$store
Webcam.snap(function(data_uri) {
// document.getElementById('photo_result').innerHTML = '<img src="'+data_uri+'"/>';
// console.log(data_uri)
str.commit('photo/update_photo_64', data_uri)
str.dispatch('photo/upload')
})
delete str
},
pickFile () {
this.$refs.image.click ()
},
onFilePicked (e) {
this.camera = false
console.log(this.camera)
const files = e.target.files
if(files[0] !== undefined) {
this.imageName = files[0].name
if(this.imageName.lastIndexOf('.') <= 0) {
return
}
const fr = new FileReader ()
fr.readAsDataURL(files[0])
fr.addEventListener('load', () => {
this.imageUrl = fr.result
this.imageFile = files[0] // this is an image file that can be sent to server...
})
} else {
this.imageName = ''
this.imageFile = ''
this.imageUrl = ''
}
},
upload () {
this.$store.commit('photo/update_photo_64', this.imageUrl)
this.$store.dispatch('photo/upload')
}
},
watch : {
dialog (n, o) {
if (n == true) {
this.camera = true
Webcam.set({
width: 268,
height: 201,
image_format: 'jpeg',
jpeg_quality: 90,
dest_width: 640,
dest_height: 480
});
Webcam.attach( '#photo_inside' );
} else {
Webcam.reset()
}
},
camera (n, o) {
if (n == true) {
this.imageName = ''
this.imageFile = ''
this.imageUrl = ''
Webcam.set({
width: 268,
height: 201,
image_format: 'jpeg',
jpeg_quality: 90,
dest_width: 640,
dest_height: 480
});
Webcam.attach( '#photo_inside' );
} else {
Webcam.reset()
}
}
}
}
</script>

View File

@@ -0,0 +1,397 @@
<template>
<v-layout v-if="xact !== 'new'" column >
<v-dialog v-model="dialogconfirmationdeleteaddr" persistent max-width="290">
<v-card>
<v-card-title
dark
class="headline error pt-2 pb-2"
primary-title
style="color:white"
>
<h4 dark>Konfirmasi</h4>
</v-card-title>
<v-card-text>
{{msgconfirmationdeleteaddr}}
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn small v-if="!checkError('deleteutama')" color="error darken-1 text-sm-left" flat @click="doDeleteAddr()">Hapus</v-btn>
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationdeleteaddr = false">Batal</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogformaddress" persistent max-width="650">
<v-card>
<v-card-title>
<span class="headline">Form Alamat Pasien</span>
</v-card-title>
<v-card-text class="pt-0 pb-0">
<v-layout wrap>
<v-flex xs12>
<v-text-field v-model="labeladdress" label="Label"></v-text-field>
<p v-if="checkError('requiredlabel')" class="error pl-2 pr-2" style="color:#fff">Jangan kosong dong</p>
<p v-if="checkError('readonlyutama')" class="error pl-2 pr-2" style="color:#fff">Biarkan jadi yang utama</p>
</v-flex>
<v-flex xs12>
<v-layout row>
<v-flex xs4 pa-1>
<v-autocomplete
label="Kota"
v-model="cityaddress"
:items="xcities"
:search-input.sync="search_city"
auto-select-first
no-filter
item-text="M_CityName"
return-object
:loading="isLoading"
no-data-text="Pilih Kota"
>
<template
slot="item"
slot-scope="{ item }"
>
<v-list-tile-content>
<v-list-tile-title v-text="item.M_CityName"></v-list-tile-title>
</v-list-tile-content>
</template>
</v-autocomplete>
<p v-if="checkError('requiredcity')" class="error pl-2 pr-2" style="color:#fff">Jangan kosong dong</p>
</v-flex>
<v-flex xs4 pa-1>
<v-select
item-text="M_DistrictName"
return-object
:items="xdistricts"
v-model="districtaddress"
label="Kecamatan*"
></v-select>
<p v-if="checkError('requireddistrict')" class="error pl-2 pr-2" style="color:#fff">Jangan kosong dong</p>
</v-flex>
<v-flex xs4 pa-1>
<v-select
item-text="M_KelurahanName"
return-object
:items="xkelurahans"
v-model="kelurahanaddress"
label="Kelurahan / Desa*"
></v-select>
<p v-if="checkError('requiredkelurahan')" class="error pl-2 pr-2" style="color:#fff">Jangan kosong dong</p>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs12>
<v-textarea
box
label="Alamat Lengkap"
v-model="descriptionaddress"
></v-textarea>
<p v-if="checkError('requireddescription')" class="error pl-2 pr-2" style="color:#fff">Jangan kosong dong</p>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="blue darken-1" flat @click="dialogformaddress = false">Tutup</v-btn>
<v-btn v-if="xactaddr === 'new'" color="blue darken-1" flat @click="saveNewAddress()">Simpan</v-btn>
<v-btn v-if="xactaddr === 'edit'" color="blue darken-1" flat @click="saveEditAddress()">Simpan</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-card>
<v-layout row>
<v-flex xs12>
<v-subheader red--text text--lighten-1> ALAMAT PASIEN
<v-flex text-md-right>
<v-btn @click="createNewAddress()" small color="info">Baru</v-btn>
</v-flex>
</v-subheader>
<v-divider></v-divider>
<v-layout row wrap>
<v-flex xs12 pa-2>
<v-data-table
:headers="headers"
:items="xaddresses"
:loading="isLoading"
hide-actions class="elevation-1">
<template slot="items" slot-scope="props">
<td class="text-xs-center pa-2">
<v-icon color="error" @click="deleteAddress(props.item)">delete</v-icon>
<v-icon class="ml-3" color="primary" @click="editAddress(props.item)">edit</v-icon>
</td>
<td class="text-xs-left pa-2">{{ props.item.M_PatientAddressNote}}</td>
<td class="text-xs-left pa-2">{{ props.item.M_PatientAddressDescription}}</td>
</template>
</v-data-table>
</v-flex>
</v-layout>
</v-flex>
</v-flex>
</v-card>
</v-layout>
</template>
<style scoped>
</style>
<script>
module.exports = {
data: () => ({
search_city:'',
oldlabel:'',
headers: [
{
text: "AKSI",
align: "center",
sortable: false,
value: "action",
width: "10%",
class: "pa-1 blue lighten-3 white--text"
},
{
text: "LABEL",
align: "left",
sortable: false,
value: "mr",
width: "20%",
class: "pa-1 blue lighten-3 white--text"
},
{
text: "ALAMAT",
align: "left",
sortable: false,
value: "lab",
width: "40%",
class: "pa-1 blue lighten-3 white--text"
}
]
}),
computed: {
dialogconfirmationdeleteaddr:{
get() {
return this.$store.state.patient.dialog_confirmation_delete_addr
},
set(val) {
this.$store.commit("patient/update_dialog_confirmation_delete_addr",val)
}
},
msgconfirmationdeleteaddr(){
return this.$store.state.patient.msg_confirmation_delete_addr
},
xact() {
return this.$store.state.patient.act
},
xactaddr() {
return this.$store.state.patient.act_addr
},
dialogformaddress:{
get() {
return this.$store.state.patient.dialog_form_address
},
set(val) {
this.$store.commit("patient/update_dialog_form_address",val)
}
},
isLoading() {
return this.$store.state.patient.search_status == 1
},
xaddresses(p) {
return this.$store.state.patient.addresses
},
xcities(){
return this.$store.state.patient.cities
},
labeladdress:{
get() {
return this.$store.state.patient.label_address
},
set(val) {
this.$store.commit("patient/update_label_address",val)
}
},
cityaddress:{
get() {
return this.$store.state.patient.city_address
},
set(val) {
this.$store.commit("patient/update_city_address",val)
this.$store.dispatch("patient/getdistrict",this.$store.state.patient.city_address)
}
},
xdistricts(){
return this.$store.state.patient.districts
},
districtaddress:{
get() {
return this.$store.state.patient.district_address
},
set(val) {
this.$store.commit("patient/update_district_address",val)
this.$store.dispatch("patient/getkelurahan",this.$store.state.patient.district_address)
}
},
xkelurahans(){
return this.$store.state.patient.kelurahans
},
kelurahanaddress:{
get() {
return this.$store.state.patient.kelurahan_address
},
set(val) {
this.$store.commit("patient/update_kelurahan_address",val)
}
},
descriptionaddress:{
get() {
return this.$store.state.patient.description_address
},
set(val) {
this.$store.commit("patient/update_description_address",val)
}
},
},
methods : {
createNewAddress(){
this.$store.commit("patient/update_act_addr",'new')
this.search_city = ''
this.labeladdress = ''
this.$store.commit("patient/update_cities",[])
this.cityaddress = {}
this.$store.commit("patient/update_districts",[])
this.districtaddress = {}
this.$store.commit("patient/update_kelurahans",[])
this.kelurahanaddress = {}
this.descriptionaddress = ''
this.$store.commit("patient/update_dialog_form_address",true)
},
thr_search_city: _.debounce( function () {
this.$store.dispatch("patient/searchcity",this.search_city)
},2000),
checkError(value){
var errors = this.$store.state.patient.errors
if(errors.includes(value)){
return true
}
else{
return false
}
},
saveNewAddress(){
this.$store.commit("patient/update_errors",[])
var errors = this.$store.state.patient.errors
if(this.labeladdress === ''){
errors.push("requiredlabel")
}
if(_.isEmpty(this.cityaddress)){
errors.push("requiredcity")
}
if(_.isEmpty(this.districtaddress)){
errors.push("requireddistrict")
}
if(_.isEmpty(this.kelurahanaddress)){
errors.push("requiredkelurahan")
}
if(_.isEmpty(this.descriptionaddress)){
errors.push("requireddescription")
}
if(errors.length === 0){
var prm = {}
prm.M_PatientAddressM_PatientID = this.$store.state.patient.selected_patient.M_PatientID
prm.M_PatientName = this.$store.state.patient.selected_patient.M_PatientName
prm.M_PatientAddressNote = this.labeladdress
prm.M_PatientAddressDescription = this.descriptionaddress
prm.M_PatientAddressM_KelurahanID = this.kelurahanaddress.M_KelurahanID
this.$store.dispatch("patient/savenewaddress",prm)
}
},
editAddress(value){
this.$store.commit("patient/update_act_addr",'edit')
this.$store.commit("patient/update_x_addr_id",value.M_PatientAddressID)
this.labeladdress = value.M_PatientAddressNote
this.oldlabel = value.M_PatientAddressNote
this.$store.commit("patient/update_cities",[{M_CityID:value.M_CityID,M_CityName:value.M_CityName}])
this.cityaddress = {M_CityID:value.M_CityID,M_CityName:value.M_CityName}
this.$store.commit("patient/update_districts",[{M_DistrictID:value.M_DistrictID,M_DistrictName:value.M_DistrictName}])
this.districtaddress = {M_DistrictID:value.M_DistrictID,M_DistrictName:value.M_DistrictName}
this.$store.commit("patient/update_kelurahans",[{M_KelurahanID:value.M_PatientAddressM_KelurahanID,M_KelurahanName:value.M_KelurahanName}])
this.kelurahanaddress = {M_KelurahanID:value.M_PatientAddressM_KelurahanID,M_KelurahanName:value.M_KelurahanName}
this.descriptionaddress = value.M_PatientAddressDescription
this.$store.commit("patient/update_dialog_form_address",true)
},
saveEditAddress(){
this.$store.commit("patient/update_errors",[])
var errors = this.$store.state.patient.errors
if(this.labeladdress === ''){
errors.push("requiredlabel")
}
if(this.oldlabel.toLowerCase() === 'utama' && this.labeladdress.toLowerCase() !== 'utama'){
errors.push("readonlyutama")
}
if(_.isEmpty(this.cityaddress)){
errors.push("requiredcity")
}
if(_.isEmpty(this.districtaddress)){
errors.push("requireddistrict")
}
if(_.isEmpty(this.kelurahanaddress)){
errors.push("requiredkelurahan")
}
if(_.isEmpty(this.descriptionaddress)){
errors.push("requireddescription")
}
if(errors.length === 0){
var prm = {}
prm.M_PatientAddressID = this.$store.state.patient.x_addr_id
prm.M_PatientAddressM_PatientID = this.$store.state.patient.selected_patient.M_PatientID
prm.M_PatientName = this.$store.state.patient.selected_patient.M_PatientName
prm.M_PatientAddressNote = this.labeladdress
prm.M_PatientAddressDescription = this.descriptionaddress
prm.M_PatientAddressM_KelurahanID = this.kelurahanaddress.M_KelurahanID
this.$store.dispatch("patient/saveeditaddress",prm)
}
},
deleteAddress(value){
this.$store.commit("patient/update_act_addr",'delete')
this.$store.commit("patient/update_x_addr_id",value.M_PatientAddressID)
this.$store.commit("patient/update_errors",[])
this.oldlabel = value.M_PatientAddressNote
var errors = this.$store.state.patient.errors
if(value.M_PatientAddressNote.toLowerCase() === 'utama'){
errors.push("deleteutama")
}
var msg = ''
if(errors.includes("deleteutama")){
msg = "Biarkan yang utama tetap ada"
}
else{
msg = "Yakin, akan menghapus data alamat pasien "+value.M_PatientAddressNote+" ?"
}
this.$store.commit("patient/update_msg_confirmation_delete_addr",msg)
this.$store.commit("patient/update_dialog_confirmation_delete_addr",true)
},
doDeleteAddr(){
var prm = {}
prm.M_PatientAddressID = this.$store.state.patient.x_addr_id
prm.M_PatientAddressM_PatientID = this.$store.state.patient.selected_patient.M_PatientID
prm.M_PatientName = this.$store.state.patient.selected_patient.M_PatientName
prm.M_PatientAddressNote = this.oldlabel
this.$store.dispatch("patient/deleteaddress",prm)
}
},
watch: {
search_city(val,old) {
if (val == old ) return
if (! val) return
if (val.length < 1 ) return
if (this.$store.state.patient.update_autocomplete_status == 1 ) return
this.thr_search_city()
}
}
}
</script>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,700 @@
<template>
<v-layout class="fill-height" column>
<!-- dialog confirmation start -->
<v-dialog v-model="dialogconfirmationdeletex" persistent max-width="290">
<v-card>
<v-card-title dark class="headline error pt-2 pb-2" primary-title style="color:white">
<h4 dark>Konfirmasi</h4>
</v-card-title>
<v-card-text>
{{msgconfirmationdeletex}}
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn small color="error darken-1 text-sm-left" flat @click="doDeleteData()">Hapus</v-btn>
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationdeletex = false">Batal</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<!-- dialog confirmation end -->
<v-dialog v-model="dialogsuccess" persistent max-width="290">
<v-card>
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
<v-card-text>
{{ msgsuccess }}
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="dialogsuccessorder" persistent max-width="290">
<v-card>
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
<v-card-text>
<h1>{{ nomor_order }}</h1>
</v-card-text>
<v-card-actions>
<v-btn color="grey darken-1" flat @click="dialogsuccessorder = false">Tutup</v-btn>
<v-spacer></v-spacer>
<v-btn color="green darken-1" flat @click="goToPay()">Bayar</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-card class="mb-2 pa-2 searchbox">
<v-layout row>
<v-flex xs1>
<span @click="setNewPatient"
class="icon-medium-fill-base xs1 white--text primary ml-1 icon-add"></span>
</v-flex>
<!-- <v-flex xs3>
<v-text-field class="xs3 ma-1" label="PID" outline @keyup.enter="searchPatient" v-model="snorm"
hide-details></v-text-field>
</v-flex> -->
<v-flex xs11>
<v-text-field class="xs6 ma-1" label="Nama" outline
@keyup.enter="searchPatient" v-model="name" hide-details></v-text-field>
</v-flex>
<!-- <span @click="searchPatient" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>-->
</v-layout>
<v-layout row v-if="onsearch"><v-progress-linear :indeterminate="true"></v-progress-linear></v-layout>
</v-card>
<v-card>
<v-layout row>
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
<v-data-table :headers="headers" :items="patients" :loading="isLoading" hide-actions
class="elevation-1">
<template slot="items" slot-scope="props">
<td v-bind:class="{ 'blue lighten-4': props.item.divider === 'Y', 'amber lighten-4': props.item.selected, 'amber lighten-4': isSelected(props.item) }"
class="text-xs-left pa-2" @click="selectMe(props.item)">{{ props.item.M_PatientName }}</td>
<td v-bind:class="{ 'blue lighten-4': props.item.divider === 'Y', 'amber lighten-4': props.item.selected, 'amber lighten-4': isSelected(props.item) }"
class="text-xs-left pa-2" @click="selectMe(props.item)">{{ props.item.M_PatientHp }}</td>
<td v-bind:class="{ 'blue lighten-4': props.item.divider === 'Y', 'amber lighten-4': props.item.selected, 'amber lighten-4': isSelected(props.item) }"
class="text-xs-center pa-2" @click="selectMe(props.item)">{{ props.item.M_PatientGender }}</td>
<td v-bind:class="{ 'blue lighten-4': props.item.divider === 'Y', 'amber lighten-4': props.item.selected, 'amber lighten-4': isSelected(props.item) }"
class="text-xs-left pa-2" @click="selectMe(props.item)">{{ props.item.M_PatientAddress }}</td>
<td v-bind:class="{ 'blue lighten-4': props.item.divider === 'Y', 'amber lighten-4': props.item.selected, 'amber lighten-4': isSelected(props.item) }"
class="text-xs-left pa-2" @click="selectMe(props.item)">
<v-btn
style="min-width:25px;margin:0" @click="deleteData(props.item)" small color="error"><v-icon small>close</v-icon></v-btn>
</td>
</template>
</v-data-table>
<div class="text-xs-center pt-2">
<v-btn :loading="isLoading" dark v-if="show_more" @click="showMore()" small color="blue darken-3">
Tampilkan lebih banyak
<template v-slot:loader>
sedang memuat ...
</template>
</v-btn>
<v-btn depressed v-if="!show_more" small color="grey lighten-2">Tidak ada lagi data</v-btn>
</div>
<!--<v-pagination style="margin-top:10px;margin-bottom:10px" :total-visible="15" v-model="curr_page" :length="xtotal_page"></v-pagination>-->
</v-flex>
</v-layout>
</v-card>
<!-- <v-card class="mt-2 mb-2">
<v-layout class="pa-2" row>
<v-flex xs9 class="mr-2">
<v-textarea auto-grow rows="1" v-model="keluhan" label="Keluhan" hide-details>
</v-textarea>
</v-flex>
<v-flex xs3 class="pt-1">
<v-text-field v-model="queueNumber" label="Nomor Antrian" hide-details></v-text-field>
</v-flex>
</v-layout>
</v-card> -->
<!-- <v-card>
<v-layout class="pa-2" row>
<v-flex xs12>
<v-btn @click="saveOrder()" v-if="!_.isEmpty(selected_patient)"
:disabled="pgrs_save || _.isEmpty(selected_patient)" block dark color="red lighten-2">Simpan</v-btn>
<v-btn color="grey" v-if="_.isEmpty(selected_patient)" dark block>Simpan</v-btn>
</v-flex>
</v-layout>
</v-card> -->
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation"
@forget-dialog-alert="forgetAlertConfirmation()"
@close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
</v-layout>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot {
min-height: 60px;
}
.searchbox .v-btn {
min-height: 60px;
}
table.v-table tbody td,
table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
</style>
<script>
module.exports = {
components: {
'one-dialog-info': httpVueLoader('../../common/oneDialogInfo.vue'),
'one-dialog-alert': httpVueLoader('../../common/oneDialogAlert.vue')
},
mounted() {
//this.$store.dispatch('patient/getprovinces')
// this.$store.dispatch("patient/getsexreg")
this.$store.dispatch("patient/search", {
search: this.name,
snorm: this.snorm,
current_page: this.curr_page,
lastid: -1
})
var url_string = window.location.href
var url = new URL(url_string);
var queue = url.searchParams.get("que")
var queueID = url.searchParams.get("id_queue")
if (queue) {
this.queueNumber = queue;
// this.$store.dispatch("patient/getdoctors", { orderNumber: id })
}
if (queueID) {
this.queueID = queueID;
// this.$store.dispatch("patient/getdoctors", { orderNumber: id })
}
},
methods: {
setNewPatient() {
this.$store.commit("patient/update_patient_prefix", "")
this.$store.commit("patient/update_patient_prefix2", "")
this.$store.commit("patient/update_patient_name", "")
this.$store.commit("patient/update_patient_suffix", "")
this.$store.commit("patient/update_patient_suffix2", "")
this.$store.commit("patient/update_selected_title", {})
this.$store.commit("patient/update_noidentitas", "")
this.$store.commit("patient/update_inp_CorporateAddress", "")
this.$store.commit("patient/update_hp", "")
this.$store.commit("patient/update_email", "")
this.$store.commit("patient/update_selected_sex", {})
this.$store.commit("patient/update_dob", "")
this.$store.commit("patient/update_selected_bloodtype", {})
this.$store.commit("patient/update_selected_bloodrh", {})
this.$store.commit("patient/update_selected_education", {})
this.$store.commit("patient/update_selected_citizenship", {})
this.$store.commit("patient/update_selected_etnicity", {})
this.$store.commit("patient/update_selected_religion", {})
this.$store.commit("patient/update_selected_kartuidentitas", {})
this.$store.commit("patient/update_selected_specialist", {})
this.$store.commit("patient/update_inp_CorporateAddressState", "")
this.$store.commit("patient/update_inp_CorporateAddressVillage", "")
this.$store.commit("patient/update_inp_CorporateAddressState", "")
this.$store.commit("patient/update_inp_CorporateAddressCity", "")
this.$store.commit("patient/update_inp_CorporateAddressDistrict", "")
this.$store.commit("patient/update_inp_CorporateAddressRT", "")
this.$store.commit("patient/update_inp_CorporateAddressRW", "")
this.$store.commit("patient/update_selected_countryCb", {})
this.$store.commit("patient/update_ageYear", 0)
this.$store.commit("patient/update_ageMonth", 0)
this.$store.commit("patient/update_ageDay", 0)
this.$store.commit('photo/update_photo_url', this.$store.state.photo.default_photo_url)
this.$store.commit("patient/update_no_save", 0)
},
doDeleteData(){
// console.log('delete process')
var prm = {}
prm.M_PatientID = this.$store.state.patient.selected_patient.M_PatientID
prm.M_PatientName = this.$store.state.patient.selected_patient.M_PatientName
this.$store.dispatch("patient/deletev0", prm)
},
deleteData(row){
console.log('item delete ', row)
this.$store.commit("patient/update_selected_patient", row)
console.log(this.$store.state.patient.selected_patient)
let msg = "Yakin, akan menghapus data doctor " + this.$store.state.patient.selected_patient.M_PatientName + " ?"
this.$store.commit("patient/update_msg_confirmation_deletex", msg)
this.$store.commit("patient/update_dialog_confirmation_deletex", true)
},
goToPay() {
this.dialogsuccessorder = false
location.replace("/one-ui/test/vuex/one-fo-cashier-klinik/?id=" + this.nomor_order)
},
saveOrder() {
this.$store.commit('patient/update_pgrs_save', true)
this.$store.dispatch("patient/saveorder", {
patient: this.selected_patient,
keluhan: this.keluhan,
queueNumber: this.queueNumber,
queueID: this.queueID
})
},
showMore() {
if (!this.isLoading) {
this.$store.commit('patient/update_search_status', true)
var xnow = this.curr_page
this.curr_page = xnow + 1
}
},
isSelected(p) {
return p.M_PatientID == this.$store.state.patient.selected_patient.M_PatientID
},
searchPatient() {
console.log(this.name)
this.$store.dispatch("patient/search", {
search: this.name,
snorm: this.snorm,
current_page: 1,
lastid: -1
})
this.$store.commit("patient/update_current_page", 1)
},
selectMe(pat) {
// Photo module
// clear form
this.$store.commit("patient/update_patient_prefix", "")
this.$store.commit("patient/update_patient_prefix2", "")
this.$store.commit("patient/update_patient_name", "")
this.$store.commit("patient/update_patient_suffix", "")
this.$store.commit("patient/update_patient_suffix2", "")
this.$store.commit("patient/update_selected_title", {})
this.$store.commit("patient/update_noidentitas", "")
this.$store.commit("patient/update_inp_CorporateAddress", "")
this.$store.commit("patient/update_hp", "")
this.$store.commit("patient/update_email", "")
this.$store.commit("patient/update_selected_sex", {})
this.$store.commit("patient/update_dob", "")
this.$store.commit("patient/update_selected_bloodtype", {})
this.$store.commit("patient/update_selected_bloodrh", {})
this.$store.commit("patient/update_selected_education", {})
this.$store.commit("patient/update_selected_citizenship", {})
this.$store.commit("patient/update_selected_etnicity", {})
this.$store.commit("patient/update_selected_religion", {})
this.$store.commit("patient/update_selected_kartuidentitas", {})
this.$store.commit("patient/update_selected_specialist", {})
this.$store.commit("patient/update_inp_CorporateAddressState", "")
this.$store.commit("patient/update_inp_CorporateAddressVillage", "")
this.$store.commit("patient/update_inp_CorporateAddressState", "")
this.$store.commit("patient/update_inp_CorporateAddressCity", "")
this.$store.commit("patient/update_inp_CorporateAddressDistrict", "")
this.$store.commit("patient/update_inp_CorporateAddressRT", "")
this.$store.commit("patient/update_inp_CorporateAddressRW", "")
this.$store.commit("patient/update_selected_countryCb", {})
this.$store.commit("patient/update_ageYear", 0)
this.$store.commit("patient/update_ageMonth", 0)
this.$store.commit("patient/update_ageDay", 0)
// clear form
if (this.$store.state.patient.no_save == 0) {
this.$store.commit('photo/update_patient_id', pat.M_PatientID)
if (pat.M_PatientPhoto == null || pat.M_PatientPhoto == "")
this.$store.commit('photo/update_photo_url', this.$store.state.photo.default_photo_url)
else
this.$store.commit('photo/update_photo_url', pat.M_PatientPhoto + "?r=" + Math.round(Math.random() * 1000000000))
console.log('data edit doctor',pat)
this.$store.commit("patient/update_selected_patient", pat)
this.$store.commit("patient/update_patient_prefix", pat.M_PatientPrefix)
this.$store.commit("patient/update_patient_prefix2", pat.M_PatientPrefix2)
this.$store.commit("patient/update_patient_name", pat.M_PatientName)
this.$store.commit("patient/update_patient_suffix", pat.M_PatientSuffix)
this.$store.commit("patient/update_patient_suffix2", pat.M_PatientSuffix2)
this.$store.commit("patient/update_patient_suffix2", pat.M_PatientSuffix2)
if(pat.title.length > 0){
this.$store.commit("patient/update_selected_title", {
M_TitleID: pat.title[0].M_TitleID,
M_TitleName: pat.title[0].M_TitleName,
})
} else{
this.$store.commit("patient/update_selected_title", {})
}
this.$store.commit("patient/update_noidentitas", pat.M_PatientIdentifierValue)
this.$store.commit("patient/update_inp_CorporateAddress", pat.M_PatientAddress)
this.$store.commit("patient/update_hp", pat.M_PatientHp)
this.$store.commit("patient/update_email", pat.M_PatientEmail)
if(pat.M_PatientGender != ""){
this.$store.commit("patient/update_selected_sex", {
M_PatientGender: pat.M_PatientGender
})
}
if(pat.M_PatientDOB != "00-00-0000"){
this.$store.commit("patient/update_dob", pat.M_PatientDOB)
}
if(pat.bloodtype.length > 0){
this.$store.commit("patient/update_selected_bloodtype", {
code:pat.bloodtype[0].code,
display:pat.bloodtype[0].display,
display_en:pat.bloodtype[0].display_en,
code_system:pat.bloodtype[0].code_system,
})
}
if(pat.bloodrhesus.length > 0){
this.$store.commit("patient/update_selected_bloodrh", {
code:pat.bloodrhesus[0].code,
display:pat.bloodrhesus[0].display,
display_en:pat.bloodrhesus[0].display_en,
code_system:pat.bloodrhesus[0].code_system,
})
}
if(pat.education.length > 0){
this.$store.commit("patient/update_selected_education", {
code:pat.education[0].code,
display:pat.education[0].display,
display_en:pat.education[0].display_en,
code_system:pat.education[0].code_system,
})
}
if(pat.kewarganegaraan.records[0].M_PatientCitizenship != ""){
this.$store.commit("patient/update_selected_citizenship", {
M_PatientCitizenship: pat.kewarganegaraan.records[0].M_PatientCitizenship
})
}
if(pat.etnicity.length > 0){
this.$store.commit("patient/update_selected_etnicity", {
code:pat.etnicity[0].code,
display:pat.etnicity[0].display,
display_en:pat.etnicity[0].display_en,
code_system:pat.etnicity[0].code_system,
})
}
if(pat.religion.length > 0){
this.$store.commit("patient/update_selected_religion", {
code:pat.religion[0].code,
display:pat.religion[0].display,
display_en:pat.religion[0].display_en,
code_system:pat.religion[0].code_system,
})
}
if(pat.identifier.length > 0){
this.$store.commit("patient/update_selected_kartuidentitas", {
code:pat.identifier[0].code,
display:pat.identifier[0].display,
display_en:pat.identifier[0].display_en,
code_system:pat.identifier[0].code_system,
})
}
if(pat.specialist.length > 0){
this.$store.commit("patient/update_selected_specialist", {
M_SpecialistID:pat.specialist[0]. M_SpecialistID,
M_SpecialistName:pat.specialist[0].M_SpecialistName,
})
}
this.$store.commit("patient/update_inp_CorporateAddressState", pat.M_PatientAddressState)
this.$store.commit("patient/update_inp_CorporateAddressVillage", pat.M_PatientAddressVillage)
this.$store.commit("patient/update_inp_CorporateAddressState", pat.M_PatientAddressState)
this.$store.commit("patient/update_inp_CorporateAddressCity", pat.M_PatientAddressCity)
this.$store.commit("patient/update_inp_CorporateAddressDistrict", pat.M_PatientAddressDistrict)
this.$store.commit("patient/update_inp_CorporateAddressRT", pat.M_PatientAddressRT)
this.$store.commit("patient/update_inp_CorporateAddressRW", pat.M_PatientAddressRW)
if(pat.country.length > 0){
this.$store.commit("patient/update_selected_countryCb", {
code:pat.country[0].code,
display:pat.country[0].display,
display_en:pat.country[0].display_en,
code_system:pat.country[0].code_system,
})
}
this.$store.commit("patient/update_errors", [])
this.$store.commit("patient/update_act", 'edit')
} else {
this.$store.commit("patient/update_open_alert_confirmation", true)
}
},
closeAlertConfirmation() {
this.$store.commit("patient/update_open_alert_confirmation", false)
},
forgetAlertConfirmation() {
this.$store.commit("patient/update_no_save", 0)
this.$store.commit("patient/update_open_alert_confirmation", false)
},
updateAlert_success(val) {
this.$store.commit("patient/update_alert_success", val)
},
setNewPatientOld() {
this.$store.commit("patient/update_selected_patient", {})
this.$store.commit("patient/update_norm", '')
this.$store.commit("patient/update_patient_name", '')
this.$store.commit("patient/update_selected_title", {})
this.$store.commit("patient/update_selected_sex", {})
this.$store.commit("patient/update_selected_religion", {})
this.$store.commit("patient/update_dob", '')
this.$store.commit("patient/update_hp", '')
this.$store.commit("patient/update_phone", '')
this.$store.commit("patient/update_email", '')
this.$store.commit("patient/update_pob", '')
this.$store.commit("patient/update_selected_kartuidentitas", {})
this.$store.commit("patient/update_noidentitas", '')
this.$store.commit("patient/update_note", '')
this.$store.commit("patient/update_nik", '')
this.$store.commit("patient/update_jabatan", '')
this.$store.commit("patient/update_kedudukan", '')
this.$store.commit("patient/update_pj", '')
this.$store.commit("patient/update_location", '')
this.$store.commit("patient/update_job", '')
this.$store.commit("patient/update_addresses", [])
this.$store.commit("patient/update_address", '')
this.$store.commit("patient/update_selected_patient", {})
this.$store.commit('photo/update_photo_url', this.$store.state.photo.default_photo_url)
this.$store.commit("patient/update_no_save", 0)
},
closeDialogSuccess() {
this.setNewPatient()
this.$store.commit("patient/update_patients", [])
// this.$store.dispatch("patient/getsexreg")
this.$store.dispatch("patient/search", {
search: this.name,
snorm: this.snorm,
current_page: 1,
lastid: -1
})
this.dialogsuccess = false
}
},
computed: {
dialogconfirmationdeletex: {
get() {
return this.$store.state.patient.dialog_confirmation_deletex
},
set(val) {
this.$store.commit("patient/update_dialog_confirmation_deletex", val)
}
},
msgconfirmationdeletex() {
return this.$store.state.patient.msg_confirmation_deletex
},
dialogsuccessorder: {
get() {
return this.$store.state.patient.dialogsuccessorder
},
set(val) {
this.$store.commit("patient/update_dialogsuccessorder", val)
}
},
nomor_order: {
get() {
return this.$store.state.patient.nomor_order
},
set(val) {
this.$store.commit("patient/update_nomor_order", val)
}
},
selected_patient: {
get() {
return this.$store.state.patient.selected_patient
},
set(val) {
this.$store.commit("patient/update_selected_patient", val)
}
},
keluhan: {
get() {
return this.$store.state.patient.keluhan
},
set(val) {
this.$store.commit("patient/update_keluhan", val)
}
},
queueNumber: {
get() {
return this.$store.state.patient.queueNumber
},
set(val) {
this.$store.commit("patient/update_queueNumber", val)
}
},
queueID: {
get() {
return this.$store.state.patient.queueID
},
set(val) {
this.$store.commit("patient/update_queueID", val)
}
},
pgrs_save() {
return this.$store.state.patient.pgrs_save
},
onsearch() {
return this.$store.state.patient.onsearch
},
dialogsuccess: {
get() {
return this.$store.state.patient.dialog_success
},
set(val) {
this.$store.commit("patient/update_dialog_success", val)
}
},
msgsuccess() {
return this.$store.state.patient.msg_success
},
snackbar: {
get() {
return this.$store.state.patient.alert_success
},
set(val) {
this.$store.commit("patient/update_alert_success", val)
}
},
isLoading() {
return this.$store.state.patient.search_status == 1
},
patients() {
return this.$store.state.patient.patients
},
totalpatient() {
return this.$store.state.patient.total_patient
},
curr_page: {
get() {
return this.$store.state.patient.current_page
},
set(val) {
this.$store.commit("patient/update_current_page", val)
this.$store.dispatch("patient/search", {
search: this.name,
snorm: this.snorm,
current_page: val,
lastid: -1
})
}
},
xtotal_page: {
get() {
return this.$store.state.patient.total_patient
},
set(val) {
this.$store.commit("patient/update_total_patient", val)
}
},
openalertconfirmation: {
get() {
return this.$store.state.patient.open_alert_confirmation
},
set(val) {
this.$store.commit("patient/update_open_alert_confirmation", val)
}
},
show_more() {
return this.$store.state.patient.show_more
},
},
data() {
return {
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
items: [],
name: '',
snorm: '',
page: 1,
headers: [
{
text: "NAMA",
align: "left",
sortable: false,
value: "lab",
width: "15%",
class: "pa-2 blue darken-2 white--text"
},
{
text: "NO HP",
align: "center",
sortable: false,
value: "name",
width: "15%",
class: "pa-2 blue darken-2 white--text"
},
{
text: "JENIS KELAMIN",
align: "left",
sortable: false,
value: "status",
width: "15%",
class: "pa-2 blue darken-2 white--text"
},
{
text: "ALAMAT",
align: "left",
sortable: false,
value: "status",
width: "20%",
class: "pa-2 blue darken-2 white--text"
},
{
text: "AKSI",
align: "left",
sortable: false,
value: "status",
width: "10%",
class: "pa-2 blue darken-2 white--text"
}
],
pagination: {
descending: false,
page: 1,
rowsPerPage: 5,
sortBy: 'M_PatientName',
totalItems: this.$store.state.patient.total_patients
}
};
}
}
</script>