|
@@ -32,7 +32,8 @@ public interface APatientMiMapper {
|
|
|
",rtrim(insur2_code) insur2_code,lastvisit_date,lastadmiss_times,lastbill_acc,baddebit_acc,baddebit_date,rtrim(birth_place) birth_place,rtrim(country) country," +
|
|
|
"rtrim(temp_district) temp_district,rtrim(fv_dept) fv_dept,fv_date,rtrim(hic_no) hic_no,rtrim(py_code) py_code,rtrim(cpy) cpy,rtrim(yb_card_no) yb_card_no," +
|
|
|
"rtrim(mz_no) mz_no,rtrim(dnh) dnh,rtrim(account_street) account_street,rtrim(account_district) account_district,rtrim(account_zipcode) account_zipcode,rtrim(origin_type) origin_type" +
|
|
|
- ",rtrim(card_iden) card_iden,rtrim(card_no) card_no,rtrim(indi_id) indi_id,rtrim(hic_no_new) hic_no_new,rtrim(health_card_no) health_card_no,rtrim(psn_cert_type) psn_cert_type from a_patient_mi where inpatient_no = #{inpatientNo}")
|
|
|
+ ",rtrim(card_iden) card_iden,rtrim(card_no) card_no,rtrim(indi_id) indi_id,rtrim(hic_no_new) hic_no_new,rtrim(health_card_no) health_card_no" +
|
|
|
+ ",rtrim(psn_cert_type) psn_cert_type,rtrim(province_code) province_code,rtrim(city_code) city_code,rtrim(district_code) district_code from a_patient_mi where inpatient_no = #{inpatientNo}")
|
|
|
APatientMi selectPatientMiByInPatientNo(@Param("inpatientNo") String inpatientNo);
|
|
|
|
|
|
|
|
@@ -51,7 +52,8 @@ public interface APatientMiMapper {
|
|
|
",rtrim(insur2_code) insur2_code,lastvisit_date,lastadmiss_times,lastbill_acc,baddebit_acc,baddebit_date,rtrim(birth_place) birth_place,rtrim(country) country," +
|
|
|
"rtrim(temp_district) temp_district,rtrim(fv_dept) fv_dept,fv_date,rtrim(hic_no) hic_no,rtrim(py_code) py_code,rtrim(cpy) cpy,rtrim(yb_card_no) yb_card_no," +
|
|
|
"rtrim(mz_no) mz_no,rtrim(dnh) dnh,rtrim(account_street) account_street,rtrim(account_district) account_district,rtrim(account_zipcode) account_zipcode,rtrim(origin_type) origin_type" +
|
|
|
- ",rtrim(card_iden) card_iden,rtrim(card_no) card_no,rtrim(indi_id) indi_id,rtrim(hic_no_new) hic_no_new,rtrim(health_card_no) health_card_no,rtrim(psn_cert_type) psn_cert_type from a_patient_mi where mz_no = #{mzNo}")
|
|
|
+ ",rtrim(card_iden) card_iden,rtrim(card_no) card_no,rtrim(indi_id) indi_id,rtrim(hic_no_new) hic_no_new,rtrim(health_card_no) health_card_no" +
|
|
|
+ ",rtrim(psn_cert_type) psn_cert_type,rtrim(province_code) province_code,rtrim(city_code) city_code,rtrim(district_code) district_code from a_patient_mi where mz_no = #{mzNo}")
|
|
|
APatientMi selectAPatientByMzNo(@Param("mzNo") String mzNo);
|
|
|
|
|
|
|
|
@@ -68,7 +70,7 @@ public interface APatientMiMapper {
|
|
|
"employer_zipcode, relation_name, relation_code, relation_street, relation_district, relation_tel, relation_zipcode, contract_code, insur1_code, " +
|
|
|
"insur2_code, lastvisit_date, lastadmiss_times, lastbill_acc, baddebit_acc, baddebit_date, birth_place, country, temp_district, fv_dept, fv_date, " +
|
|
|
"hic_no, py_code, cpy, yb_card_no, mz_no, dnh, account_street, account_district, account_zipcode, origin_type, card_iden, card_no, indi_id, hic_no_new," +
|
|
|
- " health_card_no,psn_cert_type) " +
|
|
|
+ " health_card_no,psn_cert_type,province_code,city_code,district_code) " +
|
|
|
"VALUES(#{inpatientNo,jdbcType=CHAR},#{outpatientNo,jdbcType=CHAR},#{name,jdbcType=CHAR},#{birthDate,jdbcType=TIMESTAMP},#{sex,jdbcType=CHAR},#{marryCode,jdbcType=CHAR}," +
|
|
|
"#{nationCode,jdbcType=CHAR},#{occupationCode,jdbcType=CHAR},#{vipCode,jdbcType=CHAR},#{socialNo,jdbcType=VARCHAR},#{homeTel,jdbcType=CHAR}," +
|
|
|
"#{homeStreet,jdbcType=CHAR},#{homeDistrict,jdbcType=CHAR},#{homeZipcode,jdbcType=CHAR},#{tempStreet,jdbcType=CHAR},#{tempTel,jdbcType=CHAR}," +
|
|
@@ -79,7 +81,8 @@ public interface APatientMiMapper {
|
|
|
"#{baddebitDate,jdbcType=TIMESTAMP},#{birthPlace,jdbcType=CHAR},#{country,jdbcType=CHAR},#{tempDistrict,jdbcType=CHAR},#{fvDept,jdbcType=CHAR}," +
|
|
|
"#{fvDate,jdbcType=TIMESTAMP},#{hicNo,jdbcType=CHAR},#{pyCode,jdbcType=CHAR},#{cpy,jdbcType=CHAR},#{ybCardNo,jdbcType=VARCHAR},#{mzNo,jdbcType=CHAR}," +
|
|
|
"#{dnh,jdbcType=VARCHAR},#{accountStreet,jdbcType=VARCHAR},#{accountDistrict,jdbcType=VARCHAR},#{accountZipcode,jdbcType=CHAR},#{originType,jdbcType=CHAR}," +
|
|
|
- "#{cardIden,jdbcType=CHAR},#{cardNo,jdbcType=VARCHAR},#{indiId,jdbcType=VARCHAR},#{hicNoNew,jdbcType=CHAR},#{healthCardNo,jdbcType=VARCHAR},#{psnCertType,jdbcType=VARCHAR}) ")
|
|
|
+ "#{cardIden,jdbcType=CHAR},#{cardNo,jdbcType=VARCHAR},#{indiId,jdbcType=VARCHAR},#{hicNoNew,jdbcType=CHAR},#{healthCardNo,jdbcType=VARCHAR}," +
|
|
|
+ "#{psnCertType,jdbcType=VARCHAR},#{provinceCode},#{cityCode},#{districtCode}) ")
|
|
|
int insertMzPatientMi(APatientMi aPatientMi);
|
|
|
|
|
|
|
|
@@ -154,6 +157,15 @@ public interface APatientMiMapper {
|
|
|
"<when test='psnCertType!=null'>",
|
|
|
",psn_cert_type =#{psnCertType,jdbcType=VARCHAR}",
|
|
|
"</when>",
|
|
|
+ "<when test='provinceCode!=null'>",
|
|
|
+ ",province_code =#{provinceCode}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='cityCode!=null'>",
|
|
|
+ ",city_code =#{cityCode}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='districtCode!=null'>",
|
|
|
+ ",district_code =#{districtCode}",
|
|
|
+ "</when>",
|
|
|
"</trim>"
|
|
|
,"</script>"})
|
|
|
int updateMzPatientMiByMzno(APatientMi aPatientMi);
|
|
@@ -234,6 +246,15 @@ public interface APatientMiMapper {
|
|
|
"<when test='psnCertType!=null'>",
|
|
|
",psn_cert_type =#{psnCertType,jdbcType=VARCHAR}",
|
|
|
"</when>",
|
|
|
+ "<when test='provinceCode!=null'>",
|
|
|
+ ",province_code =#{provinceCode}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='cityCode!=null'>",
|
|
|
+ ",city_code =#{cityCode}",
|
|
|
+ "</when>",
|
|
|
+ "<when test='districtCode!=null'>",
|
|
|
+ ",district_code =#{districtCode}",
|
|
|
+ "</when>",
|
|
|
"</trim>"
|
|
|
,"</script>"})
|
|
|
int updateMzPatientMiByInpatientNo(APatientMi aPatientMi);
|
|
@@ -263,11 +284,13 @@ public interface APatientMiMapper {
|
|
|
@Insert("INSERT INTO a_patient_mi ( inpatient_no , outpatient_no , name , birth_date , sex , marry_code , nation_code , occupation_code , vip_code , social_no ," +
|
|
|
" home_tel , home_street , home_district , home_zipcode , temp_street , temp_tel , temp_zipcode , employer_name , employer_street , employer_district , " +
|
|
|
"employer_tel , employer_zipcode , relation_name , relation_code , relation_street , relation_district , relation_tel , relation_zipcode , contract_code , " +
|
|
|
- "insur1_code , insur2_code , lastvisit_date , lastadmiss_times , lastbill_acc , baddebit_acc , baddebit_date , birth_place , country , temp_district , mz_no,psn_cert_type )" +
|
|
|
+ "insur1_code , insur2_code , lastvisit_date , lastadmiss_times , lastbill_acc , baddebit_acc , baddebit_date , birth_place , country , temp_district , mz_no," +
|
|
|
+ "psn_cert_type,province_code,city_code,district_code )" +
|
|
|
" SELECT #{inpatientNo,jdbcType=CHAR} , #{inpatientNo,jdbcType=CHAR} , #{name} , birth_date , sex , marry_code , nation_code , occupation_code , vip_code , social_no , home_tel , home_street , " +
|
|
|
"home_district , home_zipcode , temp_street , temp_tel , temp_zipcode , employer_name , employer_street , employer_district , employer_tel , employer_zipcode , " +
|
|
|
"relation_name , relation_code , relation_street , relation_district , relation_tel , relation_zipcode , contract_code , insur1_code , insur2_code , " +
|
|
|
- "lastvisit_date , #{lastadmissTimes} , lastbill_acc , baddebit_acc , baddebit_date , birth_place , country , temp_district , isnull ( #{mzNo} , mz_no ),psn_cert_type FROM a_patient_mi b " +
|
|
|
+ "lastvisit_date , #{lastadmissTimes} , lastbill_acc , baddebit_acc , baddebit_date , birth_place , country , temp_district , isnull ( #{mzNo} , mz_no )," +
|
|
|
+ "psn_cert_type,province_code,city_code,district_code FROM a_patient_mi b " +
|
|
|
"WHERE b.inpatient_no =#{oldInpatientNo,jdbcType=CHAR} ")
|
|
|
int insertFromOtherItem(APatientMi aPatientMi);
|
|
|
}
|