2058 lines
73 KiB
Vue
2058 lines
73 KiB
Vue
<template>
|
|
<div>
|
|
<v-dialog v-model="dialogattachments" width="65%">
|
|
<v-card>
|
|
<v-card-title class="headline grey lighten-2" primary-title>
|
|
ATTACHMENTS
|
|
</v-card-title>
|
|
<v-card-text>
|
|
<v-layout row v-if="attachments && attachments.length > 0">
|
|
<v-flex xs12>
|
|
<v-card v-for="attachment in attachments" :key="attachment.id">
|
|
<v-img
|
|
v-if="attachment.T_NonlabDocumentType == 'image/jpeg' || attachment.T_NonlabDocumentType == 'png' || attachment.T_NonlabDocumentType == 'jpg'"
|
|
:src="`/one-media/one-document-nonlab/${attachment.T_NonlabDocumentFile}`"
|
|
height="300px"
|
|
>
|
|
|
|
</v-img>
|
|
<object
|
|
v-if="attachment.T_NonlabDocumentType == 'application/pdf' || attachment.T_NonlabDocumentType == 'pdf'"
|
|
:src="`/one-media/one-document-nonlab/${attachment.T_NonlabDocumentFile}`"
|
|
height="300px"
|
|
></object>
|
|
<v-card-actions>
|
|
<span style="font-size: 12px; color: #666">{{ attachment.M_PatientName }} - {{ attachment.T_NonlabDocumentFile }}</span>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="grey ligthen-1" flat @click="dialogattachments = false">TUTUP</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog persistent v-model="dialogDoctor" width="500">
|
|
<!-- <template v-slot:activator="{ on }">
|
|
<v-btn color="red lighten-2" dark v-on="on"> Click Me </v-btn>
|
|
</template> -->
|
|
|
|
<v-card>
|
|
<v-card-title class="headline grey lighten-2" primary-title>
|
|
Pilih Dokter
|
|
</v-card-title>
|
|
|
|
<v-card-text>
|
|
<v-autocomplete
|
|
label="Dokter"
|
|
v-model="selectedDoctor"
|
|
class="mt-1"
|
|
:items="doctorList"
|
|
:search-input.sync="searchDoctor"
|
|
auto-select-first
|
|
hide-details
|
|
style="font-size: 14px"
|
|
no-filter
|
|
item-text="doctorName"
|
|
return-object
|
|
:loading="isLoading"
|
|
no-data-text="Pilih Dokter"
|
|
>
|
|
<!-- :disabled="disableAutocomplete()" -->
|
|
<template slot="item" slot-scope="{ item }">
|
|
<v-list-tile-content>
|
|
<v-list-tile-title v-text="item.doctorName"></v-list-tile-title>
|
|
</v-list-tile-content>
|
|
</template>
|
|
</v-autocomplete>
|
|
</v-card-text>
|
|
|
|
<v-divider></v-divider>
|
|
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="error" flat @click="closeDialogDoctor()"> Tutup </v-btn>
|
|
<v-btn color="success" flat @click="saveDoctor()">Simpan</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog v-model="dialogprintlang" persistent max-width="80%">
|
|
<v-card class="align-center justify-center">
|
|
<v-card-title
|
|
style="padding: 0px"
|
|
primary-title
|
|
dark
|
|
color="blue-grey"
|
|
class="blue-grey white--text"
|
|
>
|
|
<v-subheader
|
|
v-if="dialoglangs.length > 0"
|
|
style="color: #fff !important"
|
|
>Laporan Hasil {{ dialoglangs[0].name }}</v-subheader
|
|
>
|
|
</v-card-title>
|
|
<v-card-text>
|
|
<v-layout row>
|
|
<!-- <v-flex xs3>
|
|
<v-layout row>
|
|
<v-flex xs12>
|
|
<v-switch
|
|
class="mt-1 mb-0"
|
|
@change="doPrintAfterLangClick(print_format, $event)"
|
|
v-model="print_format"
|
|
value="format-1"
|
|
>
|
|
<template v-slot:label>
|
|
<div class="body-1">Format 1</div>
|
|
</template>
|
|
</v-switch>
|
|
<v-switch
|
|
class="mt-1 mb-0"
|
|
@change="doPrintAfterLangClick(print_format, $event)"
|
|
v-model="print_format"
|
|
value="format-2"
|
|
>
|
|
<template v-slot:label>
|
|
<div class="body-1">Format 2</div>
|
|
</template>
|
|
</v-switch>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex> -->
|
|
<v-flex xs12>
|
|
<object
|
|
style="overflow: hidden"
|
|
height="540px"
|
|
width="100%"
|
|
:data="urlprint"
|
|
></object>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn
|
|
color="teal lighten-2"
|
|
v-if="btnsaveemail"
|
|
flat
|
|
@click="doSaveEmailFormat()"
|
|
>E-DELIVERY FORMAT</v-btn
|
|
>
|
|
<v-btn color="grey ligthen-1" flat @click="closePrint">TUTUP</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog v-model="dialognote" width="75%">
|
|
<v-card>
|
|
<v-card-title class="headline white--text error" primary-title>
|
|
</v-card-title>
|
|
|
|
<v-card-text>
|
|
<v-layout v-if="patient.fo_note && patient.fo_note !== ''" mb-2 row>
|
|
<v-flex mb-2 xs3>
|
|
<span style="color: #0f80db" class="mono name">FO</span>
|
|
</v-flex>
|
|
<v-flex xs9>
|
|
<v-layout row>
|
|
<v-flex mb-1 xs12>
|
|
<code
|
|
style="
|
|
box-shadow: none !important;
|
|
color: #0f80db !important;
|
|
background-color: #a8cfee6b !important;
|
|
"
|
|
>{{ patient.fo_note_user }}</code
|
|
>
|
|
<div class="v-markdown">
|
|
<p style="margin-top: 2px; margin-bottom: 0">
|
|
{{ patient.fo_note }}
|
|
</p>
|
|
</div>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
</v-layout>
|
|
<v-layout
|
|
v-if="patient.fo_ver_note && patient.fo_ver_note !== ''"
|
|
mb-2
|
|
row
|
|
>
|
|
<v-flex mb-2 xs3>
|
|
<span style="color: #0f80db" class="mono name"
|
|
>FO Verifikasi</span
|
|
>
|
|
</v-flex>
|
|
<v-flex xs9>
|
|
<v-layout row>
|
|
<v-flex mb-1 xs12>
|
|
<code
|
|
style="
|
|
box-shadow: none !important;
|
|
color: #0f80db !important;
|
|
background-color: #a8cfee6b !important;
|
|
"
|
|
>{{ patient.fo_ver_note_user }}</code
|
|
>
|
|
<div class="v-markdown">
|
|
<p style="margin-top: 2px; margin-bottom: 0">
|
|
{{ patient.fo_ver_note }}
|
|
</p>
|
|
</div>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
</v-layout>
|
|
<v-layout
|
|
v-if="patient.sampling_note && patient.sampling_note !== ''"
|
|
mb-2
|
|
row
|
|
>
|
|
<v-flex mb-2 xs3>
|
|
<span style="color: #0f80db" class="mono name">Sampling</span>
|
|
</v-flex>
|
|
<v-flex xs9>
|
|
<v-layout row>
|
|
<v-flex mb-1 xs12>
|
|
<code
|
|
style="
|
|
box-shadow: none !important;
|
|
color: #0f80db !important;
|
|
background-color: #a8cfee6b !important;
|
|
"
|
|
>{{ patient.sampling_note_user }}</code
|
|
>
|
|
<div class="v-markdown">
|
|
<p style="margin-top: 2px; margin-bottom: 0">
|
|
{{ patient.sampling_note }}
|
|
</p>
|
|
</div>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card-text>
|
|
|
|
<v-divider></v-divider>
|
|
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="grey" dark flat text @click="dialognote = false">
|
|
Tutup
|
|
</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog v-model="dialogtemplates" persistent max-width="450">
|
|
<v-card class="align-center justify-center">
|
|
<v-card-title
|
|
style="padding: 0px"
|
|
primary-title
|
|
dark
|
|
color="primary"
|
|
class="primary white--text"
|
|
>
|
|
<v-subheader style="color: #fff !important"
|
|
>PILIH TEMPLATE</v-subheader
|
|
>
|
|
</v-card-title>
|
|
<v-card-text>
|
|
<v-select
|
|
class="ma-1 mini-select"
|
|
:items="xtemplates"
|
|
item-text="label"
|
|
return-object
|
|
v-model="xselectedtemplate"
|
|
label="Template"
|
|
outline
|
|
hide-details
|
|
>
|
|
</v-select>
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="grey ligthen-1" flat @click="dialogtemplates = false"
|
|
>Batal</v-btn
|
|
>
|
|
<v-btn color="blue-grey" flat @click="doPasteTemplate()"
|
|
>Terapkan</v-btn
|
|
>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog v-model="dialoghistories" persistent max-width="80%">
|
|
<v-card class="align-center justify-center">
|
|
<v-card-title
|
|
style="padding: 0px"
|
|
primary-title
|
|
dark
|
|
color="info"
|
|
class="info white--text"
|
|
>
|
|
<v-subheader style="color: #fff !important">
|
|
RIWAYAT PEMERIKSAAN
|
|
</v-subheader>
|
|
</v-card-title>
|
|
<v-card-text
|
|
class="pa-1"
|
|
style="background: rgb(245, 232, 223) !important"
|
|
>
|
|
<v-layout pl-2 pr-2 pt-2 pb-2 row>
|
|
<v-flex pa-1 xs6>
|
|
<v-card class="pa-2">
|
|
<v-data-table
|
|
:headers="headers"
|
|
:items="xhistories"
|
|
:loading="isLoading"
|
|
hide-actions
|
|
class="elevation-1"
|
|
>
|
|
<template slot="items" slot-scope="props">
|
|
<td
|
|
class="text-xs-left pl-2 pr-2 pb-1 pt-1"
|
|
v-bind:class="{
|
|
'amber lighten-4': isSelected(props.item),
|
|
}"
|
|
@click="selectMe(props.item)"
|
|
>
|
|
{{ props.item.noreg }}
|
|
</td>
|
|
<td
|
|
class="text-xs-left pl-2 pr-2 pb-1 pt-1"
|
|
v-bind:class="{
|
|
'amber lighten-4': isSelected(props.item),
|
|
}"
|
|
@click="selectMe(props.item)"
|
|
>
|
|
{{ props.item.order_date }}
|
|
</td>
|
|
<td
|
|
class="text-xs-left pl-2 pr-2 pb-1 pt-1"
|
|
v-bind:class="{
|
|
'amber lighten-4': isSelected(props.item),
|
|
}"
|
|
@click="selectMe(props.item)"
|
|
>
|
|
{{ props.item.tests }}
|
|
</td>
|
|
</template>
|
|
</v-data-table>
|
|
<v-divider></v-divider>
|
|
<v-pagination
|
|
style="margin-top: 10px; margin-bottom: 10px"
|
|
v-model="curr_page_histories"
|
|
:length="xtotal_page_histories"
|
|
></v-pagination>
|
|
</v-card>
|
|
</v-flex>
|
|
<v-flex pa-1 xs7>
|
|
<v-card v-for="(test, index) in xselectedhistory.details">
|
|
<v-layout mb-2 row>
|
|
<v-flex xs12>
|
|
<v-subheader red--text text--lighten-1>
|
|
<v-chip color="blue grey" label text-color="white">
|
|
{{ test.test_name }}
|
|
</v-chip>
|
|
<v-chip label outline>
|
|
<v-icon left>assignment_ind</v-icon
|
|
>{{ test.doctor_fullname }}
|
|
</v-chip>
|
|
<v-flex text-md-right>
|
|
<v-icon @click="showMore(index)" style="cursor: pointer"
|
|
>more_horiz</v-icon
|
|
>
|
|
</v-flex>
|
|
</v-subheader>
|
|
<v-divider></v-divider>
|
|
<v-layout v-if="test.xshow === 'Y'" pl-2 row wrap>
|
|
<v-flex v-for="result in test.details" xs12 pa-2>
|
|
<div
|
|
style="font-weight: bold; font-size: 10px !important"
|
|
>
|
|
{{ result.result_label.toUpperCase() }}
|
|
</div>
|
|
<div class="v-markdown pl-2">
|
|
<p
|
|
class="mono"
|
|
style="margin-bottom: 0; font-size: 14px"
|
|
>
|
|
{{ result.result_value }}
|
|
</p>
|
|
</div>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="grey ligthen-1" flat @click="dialoghistories = false"
|
|
>Tutup</v-btn
|
|
>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog v-model="xdialogaction" persistent max-width="350">
|
|
<v-card>
|
|
<v-card-title color="warning" class="headline">Konfirmasi</v-card-title>
|
|
<v-card-text v-html="xmsgaction"> </v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="primary darken-1" flat @click="closeDialogAction()"
|
|
>Ya</v-btn
|
|
>
|
|
<v-btn color="error darken-1" flat @click="xdialogaction = false"
|
|
>Tutup</v-btn
|
|
>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog
|
|
v-model="dialogdownload"
|
|
persistent
|
|
max-width="650"
|
|
max-height="500"
|
|
>
|
|
<v-card>
|
|
<v-container grid-list-sm fluid>
|
|
<v-layout row wrap>
|
|
<v-flex xs12>
|
|
<p class="mb-2">PILIH YANG DIINGINKAN :</p>
|
|
<v-layout class="pl-2 pt-2" row>
|
|
<v-flex xs12>
|
|
<v-radio-group v-model="selected_download">
|
|
<v-radio
|
|
v-for="report in reports"
|
|
:label="report.test"
|
|
:value="report.url"
|
|
></v-radio>
|
|
</v-radio-group>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-container>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="error darken-1" flat @click="dialogdownload = false"
|
|
>Tutup</v-btn
|
|
>
|
|
<v-btn color="teal lighten-2" flat @click="doDownloadRpt()"
|
|
>DOWNLOAD</v-btn
|
|
>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-dialog
|
|
v-model="xdialogimage"
|
|
persistent
|
|
max-width="650"
|
|
max-height="500"
|
|
>
|
|
<v-card color="amber lighten-5">
|
|
<v-container grid-list-sm fluid>
|
|
<v-layout row wrap>
|
|
<v-flex>
|
|
<v-card flat tile class="d-flex">
|
|
<v-img :src="ximage" aspect-ratio="1" class="grey lighten-2">
|
|
<template v-slot:placeholder>
|
|
<v-layout fill-height align-center justify-center ma-0>
|
|
<v-progress-circular
|
|
indeterminate
|
|
color="grey lighten-5"
|
|
></v-progress-circular>
|
|
</v-layout>
|
|
</template>
|
|
</v-img>
|
|
</v-card>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-container>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="black" dark @click="xdialogimage = false">Tutup</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-layout row mb-2 wrap>
|
|
<v-flex xs12 pr-1>
|
|
<v-card>
|
|
<v-layout class="align-center" pt-1 pb-1 row>
|
|
<v-flex pt-1 pb-1 pl-2 pr-2 xs12>
|
|
<v-layout row>
|
|
<v-flex xs6>
|
|
<v-icon
|
|
title="riwayat"
|
|
v-if="parseInt(patient.has_histories) > 0"
|
|
@click="showHistories()"
|
|
style="font-size: 28px; cursor: pointer"
|
|
large
|
|
>today</v-icon
|
|
>
|
|
<v-btn color="primary" outline style="font-size: 36px; font-weight: bold" class="title">{{ patient.ordernumber }}</v-btn>
|
|
<v-icon
|
|
title="catatan"
|
|
@click="dialognote = true"
|
|
v-if="
|
|
(patient.fo_note && patient.fo_note != '') ||
|
|
(patient.sampling_note && patient.sampling_note != '')
|
|
"
|
|
style="font-size: 20px; cursor: pointer"
|
|
large
|
|
color="error"
|
|
>info</v-icon
|
|
>
|
|
</v-flex>
|
|
<v-flex class="text-xs-right pr-5" xs6>
|
|
<v-btn v-if="attachments && attachments.length > 0" icon @click="dialogattachments = true">
|
|
<v-icon>attach_file</v-icon> Attachment
|
|
</v-btn>
|
|
<v-chip
|
|
dark
|
|
v-for="delivery in patient.deliveries"
|
|
@click="downloadRpt(delivery)"
|
|
:title="delivery.destination"
|
|
label
|
|
:color="delivery.color"
|
|
text-color="white"
|
|
>
|
|
{{ delivery.label }}
|
|
</v-chip>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
</v-layout>
|
|
<v-divider></v-divider>
|
|
<v-layout pt-1 pb-2 row wrap>
|
|
<v-flex pt-1 pb-1 pl-2 xs12 md4>
|
|
<v-text-field
|
|
style="font-size: 12px"
|
|
ma-1
|
|
label="NAMA PASIEN"
|
|
class="text-uppercase"
|
|
:value="patient.patient_fullname"
|
|
hide-details
|
|
></v-text-field>
|
|
</v-flex>
|
|
<v-flex pt-1 pb-1 pl-2 xs6 md4>
|
|
<v-text-field
|
|
style="font-size: 12px"
|
|
ma-1
|
|
label="JENIS KELAMIN"
|
|
class="text-uppercase"
|
|
:value="patient.sexname"
|
|
hide-details
|
|
></v-text-field>
|
|
</v-flex>
|
|
<v-flex pt-1 pb-1 pl-2 pr-1 xs6 md4>
|
|
<v-text-field
|
|
ma-1
|
|
style="font-size: 12px"
|
|
label="UMUR"
|
|
class="text-uppercase"
|
|
:value="patient.umur"
|
|
hide-details
|
|
:title="patient.dob"
|
|
></v-text-field>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card>
|
|
</v-flex>
|
|
</v-layout>
|
|
<div style="overflow-y: auto">
|
|
<!-- <v-layout v-if="!patient.T_OrderPromiseDateTime" row wrap>
|
|
<v-flex pr-1 xs12>
|
|
<v-card>
|
|
<v-layout pa-3 row>
|
|
<v-flex xs12>
|
|
<h4 class="text-align-center font-weight-black title">JANJI YANG TAK PERNAH ADA - TERNYATA DIA SUDAH DENGANNYA</h4>
|
|
<blockquote class="blockquote subheading font-weight-light font-italic">
|
|
Pergi ke uluwatu bareng santi
|
|
<span class="font-weight-bold">Koreksi janji itu</span>, agar ku bisa mengerti.
|
|
</blockquote>
|
|
<p class="mt-2 pb-1 pr-5 caption warning--text">*) silahkan isi janji hasil di menu koreksi janji hasil</p>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card>
|
|
</v-flex>
|
|
</v-layout> -->
|
|
<!-- v-if="patient.T_OrderPromiseDateTime" -->
|
|
<v-layout mb-2 row v-for="(test, index) in xtests" wrap>
|
|
<v-flex xs12 pr-1>
|
|
<v-card>
|
|
<v-layout row>
|
|
<v-flex xs12>
|
|
<v-layout row wrap class="px-3 py-2">
|
|
<v-chip
|
|
:title="test.test_name"
|
|
v-if="
|
|
test.status === 'NEW' &&
|
|
(search_lab_no === '' || !search_lab_no)
|
|
"
|
|
label
|
|
color="grey"
|
|
text-color="white"
|
|
>
|
|
<v-icon left>label</v-icon
|
|
>{{ testfullname(test.test_name) }}
|
|
</v-chip>
|
|
<v-chip
|
|
:title="test.test_name"
|
|
v-if="
|
|
test.status === 'VAL1' &&
|
|
(search_lab_no === '' || !search_lab_no)
|
|
"
|
|
label
|
|
color="warning"
|
|
text-color="white"
|
|
>
|
|
<v-icon left>label</v-icon
|
|
>{{ testfullname(test.test_name) }}
|
|
</v-chip>
|
|
<v-chip
|
|
:title="test.test_name"
|
|
v-if="
|
|
test.status === 'VAL2' &&
|
|
(search_lab_no === '' || !search_lab_no)
|
|
"
|
|
label
|
|
color="success"
|
|
text-color="white"
|
|
>
|
|
<v-icon left>label</v-icon>{{ test.test_name }}
|
|
</v-chip>
|
|
<v-chip
|
|
@click="openDialogDoctor(test)"
|
|
:title="test.test_name"
|
|
label
|
|
color="info"
|
|
outline
|
|
>
|
|
<v-icon left>assignment_ind</v-icon
|
|
>{{ getDoctorName(test.doctor_fullname) }}
|
|
</v-chip>
|
|
<!-- <v-menu
|
|
bottom
|
|
origin="center center"
|
|
transition="scale-transition"
|
|
>
|
|
<template v-slot:activator="{ on }">
|
|
<v-btn
|
|
color="primary"
|
|
dark
|
|
depressed
|
|
style="margin-left: 4px; height: 32px; padding: 2px 8px"
|
|
small
|
|
v-on="on"
|
|
>
|
|
{{ selectedlangName(test) }}
|
|
</v-btn>
|
|
</template>
|
|
|
|
<v-list>
|
|
<v-list-tile
|
|
v-for="(lang, i) in xlangs(test)"
|
|
:key="i"
|
|
@click="selectLang(test, lang)"
|
|
>
|
|
<v-list-tile-title>{{ lang.name }}</v-list-tile-title>
|
|
</v-list-tile>
|
|
</v-list>
|
|
</v-menu> -->
|
|
<!-- <v-tooltip left>
|
|
<template v-slot:activator="{ on }">
|
|
<v-icon
|
|
v-on="on"
|
|
@click="pasteTemplate(test, index)"
|
|
style="cursor: pointer"
|
|
large
|
|
>
|
|
assignment</v-icon
|
|
>
|
|
</template>
|
|
<span>pasang template</span>
|
|
</v-tooltip> -->
|
|
<!-- <v-flex pt-1 pb-1 pl-2 pr-1 xs3> -->
|
|
<!-- <v-text-field
|
|
ma-1
|
|
style="font-size: 12px"
|
|
label="PENGIRIM"
|
|
class="text-uppercase"
|
|
:value="patient.doctor_sender"
|
|
hide-details
|
|
></v-text-field> -->
|
|
|
|
<!-- <v-autocomplete
|
|
label="Dokter"
|
|
v-model="selectedDoctor"
|
|
class="mt-1"
|
|
:items="doctorList"
|
|
:search-input.sync="searchDoctor"
|
|
auto-select-first
|
|
hide-details
|
|
:disabled="disableAutocomplete()"
|
|
style="font-size: 14px"
|
|
no-filter
|
|
item-text="doctorName"
|
|
return-object
|
|
:loading="isLoading"
|
|
no-data-text="Pilih Dokter"
|
|
>
|
|
<template slot="item" slot-scope="{ item }">
|
|
<v-list-tile-content>
|
|
<v-list-tile-title
|
|
v-text="item.doctorName"
|
|
></v-list-tile-title>
|
|
</v-list-tile-content>
|
|
</template>
|
|
</v-autocomplete> -->
|
|
<!-- </v-flex> -->
|
|
<v-flex text-xs-right>
|
|
<!-- v-if="test.status === 'VAL1' || test.status === 'VAL2'" -->
|
|
<span
|
|
v-if="test.type === 'Rontgen'"
|
|
@click="print2thn(test, 'print')"
|
|
class="icon-medium-fill-base-small xs1 white--text brown icon-print"
|
|
></span>
|
|
<span
|
|
@click="print(test, 'print')"
|
|
class="icon-medium-fill-base-small xs1 white--text blue-grey icon-print"
|
|
></span>
|
|
<span
|
|
v-if="test.status === 'VAL1'"
|
|
@click="unval1(test, 'unval1')"
|
|
class="icon-medium-fill-base-small xs1 white--text warning icon-unval hidden-xs-only"
|
|
></span>
|
|
<span
|
|
v-if="test.status === 'NEW' && check_saved(test)"
|
|
@click="val1(test, 'val1')"
|
|
class="icon-medium-fill-base-small xs1 white--text warning icon-v hidden-xs-only"
|
|
></span>
|
|
<span
|
|
v-if="test.status === 'NEW'"
|
|
@click="saveResult(test, 'save')"
|
|
class="icon-medium-fill-base-small xs1 white--text info icon-save"
|
|
></span>
|
|
</v-flex>
|
|
</v-layout>
|
|
<v-divider></v-divider>
|
|
<v-layout
|
|
v-if="test.status === 'NEW'"
|
|
row
|
|
wrap
|
|
class="px-3 py-2"
|
|
>
|
|
<div v-for="(df, dfid) in test.defaultValue">
|
|
<v-tooltip bottom :key="dfid">
|
|
<template v-slot:activator="{ on }">
|
|
<v-btn
|
|
small
|
|
color="blue-grey"
|
|
class="white--text"
|
|
v-on="on"
|
|
@click="assignTemplate(df)"
|
|
>
|
|
<v-icon left dark>assignment</v-icon>
|
|
{{ df.resultDefaultName }}
|
|
</v-btn>
|
|
</template>
|
|
<span>Default template</span>
|
|
</v-tooltip>
|
|
</div>
|
|
</v-layout>
|
|
<v-divider v-if="test.status === 'NEW'"></v-divider>
|
|
<v-layout row wrap>
|
|
<v-flex xs12 pa-2 pt-1>
|
|
<v-layout
|
|
align-center
|
|
justify-center
|
|
v-for="(result, idxresult) in test.details"
|
|
row
|
|
>
|
|
<!-- <v-flex pl-2 class="text-xs-center" xs1>
|
|
<v-switch
|
|
:v-model="result.flag_print === 'Y'"
|
|
@change="
|
|
changeFlagPrint(result.flag_print, idxresult, index)
|
|
"
|
|
></v-switch>
|
|
</v-flex> -->
|
|
<v-flex xs11 pr-2 pb-2>
|
|
<v-textarea
|
|
filled
|
|
outline
|
|
hide-details
|
|
:label="result.result_label"
|
|
auto-grow
|
|
@change="
|
|
changeResult(result.result_value, idxresult, index)
|
|
"
|
|
:disabled="test.status !== 'NEW'"
|
|
v-model="result.result_value"
|
|
rows="3"
|
|
></v-textarea>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
</v-layout>
|
|
<!-- v-if="test.is_mcu === 'Y'" -->
|
|
<v-divider></v-divider>
|
|
<!-- v-if="test.is_mcu === 'Y'" -->
|
|
<v-layout align-center justify-end row>
|
|
<v-flex xs12 pl-3 pr-3 pt-2 pb-2>
|
|
<!--<v-select
|
|
:disabled="test.status !== 'NEW'"
|
|
:items="test.status_result_arr"
|
|
v-model="test.status_result"
|
|
return-object
|
|
hide-details
|
|
outline
|
|
class="mini-select"
|
|
item-text="name"
|
|
label="Kategori Hasil"
|
|
></v-select>-->
|
|
<v-combobox
|
|
v-model="test.status_result"
|
|
:items="test.status_result_arr"
|
|
:disabled="test.status !== 'NEW'"
|
|
label="Kategori Hasil"
|
|
item-text="name"
|
|
multiple
|
|
chips
|
|
></v-combobox>
|
|
</v-flex>
|
|
</v-layout>
|
|
<v-divider v-if="search_lab_no !== ''"></v-divider>
|
|
<!-- v-if="test.is_mcu === 'Y'" -->
|
|
<v-layout
|
|
v-if="search_lab_no !== ''"
|
|
align-center
|
|
justify-end
|
|
row
|
|
>
|
|
<v-flex xs12 pl-3 pr-3 pt-2 pb-2>
|
|
<v-btn
|
|
v-if="test.status === 'NEW'"
|
|
@click="saveResult(test, 'save')"
|
|
block
|
|
color="success"
|
|
dark
|
|
>SIMPAN
|
|
</v-btn>
|
|
<v-btn
|
|
v-if="test.status === 'NEW' && check_saved(test)"
|
|
@click="val1(test, 'val1')"
|
|
block
|
|
color="info"
|
|
class="hidden-xs-only"
|
|
dark
|
|
>VALIDASI
|
|
</v-btn>
|
|
<!--<v-btn
|
|
v-if="test.status === 'VAL1'"
|
|
@click="unval1(test, 'unval1')"
|
|
block
|
|
color="warning"
|
|
class="hidden-xs-only"
|
|
dark
|
|
>BATAL VALIDASI
|
|
</v-btn>-->
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card>
|
|
</v-flex>
|
|
</v-layout>
|
|
</div>
|
|
<one-dialog-print
|
|
:title="printtitle"
|
|
:width="printwidth"
|
|
:height="500"
|
|
:status="openprint"
|
|
:urlprint="urlprint"
|
|
@close-dialog-print="closePrint"
|
|
></one-dialog-print>
|
|
<one-dialog-alert
|
|
:status="openalertconfirmation"
|
|
:msg="msgalertconfirmation"
|
|
@forget-dialog-alert="forgetAlertConfirmation()"
|
|
@close-dialog-alert="closeAlertConfirmation()"
|
|
></one-dialog-alert>
|
|
<one-dialog-info
|
|
:status="opendialoginfo"
|
|
:msg="msginfo"
|
|
@close-dialog-info="closeDialogInfo()"
|
|
></one-dialog-info>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
table,
|
|
td,
|
|
th {
|
|
border: 1px solid #ddd;
|
|
text-align: left;
|
|
}
|
|
|
|
table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
}
|
|
|
|
th,
|
|
td {
|
|
padding-top: 5px;
|
|
padding-bottom: 5px;
|
|
padding-left: 8px;
|
|
padding-right: 5px;
|
|
}
|
|
|
|
.mini-input .v-input {
|
|
margin-top: 0px;
|
|
}
|
|
|
|
.mini-input .v-input,
|
|
.mini-input .v-input--selection-controls,
|
|
.mini-input .v-input__slot {
|
|
margin-top: 0px;
|
|
margin-bottom: 0px;
|
|
margin-left: 3px;
|
|
}
|
|
|
|
.mini-input .v-messages {
|
|
min-height: 0px;
|
|
}
|
|
|
|
input.fhm-input {
|
|
border: 1px solid black;
|
|
border-radius: 2px;
|
|
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1),
|
|
0 0 4px rgba(0, 0, 0, 0.1);
|
|
-moz-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1), 0 0 4px rgba(0, 0, 0, 0.1);
|
|
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1), 0 0 4px rgba(0, 0, 0, 0.1);
|
|
padding: 2px 4px;
|
|
background: rgba(255, 255, 255, 0.5);
|
|
margin: 0 0 1px 0;
|
|
width: 30px;
|
|
text-align: center;
|
|
}
|
|
|
|
code,
|
|
kbd {
|
|
white-space: normal;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
module.exports = {
|
|
components: {
|
|
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
|
|
"one-dialog-info": httpVueLoader("../../common/oneDialogInfo.vue"),
|
|
"one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
|
|
},
|
|
data: () => ({
|
|
dialogattachments: false,
|
|
dialogdownload: false,
|
|
reports: [],
|
|
selected_download: "",
|
|
btnsaveemail: false,
|
|
openprint: false,
|
|
urlprint: "",
|
|
isLoading: false,
|
|
msgalertconfirmation:
|
|
"Perubahan yang telah dilakukan belum disimpan dong !",
|
|
printtitle: "",
|
|
printwidth: 600,
|
|
selected_template: {},
|
|
status_results: [
|
|
{ id: "X", name: "Belum ditentukan" },
|
|
{ id: "Y", name: "Normal" },
|
|
{ id: "N", name: "Tidak Normal" },
|
|
],
|
|
idx_test: 0,
|
|
headers: [
|
|
{
|
|
text: "NO REG",
|
|
align: "left",
|
|
sortable: false,
|
|
width: "10%",
|
|
class: "pl-2 pr-2 pb-1 pt-1 blue lighten-3 white--text",
|
|
},
|
|
{
|
|
text: "TANGGAL ORDER",
|
|
align: "left",
|
|
sortable: false,
|
|
width: "10%",
|
|
class: "pl-2 pr-2 pb-1 pt-1 blue lighten-3 white--text",
|
|
},
|
|
{
|
|
text: "PEMRIKSAAN",
|
|
align: "left",
|
|
sortable: false,
|
|
width: "35%",
|
|
class: "pl-2 pr-2 pb-1 pt-1 blue lighten-3 white--text",
|
|
},
|
|
],
|
|
}),
|
|
computed: {
|
|
attachments: {
|
|
get() {
|
|
return this.$store.state.sample.attachments;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_attachments", val);
|
|
},
|
|
},
|
|
search_lab_no: {
|
|
get() {
|
|
return this.$store.state.sample.search_lab_no;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_search_lab_no", val);
|
|
},
|
|
},
|
|
openalertconfirmation: {
|
|
get() {
|
|
return this.$store.state.sample.open_alert_confirmation;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_open_alert_confirmation", val);
|
|
},
|
|
},
|
|
opendialoginfo: {
|
|
get() {
|
|
return this.$store.state.sample.open_dialog_info;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_open_dialog_info", false);
|
|
},
|
|
},
|
|
msginfo() {
|
|
return this.$store.state.sample.msg_info;
|
|
},
|
|
email_format: {
|
|
get() {
|
|
let format = this.$store.state.email.format;
|
|
if (format) return format;
|
|
return "";
|
|
},
|
|
set(val) {
|
|
this.$store.commit("email/update_format", val);
|
|
},
|
|
},
|
|
print_format: {
|
|
get() {
|
|
return this.$store.state.sample.print_format;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_print_format", val);
|
|
},
|
|
},
|
|
xhistories: {
|
|
get() {
|
|
return this.$store.state.sample.histories;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_histories", val);
|
|
},
|
|
},
|
|
dialoghistories: {
|
|
get() {
|
|
return this.$store.state.sample.dialog_histories;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_dialog_histories", val);
|
|
},
|
|
},
|
|
dialognote: {
|
|
get() {
|
|
return this.$store.state.sample.dialog_note;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_dialog_note", val);
|
|
},
|
|
},
|
|
dialogtemplates: {
|
|
get() {
|
|
return this.$store.state.sample.dialog_template;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_dialog_template", val);
|
|
},
|
|
},
|
|
xtemplates() {
|
|
return this.$store.state.sample.templates;
|
|
},
|
|
xselectedtemplate: {
|
|
get() {
|
|
return this.$store.state.sample.selected_template;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_selected_template", val);
|
|
},
|
|
},
|
|
xdialogaction: {
|
|
get() {
|
|
return this.$store.state.sample.dialog_action;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_dialog_action", val);
|
|
},
|
|
},
|
|
xmsgaction: {
|
|
get() {
|
|
return this.$store.state.sample.msg_action;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_msg_action", val);
|
|
},
|
|
},
|
|
xtests() {
|
|
return this.$store.state.sample.selected_transaction.details;
|
|
},
|
|
patient() {
|
|
return this.$store.state.sample.selected_transaction;
|
|
},
|
|
xdialogimage: {
|
|
get() {
|
|
return this.$store.state.sample.dialog_image;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_dialog_image", val);
|
|
},
|
|
},
|
|
ximage() {
|
|
return this.$store.state.sample.image;
|
|
},
|
|
dialoglangs: {
|
|
get() {
|
|
return this.$store.state.sample.langs;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_item_langs", val);
|
|
},
|
|
},
|
|
xselectedlang: {
|
|
get() {
|
|
return this.$store.state.sample.selected_lang;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_selected_lang", val);
|
|
},
|
|
},
|
|
dialogprintlang: {
|
|
get() {
|
|
return this.$store.state.sample.dialog_print_lang;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_dialog_print_lang", val);
|
|
},
|
|
},
|
|
curr_page_histories: {
|
|
get() {
|
|
return this.$store.state.sample.current_page_histories;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_current_page_histories", val);
|
|
this.$store.dispatch("sample/search_histories", {
|
|
search: "",
|
|
patientid: this.patient.patientid,
|
|
orderid: this.patient.trx_id,
|
|
current_page: val,
|
|
lastid: -1,
|
|
});
|
|
},
|
|
},
|
|
xtotal_page_histories: {
|
|
get() {
|
|
return this.$store.state.sample.total_page_histories;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_total_page_histories", val);
|
|
},
|
|
},
|
|
xselectedhistory() {
|
|
return this.$store.state.sample.selected_history;
|
|
},
|
|
doctorList() {
|
|
return this.$store.state.sample.doctorList;
|
|
},
|
|
selectedDoctor: {
|
|
get() {
|
|
return this.$store.state.sample.selectedDoctor;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_selectedDoctor", val);
|
|
// this.$store.dispatch("sample/savedoctor", {
|
|
// id: this.patient.re_id,
|
|
// doctorid: val.doctorID,
|
|
// });
|
|
},
|
|
},
|
|
searchDoctor: {
|
|
get() {
|
|
return this.$store.state.sample.searchDoctor;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_searchDoctor", val);
|
|
},
|
|
},
|
|
dialogDoctor: {
|
|
get() {
|
|
return this.$store.state.sample.dialogDoctor;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_dialogDoctor", val);
|
|
},
|
|
},
|
|
selectedDoctrorTest: {
|
|
get() {
|
|
return this.$store.state.sample.selectedDoctrorTest;
|
|
},
|
|
set(val) {
|
|
this.$store.commit("sample/update_selectedDoctrorTest", val);
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
assignTemplate(tmpt) {
|
|
let trx = this.$store.state.sample.selected_transaction;
|
|
let validate = false;
|
|
for (let index = 0; index < trx.details.length; index++) {
|
|
const e = trx.details[index];
|
|
if (
|
|
parseInt(e.template_id) === parseInt(tmpt.resultDefaultTemplateID)
|
|
) {
|
|
for (let k = 0; k < e.details.length; k++) {
|
|
const el = e.details[k];
|
|
for (let m = 0; m < tmpt.detail.length; m++) {
|
|
const dtm = tmpt.detail[m];
|
|
if (
|
|
el.template_detail_id ===
|
|
dtm.resultDefaultDetailNonlabtemplateDetailID
|
|
) {
|
|
if (el.result_value !== "" && el.result_value !== null) {
|
|
validate = true;
|
|
}
|
|
}
|
|
// resultDefaultDetailNonlabtemplateDetailID;
|
|
// resultDefaultDetailResult;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let confrm = false;
|
|
if (validate) {
|
|
confrm = confirm(
|
|
"Hasil sudah terisi, apakah anda yakin untuk mengubah template?.\n \nMengubah template akan mengganti data yang sudah terisi dengan nilai baru"
|
|
);
|
|
if (confrm === true) {
|
|
for (let index = 0; index < trx.details.length; index++) {
|
|
const e = trx.details[index];
|
|
if (
|
|
parseInt(e.template_id) === parseInt(tmpt.resultDefaultTemplateID)
|
|
) {
|
|
for (let k = 0; k < e.details.length; k++) {
|
|
const el = e.details[k];
|
|
for (let m = 0; m < tmpt.detail.length; m++) {
|
|
const dtm = tmpt.detail[m];
|
|
if (
|
|
el.template_detail_id ===
|
|
dtm.resultDefaultDetailNonlabtemplateDetailID
|
|
) {
|
|
trx.details[index].details[k].result_value =
|
|
dtm.resultDefaultDetailResult;
|
|
}
|
|
// resultDefaultDetailNonlabtemplateDetailID;
|
|
// resultDefaultDetailResult;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
console.log(trx);
|
|
this.$store.commit("sample/update_selected_transaction", trx);
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
// debugger;
|
|
|
|
if (!validate) {
|
|
//apabila semua kosong
|
|
for (let index = 0; index < trx.details.length; index++) {
|
|
const e = trx.details[index];
|
|
if (
|
|
parseInt(e.template_id) === parseInt(tmpt.resultDefaultTemplateID)
|
|
) {
|
|
for (let k = 0; k < e.details.length; k++) {
|
|
const el = e.details[k];
|
|
for (let m = 0; m < tmpt.detail.length; m++) {
|
|
const dtm = tmpt.detail[m];
|
|
if (
|
|
el.template_detail_id ===
|
|
dtm.resultDefaultDetailNonlabtemplateDetailID
|
|
) {
|
|
trx.details[index].details[k].result_value =
|
|
dtm.resultDefaultDetailResult;
|
|
}
|
|
// resultDefaultDetailNonlabtemplateDetailID;
|
|
// resultDefaultDetailResult;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
console.log(trx);
|
|
this.$store.commit("sample/update_selected_transaction", trx);
|
|
}
|
|
},
|
|
closeDialogInfo() {
|
|
this.$store.commit("sample/update_open_dialog_info", false);
|
|
/*var trxs = this.$store.state.sample.transactions
|
|
var trx = this.$store.state.sample.selected_transaction
|
|
var idx = _.findIndex(trxs, item => item.T_OrderHeaderID === trx.T_OrderHeaderID && item.T_SampleTypeID === trx.T_SampleTypeID)
|
|
this.$store.dispatch("sample/search",{
|
|
startdate:this.xdatestart,
|
|
enddate: this.xdateend,
|
|
search:this.xnamelab,
|
|
stationid:this.xselectedstation.id,
|
|
groupid:this.$store.state.sample.select_item_group.id,
|
|
subgroupid:this.$store.state.sample.select_item_subgroup.id,
|
|
lastid:idx
|
|
})*/
|
|
},
|
|
closeAlertConfirmation() {
|
|
this.$store.commit("sample/update_open_alert_confirmation", false);
|
|
},
|
|
forgetAlertConfirmation() {
|
|
this.$store.commit("sample/update_no_save", 0);
|
|
this.$store.commit("sample/update_open_alert_confirmation", false);
|
|
},
|
|
doDownloadRpt() {
|
|
var eurl = this.selected_download;
|
|
var win = window.open(eurl, "_blank");
|
|
win.focus();
|
|
},
|
|
downloadRpt(dx) {
|
|
this.reports = dx.url;
|
|
this.selected_download = "";
|
|
if (dx.status_payment === "Y" && dx.url.length > 0) {
|
|
if (dx.url.length === 1) {
|
|
var eurl = dx.url[0].url;
|
|
var win = window.open(eurl, "_blank");
|
|
win.focus();
|
|
} else {
|
|
this.dialogdownload = true;
|
|
}
|
|
}
|
|
},
|
|
testfullname(value) {
|
|
var xx = value.length;
|
|
if (xx > 25) return value.substring(0, 25) + "...";
|
|
else return value;
|
|
},
|
|
showMore(index) {
|
|
var selected_history = this.$store.state.sample.selected_history;
|
|
var old_value = selected_history.details[index].xshow;
|
|
selected_history.details[index].xshow = old_value === "Y" ? "N" : "Y";
|
|
},
|
|
showHistories() {
|
|
this.xhistories = [];
|
|
this.dialoghistories = true;
|
|
this.curr_page_histories = 1;
|
|
this.xtotal_page_histories = 0;
|
|
},
|
|
isSelected(p) {
|
|
return p.orderid == this.$store.state.sample.selected_history.orderid;
|
|
},
|
|
selectMe(trx) {
|
|
this.$store.commit("sample/update_selected_history", trx);
|
|
this.$store.commit("sample/update_details_histories", trx.details);
|
|
},
|
|
changeSwitch(value, idx) {
|
|
//console.log(value)
|
|
_.forEach(this.dialoglangs, function (num) {
|
|
num.chex = "N";
|
|
});
|
|
this.dialoglangs[idx].chex = value === "Y" ? "N" : "Y";
|
|
},
|
|
changeFlagPrint(value, rst_idx, test_idx) {
|
|
var selected_patient = this.$store.state.sample.selected_transaction;
|
|
var trx = this.$store.state.sample.selected_test;
|
|
var idx_true = _.findIndex(this.dialoglangs, (item) => item.chex === "Y");
|
|
|
|
//console.log(selected_patient)
|
|
selected_patient.details[test_idx].details[rst_idx].flag_print =
|
|
value === "Y" ? "N" : "Y";
|
|
//console.log(selected_patient[test_idx][rst_idx])
|
|
this.$store.dispatch("sample/save_flagprint", {
|
|
lang: selected_patient.details[test_idx].language_id,
|
|
selected_trx: selected_patient,
|
|
row: selected_patient.details[test_idx].details[rst_idx],
|
|
});
|
|
},
|
|
changeResult(value, rst_idx, test_idx) {
|
|
var value = JSON.stringify(value);
|
|
value = JSON.parse(value);
|
|
var transactions = this.$store.state.sample.transactions;
|
|
var selected_patient = this.$store.state.sample.selected_transaction;
|
|
var idx = _.filter(transactions, function (o) {
|
|
return o.trx_id === selected_patient.trx_id;
|
|
});
|
|
//console.log(selected_patient)
|
|
selected_patient.details[test_idx].details[rst_idx].result_value = value;
|
|
this.$store.commit("sample/update_transactions", transactions);
|
|
//console.log(selected_patient[test_idx][rst_idx])
|
|
//this.$store.dispatch("sample/save_flagprint",{selected_trx:selected_patient,row:selected_patient.details[test_idx].details[rst_idx]})
|
|
},
|
|
xlangs(test) {
|
|
return test.langs;
|
|
},
|
|
check_saved(test) {
|
|
var arrdetails = test.details;
|
|
var notempty = _.filter(arrdetails, function (o) {
|
|
return o.result_value_before !== "";
|
|
});
|
|
//console.log(notempty)
|
|
if (notempty.length === 0) return false;
|
|
else return true;
|
|
},
|
|
selectedLang(value) {
|
|
return {
|
|
id: value.language_id,
|
|
name: value.language_name,
|
|
};
|
|
},
|
|
selectedlangName(value) {
|
|
return value.language_name;
|
|
},
|
|
selectLang(trx, lang) {
|
|
console.log(trx);
|
|
var arr = this.$store.state.sample.selected_transaction;
|
|
var arrdetails = arr.details;
|
|
let idx = _.findIndex(arrdetails, function (o) {
|
|
return o.trx_id == trx.trx_id;
|
|
});
|
|
console.log("aye");
|
|
this.$store.dispatch("sample/getrstbylang", {
|
|
trx: trx,
|
|
lang: lang,
|
|
selected_trx: this.$store.state.sample.selected_transaction,
|
|
idx: idx,
|
|
detail: arrdetails[idx],
|
|
});
|
|
},
|
|
changeResult() {
|
|
this.$store.commit("sample/update_no_save", 1);
|
|
},
|
|
saveResult(trx, act) {
|
|
var ar = this.$store.state.sample.transactions;
|
|
var arr = this.$store.state.sample.selected_transaction;
|
|
let idx = _.findIndex(ar, function (o) {
|
|
return o.trx_id == arr.trx_id;
|
|
});
|
|
this.$store.dispatch("sample/saveresult", {
|
|
startdate: this.$store.state.sample.start_date,
|
|
enddate: this.$store.state.sample.end_date,
|
|
search: this.$store.state.sample.name_lab,
|
|
stationid: this.$store.state.sample.selected_station.id,
|
|
groupid: this.$store.state.sample.select_item_group.id,
|
|
subgroupid: this.$store.state.sample.select_item_subgroup.id,
|
|
lastid: arr.trx_id,
|
|
current_page: this.$store.state.sample.current_page,
|
|
trx: trx,
|
|
trx_numbering: arr.ordernumber,
|
|
act: act,
|
|
});
|
|
},
|
|
isObjectEmpty(objectName) {
|
|
return (
|
|
Object.keys(objectName).length === 0 &&
|
|
objectName.constructor === Object
|
|
);
|
|
},
|
|
val1(trx, act) {
|
|
console.log(act);
|
|
if (
|
|
trx.doctor_id === "0" ||
|
|
trx.doctor_id === 0 ||
|
|
trx.doctor_id === "" ||
|
|
trx.doctor_id === null
|
|
) {
|
|
alert("Pilih dokter terlebih dahulu");
|
|
return;
|
|
}
|
|
var go_cat = true;
|
|
trx.is_mcu = "Y";
|
|
if (
|
|
trx.is_mcu === "Y" &&
|
|
(trx.status_result.id === "X" || trx.status_result.length === 0)
|
|
)
|
|
go_cat = false;
|
|
// console.log("CEK GO CAT");
|
|
// console.log(go_cat);
|
|
// console.log(trx.is_mcu);
|
|
// console.log(trx.status_result.id);
|
|
// console.log(trx.status_result.length);
|
|
if (go_cat) {
|
|
this.$store.commit("sample/update_act", act);
|
|
this.$store.commit("sample/update_last_trx", trx);
|
|
var arr = this.$store.state.sample.selected_transaction;
|
|
var msg =
|
|
"Anda yakin akan melakukan validasi untuk pemeriksaan " +
|
|
trx.test_name +
|
|
" dari pasien " +
|
|
arr.patient_fullname +
|
|
" ?";
|
|
this.$store.commit("sample/update_msg_action", msg);
|
|
this.$store.commit("sample/update_dialog_action", true);
|
|
} else {
|
|
var msg =
|
|
"<p class='mb-0'>Belajar menggambar pakai pensil, menggambar daun pohon kelapa, tolong dilihat kategori hasil, pilih salah satu jangan lupa</p>";
|
|
msg +=
|
|
"<p class='mb-1 mono caption' style='color:red' >*) Kategori hasil untuk rekap mcu</p>";
|
|
this.$store.commit("sample/update_msg_info", msg);
|
|
this.$store.commit("sample/update_open_dialog_info", true);
|
|
}
|
|
},
|
|
unval1(trx, act) {
|
|
console.log(act);
|
|
this.$store.commit("sample/update_act", act);
|
|
this.$store.commit("sample/update_last_trx", trx);
|
|
var arr = this.$store.state.sample.selected_transaction;
|
|
var msg =
|
|
"Anda yakin akan membatalkan validasi untuk pemeriksaan " +
|
|
trx.test_name +
|
|
" dari pasien " +
|
|
arr.patient_fullname +
|
|
" ?";
|
|
this.$store.commit("sample/update_msg_action", msg);
|
|
this.$store.commit("sample/update_dialog_action", true);
|
|
},
|
|
val2(trx, act) {
|
|
console.log(act);
|
|
this.$store.commit("sample/update_act", act);
|
|
this.$store.commit("sample/update_last_trx", trx);
|
|
var arr = this.$store.state.sample.selected_transaction;
|
|
var msg =
|
|
"Anda yakin akan melakukan validasi untuk pemeriksaan " +
|
|
trx.test_name +
|
|
" dari pasien " +
|
|
arr.patient_fullname +
|
|
" ?";
|
|
this.$store.commit("sample/update_msg_action", msg);
|
|
this.$store.commit("sample/update_dialog_action", true);
|
|
},
|
|
unval2(trx, act) {
|
|
console.log(act);
|
|
this.$store.commit("sample/update_act", act);
|
|
this.$store.commit("sample/update_last_trx", trx);
|
|
var arr = this.$store.state.sample.selected_transaction;
|
|
var msg =
|
|
"Anda yakin akan membatalkan validasi untuk pemeriksaan " +
|
|
trx.test_name +
|
|
" dari pasien " +
|
|
arr.patient_fullname +
|
|
" ?";
|
|
this.$store.commit("sample/update_msg_action", msg);
|
|
this.$store.commit("sample/update_dialog_action", true);
|
|
},
|
|
disableAutocomplete() {
|
|
let ret = false;
|
|
if (this.xtests !== undefined && this.xtests !== null) {
|
|
if (this.xtests.length > 0) {
|
|
if (this.xtests[0]["status"] !== "NEW") {
|
|
ret = true;
|
|
}
|
|
} else {
|
|
ret = true;
|
|
}
|
|
} else {
|
|
ret = true;
|
|
}
|
|
return ret;
|
|
},
|
|
async doSaveEmailFormat() {
|
|
var trx = this.$store.state.sample.selected_test;
|
|
var idx_true = _.findIndex(this.dialoglangs, (item) => item.chex === "Y");
|
|
this.xselectedlang = this.dialoglangs[idx_true];
|
|
let idx = trx.orderid;
|
|
let user = one_user();
|
|
var d = new Date();
|
|
var n = d.getTime();
|
|
var rptname = "";
|
|
this.email_format = this.print_format;
|
|
if (trx.type === "Rontgen") rptname = "rpt_hasil_so_xray_email";
|
|
if (trx.type === "USG") {
|
|
rptname = "rpt_hasil_so_usg_email";
|
|
idx = trx.trx_id;
|
|
}
|
|
if (trx.type === "BMD") rptname = "rpt_hasil_so_bdm_email";
|
|
if (trx.type === "MRI") rptname = "rpt_hasil_so_xray_mri_email";
|
|
|
|
if (trx.type === "Rontgen" && this.email_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_2_email";
|
|
if (trx.type === "USG" && this.email_format === "format-2")
|
|
rptname = "rpt_hasil_so_usg_2_email";
|
|
if (trx.type === "BMD" && this.email_format === "format-2")
|
|
rptname = "rpt_hasil_so_bdm_2_email";
|
|
if (trx.type === "MRI" && this.email_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_mri_2_email";
|
|
|
|
if (this.xselectedlang.code === "EN") {
|
|
if (trx.type === "Rontgen") rptname = "rpt_hasil_so_xray_eng_email";
|
|
if (trx.type === "USG") rptname = "rpt_hasil_so_usg_eng_email";
|
|
if (trx.type === "BMD") rptname = "rpt_hasil_so_bdm_eng_email";
|
|
if (trx.type === "MRI") rptname = "rpt_hasil_so_xray_mri_eng_email";
|
|
|
|
if (trx.type === "Rontgen" && this.email_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_2_eng_email";
|
|
if (trx.type === "USG" && this.email_format === "format-2")
|
|
rptname = "rpt_hasil_so_usg_2_eng_email";
|
|
if (trx.type === "BMD" && this.email_format === "format-2")
|
|
rptname = "rpt_hasil_so_bdm_2_eng_email";
|
|
if (trx.type === "MRI" && this.email_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_mri_2_eng_email";
|
|
}
|
|
let url =
|
|
"/birt/run?__report=report/one/lab/" +
|
|
rptname +
|
|
".rptdesign&__format=pdf&username=" +
|
|
user.M_UserUsername +
|
|
"&PID=" +
|
|
idx +
|
|
"&PLang=" +
|
|
trx.language_id +
|
|
"&tm=" +
|
|
n;
|
|
|
|
let prm_email = {
|
|
orderID: trx.orderid,
|
|
type: trx.type,
|
|
url: url,
|
|
format: this.email_format,
|
|
};
|
|
if (trx.type === "USG") {
|
|
prm_email.re_id = trx.trx_id;
|
|
}
|
|
await this.$store.dispatch("email/save", prm_email);
|
|
this.dialogprintlang = false;
|
|
},
|
|
async doPrintAfterLangClick(item, event) {
|
|
var trx = this.$store.state.sample.selected_test;
|
|
var idx_true = _.findIndex(this.dialoglangs, (item) => item.chex === "Y");
|
|
this.xselectedlang = this.dialoglangs[idx_true];
|
|
this.printwidth = 1028;
|
|
this.printtitle = "";
|
|
let idx = trx.orderid;
|
|
console.log(event);
|
|
console.log(this.print_format);
|
|
//this.print_format = event.target.value
|
|
let user = one_user();
|
|
var d = new Date();
|
|
var n = d.getTime();
|
|
var rptname = "";
|
|
if (trx.type === "Rontgen") rptname = "rpt_hasil_so_xray";
|
|
if (trx.type === "USG") {
|
|
rptname = "rpt_hasil_so_usg";
|
|
idx = trx.trx_id;
|
|
}
|
|
if (trx.type === "BMD") rptname = "rpt_hasil_so_bdm";
|
|
if (trx.type === "MRI") rptname = "rpt_hasil_so_xray_mri";
|
|
|
|
if (trx.type === "Rontgen" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_2";
|
|
if (trx.type === "USG" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_usg_2";
|
|
if (trx.type === "BMD" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_bdm_2";
|
|
if (trx.type === "MRI" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_mri_2";
|
|
|
|
if (parseInt(trx.language_id) === 2) {
|
|
if (trx.type === "Rontgen") rptname = "rpt_hasil_so_xray_eng";
|
|
if (trx.type === "USG") rptname = "rpt_hasil_so_usg_eng";
|
|
if (trx.type === "BMD") rptname = "rpt_hasil_so_bdm_eng";
|
|
if (trx.type === "MRI") rptname = "rpt_hasil_so_xray_mri_eng";
|
|
|
|
if (trx.type === "Rontgen" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_2_eng";
|
|
if (trx.type === "USG" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_usg_2_eng";
|
|
if (trx.type === "BMD" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_bdm_2_eng";
|
|
if (trx.type === "MRI" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_mri_2_eng";
|
|
}
|
|
// rptname = 'rpt_hasil_so_eng'
|
|
this.urlprint =
|
|
"/birt/run?__report=report/one/lab/" +
|
|
rptname +
|
|
".rptdesign&__format=pdf&username=" +
|
|
user.M_StaffName +
|
|
"&PID=" +
|
|
idx +
|
|
"&PLang=" +
|
|
trx.language_id +
|
|
"&tm=" +
|
|
n;
|
|
|
|
//this.openprint = true
|
|
},
|
|
async doPrintAfterLang() {
|
|
//console.log(this.print_format)
|
|
//this.dialogprintlang = false
|
|
var trx = this.$store.state.sample.selected_test;
|
|
var idx_true = _.findIndex(this.dialoglangs, (item) => item.chex === "Y");
|
|
this.xselectedlang = this.dialoglangs[idx_true];
|
|
this.printwidth = 1028;
|
|
this.printtitle = "";
|
|
let idx = trx.orderid;
|
|
this.print_format = "format-1";
|
|
let user = one_user();
|
|
var d = new Date();
|
|
var n = d.getTime();
|
|
var rptname = "";
|
|
if (trx.type === "Rontgen") rptname = "rpt_hasil_so_xray";
|
|
if (trx.type === "USG") {
|
|
rptname = "rpt_hasil_so_usg";
|
|
idx = trx.trx_id;
|
|
}
|
|
if (trx.type === "BMD") rptname = "rpt_hasil_so_bdm";
|
|
if (trx.type === "MRI") rptname = "rpt_hasil_so_xray_mri";
|
|
|
|
if (trx.type === "Rontgen" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_2";
|
|
if (trx.type === "USG" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_usg_2";
|
|
if (trx.type === "BMD" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_bdm_2";
|
|
if (trx.type === "MRI" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_mri_2";
|
|
|
|
if (parseInt(trx.language_id) === 2) {
|
|
if (trx.type === "Rontgen") rptname = "rpt_hasil_so_xray_eng";
|
|
if (trx.type === "USG") rptname = "rpt_hasil_so_usg_eng";
|
|
if (trx.type === "BMD") rptname = "rpt_hasil_so_bdm_eng";
|
|
if (trx.type === "MRI") rptname = "rpt_hasil_so_xray_mri_eng";
|
|
|
|
if (trx.type === "Rontgen" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_2_eng";
|
|
if (trx.type === "USG" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_usg_2_eng";
|
|
if (trx.type === "BMD" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_bdm_2_eng";
|
|
if (trx.type === "MRI" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_mri_2_eng";
|
|
}
|
|
// rptname = 'rpt_hasil_so_eng'
|
|
this.urlprint =
|
|
"/birt/run?__report=report/one/lab/" +
|
|
rptname +
|
|
".rptdesign&__format=pdf&username=" +
|
|
user.M_StaffName +
|
|
"&PID=" +
|
|
idx +
|
|
"&PLang=" +
|
|
trx.language_id +
|
|
"&tm=" +
|
|
n;
|
|
|
|
//this.openprint = true
|
|
},
|
|
print(trx, act) {
|
|
console.log(trx);
|
|
let user = one_user();
|
|
var d = new Date();
|
|
var n = d.getTime();
|
|
this.print_format = "format-1";
|
|
this.dialogprintlang = true;
|
|
// var nowlang = trx.langs;
|
|
// _.forEach(nowlang, function (num) {
|
|
// num.chex = "N";
|
|
// });
|
|
// var lang_idx = _.findIndex(nowlang, function (o) {
|
|
// return o.id == trx.language_id;
|
|
// });
|
|
let idx = trx.trx_id;
|
|
// let idx = trx.orderid;
|
|
// nowlang[lang_idx].chex = "Y";
|
|
// this.$store.commit("sample/update_item_langs", nowlang);
|
|
// this.xselectedlang = trx.langs[0];
|
|
this.$store.commit("sample/update_selected_test", trx);
|
|
this.$store.commit("sample/update_act", act);
|
|
this.$store.commit("sample/update_last_trx", trx);
|
|
var seltrx = this.$store.state.sample.selected_transaction;
|
|
var deliveries = seltrx.deliveries;
|
|
console.log(deliveries);
|
|
this.btnsaveemail = false;
|
|
var e_del = _.filter(deliveries, function (o) {
|
|
return (
|
|
o.code === "EMAIL" || o.code === "WHATSAPP" || o.code === "TELEGRAM"
|
|
);
|
|
});
|
|
console.log(e_del);
|
|
if (e_del.length > 0) {
|
|
this.btnsaveemail = true;
|
|
}
|
|
this.print_format = "format-1";
|
|
|
|
if (trx.type === "Rontgen") rptname = "rpt_hasil_so_xray";
|
|
if (trx.type === "USG") {
|
|
rptname = "rpt_hasil_so_usg";
|
|
idx = trx.trx_id;
|
|
}
|
|
if (trx.type === "BMD") rptname = "rpt_hasil_so_bdm";
|
|
if (trx.type === "MRI") rptname = "rpt_hasil_so_xray_mri";
|
|
console.log(this.xselectedlang);
|
|
if (parseInt(trx.language_id) === 2) {
|
|
if (trx.type === "Rontgen") rptname = "rpt_hasil_so_xray_eng";
|
|
if (trx.type === "USG") rptname = "rpt_hasil_so_usg_eng";
|
|
if (trx.type === "BMD") rptname = "rpt_hasil_so_bdm_eng";
|
|
if (trx.type === "MRI") rptname = "rpt_hasil_so_xray_mri_eng";
|
|
|
|
if (trx.type === "Rontgen" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_2_eng";
|
|
if (trx.type === "USG" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_usg_2_eng";
|
|
if (trx.type === "BMD" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_bdm_2_eng";
|
|
if (trx.type === "MRI" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_mri_2_eng";
|
|
}
|
|
//devcpone.aplikasi.web.id/birt/run?__report=report/one/lab/rpt_hasil_so_xray.rptdesign&__format=pdf&PID=15&username=adhi&tm=1717726294764
|
|
https: this.urlprint =
|
|
"/birt/run?__report=report/one/lab/" +
|
|
rptname +
|
|
".rptdesign&__format=pdf&username=" +
|
|
user.M_StaffName +
|
|
"&PID=" +
|
|
idx +
|
|
"&tm=" +
|
|
n;
|
|
console.log(this.urlprint);
|
|
this.print_format = "format-1";
|
|
},
|
|
print2thn(trx, act) {
|
|
console.log(trx);
|
|
let user = one_user();
|
|
var d = new Date();
|
|
var n = d.getTime();
|
|
this.print_format = "format-1";
|
|
this.dialogprintlang = true;
|
|
// var nowlang = trx.langs;
|
|
// _.forEach(nowlang, function (num) {
|
|
// num.chex = "N";
|
|
// });
|
|
// var lang_idx = _.findIndex(nowlang, function (o) {
|
|
// return o.id == trx.language_id;
|
|
// });
|
|
let idx = trx.trx_id;
|
|
// let idx = trx.orderid;
|
|
// nowlang[lang_idx].chex = "Y";
|
|
// this.$store.commit("sample/update_item_langs", nowlang);
|
|
// this.xselectedlang = trx.langs[0];
|
|
this.$store.commit("sample/update_selected_test", trx);
|
|
this.$store.commit("sample/update_act", act);
|
|
this.$store.commit("sample/update_last_trx", trx);
|
|
var seltrx = this.$store.state.sample.selected_transaction;
|
|
var deliveries = seltrx.deliveries;
|
|
console.log(deliveries);
|
|
this.btnsaveemail = false;
|
|
var e_del = _.filter(deliveries, function (o) {
|
|
return (
|
|
o.code === "EMAIL" || o.code === "WHATSAPP" || o.code === "TELEGRAM"
|
|
);
|
|
});
|
|
console.log(e_del);
|
|
if (e_del.length > 0) {
|
|
this.btnsaveemail = true;
|
|
}
|
|
this.print_format = "format-1";
|
|
|
|
if (trx.type === "Rontgen") rptname = "rpt_hasil_so_radiology_2_annual";
|
|
if (trx.type === "USG") {
|
|
rptname = "rpt_hasil_so_usg";
|
|
idx = trx.trx_id;
|
|
}
|
|
if (trx.type === "BMD") rptname = "rpt_hasil_so_bdm";
|
|
if (trx.type === "MRI") rptname = "rpt_hasil_so_xray_mri";
|
|
console.log(this.xselectedlang);
|
|
if (parseInt(trx.language_id) === 2) {
|
|
if (trx.type === "Rontgen") rptname = "rpt_hasil_so_xray_eng";
|
|
if (trx.type === "USG") rptname = "rpt_hasil_so_usg_eng";
|
|
if (trx.type === "BMD") rptname = "rpt_hasil_so_bdm_eng";
|
|
if (trx.type === "MRI") rptname = "rpt_hasil_so_xray_mri_eng";
|
|
|
|
if (trx.type === "Rontgen" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_2_eng";
|
|
if (trx.type === "USG" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_usg_2_eng";
|
|
if (trx.type === "BMD" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_bdm_2_eng";
|
|
if (trx.type === "MRI" && this.print_format === "format-2")
|
|
rptname = "rpt_hasil_so_xray_mri_2_eng";
|
|
}
|
|
//devcpone.aplikasi.web.id/birt/run?__report=report/one/lab/rpt_hasil_so_xray.rptdesign&__format=pdf&PID=15&username=adhi&tm=1717726294764
|
|
https: this.urlprint =
|
|
"/birt/run?__report=report/one/lab/" +
|
|
rptname +
|
|
".rptdesign&__format=pdf&username=" +
|
|
user.M_StaffName +
|
|
"&PID=" +
|
|
idx +
|
|
"&tm=" +
|
|
n;
|
|
console.log(this.urlprint);
|
|
this.print_format = "format-1";
|
|
},
|
|
closePrint() {
|
|
this.dialogprintlang = false;
|
|
//var prm = this.$store.state.sample.last_trx
|
|
var prm = {
|
|
startdate: this.$store.state.sample.start_date,
|
|
enddate: this.$store.state.sample.end_date,
|
|
search: this.$store.state.sample.name_lab,
|
|
stationid: this.$store.state.sample.selected_station.id,
|
|
companyid: this.$store.state.sample.selected_company.id,
|
|
switch_exclude: this.$store.state.sample.switch_exclude,
|
|
groupid: this.$store.state.sample.select_item_group.id,
|
|
subgroupid: this.$store.state.sample.select_item_subgroup.id,
|
|
current_page: this.$store.state.sample.current_page,
|
|
typeresult: this.$store.state.sample.typeresult.id,
|
|
lastid: this.$store.state.sample.last_id,
|
|
trx_id: this.$store.state.sample.selected_transaction.re_id,
|
|
};
|
|
this.$store.dispatch("sample/printcount", prm);
|
|
},
|
|
closeDialogAction() {
|
|
var trx = this.$store.state.sample.last_trx;
|
|
var act = this.$store.state.sample.act;
|
|
this.saveResult(trx, act);
|
|
},
|
|
openImage(value) {
|
|
this.$store.commit("sample/update_selected_photo", value);
|
|
this.$store.commit("sample/update_image", value.newname);
|
|
this.$store.commit("sample/update_dialog_image", true);
|
|
},
|
|
pasteTemplate(rst, idx) {
|
|
this.idx_test = idx;
|
|
var seltrx = this.$store.state.sample.selected_transaction;
|
|
var datax = seltrx.details[idx];
|
|
if (datax.status === "NEW") {
|
|
var prm = {
|
|
idx: idx,
|
|
template_id: datax.template_id,
|
|
doctor_id: datax.doctor_id,
|
|
language_id: datax.language_id,
|
|
test_id: datax.test_id,
|
|
};
|
|
this.$store.dispatch("sample/gettemplate", prm);
|
|
}
|
|
},
|
|
doPasteTemplate() {
|
|
var seltrx = this.$store.state.sample.selected_transaction;
|
|
//console.log(seltrx)
|
|
var temp_val = this.$store.state.sample.selected_template.details;
|
|
var test_idx = this.idx_test;
|
|
|
|
seltrx.details[test_idx].details.forEach(function (temp, index) {
|
|
var template_detail_id =
|
|
seltrx.details[test_idx].details[index].template_detail_id;
|
|
var value_now = seltrx.details[test_idx].details[index].result_value;
|
|
var filter_temp = _.filter(temp_val, function (o) {
|
|
return o.template_detail_id === template_detail_id;
|
|
});
|
|
//console.log(filter_temp)
|
|
if (filter_temp.length > 0 && (!value_now || value_now === "")) {
|
|
seltrx.details[test_idx].details[index].result_value =
|
|
filter_temp[0].value;
|
|
}
|
|
});
|
|
|
|
this.$store.commit("sample/update_selected_transaction", seltrx);
|
|
this.dialogtemplates = false;
|
|
},
|
|
openDialogDoctor(val) {
|
|
if (val["status"] !== "NEW") return;
|
|
console.log(val);
|
|
this.selectedDoctrorTest = val;
|
|
let dctr = {
|
|
M_DoctorID: val.doctor_id,
|
|
doctorID: val.doctor_id,
|
|
M_DoctorPrefix: "",
|
|
M_DoctorPrefix2: "",
|
|
M_DoctorName: "",
|
|
M_DoctorSuffix: "",
|
|
M_DoctorSuffix2: "",
|
|
M_DoctorCode: "",
|
|
doctorName: val.doctor_fullname,
|
|
};
|
|
this.searchDoctor = val.doctor_fullname;
|
|
this.selectedDoctor = dctr;
|
|
this.dialogDoctor = true;
|
|
},
|
|
closeDialogDoctor() {
|
|
this.selectedDoctrorTest = {};
|
|
let dctr = {};
|
|
this.searchDoctor = "";
|
|
this.selectedDoctor = dctr;
|
|
this.dialogDoctor = false;
|
|
},
|
|
saveDoctor() {
|
|
// let dctr = {};
|
|
// this.searchDoctor = "";
|
|
// this.selectedDoctor = dctr;
|
|
// this.dialogDoctor = false;
|
|
var prm = {
|
|
startdate: this.$store.state.sample.start_date,
|
|
enddate: this.$store.state.sample.end_date,
|
|
search: this.$store.state.sample.name_lab,
|
|
stationid: this.$store.state.sample.selected_station.id,
|
|
companyid: this.$store.state.sample.selected_company.id,
|
|
switch_exclude: this.$store.state.sample.switch_exclude,
|
|
groupid: this.$store.state.sample.select_item_group.id,
|
|
subgroupid: this.$store.state.sample.select_item_subgroup.id,
|
|
current_page: this.$store.state.sample.current_page,
|
|
typeresult: this.$store.state.sample.typeresult.id,
|
|
lastid: this.selectedDoctrorTest.trx_id,
|
|
id: this.selectedDoctrorTest.trx_id,
|
|
doctorid: this.selectedDoctor.doctorID,
|
|
};
|
|
|
|
this.$store.dispatch("sample/savedoctor", prm);
|
|
},
|
|
getDoctorName(name) {
|
|
console.log(name);
|
|
console.log("Name");
|
|
let nm = name;
|
|
if (name === null || name === "") {
|
|
nm = "Pilih Dokter";
|
|
}
|
|
return nm;
|
|
},
|
|
thr_search_doctor: _.debounce(function () {
|
|
prm = {
|
|
search: this.searchDoctor,
|
|
};
|
|
this.$store.dispatch("sample/getdoctorlist", prm);
|
|
}, 100),
|
|
},
|
|
watch: {
|
|
searchDoctor(val, old) {
|
|
console.log(val);
|
|
if (val == old) return;
|
|
if (!val) return;
|
|
if (val.length < 1) return;
|
|
// if (this.selectedDoctor.doctorName == val) return;
|
|
if (this.$store.state.sample.update_autocomplete_status == 1) return;
|
|
this.thr_search_doctor();
|
|
},
|
|
},
|
|
};
|
|
</script>
|