|
@@ -57,7 +57,7 @@ public interface EmrPatientDao {
|
|
|
void updateCreatedTemplate(EmrPatientData param);
|
|
|
|
|
|
|
|
|
- @Select("select emr_category_code,pat_no,times from emr_patient_data where emr_document_id = #{id} ")
|
|
|
+ @Select("select emr_category_code,pat_no,times,create_id from emr_patient_data where emr_document_id = #{id} ")
|
|
|
EmrPatientData getCategoryCodeByDocumentId(String id);
|
|
|
|
|
|
@Update("update emr_patient_data " +
|
|
@@ -126,24 +126,33 @@ public interface EmrPatientDao {
|
|
|
List<String> getDocumentIdByPatietn(String patNo, int times, String categoryCode);
|
|
|
|
|
|
|
|
|
- @Select("select rtrim(name) as xm,dis_date as cysj,sex as xb," +
|
|
|
- " (select DATEDIFF(yy, birth_date, GETDATE()) from a_patient_mi b where b.inpatient_no = a.inpatient_no) as nl, " +
|
|
|
+ @Select("select rtrim(a.name) as xm, " +
|
|
|
+ " dis_date as cysj, " +
|
|
|
+ " a.sex as xb, " +
|
|
|
+ " (select DATEDIFF(yy, birth_date, GETDATE()) from a_patient_mi b where b.inpatient_no = a.inpatient_no) as nl, " +
|
|
|
" (select sum(charge_fee) " +
|
|
|
- " from zy_detail_charge c " +
|
|
|
- " where c.inpatient_no = a.inpatient_no " +
|
|
|
- " and c.admiss_times = a.admiss_times " +
|
|
|
- " and ledger_sn = #{ledgerSn}) as zfy, " +
|
|
|
- " datediff(day, admiss_date, isnull(dis_date, getdate())) as sjzyts, " +
|
|
|
- " '' as rybq, " +
|
|
|
- " '' as rytj, " +
|
|
|
- " '' as lyfs, " +
|
|
|
- " (select insutype from t_si_setlinfo where inpatient_no = pat_no and admiss_times = times) as insur_type_id, " +
|
|
|
- " '' as xsecstz, " +
|
|
|
- " '' as xserytz, " +
|
|
|
- " '' as bzyzsnl " +
|
|
|
- "from zy_actpatient a " +
|
|
|
- "where inpatient_no = #{patNo} " +
|
|
|
- " and admiss_times = #{times}")
|
|
|
+ " from zy_detail_charge " +
|
|
|
+ " where zy_detail_charge.inpatient_no = a.inpatient_no " +
|
|
|
+ " and zy_detail_charge.admiss_times = a.admiss_times " +
|
|
|
+ " and ledger_sn = #{ledgerSn}) as zfy, " +
|
|
|
+ " datediff(day, admiss_date, isnull(dis_date, getdate())) as sjzyts, " +
|
|
|
+ " condition_code as rybq, " +
|
|
|
+ " route_of_admission as rytj, " +
|
|
|
+ " '' as lyfs, " +
|
|
|
+ " (select insutype " +
|
|
|
+ " from t_si_setlinfo " +
|
|
|
+ " where a.inpatient_no = pat_no " +
|
|
|
+ " and admiss_times = times) as insur_type_id, " +
|
|
|
+ " '' as xsecstz, " +
|
|
|
+ " '' as xserytz, " +
|
|
|
+ " '' as bzyzsnl " +
|
|
|
+ "from zy_actpatient a, " +
|
|
|
+ " a_patient_mi b, " +
|
|
|
+ " mz_zy_req c " +
|
|
|
+ "where a.inpatient_no = #{patNo} " +
|
|
|
+ " and admiss_times = #{times} " +
|
|
|
+ " and a.inpatient_no = b.inpatient_no " +
|
|
|
+ " and b.mz_no = c.patient_id")
|
|
|
Map<String, String> drgPatientInfo(String patNo, int times, int ledgerSn);
|
|
|
|
|
|
|