📄 tmp.sql
字号:
select a.bed_no,a.inpatient_no baza01,a.name 病人姓名,c.name 性别,a.birth_date 出生日期,h.marry_code 婚状,h.occupation_code 职业,h.birth_place 出生地,h.nation_code 民族,
h.country 国籍,h.employer_tel 单位电话,h.employer_name 单位名称,h.employer_zipcode 单位邮编,h.birth_place 省市县地址,h.home_street 街村地址,
h.home_zipcode 邮编,h.relation_name 关系人姓名,h.relation_code 关系,h.relation_district 关系地址县,h.relation_street 关系村,
h.relation_tel 关系电话,a.admiss_status 入院情况,b.name 入院科别,b.abbname 出院科别,a.admiss_date 入院日期,f.dis_type 出院方式,
a.dis_date 出院日期,datediff(dd,a.admiss_date,a.dis_date) 住院天数,a.diagnosis_date 确诊日期,datediff(dd,a.diagnosis_date,a.admiss_date ) 几日确诊,
a.dept_director 科主任,g.name 主任医师,a.consult_physician 主治医师,a.refer_physician 住院医师,f.mz_diag_doctor 门诊医师,
f.learn_doctor 进修医师,f.practice_doctor 实习医师,f.encoder 病案整理者,a.clinic_diag 门诊诊断,d.dis_diag_type 出院主诊断,d.dis_diag_status 转归,
f.diag_conform3 门出符合,f.diag_conform4 入出符合,f.diag_conform6 临床病理符合,f.diag_conform7 放射病理符合,a.blood_type 血型,
f.salvage_times 抢救次数,f.salvage_success 成功次数,f.cure_type 治疗类别,d.dis_diag_pathology 病理标志,f.salvage_method 抢救方法,
a.clinic_diag 入院主诊断ICD10,a.admiss_diag 出院主诊断ICD10,a.charge_type 医疗付款方式,e.charge_fee '001',
a.admiss_diag_str
from view_zy_allpatient a,zd_unit_code b,zd_sex_code c,ba_first_page1 d,ba_first_page6 e,ba_first_page4 f,a_employee_mi g,a_patient_mi h
where a.dis_date>='2005-01-01'
and a.sex=c.code
and a.dept=b.code
and g.code=f.chief_doctor
and g.code=f.chief_doctor
and a.inpatient_no=d.inpatient_no
and a.inpatient_no=e.inpatient_no
and a.inpatient_no=f.inpatient_no
and a.inpatient_no=h.inpatient_no
and e.charge_item ='001'
and d.dis_diag_no='1'
order by a.inpatient_no
--select * from a_patient_mi
--select * from zd_unit_code
--select * from ba_field_control **
--select * from view_zy_allpatient where patient_id='000000002700'
--select * from view_zy_allpatient where inpatient_no='138203'
--select * from view_zy_allpatient where name='郭波'
--select * from zy_actpatient
--select * from ba_first_page6
--select * from zd_sex_code
--select * from a_employee_mi
--select * from gh_detail_charge
--select * from zy_deposit_file where depo_amount='1000' 病人交款记录
--select * from zy_patient_total_charge 病人费用表
--select * from zy_actpatient
--select * from zy_receipt_charge
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -