fix: 修正漏れがあったため修正
This commit is contained in:
parent
2408460f29
commit
b497a7b254
@ -46,14 +46,14 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
||||
return self._format_date_string(self.doctor_info_data.birthday)
|
||||
|
||||
# 開始年月日
|
||||
def is_input_aply_start_ymd_format(self, date_string):
|
||||
if date_string:
|
||||
return self._format_date(date_string)
|
||||
def is_input_aply_start_ymd_format(self, aply_start_date: datetime):
|
||||
if aply_start_date:
|
||||
return self._format_date(aply_start_date)
|
||||
else:
|
||||
return ''
|
||||
|
||||
# 医師勤務先履歴_開始年月日
|
||||
def is_input_his_aply_start_ymd_format(self, aply_start_date_string):
|
||||
def is_input_his_aply_start_ymd_format(self, aply_start_date_string: str):
|
||||
if aply_start_date_string:
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
aply_start_date = datetime.strptime(aply_start_date_string, '%Y%m%d')
|
||||
@ -62,7 +62,7 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
||||
return ''
|
||||
|
||||
# 医師勤務先履歴_終了年月日
|
||||
def is_input_his_aply_end_ymd_format(self, aply_end_date_string):
|
||||
def is_input_his_aply_end_ymd_format(self, aply_end_date_string: str):
|
||||
if aply_end_date_string:
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
aply_end_date = datetime.strptime(aply_end_date_string, '%Y%m%d')
|
||||
@ -85,13 +85,13 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
||||
def is_data_overflow_max_length(self):
|
||||
return len(self.doctor_data) > environment.ULTMARC_SEARCH_RESULT_MAX_COUNT
|
||||
|
||||
def _format_date_string(self, date_string):
|
||||
if date_string is None:
|
||||
def _format_date_string(self, date_string: str) -> str:
|
||||
if date_string is None or date_string == '':
|
||||
return ''
|
||||
date_str = datetime.strptime(date_string, '%Y%m%d')
|
||||
return date_str.strftime('%Y/%m/%d')
|
||||
|
||||
def _format_date(self, date_time):
|
||||
def _format_date(self, date_time: datetime) -> str:
|
||||
if date_time is None:
|
||||
return ''
|
||||
return date_time.strftime('%Y/%m/%d')
|
||||
|
||||
@ -17,12 +17,12 @@ class UltmarcDoctorWrkplaceHisRepository(BaseRepository):
|
||||
post.form_post_name as post_name,
|
||||
com_dr_wrkplace_his.aply_start_ymd,
|
||||
com_dr_wrkplace_his.aply_end_ymd
|
||||
FROM com_dr
|
||||
LEFT JOIN com_dr_wrkplace_his ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace_his.dcf_pcf_dr_cd
|
||||
LEFT JOIN com_inst ON com_dr_wrkplace_his.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||
LEFT JOIN com_blng_sec ON com_dr_wrkplace_his.blng_sec_cd = com_blng_sec.blng_sec_cd
|
||||
LEFT JOIN com_post as univ_post ON com_dr_wrkplace_his.identity_cd = univ_post.post_cd
|
||||
LEFT JOIN com_post as post ON com_dr_wrkplace_his.post_cd = post.post_cd
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_wrkplace_his ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace_his.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_inst ON com_dr_wrkplace_his.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||
LEFT JOIN src05.com_blng_sec ON com_dr_wrkplace_his.blng_sec_cd = com_blng_sec.blng_sec_cd
|
||||
LEFT JOIN src05.com_post as univ_post ON com_dr_wrkplace_his.identity_cd = univ_post.post_cd
|
||||
LEFT JOIN src05.com_post as post ON com_dr_wrkplace_his.post_cd = post.post_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_dr_wrkplace_his.aply_end_ymd DESC,
|
||||
com_dr_wrkplace_his.aply_start_ymd DESC
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user