Forráskód Böngészése

환자 정보 등록 쿼리 추가

huiwon.seo 4 éve
szülő
commit
d3548391c9

+ 3 - 0
src/main/java/com/lemon/lifecenter/mapper/PatientMapper.java

@@ -12,4 +12,7 @@ import com.lemon.lifecenter.dto.PatientDTO;
 public interface PatientMapper {
     public int selectPatientCount(PatientDTO dto);
     public List<PatientDTO> selectPatientList(PatientDTO dto);
+    public void insertPatientCare( PatientDTO dto );
+    public void insertPatientDisease( PatientDTO dto );
+    public void insertPatientSymptom( PatientDTO dto );
 }

+ 10 - 0
src/main/java/com/lemon/lifecenter/service/PatientService.java

@@ -21,4 +21,14 @@ public class PatientService {
     public List<PatientDTO> selectPatietList(PatientDTO dto) {
         return mapper.selectPatientList(dto);
     }
+    
+    public void insertPatientCare( PatientDTO dto ) {
+        mapper.insertPatientCare(dto);
+    }
+    public void insertPatientDisease( PatientDTO dto ) {
+        mapper.insertPatientDisease(dto);
+    }
+    public void insertPatientSymptom( PatientDTO dto ) {
+        mapper.insertPatientSymptom(dto);
+    }
 }

+ 44 - 0
src/main/resources/mybatis/mapper/patient/patient.xml

@@ -68,4 +68,48 @@
              LIMIT ${limit}, ${limitMax}
         ]]>
     </select>
+    
+    
+    <insert id="insertPatientCare" parameterType="PatientDTO" useGeneratedKeys="true">
+        INSERT 
+          INTO patient_care
+               ( patient_name,      gender,      ward_number,     room_number,        final_clinic_date,   hospitalization_date, state, 
+                 center_code,       jumin,       patient_phone,   guardian_phone,     symptom_start_date,  confirmation_date,    disisolation_date, 
+                 basal_disease_yn,  drug_yn,     drug_content,    pregnancy_status,   pregnancy_week,      id,                   pw, 
+                 create_date,       update_date, create_by,       update_by)
+                  
+        VALUES ( #{patientName},    #{gender},   #{wardNumber},   #{roomNumber},      NOW(),               NOW(),               #{state}, 
+                 #{centerCode},     #{jumin},    #{patientPhone}, #{guardianPhone},   #{symptomStartDate}, #{confirmationDate}, #{disisolationDate}, 
+                 #{basalDiseaseYn}, #{drugYn},   #{drugContent},  #{pregnancyStatus}, #{pregnancyWeek},    #{id},               #{pw}, 
+                 NOW(),             '',          #{staffId},      '')
+    </insert>
+    
+    <insert id="insertPatientDiseases" parameterType="PatientDTO" useGeneratedKeys="true">
+        INSERT
+          INTO patient_disease
+               ( patient_idx,                high_blood_pressure_check,    low_blood_pressure_check, organ_transplant_check,  diabetes_check, 
+                 respiratory_disease_check,  immunological_disease_check,  dyspnea_check,            cold_fit_check,          muscle_pain_check,
+                 headache_check,             sore_throat_check,            smell_palate_check,       fatigue_check,           heart_disease,
+                 liver_disease,              [operation],                  operation_content,        allergy_check,           kidney_disease,
+                 cancer_check,               cancer_name,                  etc_check,                etc_content )
+        VALUES ( #{patientIdx},              #{highBloodPressureCheck},    #{lowBloodPressureCheck}, #{organTransplantCheck}, #{diabetesCheck}, 
+                 #{respiratoryDiseaseCheck}, #{immunologicalDiseaseCheck}, #{dyspneaCheck},          #{coldFitCheck},         #{musclePainCheck}, 
+                 #{headacheCheck},           #{soreThroatCheck},           #{smellPalateCheck},      #{fatigueCheck},         #{heartDisease},
+                 #{liverDisease},            #{operation},                 #{operationContent},      #{allergyCheck},         #{kidneyDisease}, 
+                 #{cancerCheck},             #{cancerName},                #{etcCheck},              #{etcContent} )
+    </insert>
+    
+    <insert id="insertPatientSymptom" parameterType="PatientDTO" useGeneratedKeys="true">
+            INSERT 
+              INTO patient_symptom 
+                   ( patient_idx,      fever_check,     cough_check,      colic,              cold_fit_check,        sputum_check, 
+                     ocin_check,       fever_right,     fever_left,       fatigue_check,      etc_check,             etc_content, 
+                     chest_pain,       nose_check,      vomiting_check,   muscle_pain_check,  sore_throat_check,     diarrhea_check, 
+                     headache_check,   dyspnea_check,   pulse_rate,       respiration_rate,   blood_pressure_level,  oxygen_saturation )
+                     
+            VALUES ( #{patientIdx},    #{feverCheck},   #{coughCheck},    #{colic},           #{coldFitCheck},       #{sputumCheck}, 
+                     #{ocinCheck},     #{feverRight},   #{feverLeft},     #{fatigueCheck},    #{etcCheck},           #{etcContent}, 
+                     #{chestPain},     #{noseCheck},    #{vomitingCheck}, #{musclePainCheck}, #{soreThroatCheck},    #{diarrheaCheck}, 
+                     #{headacheCheck}, #{dyspneaCheck}, #{pulseRate},     #{respirationRate}, #{bloodPressureLevel}, #{oxygenSaturation )
+    </insert>
 </mapper>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 521 - 487
src/main/webapp/WEB-INF/jsp/patient/new.jsp