123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301 |
- <template>
- <el-dialog
- title="详情"
- width="1000px"
- :visible.sync="visible"
- :before-close="_close"
- class="detailDialog"
- >
- <el-tabs v-model="activeName">
- <el-tab-pane label="处方详情" name="first">
- <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
- <el-tab-pane
- v-for="(item, index) in prescriptions"
- :key="index"
- :label="item.name"
- :name="item.name"
- >
- </el-tab-pane>
-
- <div class="RP">
- Rp
- </div>
- <new-prescription-table ref="prescription_tables"
- :prescription="curPrescriptions"></new-prescription-table>
- </el-tabs>
-
- </el-tab-pane>
- <el-tab-pane label="病历详情" name="second">
- <div class="detailMain">
- <span style="width:240px;">处方号:{{order.prescription_number}}</span>
- <span style="width:200px;">医生:{{order.doctor}}</span>
- <span style="width:200px;">科室:{{order.departments}}</span>
- <span style="width:200px;">创建时间: {{getTimes(order.ctime,"{y}-{m}-{d} {h}:{i}")}}</span>
- </div>
- <div class="commonCell">
- <p>基本信息</p>
- <div class="detailMain">
- <span style="width:240px;">疾病名称:{{case_history.diagnostic}}</span>
- <span style="width:200px;">症状:{{case_history.diagnostic}}</span>
- <span style="width:200px;">发病日期:{{getTimes(case_history.sick_date,"{y}-{m}-{d}")}}</span>
- <span style="width:200px;" v-if="case_history.is_infect== 1">是否传染:是</span>
- <span style="width:200px;" v-if="case_history.is_infect != 1">是否传染:否</span>
-
- </div>
- </div>
- <div class="commonCell">
- <p>体格信息</p>
- <div class="detailMain">
- <span style="width:140px;">体温:{{case_history.temperature}}℃</span>
- <span style="width:140px;">呼吸:{{case_history.breathing}} 次/分</span>
-
- <span style="width:140px;">脉搏:{{case_history.pulse}} 次/分</span>
- <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
- </div>
- </div>
- <div class="commonCell">
- <p></p>
- <div class="detailMain">
- <span style="width:140px;">血糖:{{case_history.blood_sugar}} mmol/L</span>
- <span style="width:140px;">血脂:{{case_history.blood_fat}} mmol/L</span>
- <span style="width:140px;">身高:{{case_history.height}} cm</span>
- <span style="width:200px;">体重: kg</span>
- </div>
- </div>
- <div class="commonCell">
- <p>主诉</p>
- <div>{{case_history.chief_conplaint}}</div>
- </div>
- <div class="commonCell">
- <p>现病史</p>
- <div>{{case_history.history_of_present_illness}}</div>
- </div>
- <div class="commonCell">
- <p>门诊诊断</p>
- <div>{{case_history.diagnostic}}</div>
- </div>
- <div class="commonCell">
- <p>门诊医嘱</p>
- <div>{{case_history.doctor_advice}}</div>
- </div>
- <div class="commonCell">
- <p>过敏史</p>
- <div>{{order.sick_history}}</div>
- </div>
- <div class="commonCell">
- <p>既往史</p>
- <div>{{case_history.past_history}}</div>
- </div>
- <div class="commonCell">
- <p>个人史</p>
- <div>{{case_history.personal_history}}</div>
- </div>
- <div class="commonCell">
- <p>家族史</p>
- <div>{{case_history.family_history}}</div>
- </div>
- </el-tab-pane>
- </el-tabs>
- <div slot="footer" class="dialog-footer">
- <el-button @click="hide">取 消</el-button>
- <!--<el-button type="primary" :loading="submitLoading" @click="hide">确定</el-button>-->
- </div>
- </el-dialog>
- </template>
-
-
-
- <script>
- import { getDictionaryDataConfig} from "@/utils/data";
- import { getHisPrescriptionInfo } from '@/api/his/his'
- import NewPrescriptionTable from './newPrescriptionTable'
- import { uParseTime } from '@/utils/tools'
-
- export default {
- components: { NewPrescriptionTable },
- data() {
- return {
- visible: false,
- activeName: 'first',
- curPrescriptions: {},
- prescriptions: [],
- record_date: '',
- editableTabsValue: '1',
- loadingone: false,
- editableTabs: [{
- title: '处方1',
- name: '1'
- }],
- tabIndex: 1,
- hisPatientInfo: {},
- loadingtwo: false,
- patientTableData: [{
- name: '杨美英',
- mdtrt_id: '1709946'
- }],
- patientInfo: { id: 0 },
- doctor: {},
- total: 0,
- state: '未收费',
- radio: 1,
- radioStatus: 1,
- search_input: '',
- case_history:{},
- order:{},
- }
- },
- methods: {
- getTimes(time,temp) {
- return uParseTime(time, temp);
- },
- tabclickEvent(val) {
- for (let i = 0; i < this.prescriptions.length; i++) {
- if (this.prescriptions[i].name == val.name) {
- this.curPrescriptions = {}
- var temp = this.deepClone(this.prescriptions[i])
- this.curPrescriptions = temp
- }
- }
- },
- deepClone(source) {
- if (!source && typeof source !== 'object') {
- throw new Error('error arguments', 'shallowClone')
- }
- const targetObj = source.constructor === Array ? [] : {}
- Object.keys(source).forEach((keys) => {
- if (source[keys] && typeof source[keys] === 'object') {
- targetObj[keys] = this.deepClone(source[keys])
- } else {
- targetObj[keys] = source[keys]
- }
- })
- return targetObj
- },
-
- moreState(tab, event) {
- if (tab == 'more') {
- return false
- }
- },
-
- _close: function(done) {
- // this.clear()
- done()
- },
- clear: function() {
- this.form.id = 0
- this.form.name = ''
- this.form.intro = ''
- },
- show(id) {
- let params={
- id:id,
- }
- getHisPrescriptionInfo(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.patientInfo = response.data.data.order.patient
- this.hisPatientInfo = response.data.data.order.his_patient
- this.case_history = response.data.data.order.case_history
- this.order = response.data.data.order
-
-
- this.prescriptions = []
- for (let i = 0; i < response.data.data.prescription.length; i++) {
- var prescription = response.data.data.prescription[i]
- let tempAdvice = []
- let tempProject = []
- for (let b = 0; b < prescription.advices.length; b++) {
- let obj = {
- advice_id: prescription.advices[b].id,
- drug_name: prescription.advices[b].advice_name,
- single_dose: prescription.advices[b].single_dose,
- delivery_way: prescription.advices[b].delivery_way,
- execution_frequency: prescription.advices[b].execution_frequency,
- retail_price: prescription.advices[b].price.toString(),
- remark: prescription.advices[b].remark,
- prescribing_number: prescription.advices[b].prescribing_number.toString(),
- single_dose_unit: prescription.advices[b].single_dose_unit,
- prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
- medical_insurance_number: prescription.advices[b].med_list_codg
-
- }
- tempAdvice.push(obj)
- }
-
- for (let b = 0; b < prescription.project.length; b++) {
- let obj = {
- id: prescription.project[b].id,
- project_id: prescription.project[b].project.id,
- project_name: prescription.project[b].project.project_name,
- statistical_classification: prescription.project[b].project.statistical_classification,
- single_dose: prescription.project[b].single_dose,
- delivery_way: prescription.project[b].delivery_way,
- execution_frequency: prescription.project[b].execution_frequency,
- number_days: prescription.project[b].day,
- total: prescription.project[b].count.toString(),
- price: prescription.project[b].price,
- remark: prescription.project[b].remark,
- medical_code: prescription.project[b].project.medical_code
- }
- tempProject.push(obj)
- }
- let index = i + 1
- let obj = {
- id: prescription.id,
- name: '处方' + index,
- advices: tempAdvice,
- project: tempProject,
- type: response.data.data.prescription[i].type
- }
- this.prescriptions.push(obj)
- console.log(this.prescriptions)
-
- this.curPrescriptions = this.prescriptions[0]
- }
- }
- })
- // this.clear()
- this.visible = true
-
-
-
- },
- hide() {
- // this.clear()
- this.visible = false
- }
- }
- }
- </script>
-
- <style lang="scss">
- .detailDialog {
-
- .el-dialog__body {
- padding: 0 20px 30px;
- }
-
- .detailMain {
- span {
- display: inline-block;
- }
-
- }
- .commonCell {
- display: flex;
- line-height: 40px;
-
- > p {
- font-weight: bold;
- color: #000;
- width: 80px;
- }
-
- }
- }
- </style>
-
|