select t.id_card as id_card --病人身份证号
,t.patient_name as patient_name --病人姓名
,t.patient_id as patient_id --病历号
,t.sex_name as sex_name --性别名称
,t.date_of_birth as date_of_birth --出生日期
,'' as native_place --籍贯(TODO)
,t.nation_name as nation_name --民族
,t.occupation_name as occupation_name --职业
,t.education_name as education_name --文化程度
,null as residence_time --居住时间(TODO)
,t.address_combination_text as address_combination_text --居住地址
,t.next_of_kin_phone as next_of_kin_phone --联系电话
,t.zip_code as zip_code --邮编
,'' as address_new --居住地(TODO)
,t.next_of_kin_addr as next_of_kin_addr --通讯地址
,null as osteoporosis_true --确认骨质疏松
,null as osteoporosis_check --关注
,t.dept_admission_to_code as dept_name --所在科室
,case
when t.DISCHARGE_DATE_TIME is null then
0
else
1
end as is_in --在院标志
,t.discharge_date_time as discharge_date_time --出院时间
,null as menstruation
,null as last_menstrual_per
,null as menopausal_age
,null as stretch_marks_numb
,null as family_history
,null as allergic_history
,null as persion_history
from patient.patient_master_index t
left join (clinic.)
where t.id_card='622333199511254665';
网友评论