123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449 |
- <template>
- <div>
- <el-dialog
- title="详情"
- width="1000px"
- :visible.sync="visible"
- :before-close="_close"
- class="detailDialog"
- >
- <div style="position: absolute;right:20px;z-index:99">
- <el-button v-if="activeName == 'first'" @click="open(1)" type="primary">打印</el-button>
- <el-button v-if="activeName == 'second'" @click="open(2)" type="primary">打印</el-button>
-
- <el-button @click="open(3)" type="primary">打印清单</el-button>
- <el-button @click="open(4)" type="primary">打印汇总</el-button>
-
- </div>
- <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="commonCell">
- <p style="color:#409EFF;">基本信息</p>
- <div class="detailMain">
- <span style="width:270px;">处方号:{{order.prescription_number}}</span>
- <span style="width:180px;">姓名:{{order.patient.name}}</span>
- <span style="width:240px;">证件号:{{order.patient.id_card_no}}</span>
- <span style="width:180px;">联系电话:{{order.patient.phone}}</span>
- <span style="width:270px;">医生:{{order.doctor}}</span>
- <span style="width:180px;">科室:{{getDepartMent(order.departments)}}</span>
- <span style="width:240px;">创建时间: {{getTimes(order.ctime,"{y}-{m}-{d} {h}:{i}")}}</span>
- <!-- <span style="width:180px;">疾病名称:{{case_history.diagnostic}}</span>
- <span style="width:180px;">症状:{{case_history.diagnostic}}</span> -->
-
-
- </div>
- </div>
- <div class="commonCell">
- <p style="color:#409EFF;">体格信息</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 style="color:#409EFF;">病历信息</p>
- <div class="detailMain">
- <span style="width:260px;" v-if="case_history.is_infect== 1">是否传染:是</span>
- <span style="width:260px;" v-if="case_history.is_infect != 1">是否传染:否</span>
- <span style="width:180px;">发病日期:{{getTimes(case_history.sick_date,"{y}-{m}-{d}")}}</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>{{case_history.past_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
- class="centerDialog detailDialog"
- width="600px"
- title="打印"
- :visible.sync="innerVisible"
- append-to-body>
-
- <print v-if="activeName == 'first'" :paramsObj='paramsObj' :showBtn='true'></print>
- <recordPrint v-if="activeName == 'second'" :patientid="patientid" :showBtn='true'></recordPrint>
- </el-dialog>
-
- <div >
- <el-dialog
- class="centerDialog"
- width="900px"
- title="打印"
- :visible.sync="listVisible" append-to-body>
- <hospital-list-print :paramsObj='paramsObjTwo'></hospital-list-print>
- </el-dialog>
- </div>
- <div >
- <el-dialog
- class="centerDialog"
- width="900px"
- title="打印"
- :visible.sync="allListVisible" append-to-body>
- <hospital-all-list-print :paramsObj='paramsObjTwo'></hospital-all-list-print>
- </el-dialog>
- </div>
- </el-dialog>
- </div>
- </template>
-
-
-
- <script>
- import { getHisPrescriptionInfo } from '@/api/his/his'
- import NewPrescriptionTable from './newPrescriptionTable'
- import { uParseTime } from '@/utils/tools'
- import { getAllDoctorList } from "@/api/project/project"
- import moment from 'moment';
- import print from '../print'
- import recordPrint from '../recordPrint'
- import HospitalListPrint from '../pastQuiriesPrint/hospitalListPrint.vue'
- import HospitalAllListPrint from '../pastQuiriesPrint/hospitalAllListPrint.vue'
-
- export default {
- components: { HospitalAllListPrint, HospitalListPrint, NewPrescriptionTable,print,recordPrint },
- data() {
- return {
- listVisible:false,
- allListVisible:false,
- visible: false,
- activeName: 'first',
- curPrescriptions: {},
- paramsObjTwo:{},
- 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:{},
- doctorList:[],
- departmentList:[],
- innerVisible:false,
- paramsObj:{},
- patientid:''
- }
- },
- methods: {
- open(index){
- if(index == 1){
- var arr= [];
- for(let i=0;i<this.prescriptions.length;i++){
- arr.push(this.prescriptions[i].id)
- }
- var prescription_id = arr[0];
- var record_date = this.format(this.order.record_date);
- var ids = arr.toString();
-
- let obj = {
- record:record_date,
- prescription_id:prescription_id,
- ids:ids,
- patient_id:this.patientInfo.id
- };
- this.paramsObj = obj;
- this.innerVisible = true
- // this.$router.push("/outpatientDoctorStation/print?record="+record_date+"&prescription_id="+prescription_id+"&ids="+ids+"&patient_id="+this.patientInfo.id)
-
- } else if(index == 2){
- var record_date = this.format(this.case_history.sick_date);
- this.patientid = this.patientInfo.id;
- this.innerVisible = true
- // this.$router.push("/outpatientDoctorStation/recordPrint?record="+record_date+"&patient_id="+this.case_history.patient_id)
- }else if(index == 3){
- // var record_date = this.format(this.order.record_date);
- this.patientid = this.patientInfo.id;
- this.paramsObjTwo = {
- record_date:this.order.record_date,
- patient_id:this.patientid
- }
- this.listVisible = true
- }else if(index == 4){
- this.patientid = this.patientInfo.id;
- this.paramsObjTwo = {
- record_date:this.order.record_date,
- patient_id:this.patientid
- }
- this.allListVisible = true
- }
- },
- 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;
- console.log("患者信息",this.patientInfo);
- this.hisPatientInfo = response.data.data.order.his_patient;
- this.case_history = response.data.data.order.case_history;
- console.log("历史详情",this.case_history);
- this.order = response.data.data.order;
- console.log('this.order',this.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,
- day: prescription.advices[b].day,
- 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,
- unit:prescription.project[b].project.unit,
- };
- if(prescription.project[b].type == 2){
- obj['statistical_classification'] = prescription.project[b].team.project_team
- obj['medical_code'] = prescription.project[b].project.medical_code
- obj['project_name'] = prescription.project[b].project.project_name
- obj['type'] = 2
-
-
-
- }else if(prescription.project[b].type == 3){
- obj['statistical_classification'] = prescription.project[b].team.project_team
- obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
- obj['project_name'] = prescription.project[b].good_info.good_name
- obj['type'] = 3
-
- }
- tempProject.push(obj)
- }
-
- console.log(tempProject)
- 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);
-
- this.curPrescriptions = this.prescriptions[0]
-
-
-
- }
- }
- });
- // this.clear()
- this.visible = true
-
-
-
- },
- hide() {
- // this.clear()
- this.visible = false
- },
- getAllDoctorList(){
- getAllDoctorList().then(response=>{
- if(response.data.state == 1){
- var doctor = response.data.data.doctor;
- this.doctorList = doctor;
- var department = response.data.data.department;
- console.log("department",department);
- this.departmentList = department
- }
- })
- },
- getDepartMent(id){
- var name = "";
- for(let i=0;i<this.departmentList.length;i++){
- if(id == this.departmentList[i].id){
- name = this.departmentList[i].name
- }
- }
- return name
- },
-
- format(time){
- moment.locale();
- var times = time*1000;
- times = moment(times).format('YYYY-MM-DD');
- return times
- }
- },
- created(){
- this.getAllDoctorList()
- }
- }
- </script>
-
- <style lang="scss">
- .detailDialog {
-
- .el-dialog__body {
- padding: 0 20px 30px;
- position: relative;
- }
-
- .detailMain {
- flex: 1;
- span {
- display: inline-block;
- }
-
- }
- .commonCell {
- display: flex;
- line-height: 40px;
-
- > p {
- font-weight: bold;
- color: #000;
- width: 80px;
- }
-
- }
- }
- </style>
-
|