|
@@ -32,27 +32,27 @@
|
|
|
]]>
|
|
|
|
|
|
<choose>
|
|
|
- <when test='careAgencyCode != null and careAgencyCode == "" and birthDate == null and birthDate == "" and patientName == null and patientName == "" and patientPhone == null and patientPhone == ""'>
|
|
|
+ <when test='patientNumber != null and patientNumber !=""'>
|
|
|
<![CDATA[
|
|
|
- AND CENTER_CODE = (SELECT center_code
|
|
|
- FROM api_manager
|
|
|
- WHERE cooperative_code = #{careAgencyCode}
|
|
|
- AND use_yn = 'C')
|
|
|
+ AND PATIENT_NUMBER = #{patientNumber}
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<choose>
|
|
|
- <when test='patientNumber != null and patientNumber !=""'>
|
|
|
+ <when test='birthDate != null and birthDate != "" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
<![CDATA[
|
|
|
- AND PATIENT_NUMBER = #{patientNumber}
|
|
|
+ AND JUMIN = #{birthDate}
|
|
|
+ AND PATIENT_NAME = #{patientName}
|
|
|
+ AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- <if test='birthDate != null and birthDate !="" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
+ <if test='careAgencyCode != null and careAgencyCode != ""'>
|
|
|
<![CDATA[
|
|
|
- AND JUMIN = #{birthDate}
|
|
|
- AND PATIENT_NAME = #{patientName}
|
|
|
- AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
+ AND CENTER_CODE = (SELECT center_code
|
|
|
+ FROM api_manager
|
|
|
+ WHERE cooperative_code = #{careAgencyCode}
|
|
|
+ AND use_yn = 'C')
|
|
|
]]>
|
|
|
</if>
|
|
|
</otherwise>
|
|
@@ -89,27 +89,27 @@
|
|
|
]]>
|
|
|
|
|
|
<choose>
|
|
|
- <when test='careAgencyCode != null and careAgencyCode != "" and birthDate == null and birthDate == "" and patientName == null and patientName == "" and patientPhone == null and patientPhone == ""'>
|
|
|
+ <when test='patientNumber != null and patientNumber !=""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.CENTER_CODE = (SELECT center_code
|
|
|
- FROM api_manager
|
|
|
- WHERE cooperative_code = #{careAgencyCode}
|
|
|
- AND use_yn = 'C')
|
|
|
+ AND PATIENT_NUMBER = #{patientNumber}
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<choose>
|
|
|
- <when test='patientNumber != null and patientNumber !=""'>
|
|
|
+ <when test='birthDate != null and birthDate != "" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.PATIENT_NUMBER = #{patientNumber}
|
|
|
+ AND JUMIN = #{birthDate}
|
|
|
+ AND PATIENT_NAME = #{patientName}
|
|
|
+ AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- <if test='birthDate != null and birthDate !="" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
+ <if test='careAgencyCode != null and careAgencyCode != ""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.JUMIN = #{birthDate}
|
|
|
- AND PC.PATIENT_NAME = #{patientName}
|
|
|
- AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
+ AND CENTER_CODE = (SELECT center_code
|
|
|
+ FROM api_manager
|
|
|
+ WHERE cooperative_code = #{careAgencyCode}
|
|
|
+ AND use_yn = 'C')
|
|
|
]]>
|
|
|
</if>
|
|
|
</otherwise>
|
|
@@ -134,27 +134,27 @@
|
|
|
WHERE 1 = 1
|
|
|
]]>
|
|
|
<choose>
|
|
|
- <when test='careAgencyCode != null and careAgencyCode != "" and birthDate == null and birthDate == "" and patientName == null and patientName == "" and patientPhone == null and patientPhone == ""'>
|
|
|
+ <when test='patientNumber != null and patientNumber !=""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.CENTER_CODE = (SELECT center_code
|
|
|
- FROM api_manager
|
|
|
- WHERE cooperative_code = #{careAgencyCode}
|
|
|
- AND use_yn = 'C')
|
|
|
+ AND PATIENT_NUMBER = #{patientNumber}
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<choose>
|
|
|
- <when test='patientNumber != null and patientNumber !=""'>
|
|
|
+ <when test='birthDate != null and birthDate != "" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.PATIENT_NUMBER = #{patientNumber}
|
|
|
+ AND JUMIN = #{birthDate}
|
|
|
+ AND PATIENT_NAME = #{patientName}
|
|
|
+ AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- <if test='birthDate != null and birthDate !="" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
+ <if test='careAgencyCode != null and careAgencyCode != ""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.JUMIN = #{birthDate}
|
|
|
- AND PC.PATIENT_NAME = #{patientName}
|
|
|
- AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
+ AND CENTER_CODE = (SELECT center_code
|
|
|
+ FROM api_manager
|
|
|
+ WHERE cooperative_code = #{careAgencyCode}
|
|
|
+ AND use_yn = 'C')
|
|
|
]]>
|
|
|
</if>
|
|
|
</otherwise>
|
|
@@ -198,27 +198,27 @@
|
|
|
WHERE 1 = 1
|
|
|
]]>
|
|
|
<choose>
|
|
|
- <when test='careAgencyCode != null and careAgencyCode != "" and birthDate == null and birthDate == "" and patientName == null and patientName == "" and patientPhone == null and patientPhone == ""'>
|
|
|
+ <when test='patientNumber != null and patientNumber !=""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.CENTER_CODE = (SELECT center_code
|
|
|
- FROM api_manager
|
|
|
- WHERE cooperative_code = #{careAgencyCode}
|
|
|
- AND use_yn = 'C')
|
|
|
+ AND PATIENT_NUMBER = #{patientNumber}
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<choose>
|
|
|
- <when test='patientNumber != null and patientNumber !=""'>
|
|
|
+ <when test='birthDate != null and birthDate != "" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.PATIENT_NUMBER = #{patientNumber}
|
|
|
+ AND JUMIN = #{birthDate}
|
|
|
+ AND PATIENT_NAME = #{patientName}
|
|
|
+ AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- <if test='birthDate != null and birthDate !="" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
+ <if test='careAgencyCode != null and careAgencyCode != ""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.JUMIN = #{birthDate}
|
|
|
- AND PC.PATIENT_NAME = #{patientName}
|
|
|
- AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
+ AND CENTER_CODE = (SELECT center_code
|
|
|
+ FROM api_manager
|
|
|
+ WHERE cooperative_code = #{careAgencyCode}
|
|
|
+ AND use_yn = 'C')
|
|
|
]]>
|
|
|
</if>
|
|
|
</otherwise>
|
|
@@ -260,27 +260,27 @@
|
|
|
WHERE 1 = 1
|
|
|
]]>
|
|
|
<choose>
|
|
|
- <when test='careAgencyCode != null and careAgencyCode != "" and birthDate == null and birthDate == "" and patientName == null and patientName == "" and patientPhone == null and patientPhone == ""'>
|
|
|
+ <when test='patientNumber != null and patientNumber !=""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.CENTER_CODE = (SELECT center_code
|
|
|
- FROM api_manager
|
|
|
- WHERE cooperative_code = #{careAgencyCode}
|
|
|
- AND use_yn = 'C')
|
|
|
+ AND PATIENT_NUMBER = #{patientNumber}
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<choose>
|
|
|
- <when test='patientNumber != null and patientNumber !=""'>
|
|
|
+ <when test='birthDate != null and birthDate != "" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.PATIENT_NUMBER = #{patientNumber}
|
|
|
+ AND JUMIN = #{birthDate}
|
|
|
+ AND PATIENT_NAME = #{patientName}
|
|
|
+ AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- <if test='birthDate != null and birthDate !="" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
+ <if test='careAgencyCode != null and careAgencyCode != ""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.JUMIN = #{birthDate}
|
|
|
- AND PC.PATIENT_NAME = #{patientName}
|
|
|
- AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
+ AND CENTER_CODE = (SELECT center_code
|
|
|
+ FROM api_manager
|
|
|
+ WHERE cooperative_code = #{careAgencyCode}
|
|
|
+ AND use_yn = 'C')
|
|
|
]]>
|
|
|
</if>
|
|
|
</otherwise>
|
|
@@ -301,27 +301,27 @@
|
|
|
WHERE 1 = 1
|
|
|
]]>
|
|
|
<choose>
|
|
|
- <when test='centerCode != null and centerCode != "" and birthDate == null and birthDate == "" and patientName == null and patientName == "" and patientPhone == null and patientPhone == ""'>
|
|
|
+ <when test='patientNumber != null and patientNumber !=""'>
|
|
|
<![CDATA[
|
|
|
- AND CENTER_CODE = (SELECT center_code
|
|
|
- FROM api_manager
|
|
|
- WHERE cooperative_code = #{careAgencyCode}
|
|
|
- AND use_yn = 'C')
|
|
|
+ AND PATIENT_NUMBER = #{patientNumber}
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
<choose>
|
|
|
- <when test='patientNumber != null and patientNumber !=""'>
|
|
|
+ <when test='birthDate != null and birthDate != "" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
<![CDATA[
|
|
|
- AND PC.PATIENT_NUMBER = #{patientNumber}
|
|
|
+ AND JUMIN = #{birthDate}
|
|
|
+ AND PATIENT_NAME = #{patientName}
|
|
|
+ AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
]]>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- <if test='birthDate != null and birthDate !="" and patientName != null and patientName != "" and patientPhone != null and patientPhone != ""'>
|
|
|
+ <if test='careAgencyCode != null and careAgencyCode != ""'>
|
|
|
<![CDATA[
|
|
|
- AND JUMIN = #{birthDate}
|
|
|
- AND PATIENT_NAME = #{patientName}
|
|
|
- AND (PATIENT_PHONE = #{patientPhone} OR PATIENT_PHONE = #{patientPhone2})
|
|
|
+ AND CENTER_CODE = (SELECT center_code
|
|
|
+ FROM api_manager
|
|
|
+ WHERE cooperative_code = #{careAgencyCode}
|
|
|
+ AND use_yn = 'C')
|
|
|
]]>
|
|
|
</if>
|
|
|
</otherwise>
|