123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- <template>
- <div id='prescription-print'>
- <div class="prescription-print">
- <div class="printTitle">{{orgname}} 门诊病历</div>
- <div class="infoTitle">
- <div>姓名:{{patient.name?patient.name:''}}</div>
- <div>性别:
- <span v-if="patient.gender == 1">男</span>
- <span v-if="patient.gender == 2">女</span>
- </div>
- <div>年龄:{{patient.age?patient.age:''}}岁</div>
- </div>
- <div class="infoTitle">
- <div>婚姻状况:
- <span v-if="patient.marital_status == 1">未婚</span>
- <span v-if="patient.marital_status == 2">已婚</span>
- <span v-if="patient.marital_status == 3">离异</span>
- </div>
- <div>职业:{{getProfession(patient.profession)?getProfession(patient.profession):''}}</div>
- </div>
- <div class="otherInfo">
- <div>医保号:</div>
- <div style="flex:1;">{{patient.health_care_no?patient.health_care_no:''}}</div>
- </div>
- <div class="otherInfo">
- <div>联系电话:</div>
- <div style="flex:1;">{{patient.phone?patient.phone:''}}</div>
- </div>
- <div class="otherInfo">
- <div>通讯地址:</div>
- <div style="flex:1;">{{patient.home_address?patient.home_address:''}}</div>
- </div>
- <div class="otherInfo">
- <div>药物过敏史:</div>
- <div style="flex:1;">{{patient.past_history?patient.past_history:''}}</div>
- </div>
- <div class="otherInfo">
- <div>病历编号:</div>
- <div style="flex:1;">{{patient.id?patient.id:''}}</div>
- </div>
- <div style="page-break-after:always;margin-top:50px;"></div>
- </div>
-
- <div class="prescription-print">
- <div class="printTitle">病历内容</div>
- <div class="recordTitle">
- <div>科别:{{getDeparment(hispatient.departments)?getDeparment(hispatient.departments):''}}</div>
- <div>姓名:{{patient.name?patient.name:''}}</div>
- <div>性别:
- <span v-if="patient.gender == 1">男</span>
- <span v-if="patient.gender == 2">女</span>
- </div>
- <div>年龄:{{patient.age?patient.age:''}}岁</div>
- </div>
- <div class="otherInfo">
- <div class="otherName">主诉:</div>
- <div style="flex:1;">{{history.chief_conplaint?history.chief_conplaint:''}}</div>
- </div>
- <div class="otherInfo">
- <div class="otherName">现病史:</div>
- <div style="flex:1;">{{history.history_of_present_illness?history.history_of_present_illness:''}}</div>
- </div>
- <div class="otherInfo">
- <div class="otherName">既往史:</div>
- <div style="flex:1;">{{history.past_history?history.past_history:''}}</div>
- </div>
- <div class="otherInfo">
- <div class="otherName">药物过敏史:</div>
- <div style="flex:1;">{{history.allergic_history?history.allergic_history:''}}</div>
- </div>
- <div class="otherInfo">
- <div class="otherName">个人史:</div>
- <div style="flex:1;">{{history.personal_history?history.personal_history:''}}</div>
- </div>
- <div class="otherInfo">
- <div class="otherName">家族史:</div>
- <div style="flex:1;">{{history.family_history?history.family_history:''}}</div>
- </div>
- <div class="otherInfo">
- <div class="otherName">体格检查:</div>
- <div style="flex:1;">无</div>
- </div>
- <div class="otherInfo">
- <div class="otherName">门诊诊断:</div>
- <div style="flex:1;">{{history.diagnostic?history.diagnostic:''}}</div>
- </div>
- <div class="otherInfo">
- <div class="otherName">门诊医嘱:</div>
- <div style="flex:1;">{{history.doctor_advice?history.doctor_advice:''}}</div>
- </div>
- <div style="display:flex;justify-content: space-between;">
- <div style="margin-top:20px;">
- 打印日期:{{ printDate }}
- </div>
- <div style="margin-top:20px;text-align:right;">
- 医生签名:{{getDoctor(history.doctor)?getDoctor(history.doctor):''}}
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
-
- import { getDataConfig } from "@/utils/data";
- import { getAllDoctorList,getPatientCaseHistory } from "@/api/project/project"
- export default {
- props:{
- patient:Object,
- hispatient:Object,
- patientid:Number
- // history:Object,
- },
- data(){
- return{
- educationOptions:[],
- departmentList:[],
- orgname:'',
- history:{},
- printDate:''
- }
- },
- methods:{
- getProfession(id){
- var name = "";
- for(let i=0;i<this.educationOptions.length;i++){
- if(id == this.educationOptions[i].id){
- name = this.educationOptions[i].name
- }
- }
- return name
- },
- 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
- }
- })
- },
- getDoctor(id){
- var name = "";
- for(let i=0;i<this.doctorList.length;i++){
- if(id == this.doctorList[i].admin_user_id){
- name = this.doctorList[i].user_name
- }
- }
- return name
- },
- getPatientCaseHistory(){
-
- const params = {
- patient_id:this.patientid
- };
- console.log("病历22222",params);
- getPatientCaseHistory(params).then(response=>{
- if(response.data.state == 1){
- var patient = response.data.data.patient;
- // console.log("patinet",patient)
- this.patient = patient;
- var history = response.data.data.history;
- console.log("中国history222222",history);
- this.history = history;
- var hispatient = response.data.data.hispatient;
- // console.log("hispatient",hispatient)
- this.hispatient = hispatient
- }
- })
- },
- getDeparment(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
- }
- },
- created(){
- this.educationOptions = getDataConfig("patient", "education_types");
- this.getAllDoctorList();
- this.getPatientCaseHistory();
-
- var xtuser = this.$store.getters.xt_user;
- this.orgname = xtuser.org.org_name;
- var data = new Date();
- var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
- var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
- this.printDate = data.getFullYear() + "-" + month + "-" + date;
- }
- }
- </script>
-
-
- <style lang="scss" scoped>
- .prescription-print{
- -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
- -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
- margin-bottom: 20px;
- padding:20px 10px;
- }
- .printTitle{
- font-size: 22px;
- text-align: center;
- font-weight: bold;
- }
- .infoTitle{
- display: flex;
- margin-top:10px;
- line-height: 24px;
- padding:0 10px;
- }
- .infoTitle div{
- width: 200px;
- }
- .otherInfo{
- display: flex;
- margin-top:10px;
- line-height: 24px;
- padding:0 10px;
- }
- .recordTitle{
- display: flex;
- margin-top:10px;
- line-height: 24px;
- padding:0 10px;
- border-bottom: 2px solid #000;
- }
- .recordTitle div{
- width: 200px;
- }
-
- </style>
|