Initial import

This commit is contained in:
sas.fajri
2026-05-25 20:01:37 +07:00
commit 710d7c1b97
10371 changed files with 2381698 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
<template>
<v-dialog
v-model="dialog"
width="1000px"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Laporan
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout>
<v-flex xs12>
<object :data="rpt_url"
width="100%" height="512px"></object>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
@click="dialog = false"
flat
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
components : {
},
methods : {
},
computed : {
dialog: {
get() {
return this.$store.state.order.print_dialog_is_active;
},
set(val) {
this.$store.commit('order/update_print_dialog_is_active', val);
}
},
rpt_url () {
return this.$store.state.order.rpt_url
}
}
}
</script>

View File

@@ -0,0 +1,84 @@
<template>
<v-dialog
v-model="dialog"
width="500px"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Konfirmasi
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row wrap>
<v-flex xs12 pt-3 pb-3 class="text-md-center">
<h6 class="display-1 text-center">PROSES PASIEN INI ?</h6>
</v-flex>
<!-- <v-flex xs6 pt-3 pb-3 class="text-md-center">
<h6 class="display-1 text-center">ANTRIAN LAB : <span class="red--text">{{ queue_number }}</span></h6>
</v-flex> -->
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
@click="dialog = false"
flat
>
Tutup
</v-btn>
<v-btn
color="primary"
@click="processMee()"
>
PROSES
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
components : {
},
methods : {
tuing: function() {
alert('x')
},
processMee () {
this.$store.dispatch('order/process')
}
},
computed : {
dialog: {
get() {
return this.$store.state.order.confirm_process_dialog_is_active;
},
set(val) {
this.$store.commit('order/update_confirm_process_dialog_is_active', val);
}
},
queue_number () {
return this.$store.state.order.queue_number
}
}
}
</script>

View File

@@ -0,0 +1,343 @@
<template>
<v-layout column>
<v-flex xs12 mb-2>
<v-card>
<v-card-text>
<one-fo-clinic-poly-info-detail></one-fo-clinic-poly-info-detail>
</v-card-text>
</v-card>
</v-flex>
<v-flex xs12>
<v-card>
<v-card-text>
<v-layout row wrap>
<v-flex xs6 pr-3>
<v-autocomplete
label="Diagnosa"
v-model="selected_diagnose"
:items="diagnose"
:search-input.sync="search"
auto-select-first
no-filter
return-object
item-text="M_DiagnoseName"
:loading="is_loading"
no-data-text="Pilih Diagnosa"
:clearable="true"
:disabled="!processEnabled"
>
<template
slot="item"
slot-scope="{ item }"
>
<v-list-tile-content>
<v-list-tile-title v-text="item.M_DiagnoseName"></v-list-tile-title>
<!-- <v-list-tile-sub-title v-text="a"></v-list-tile-sub-title> -->
</v-list-tile-content>
</template>
</v-autocomplete>
</v-flex>
<v-flex xs6 pl-3>
<v-select
:disabled="!processEnabled"
v-model="selected_gcs"
:items="gcs"
item-text="M_GcsName"
label="Tingkat Kesadaran"
return-object
></v-select>
</v-flex>
<v-flex xs2 pr-3>
<v-text-field
:disabled="!processEnabled"
label="Sistole"
v-model="order.sistole"
clearable
@input="(v) => update_order_d('sistole',v)"
>
</v-text-field>
</v-flex>
<v-flex xs2 pl-3 pr-3>
<v-text-field
:disabled="!processEnabled"
label="Diastole"
v-model="order.diastole"
clearable
@input="(v) => update_order_d('diastole',v)"
>
</v-text-field>
</v-flex>
<v-flex xs4 pl-3 pr-3>
<v-text-field
:disabled="!processEnabled"
label="Suhu Badan"
v-model="order.temperature"
clearable
@input="(v) => update_order_d('temperature',v)"
>
</v-text-field>
</v-flex>
<v-flex xs4 pl-3>
<v-text-field
:disabled="!processEnabled"
label="Berat Badan"
v-model="order.weight"
clearable
@input="(v) => update_order_d('weight',v)"
>
</v-text-field>
</v-flex>
<v-flex xs4 pr-3>
<v-text-field
:disabled="!processEnabled"
label="Laju Pernafasan"
v-model="order.respiratory"
clearable
@input="(v) => update_order_d('respiratory',v)"
>
</v-text-field>
</v-flex>
<v-flex xs4 pr-3 pl-3>
<v-text-field
:disabled="!processEnabled"
label="Denyut Nadi"
v-model="order.pulse"
clearable
@input="(v) => update_order_d('pulse',v)"
>
</v-text-field>
</v-flex>
<v-flex xs4 pl-3>
<v-text-field
:disabled="!processEnabled"
label="Tinggi Badan"
v-model="order.height"
clearable
@input="(v) => update_order_d('height',v)"
>
</v-text-field>
</v-flex>
<v-flex xs6 pr-3>
<v-textarea
:disabled="!processEnabled"
label="Keluhan"
v-model="order.complaint"
clearable
@input="(v) => update_order_d('complaint',v)"
></v-textarea>
</v-flex>
<v-flex xs6 pl-3>
<v-textarea
:disabled="!processEnabled"
label="Saran"
v-model="order.suggestion"
clearable
@input="(v) => update_order_d('suggestion',v)"
></v-textarea>
</v-flex>
<v-flex xs4 pa-1>
<one-fo-clinic-poly-receipt></one-fo-clinic-poly-receipt>
<v-btn
block
color="orange"
:dark="processed"
:disabled="!processed"
@click="dialog_med_open()"
>RESEP</v-btn>
</v-flex>
<v-flex xs4 pa-1>
<one-fo-clinic-poly-lab></one-fo-clinic-poly-lab>
<v-btn
block
color="green"
:dark="processed"
:disabled="!processed"
@click="dialog_lab_open()"
>LABORATORIUM</v-btn>
</v-flex>
<v-flex xs4 pa-1>
<v-btn
block
color="blue"
:dark="btn_save_enabled"
@click="save()"
:disabled="!btn_save_enabled"
>SIMPAN</v-btn>
<one-fo-clinic-poly-finish-dialog></one-fo-clinic-poly-finish-dialog>
<one-print-dialog></one-print-dialog>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
</template>
<script>
module.exports = {
components : {
'one-fo-clinic-poly-info-detail' : httpVueLoader('./oneFoClinicPolyInfoDetail.vue'),
'one-fo-clinic-poly-receipt' : httpVueLoader('./oneFoClinicPolyReceipt.vue'),
'one-fo-clinic-poly-lab' : httpVueLoader('./oneFoClinicPolyLab.vue'),
'one-fo-clinic-poly-finish-dialog' : httpVueLoader('./oneFoClinicPolyFinishDialog.vue'),
'one-print-dialog' : httpVueLoader('./oneDialogPrint.vue')
},
computed : {
search:{
get() {
return this.$store.state.diagnose.search
},
set(val) {
if (val == null) return
this.$store.commit('diagnose/update_search',val)
}
},
diagnose : {
get () {
return this.$store.state.diagnose.diagnose
}
},
selected_diagnose : {
get () {
return this.$store.state.diagnose.selected_diagnose
},
set (v) {
this.$store.commit('diagnose/update_selected_diagnose', v)
return
}
},
gcs : {
get () {
return this.$store.state.gcs.gcs
},
set (v) {
return
}
},
selected_gcs : {
get () {
return this.$store.state.gcs.selected_gcs
},
set (v) {
this.$store.commit('gcs/update_selected_gcs', v)
return
}
},
is_loading() {
return this.$store.state.diagnose.search_status == 1
},
order : {
get () {
return this.$store.state.order.order
},
set (v) {
this.$store.commit('order/update_order', v)
return
}
},
btn_save_enabled () {
if (!this.$store.state.patient.selected_patient.M_PatientID ||
!this.$store.state.diagnose.selected_diagnose.M_DiagnoseID ||
!this.$store.state.gcs.selected_gcs.M_GcsID ||
!this.$store.state.order.order.complaint ||
!this.$store.state.order.order.suggestion)
return false
return true
},
processEnabled () {
if (!this.$store.state.patient.selected_patient.M_PatientID)
return false
if (this.$store.state.patient.selected_patient.M_StatusCode != "CLINIC.PROCESS")
return false
return true
},
processed () {
return this.$store.state.order.processed;
}
},
methods: {
thr_search: _.debounce( function () {
this.$store.dispatch("diagnose/search")
}, 800),
save () {
this.$store.dispatch('order/save');
},
update_order_d (type, val) {
this.$store.commit('order/update_order_d', {type:type,val:val})
},
dialog_lab_open () {
this.$store.commit('order/update_lab_dialog_is_active', true)
},
dialog_med_open () {
this.$store.commit('order/update_med_dialog_is_active', true)
}
},
watch: {
search(val,old) {
// console.log("val:"+val)
// console.log("old:"+old)
if (val == null || typeof val == 'undefined') val = ""
console.log("1-val:"+val)
if (val == old ) return
console.log("2-val:"+val)
// if (! val) return
console.log("3-val:"+val)
// if (val.length < 1 ) return
console.log("4-val:"+val)
if (this.$store.state.diagnose.search_status == 1 ) return
console.log("5-val:"+val)
this.$store.commit("diagnose/update_search",val)
this.thr_search()
// if (this.$store.state.doctor.search_status == 1 ) return
// this.$store.commit("doctor/update_search",val)
// this.thr_search()
}
},
mounted () {
this.$store.dispatch('gcs/search')
return;
}
}
</script>

View File

@@ -0,0 +1,115 @@
<template>
<v-dialog
v-model="dialog"
width="500px"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Selesai
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout column>
<v-flex xs12 pt-3 pb-3 class="text-md-center">
<h6 class="display-1 text-center">PROSES SELESAI</h6>
</v-flex>
<v-flex xs12 pt-3 pb-3 class="text-md-center">
<v-btn
color="orange"
dark
@click="print_receipt"
>
Cetak Resep
</v-btn>
<v-btn
color="green"
dark
@click="print_resume"
>
Cetak Resume
</v-btn>
</v-flex>
<v-flex xs12 pt-3 pb-3 class="text-md-center" v-show="queue_number != '' && queue_number != '-'">
<h6 class="headline text-center">ANTRIAN LAB :</h6>
</v-flex>
<v-flex xs12 class="text-md-center" v-show="queue_number != '' && queue_number != '-'">
<h6 class="display-3 text-center"><span class="red white--text pl-3 pr-3">{{ queue_number }}</span></h6>
</v-flex>
<v-flex xs12 b-3 class="text-md-center" v-show="queue_number != '' && queue_number != '-'">
<v-btn
color="blue"
dark
@click="print_queue"
>
Cetak Antrian Lab
</v-btn>
</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 scoped>
</style>
<script>
module.exports = {
components : {
},
methods : {
print_receipt () {
let id = this.$store.state.order.last_order_id
this.$store.dispatch('order/print_receipt', id)
},
print_resume () {
let id = this.$store.state.order.last_order_id
this.$store.dispatch('order/print_resume', id)
},
print_queue () {
let id = this.$store.state.order.last_order_id
this.$store.dispatch('order/print_queue', id)
}
},
computed : {
dialog: {
get() {
return this.$store.state.order.finish_dialog_is_active;
},
set(val) {
this.$store.commit('order/update_finish_dialog_is_active', val);
}
},
queue_number () {
return this.$store.state.order.queue_number
}
}
}
</script>

View File

@@ -0,0 +1,183 @@
<template>
<v-card flat>
<v-layout row wrap>
<v-flex xs12>
<v-layout>
<v-flex xs2>
<v-img
src="https://www.sgm-inc.com/wp-content/uploads/2014/06/no-profile-male-img.gif"
aspect-ratio="1"
class="grey lighten-2 elevation-2"
>
</v-flex>
<v-flex xs10 pl-2>
<v-layout row wrap>
<v-flex xs6>
<v-layout column>
<v-flex>
<h5 class="headline">{{ labno }}</h5>
</v-flex>
<v-flex pt-3>
<v-text-field
v-model="mr"
label="No RM"
readonly
hide-details
>
</v-text-field>
</v-flex>
<v-flex>
<v-text-field
v-model="name"
label="Nama"
readonly
hide-details
>
</v-text-field>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs6 pl-2>
<v-layout column>
<v-flex>
<v-layout row>
<v-flex xs6>
<v-text-field
v-model="dob"
label="Tanggal lahir"
readonly
hide-details
>
</v-text-field>
</v-flex>
<v-flex xs6 pl-1>
<v-text-field
v-model="age"
label="Umur"
readonly
hide-details
>
</v-text-field>
</v-flex>
</v-layout>
</v-flex>
<v-flex>
<v-text-field
v-model="phone"
label="HP"
readonly
hide-details
>
</v-text-field>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
<!-- <v-flex xs12 pt-1>
<v-layout row>
<v-flex xs2>
<one-field-verification
label="Foto sesuai dengan pasien"
>
</one-field-verification>
</v-flex>
<v-flex xs5 pl-1>
<v-textarea
auto-grow
label="Catatan FO"
rows="1"
:value="note_fo"
readonly
outline
class="mb-0"
hide-details
></v-textarea>
</v-flex>
<v-flex xs5 pl-1>
<v-textarea
auto-grow
label="Catatan Sampling"
rows="1"
:value="note_sampling"
outline
hide-details
></v-textarea>
</v-flex>
</v-layout>
</v-flex> -->
</v-layout>
</v-card>
</template>
<style scoped>
.v-text-field--outline>.v-input__control>.v-input__slot {
min-height: 62px;
}
</style>
<script>
module.exports = {
components : {
'one-field-verification' : httpVueLoader('./../../common/oneFieldVerification.vue')
},
data () {
return {
sex : 'Laki - laki',
note_fo : 'Tidak ada catatan',
note_sampling : '-'
}
},
computed : {
labno () {
return this.$store.state.patient.selected_patient.C_OrderHeaderNumber
},
mr () {
return this.$store.state.patient.selected_patient.mr;
},
name () {
return this.$store.state.patient.selected_patient.name;
},
dob () {
try {
return this.$store.state.patient.selected_patient.dob.split('-').reverse().join('-');
} catch(e) {
console.log(e.message)
return '-';
}
},
phone () {
return this.$store.state.patient.selected_patient.phone;
},
age () {
return this.$store.state.patient.selected_patient.C_OrderHeaderM_PatientAge;
}
}
}
</script>

View File

@@ -0,0 +1,103 @@
<template>
<v-dialog
v-model="dialog_lab"
max-width="1200"
full-width
>
<!-- <v-btn
color="green"
:dark="processed"
block
@click="search"
:disabled="!processed"
>
LABORATORIUMX
</v-btn> -->
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout>
<v-flex xs6 pr-2>
<one-fo-clinic-poly-px></one-fo-clinic-poly-px>
</v-flex>
<v-flex xs6>
<one-fo-clinic-poly-px-list></one-fo-clinic-poly-px-list>
</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_lab = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style>
/* input { display:none } */
.no-label.v-text-field--outline>.v-input__control>.v-input__slot {
min-height: auto;
}
.no-label input {
margin-top: 0px !important;
}
</style>
<script>
module.exports = {
data () {
return {
dialog : false
}
},
components : {
'one-fo-clinic-poly-px' : httpVueLoader('./oneFoClinicPolyPx.vue'),
'one-fo-clinic-poly-px-list' : httpVueLoader('./oneFoClinicPolyPxList.vue')
},
methods : {
},
computed : {
dialog_lab : {
get () { return this.$store.state.order.lab_dialog_is_active },
set (v) { this.$store.commit('order/update_lab_dialog_is_active', v) }
},
isLoading () {
return false
},
processed () {
return this.$store.state.order.processed;
}
},
watch : {
}
}
</script>

View File

@@ -0,0 +1,66 @@
<template>
<v-layout column fill-height>
<!-- <v-flex xs12> -->
<v-card class="pa-1 mb-2">
<v-card-text class="pa-0">
<v-layout row wrap>
<v-flex xs12>
<patient-search-box></patient-search-box>
</v-flex>
</v-layout>
</v-card-text>
<!-- <v-card-actions class="text-xs-right">
<v-btn color="orange" class="white--text">Lanjut</v-btn>
</v-card-actions> -->
</v-card>
<!-- </v-flex> -->
<!-- <v-flex xs12 grow> -->
<v-card class="pa-1 p-left-side grow" grow>
<v-card-text class="pa-0">
<v-layout column>
<v-flex xs12>
<!-- <patient-detail></patient-detail> -->
<patient-search-result></patient-search-result>
&nbsp;
</v-flex>
<v-flex xs12>
<!-- <patient-notes></patient-notes> -->
&nbsp;
</v-flex>
</v-layout>
</v-card-text>
<!-- <v-card-actions class="text-xs-right">
<v-btn color="orange" class="white--text">Lanjut</v-btn>
</v-card-actions> -->
</v-card>
<!-- </v-flex> -->
</v-layout>
</template>
<style scoped>
/* .p-left-side {
min-height: 500px;
} */
</style>
<script>
module.exports = {
components : {
'patient-search-box' : httpVueLoader('./oneFoClinicPolyPatientSearchBox.vue'),
'patient-search-result' : httpVueLoader('./oneFoClinicPolyPatientSearchResult.vue')
// 'patient-detail': httpVueLoader('./patientDetail.vue'),
// 'patient-search-result' : httpVueLoader('./patientSearchResult.vue')
// 'patient-notes' : httpVueLoader('./patientNotes.vue')
}
}
</script>

View File

@@ -0,0 +1,160 @@
<template>
<v-card class="pa-2" flat>
<v-layout row wrap>
<v-flex xs3 pa-1>
<v-text-field
label="Search"
placeholder="No Lab"
single-line
outline
hide-details
v-model="no_lab"
@keyup.native="keyup"
></v-text-field>
</v-flex>
<v-flex xs4 pa-1>
<v-text-field
label=""
placeholder="Nama"
single-line
outline
hide-details
v-model="search_x"
@keyup.native="keyup"
></v-text-field>
</v-flex>
<v-flex xs4 pa-1>
<v-select
outline
label="Status"
:items="statuses"
item-text="M_StatusName"
item-value="M_StatusID"
v-model="selected_status"
return-object
></v-select>
</v-flex>
<!-- <v-flex xs1>
<v-btn color="success" class="mr-1 ml-1" large block fill-height @click="search" :disabled="processed">CARI</v-btn>
</v-flex> -->
<v-flex xs1 pl-1>
<v-btn color="success" class="mr-1 ml-1 one-btn-icon" large block fill-height @click="search" :disabled="processed">
<span class="icon-search"></span>
</v-btn>
</v-flex>
</v-layout>
</v-card>
</template>
<style scoped>
.v-btn {
min-width: auto;
}
.v-btn--large {
height: 52px;
}
/* .v-input__slot {
margin-bottom: 0px !important;
} */
/* .v-messages {
display: none;
} */
/* .v-text-field--box>.v-input__control>.v-input__slot,.v-text-field--full-width>.v-input__control>.v-input__slot,.v-text-field--outline>.v-input__control>.v-input__slot {
min-height: 44px;
} */
/* .v-text-field--box.v-text-field--single-line input,.v-text-field--full-width.v-text-field--single-line input,.v-text-field--outline.v-text-field--single-line input {
margin-top: 6px;
} */
.v-select.v-text-field--enclosed:not(.v-text-field--single-line) .v-select__selections {
padding-top: 20px;
}
.one-btn-icon { font-size: 1.5em; float: right }
</style>
<script>
module.exports = {
components : {
// 'patient-search-dialog': httpVueLoader('./patientSearchDialog.vue'),
// 'patient-new-dialog': httpVueLoader('./patientNewDialog.vue')
},
data() {
return {
}
},
methods : {
search : function() {
this.$store.dispatch('patient/search')
},
keyup(e) {
if (e.which==13) {
// this.$store.commit('patient/update_search_dialog_is_active',true)
this.$store.dispatch('patient/search')
}
}
},
computed : {
search_x: {
get() {
return this.$store.state.patient.search
},
set(val) {
this.$store.commit('patient/update_search',val)
}
},
statuses () {
return this.$store.state.status.status
},
selected_status : {
get () {
return this.$store.state.status.selected_status
},
set (v) {
this.$store.commit('status/update_selected_status', v)
return
}
},
processed : {
get () {
return this.$store.state.order.processed
},
set (v) {
this.$store.commit('order/update_processed', v)
return
}
},
no_lab: {
get() {
return this.$store.state.patient.search_no_lab
},
set(val) {
this.$store.commit('patient/update_search_no_lab',val)
}
}
},
mounted () {
this.$store.dispatch('status/search')
}
}
</script>

View File

@@ -0,0 +1,273 @@
<template>
<v-card class="xs12 md12 mt-2">
<v-data-table :headers="headers" :items="patients"
:loading="isLoading"
hide-actions class="elevation-1">
<template slot="no-data">
<v-alert :value="isError" color="error" icon="warning">
Data Pasien tidak di temukan
{{errorMessage}}
</v-alert>
</template>
<template slot="items" slot-scope="props">
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.day }}, <br>{{ format_date(props.item.C_OrderHeaderDate) }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.C_OrderHeaderNumber }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.M_PatientNoReg }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.M_PatientName }}</td>
<td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">
<v-btn v-show="isStatusReg(props.item.M_StatusCode)"
color="blue"
:dark="!processed"
@click="processMe(props.item)"
:disabled="processed"
>
PROSES
</v-btn>
<v-btn v-show="isStatusProcess(props.item.M_StatusCode)"
color="green"
dark
@click="justProcessMe(props.item)"
flat
>
DIPROSES
</v-btn>
<template v-show="isStatusFinish(props.item.M_StatusCode)">
<v-menu offset-y
v-model="patients[props.index].vmenu"
:position-x="x"
:position-y="y"
absolute>
<v-list>
<v-list-tile
v-for="(item, index) in menu_items"
:key="index"
class="ml0 mr0"
v-show="show_btn_print(item.code, props.item.C_OrderHeaderIsLab)"
>
<!-- <v-list-tile-title>
{{ item.title }}
</v-list-tile-title> -->
<v-btn
color="orange"
flat
class="ma-0 text-md-left"
block
small
@click="print_me(item.code, props.item.C_OrderHeaderID)"
outline
>
{{ item.title }}
</v-btn>
</v-list-tile>
</v-list>
</v-menu>
</template>
<v-btn v-show="isStatusFinish(props.item.M_StatusCode)"
color="orange"
dark
@click="trigger_vmenu(props.index, $event)"
>
CETAK
</v-btn>
</td>
</template>
</v-data-table>
<one-fo-clinic-poly-confirm-process-dialog></one-fo-clinic-poly-confirm-process-dialog>
</v-card>
</template>
<style scoped>
table.v-table tbody td,table.v-table tbody th {
height: 30px;
}
table.v-table thead tr {
height: 40px;
}
div.v-list__tile.theme--light {
padding: 0px !important;
}
.v-btn { margin: 0px }
</style>
<script>
module.exports = {
components : {
'one-fo-clinic-poly-confirm-process-dialog' : httpVueLoader('./oneFoClinicPolyConfirmProcessDialog.vue')
},
data() {
return {
x: 0,
y: 0,
on: false,
query: "",
headers: [
{
text: "TANGGAL",
align: "left",
sortable: false,
value: "date",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NO REGISTRASI",
align: "left",
sortable: false,
value: "mr",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NO RM",
align: "left",
sortable: false,
value: "mr",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NAMA",
align: "left",
sortable: false,
value: "name",
width: "40%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "ACTION",
align: "left",
sortable: false,
value: "name",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
}
],
menu_items: [
{ code: '01', title: 'Cetak Resep Obat' },
{ code: '02', title: 'Cetak Antrian Lab' },
{ code: '03', title: 'Click Resume Pasien' }
]
};
},
computed : {
isError() {
// return true;
return this.$store.state.patient.search_status == 3
},
errorMessage() {
return this.$store.state.patient.search_error_message
},
isLoading() {
return this.$store.state.patient.search_status == 1
},
patients() {
return this.$store.state.patient.patients
},
total() {
return this.$store.state.patient.total_patient
},
processed : {
get () {
return this.$store.state.order.processed
},
set (v) {
this.$store.commit('order/update_processed', v)
return
}
}
},
methods : {
selectMe (a) {
a.mr = a.M_PatientNoReg;
a.name = a.M_PatientName;
a.phone = a.M_PatientHP;
a.dob = a.M_PatientDOB;
this.$store.commit('patient/update_selected_patient', a)
this.$store.commit('order/update_order_d', {type:'complaint',val:a.C_OrderHeaderComplaint})
// this.$store.state.patient.selected_patient = a
// this.$store.state.patient.selected_patient.mr = a.M_PatientNoReg;
// this.$store.state.patient.selected_patient.name = a.M_PatientName;
// this.$store.state.patient.selected_patient.phone = a.M_PatientHP;
// this.$store.state.patient.selected_patient.dob = a.M_PatientDOB;
console.log(a)
},
processMe (a) {
this.$store.commit('order/update_confirm_process_dialog_is_active', true)
return this.selectMe(a)
},
justProcessMe (a) {
this.$store.commit('order/update_processed', true)
return this.selectMe(a)
},
isStatusReg(v) {
return v == '01' ? true : false
},
isStatusProcess(v) {
return v == '02' ? true : false
},
isStatusFinish(v) {
return v == '03' ? true : false
},
print_me (t, a) {
if (t == '01') {
this.$store.dispatch('order/print_receipt', a)
}
if (t == '02') {
this.$store.dispatch('order/print_queue', a)
}
if (t == '03') {
this.$store.dispatch('order/print_resume', a)
}
},
trigger_vmenu(idx, x) {
this.x = x.x - x.offsetX + 10
this.y = x.y - x.offsetY + 25
console.log(x)
this.$store.commit('patient/trigger_patients_vmenu', idx)
},
show_btn_print (code, is_lab) {
console.log(is_lab)
if (code == '02' && is_lab == 'N')
return false
return true
},
format_date (d) {
return d.split('-').reverse().join('-')
}
}
}
</script>

View File

@@ -0,0 +1,293 @@
<template>
<v-card class="xs12 md12 mt-2">
<v-data-table :headers="headers" :items="patients"
:loading="isLoading"
hide-actions class="elevation-1">
<template slot="no-data">
<v-alert :value="isError" color="error" icon="warning">
Data Pasien tidak di temukan
{{errorMessage}}
</v-alert>
</template>
<template slot="items" slot-scope="props">
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.day }}, <br>{{ format_date(props.item.C_OrderHeaderDate) }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.C_OrderHeaderNumber }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.M_PatientNoReg }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.M_PatientName }}</td>
<td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}">
<v-btn v-show="isStatusReg(props.item.M_StatusCode)"
color="blue"
:dark="!processed"
@click="processMe(props.item)"
:disabled="processed"
class="one-btn-icon"
>
<span class="icon-process"></span>
</v-btn>
<v-btn v-show="isStatusProcess(props.item.M_StatusCode)"
color="green"
dark
@click="justProcessMe(props.item)"
flat
class="one-btn-icon"
>
<span class="icon-process"></span>
</v-btn>
<template v-show="isStatusFinish(props.item.M_StatusCode)">
<v-menu offset-y
v-model="patients[props.index].vmenu"
:position-x="x"
:position-y="y"
absolute>
<v-list>
<v-list-tile
v-for="(item, index) in patients[props.index].menu_items"
:key="index"
class="ml0 mr0"
v-show="show_btn_print(item.code, props.item.C_OrderHeaderIsLab)"
>
<!-- <v-list-tile-title>
{{ item.title }}
</v-list-tile-title> -->
<v-btn
color="orange"
flat
class="ma-0 text-md-left"
block
small
@click="print_me(item.code, props.item.C_OrderHeaderID)"
outline
>
{{ item.title }}
</v-btn>
</v-list-tile>
</v-list>
</v-menu>
</template>
<v-btn v-show="isStatusFinish(props.item.M_StatusCode)"
color="orange"
dark
@click="trigger_vmenu(props.index, $event)"
>
CETAK
</v-btn>
</td>
</template>
</v-data-table>
<one-fo-clinic-poly-confirm-process-dialog></one-fo-clinic-poly-confirm-process-dialog>
</v-card>
</template>
<style scoped>
table.v-table tbody td,table.v-table tbody th {
height: 30px;
}
table.v-table thead tr {
height: 40px;
}
div.v-list__tile.theme--light {
padding: 0px !important;
}
.v-btn { margin: 0px }
.one-btn-icon { min-width: 0px !important }
</style>
<script>
module.exports = {
components : {
'one-fo-clinic-poly-confirm-process-dialog' : httpVueLoader('./oneFoClinicPolyConfirmProcessDialog.vue')
},
data() {
return {
x: 0,
y: 0,
on: false,
query: "",
headers: [
{
text: "TANGGAL",
align: "left",
sortable: false,
value: "date",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NO REGISTRASI",
align: "left",
sortable: false,
value: "mr",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NO RM",
align: "left",
sortable: false,
value: "mr",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NAMA",
align: "left",
sortable: false,
value: "name",
width: "40%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "ACTION",
align: "left",
sortable: false,
value: "name",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
}
],
menu_items: [
{ code: '01', title: 'Cetak Resep Obat' },
{ code: '02', title: 'Cetak Antrian Lab' },
{ code: '03', title: 'Click Resume Pasien' }
]
};
},
computed : {
isError() {
// return true;
return this.$store.state.patient.search_status == 3
},
errorMessage() {
return this.$store.state.patient.search_error_message
},
isLoading() {
return this.$store.state.patient.search_status == 1
},
patients() {
return this.$store.state.patient.patients
},
total() {
return this.$store.state.patient.total_patient
},
processed : {
get () {
return this.$store.state.order.processed
},
set (v) {
this.$store.commit('order/update_processed', v)
return
}
}
},
methods : {
selectMe (a) {
a.mr = a.M_PatientNoReg;
a.name = a.M_PatientName;
a.phone = a.M_PatientHP;
a.dob = a.M_PatientDOB;
// clear px
this.$store.commit('px/update_cito', {t:'test', v:[]})
this.$store.commit('px/update_cito', {t:'panel', v:[]})
this.$store.commit('px/update_selected_test', [])
this.$store.commit('px/update_nat_test', [])
this.$store.dispatch('px/search')
this.$store.commit('patient/update_selected_patient', a)
this.$store.commit('order/update_order_d', {type:'complaint',val:a.C_OrderHeaderComplaint})
// this.$store.state.patient.selected_patient = a
// this.$store.state.patient.selected_patient.mr = a.M_PatientNoReg;
// this.$store.state.patient.selected_patient.name = a.M_PatientName;
// this.$store.state.patient.selected_patient.phone = a.M_PatientHP;
// this.$store.state.patient.selected_patient.dob = a.M_PatientDOB;
console.log(a)
// SELECT
let x = this.$store.state.patient.patients
for (let i in x)
if (x[i].C_OrderHeaderID == a.C_OrderHeaderID)
x[i].selected = true
else
x[i].selected = false
this.$store.commit('patient/update_patients', {records:x, total:this.$store.state.patient.total_patient})
},
processMe (a) {
this.$store.commit('order/update_confirm_process_dialog_is_active', true)
return this.selectMe(a)
},
justProcessMe (a) {
this.$store.commit('order/update_processed', true)
return this.selectMe(a)
},
isStatusReg(v) {
return v == 'CLINIC.REG' ? true : false
},
isStatusProcess(v) {
return v == 'CLINIC.PROCESS' ? true : false
},
isStatusFinish(v) {
return v == 'CLINIC.DONE' ? true : false
},
print_me (t, a) {
if (t == '01') {
this.$store.dispatch('order/print_receipt', a)
}
if (t == '02') {
this.$store.dispatch('order/print_queue', a)
}
if (t == '03') {
this.$store.dispatch('order/print_resume', a)
}
},
trigger_vmenu(idx, x) {
this.x = x.x - x.offsetX + 10
this.y = x.y - x.offsetY + 25
console.log(x)
this.$store.commit('patient/trigger_patients_vmenu', idx)
},
show_btn_print (code, is_lab) {
console.log(is_lab)
if (code == 'CLINIC.PROCESS' && is_lab == 'N')
return false
return true
},
format_date (d) {
return d.split('-').reverse().join('-')
}
}
}
</script>

View File

@@ -0,0 +1,55 @@
<template>
<v-layout column pb-2>
<v-card class="search-test">
<v-divider></v-divider>
<!-- <one-mou-px-mou-info v-if="isTab('mou')">
</one-mou-px-mou-info> -->
<one-fo-clinic-poly-px-px v-show="isTab('px')">
</one-fo-clinic-poly-px-px>
<!-- <one-mou-px-panel v-if="isTab('panel')">
</one-mou-px-panel>
<one-mou-px-profile v-if="isTab('profile')">
</one-mou-px-profile > -->
</v-layout>
</template>
<script>
let in_selectPx = false
module.exports = {
components: {
'one-fo-clinic-poly-px-px': httpVueLoader('./oneFoClinicPolyPxPx.vue'),
'one-fo-clinic-poly-px-profile': httpVueLoader('./oneFoClinicPolyPxProfile.vue'),
'one-fo-clinic-poly-px-panel': httpVueLoader('./oneFoClinicPolyPxPanel.vue')
},
methods: {
isTab(tab) {
return this.$store.state.px.selected_px_tab == tab
},
selectTab(tab) {
let prev_tab = this.$store.state.px.selected_px_tab
if (tab != this.$store.state.px.selected_px_tab ) {
//reset panels tests profiles
// this.$store.commit('px/update_tests',[])
// this.$store.commit('px/update_panels',[])
}
this.$store.commit('px/update_selected_px_tab', tab)
}
},
computed: {
},
data: function(){
return {
}
},
mounted () {
this.$store.dispatch('px/search')
}
}
</script>

View File

@@ -0,0 +1,189 @@
<template>
<v-layout column pb-2>
<v-card class="pa-1">
<table>
<tr>
<th class="text-md-center pt-2 pb-2" width="10%"> # </th>
<th class="text-md-center pt-2 pb-2" width="10%" style="max-width:30px">CITO</th>
<th class="text-md-center pt-2 pb-2">PEMERIKSAAN</th>
<th class="text-md-center pt-2 pb-2" width="20%">HARGA</th>
</tr>
<tr v-for="t in selected_test" v-bind:key="t.T_TestID">
<td class="text-md-center">
<v-icon color="red" @click="deletePx(t)">delete</v-icon>
</td>
<td class="text-md-left pl-3"><v-checkbox hide-details class="smr-1"
:value="t.T_TestID"
v-model="cito_test"
></v-checkbox></td>
<td class="text-md-left pl-3">{{ t.T_TestName}}</td>
<td class="pr-3 text-xs-right">{{one_money(t.T_PriceTotal)}}</td>
</tr>
<tr>
<td colspan="3" class="pr-3 text-xs-right"><strong>SUB TOTAL</strong></td>
<td class="pr-3 text-xs-right">{{one_money(sub_total)}}</td>
</tr>
</table>
</v-card>
<v-card class="total">
<v-layout align-center row>
<v-flex xs6>
</v-flex>
</v-layout>
</v-card>
</v-layout>
</template>
<style scoped>
.nota {
font-size: 2em;
font-weight: bold;
text-align: left;
}
.total {
min-height:76px;
}
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
background:white;
border: 0px;
}
th, td {
border: 1px solid black;
border-collapse: collapse;
padding-top: 2px;
padding-bottom: 2px;
}
table>tr>td {
padding: 8px;
}
table>tr>td:first {
padding-left:15px!important;
}
.vintage-text{
text-shadow: 0px -2px 0px #fff, 0px 2px 3px #fff;
}
.v-input--selection-controls {
margin-top: 0px;
padding-top: 0px;
}
</style>
<script>
module.exports = {
data () {
return {
current_cito_change : []
}
},
watch : {
cito_test (n, o) {
if (n != o) {
if (n.length == 0)
this.current_cito_change = [o[0], "N"]
else if (o.length == 0)
this.current_cito_change = [n[0], "Y"]
else if (o.length > n.length) {
for (let i in o)
if (n.indexOf(o[i]) < 0) this.current_cito_change = [o[i], "N"]
}
else {
for (let i in n)
if (o.indexOf(n[i]) < 0) this.current_cito_change = [n[i], "Y"]
}
}
}
},
methods: {
one_money(p) {
return window.one_money(p)
},
update_req(px) {
// this.$store.dispatch("px/update_req", px)
return
},
deletePanel(panel) {
let sel = this.selected_panel
sel.forEach(function(p,idx) {
if(p.T_TestPanelID == panel.T_TestPanelID) {
sel.splice(idx,1)
}
});
this.$store.commit("px/update_selected_panel",sel)
let panels = this.$store.state.px.panels
if ( panels == undefined ) panels = []
panels.push(panel)
let dt = {
records : panels,
total: panels.length
}
this.$store.commit("px/update_panels",dt)
this.update_req()
},
deletePx(test) {
this.$store.dispatch("px/delete_px", test)
},
save_order() {
// this.$store.dispatch("order/save")
return
}
},
computed: {
selected_panel() {
return this.$store.state.px.selected_panel
},
selected_test() {
return this.$store.state.px.selected_test
},
btn_save_enabled () {
return true;
},
cito_test : {
get () {
return this.$store.state.px.cito.test
},
set (v) {
this.$store.commit('px/update_cito', {t:'test', v:v})
return
}
},
sub_total() {
let t = this.selected_test
let s = 0
for (let i in t)
s += Math.round(t[i].T_PriceTotal)
return s
}
}
}
</script>

View File

@@ -0,0 +1,109 @@
<template>
<v-card-text>
<v-layout row >
<v-flex xs6 class="pa-0 ma-0" >
<v-text-field
label="Panel"
placeholder="Cari Panel"
@change="search"
class="ma-0"
outline
>
</v-text-field>
</v-flex>
<v-flex xs6 class="pa-3">
<v-label >
Panel found {{panel_count}}, display {{ panel_count < 20 ? panel_count : 20 }}
</v-label>
</v-flex>
</v-layout>
<v-container grid-list-xs text-xs-center pa-0>
<v-layout row wrap>
<v-btn xs3 v-for="p in panels" :key="p.T_TestPanelID"
@click="selectPanel(p)"
depressed small color="error">
{{p.T_TestPanelName}}
</v-btn>
</v-layout>
</v-container>
</v-card-text>
</template>
<script>
module.exports = {
methods: {
search(val) {
if (this.prev_val == val ) return
this.prev_val = val
this.$store.commit("px/update_search_panel",val)
this.$store.dispatch("px/panel")
},
update_req(px) {
if (px.T_TestRequirement != '' ) {
let reqs = this.$store.state.px.requirement
if (! _.find(reqs, function(r) { return r.label == px.T_TestRequirement; }) ) {
reqs.push({
label: px.T_TestRequirement,
is_error: true,
checked : false,
error_message: 'Hasil harus di isi',
note: ''
})
}
this.$store.commit('px/update_requirement',reqs)
}
},
selectPanel(panel) {
try {
let selected_panel = this.$store.state.px.selected_panel
let flag_found = false
selected_panel.forEach( function(p,idx) {
if (panel.T_TestPanelID == p.T_TestPanelID) {
selected_panel[idx] = panel
flag_found = true
}
})
if (!flag_found) {
let f_update_req = this.update_req
selected_panel.push(panel)
panel.test.forEach(function(px){
f_update_req(px)
})
}
this.$store.commit('px/update_selected_panel',selected_panel)
let panels = this.$store.state.px.panels
let p_idx= -1
panels.forEach( function(p,idx) {
if (p.T_TestPanelID == panel.T_TestPanelID) p_idx = idx
})
if (p_idx >= 0 ) {
_.pullAt(panels,[p_idx])
let dt = {
records: panels,
total : panels.length
}
this.$store.commit('px/update_panels',dt)
}
} catch(e) {
console.log(e)
}
}
},
computed: {
panel_count() {
return this.$store.state.px.total_panel
},
panels() {
console.log('get panels')
return this.$store.state.px.panels
},
is_loading() {
return this.$store.state.px.search_panel_status == 1
}
},
data: function(){
return {
prev_val: ''
}
}
}
</script>

View File

@@ -0,0 +1,26 @@
<template>
<v-card-text>
<v-layout row >
<v-text-field
placeholder="ketikkan profile..."
class="pt-0"
>
</v-text-field>
</v-layout>
<v-layout row>
<v-flex text-md-center >
<v-btn depressed small color="error">PROFILE 1</v-btn>
<v-btn depressed small color="error">PROFILE 2</v-btn>
<v-btn depressed small color="error">PROFILE 3</v-btn>
<v-btn depressed small color="error">PROFILE 4</v-btn>
</v-flex>
</v-layout>
</v-card-text>
</template>
<script>
module.exports = {
}
</script>

View File

@@ -0,0 +1,318 @@
<template>
<v-card-text>
<v-layout column>
<v-layout row>
<v-flex xs8 class="pa-0 ma-0" >
<v-text-field
label="Pemeriksaan"
placeholder="ketikkan pemeriksaan ..."
@change="search"
class="ma-0"
outline
>
</v-text-field>
</v-flex>
<v-flex xs4 class="pa-2">
<v-label >
Test Found {{test_count}}, <br />display {{ test_count < 20 ? test_count : 20 }}
</v-label>
</v-flex>
</v-layout>
<v-progress-linear class="ma-0 pa-0" indeterminate :active="is_loading" ></>
</v-layout>
<v-container grid-list-xs text-xs-center pa-0>
<v-layout row wrap>
<v-flex xs6 v-for="test in tests" :key="test.T_TestID"
pr-2
>
<v-btn block
:disabled="is_selectPx"
@click="selectPx(test)"
depressed small :color="px_color(test.px_type)" dark
outline
class="ma-0 btn-px"
>
{{test.T_TestName}}
</v-btn>
</v-flex>
<!-- <v-btn xs3 v-for="test in tests" :key="test.T_TestID"
:disabled="is_selectPx"
@click="selectPx(test)"
depressed small color="error">
{{test.T_TestName}}
</v-btn> -->
</v-layout>
</v-container>
</v-card-text>
</template>
<script>
let in_selectPx = false
module.exports = {
methods: {
search(val) {
if ( val == this.prev_search ) return
console.log('Searching',val)
this.prev_search = val
this.$store.commit("px/update_search",val)
this.$store.dispatch("px/search")
},
selectPx(px) {
try {
// START LOADING
// this.$store.commit('update_dialog_loading', true)
// IF PROFILE
if (px.px_type == "PR" || px.px_type == "PXR")
return this.selectProfile(px)
// SEARCH NAT TEST
let nt = this.$store.state.px.nat_test
let found_nt = false
for (let i in px.nat_test) {
if (nt.indexOf(px.nat_test[i]) > -1)
found_nt = true
}
if (found_nt) {
alert('Pemeriksaan tersebut sudah ada !')
// END LOADING
// this.$store.commit('update_dialog_loading', false)
return
}
if (in_selectPx) return
in_selectPx = true
let selected_test = this.$store.state.px.selected_test
let flag_found = false
selected_test.forEach( function(t,idx) {
if (t.T_TestID == px.T_TestID) {
selected_test[idx] = px
flag_found = true
}
})
if (!flag_found) {
selected_test.push(px)
let tests = this.$store.state.px.tests
let p_idx = -1
tests.forEach(function(t,idx) {
if (t.T_TestID == px.T_TestID) {
p_idx = idx
}
})
if (p_idx >= 0 ) {
_.pullAt(tests,[p_idx])
let dt = {
records: tests,
total: tests.length
}
this.$store.commit('px/update_tests',dt)
}
}
this.$store.commit('px/update_selected_test', selected_test)
let req = px.requirement
let reqs = this.$store.state.px.requirement
if (req.length > 0) {
for(let i in req) {
let found = false
for(let j in reqs) {
if (reqs[j]['req_id'] == req[i]['req_id'])
found = j
}
if (!found)
reqs.push({
px_id: [px.T_TestID],
label: req[i]['req_name'],
error_message: 'Hasil harus di isi',
is_error: true,
checked : false,
note: '',
req_id: req[i]['req_id']
})
else
reqs[found].px_id.push(px.T_TestID)
}
this.$store.commit('px/update_requirement', reqs)
}
// this.$store.dispatch('px/appx_schedule')
in_selectPx = false
this.$store.commit('px/update_nat_test')
// END LOADING
// this.$store.commit('update_dialog_loading', false)
// let selected_test = this.$store.state.px.selected_test
// let flag_found = false
// selected_test.forEach( function(t,idx) {
// if (t.T_TestID == px.T_TestID) {
// selected_test[idx] = px
// flag_found = true
// }
// })
// if (!flag_found) {
// selected_test.push(px)
// let tests = this.$store.state.px.tests
// let p_idx = -1
// tests.forEach(function(t,idx) {
// if (t.T_TestID == px.T_TestID) {
// p_idx = idx
// }
// })
// if (p_idx >= 0 ) {
// _.pullAt(tests,[p_idx])
// let dt = {
// records: tests,
// total: tests.length
// }
// this.$store.commit('px/update_tests',dt)
// }
// }
// this.$store.commit('px/update_selected_test',selected_test)
// if (px.T_TestRequirement != '' ) {
// let reqs = this.$store.state.px.requirement
// let rst = _.find(reqs, function(r) { return r.label == px.T_TestRequirement; })
// if ( rst == undefined ) {
// reqs.push({
// label: px.T_TestRequirement,
// error_message: 'Hasil harus di isi',
// is_error: true,
// checked : false,
// note: ''
// })
// }
// this.$store.commit('px/update_requirement',reqs)
// }
// in_selectPx = false
} catch(e) {
console.log(e)
in_selectPx = false
}
},
selectProfile(px) {
try {
// SEARCH NAT TEST
let nt = this.$store.state.px.nat_test
let found_nt = false
for (let i in px.nat_test) {
if (nt.indexOf(px.nat_test[i]) > -1)
found_nt = true
}
if (found_nt) {
alert('Pemeriksaan tersebut sudah ada !')
// END LOADING
this.$store.commit('update_dialog_loading', false)
return
}
let pxs = px.child_test
for (let i in pxs) {
px = pxs[i]
let selected_test = this.$store.state.px.selected_test
let flag_found = false
selected_test.push(px)
let tests = this.$store.state.px.tests
let p_idx = -1
tests.forEach(function(t,idx) {
if (t.T_TestID == px.T_TestID) {
p_idx = idx
}
})
if (p_idx >= 0 ) {
_.pullAt(tests,[p_idx])
let dt = {
records: tests,
total: tests.length
}
this.$store.commit('px/update_tests',dt)
}
this.$store.commit('px/update_selected_test', selected_test)
let req = px.requirement
let reqs = this.$store.state.px.requirement
if (req.length > 0) {
for(let i in req) {
let found = false
for(let j in reqs) {
if (reqs[j]['req_id'] == req[i]['req_id'])
found = j
}
if (!found)
reqs.push({
px_id: [px.T_TestID],
label: req[i]['req_name'],
error_message: 'Hasil harus di isi',
is_error: true,
checked : false,
note: '',
req_id: req[i]['req_id']
})
else
reqs[found].px_id.push(px.T_TestID)
}
this.$store.commit('px/update_requirement', reqs)
}
}
// this.$store.dispatch('px/appx_schedule')
in_selectPx = false
this.$store.commit('px/update_nat_test')
// END LOADING
this.$store.commit('update_dialog_loading', false)
} catch(e) {
console.log(e)
// END LOADING
this.$store.commit('update_dialog_loading', false)
in_selectPx = false
}
},
px_color (x) {
if (x == "PR")
return "green"
else if (x == "PN")
return "orange"
else
return "error"
}
},
computed: {
test_count() {
return this.$store.state.px.total_test
},
tests() {
return this.$store.state.px.tests
},
is_selectPx() {
return in_selectPx
},
is_loading() {
return this.$store.state.px.search_status == 1
}
},
data: function(){
return {
prev_search : ''
}
}
}
</script>

View File

@@ -0,0 +1,244 @@
<template>
<v-dialog
v-model="dialog_med"
max-width="900"
full-width
>
<!-- <v-btn
color="orange"
slot="activator"
:dark="processed"
block
:disabled="!processed"
>
RESEP
</v-btn> -->
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Resep Obat
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-data-table :headers="headers" :items="receipts"
:loading="isLoading"
hide-actions class="elevation-1">
<template slot="no-data">
<v-alert :value="isError" color="error" icon="warning">
Data Pasien tidak di temukan
{{errorMessage}}
</v-alert>
</template>
<template slot="items" slot-scope="props">
<td class="text-xs-left pa-2 text-md-center" >
{{ props.index + 1 }}
</td>
<td class="text-xs-left pa-2" >
<v-text-field outline
hide-details
v-model="props.item.med_name"
class="no-label"
@input="(val) => updateReceipt(props.index, 'med_name', val)"
></v-text-field>
</td>
<td class="text-xs-left pa-2" >
<v-layout>
<v-flex xs5>
<v-text-field outline
hide-details
v-model="props.item.med_signa1"
class="no-label"
reverse
@input="(val) => updateReceipt(props.index, 'med_signa1', val)"></v-text-field>
</v-flex>
<v-flex xs2
class="font-weight-black">
<p class="text-md-center mb-0 mt-2">X</p>
</v-flex>
<v-flex xs5>
<v-text-field outline
hide-details
v-model="props.item.med_signa2"
class="no-label"
reverse
@input="(val) => updateReceipt(props.index, 'med_signa2', val)"></v-text-field>
</v-flex>
</v-layout>
</td>
<td class="text-xs-left pa-2" >
<v-text-field outline
hide-details
v-model="props.item.med_days"
class="no-label"
reverse
@input="(val) => updateReceipt(props.index, 'med_days', val)"></v-text-field>
</td>
<!-- <td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.status }}</td> -->
</template>
</v-data-table>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
flat
@click="dialog_med = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style>
/* input { display:none } */
.no-label.v-text-field--outline>.v-input__control>.v-input__slot {
min-height: auto;
}
.no-label input {
margin-top: 0px !important;
}
</style>
<script>
module.exports = {
data () {
return {
headers : [
{
text: "NO",
align: "left",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NAMA OBAT",
align: "left",
sortable: false,
value: "mr",
width: "45%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "SIGNA",
align: "left",
sortable: false,
value: "name",
width: "30%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "HARI",
align: "left",
sortable: false,
value: "name",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
}
],
}
},
components : {
'patient-search-result': httpVueLoader('./patientSearchResult.vue')
},
methods : {
search: function() {
this.$store.dispatch('patient/search')
},
updateReceipt(idx, type, val) {
let receipts = this.$store.state.receipt.receipts
receipts[idx][type] = val
this.$store.commit("receipt/update_receipts", receipts)
}
},
computed : {
dialog_med : {
get() {
return this.$store.state.order.med_dialog_is_active;
},
set(val) {
this.$store.commit('order/update_med_dialog_is_active', val);
}
},
isLoading () {
return false
},
receipts : {
get () {
return this.$store.state.receipt.receipts
},
set (v) {
this.$store.commit('receipt/update_receipts', v)
return
}
},
isError () {
return false;
},
errorMessage () {
return ""
},
// test () {
// return this.$store.state.receipt.test
// }
test : {
get () {
return this.$store.state.receipt.test
},
set (v) {
this.$store.commit('receipt/update_test', v)
return
}
},
processed () {
return this.$store.state.order.processed;
}
},
watch : {
receipts (n, o) {
console.log(n)
console.log(o)
if (n != o)
this.$store.commit('receipt/update_receipts', n)
},
test (n, o) {
console.log("n-test:"+n+"o-test"+o)
}
}
}
</script>