Merge pull request #253 feature-NEWDWH2021-1183 into develop
This commit is contained in:
commit
7e4854aaad
@ -15,5 +15,6 @@ class UltmarcDoctorDBModel(BaseDBModel):
|
||||
form_post_name: Optional[str]
|
||||
alma: Optional[str]
|
||||
grad_y: Optional[str]
|
||||
use_stop_div: Optional[str]
|
||||
prefc_name: Optional[str]
|
||||
blng_sec_cd: Optional[str]
|
||||
|
||||
@ -14,5 +14,6 @@ class UltmarcDoctorInfoDBModel(BaseDBModel):
|
||||
alma: Optional[str]
|
||||
hometown: Optional[str]
|
||||
grad_y: Optional[str]
|
||||
use_stop_div: Optional[str]
|
||||
drday_y: Optional[str]
|
||||
estab_y: Optional[str]
|
||||
|
||||
@ -11,3 +11,4 @@ class UltmarcDoctorWrkplaceDBModel(BaseDBModel):
|
||||
univ_post_name: Optional[str]
|
||||
post_name: Optional[str]
|
||||
aply_start_ymd: Optional[date]
|
||||
notdm_flg: Optional[str]
|
||||
|
||||
@ -11,3 +11,4 @@ class UltmarcDoctorWrkplaceHisDBModel(BaseDBModel):
|
||||
post_name: Optional[str]
|
||||
aply_start_ymd: Optional[str]
|
||||
aply_end_ymd: Optional[str]
|
||||
notdm_flg: Optional[str]
|
||||
|
||||
@ -17,6 +17,7 @@ class UltmarcDoctorSearchModel(RequestBaseModel):
|
||||
trt_course_name: Optional[str]
|
||||
alma: Optional[str]
|
||||
grad_y: Optional[str]
|
||||
use_stop_div: Optional[str]
|
||||
pagination_page_number: Optional[int]
|
||||
|
||||
@classmethod
|
||||
@ -33,6 +34,7 @@ class UltmarcDoctorSearchModel(RequestBaseModel):
|
||||
ctrl_trt_course_name: str = Form(None),
|
||||
ctrl_alma: str = Form(None),
|
||||
ctrl_grad_y: str = Form(None),
|
||||
use_stop_div_ctrl: str = Form(None),
|
||||
pagination_page_number: str = Form(None)
|
||||
):
|
||||
|
||||
@ -48,6 +50,7 @@ class UltmarcDoctorSearchModel(RequestBaseModel):
|
||||
trt_course_name=ctrl_trt_course_name,
|
||||
alma=ctrl_alma,
|
||||
grad_y=ctrl_grad_y,
|
||||
use_stop_div=use_stop_div_ctrl,
|
||||
pagination_page_number=pagination_page_number
|
||||
)
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ from src.model.db.ultmarc_sosiety import UltmarcSosietyDBModel
|
||||
from src.model.db.ultmarc_specialist_license import \
|
||||
UltmarcSpecialistLicenseDBModel
|
||||
from src.model.db.ultmarc_trt_course import UltmarcDrTrtCourseDBModel
|
||||
from src.system_var import environment
|
||||
from src.system_var import constants, environment
|
||||
|
||||
|
||||
class UltmarcDoctorInfoViewModel(BaseModel):
|
||||
@ -45,36 +45,54 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
||||
def is_input_birthday_format(self):
|
||||
return self._format_date_string(self.doctor_info_data.birthday)
|
||||
|
||||
# 利用停止区分
|
||||
def is_input_use_stop_div_category_name(self):
|
||||
if not self.doctor_info_data.use_stop_div:
|
||||
return ''
|
||||
return constants.DISPLAY_USER_STOP_DIV.get(self.doctor_info_data.use_stop_div, '')
|
||||
|
||||
# 開始年月日
|
||||
def is_input_aply_start_ymd_format(self, aply_start_date: datetime):
|
||||
if aply_start_date:
|
||||
return self._format_date(aply_start_date)
|
||||
else:
|
||||
if not aply_start_date:
|
||||
return ''
|
||||
return self._format_date(aply_start_date)
|
||||
|
||||
# 医師勤務先履歴_開始年月日
|
||||
def is_input_his_aply_start_ymd_format(self, aply_start_date_string: str):
|
||||
if aply_start_date_string:
|
||||
try:
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
aply_start_date = datetime.strptime(aply_start_date_string, '%Y%m%d')
|
||||
except Exception:
|
||||
return aply_start_date_string
|
||||
return self._format_date(aply_start_date)
|
||||
else:
|
||||
if not aply_start_date_string:
|
||||
return ''
|
||||
try:
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
aply_start_date = datetime.strptime(aply_start_date_string, '%Y%m%d')
|
||||
except Exception:
|
||||
return aply_start_date_string
|
||||
return self._format_date(aply_start_date)
|
||||
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
aply_start_date = datetime.strptime(aply_start_date_string, '%Y%m%d')
|
||||
return self._format_date(aply_start_date)
|
||||
|
||||
# 医師勤務先履歴_終了年月日
|
||||
def is_input_his_aply_end_ymd_format(self, aply_end_date_string: str):
|
||||
if aply_end_date_string:
|
||||
try:
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
aply_end_date = datetime.strptime(aply_end_date_string, '%Y%m%d')
|
||||
except Exception:
|
||||
return aply_end_date_string
|
||||
return self._format_date(aply_end_date)
|
||||
else:
|
||||
if not aply_end_date_string:
|
||||
return ''
|
||||
try:
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
aply_end_date = datetime.strptime(aply_end_date_string, '%Y%m%d')
|
||||
except Exception:
|
||||
return aply_end_date_string
|
||||
return self._format_date(aply_end_date)
|
||||
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
aply_end_date = datetime.strptime(aply_end_date_string, '%Y%m%d')
|
||||
return self._format_date(aply_end_date)
|
||||
|
||||
# DM不可フラグ
|
||||
def is_input_notdm_flg_name(self, notdm_flg: str):
|
||||
if not notdm_flg:
|
||||
return ''
|
||||
if notdm_flg == '1':
|
||||
return '不可'
|
||||
|
||||
def is_input_trt_course_data_size(self):
|
||||
return len(self.trt_coursed_data)
|
||||
|
||||
@ -6,7 +6,7 @@ from pydantic import BaseModel
|
||||
from src.model.db.prefc_master import PrefcMasterModel
|
||||
from src.model.db.ultmarc_doctor import UltmarcDoctorDBModel
|
||||
from src.model.request.ultmarc_doctor import UltmarcDoctorSearchModel
|
||||
from src.system_var import environment
|
||||
from src.system_var import constants, environment
|
||||
|
||||
|
||||
class UltmarcDoctorSearchViewModel(BaseModel):
|
||||
@ -112,6 +112,20 @@ class UltmarcDoctorSearchViewModel(BaseModel):
|
||||
return ''
|
||||
return self.form_data.grad_y or ''
|
||||
|
||||
# 利用停止区分
|
||||
def is_checked_use_stop_div(self):
|
||||
if not self.is_form_submitted():
|
||||
return 'checked'
|
||||
return self._checked_value(self.form_data.use_stop_div)
|
||||
|
||||
def is_input_use_stop_div(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.use_stop_div or ''
|
||||
|
||||
def get_use_stop_div_category_name_short(self):
|
||||
return json.dumps(constants.DISPLAY_USER_STOP_DIV_SHORT, ensure_ascii=False)
|
||||
|
||||
def disabled_button(self):
|
||||
return 'disabled' if self.is_data_empty() or self.is_data_overflow_max_length() else ''
|
||||
|
||||
@ -126,3 +140,6 @@ class UltmarcDoctorSearchViewModel(BaseModel):
|
||||
|
||||
def _selected_value(self, form_value: str, current_value: str):
|
||||
return 'selected' if form_value == current_value else ''
|
||||
|
||||
def _checked_value(self, form_value: str):
|
||||
return 'checked' if form_value else ''
|
||||
|
||||
@ -25,6 +25,7 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
com_post.form_post_name,
|
||||
com_alma.alma,
|
||||
com_dr.grad_y,
|
||||
com_dr.use_stop_div,
|
||||
mst_prefc.prefc_name,
|
||||
com_dr_wrkplace.blng_sec_cd
|
||||
FROM
|
||||
@ -141,6 +142,12 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
parameter.grad_y = f'%{parameter.grad_y}%'
|
||||
where_clauses.append(SQLCondition('grad_y', condition.LIKE, 'grad_y'))
|
||||
|
||||
# 利用停止区分
|
||||
if is_not_empty(parameter.use_stop_div) is False:
|
||||
# 01・03・04を対象外とする
|
||||
where_clauses.append(SQLCondition(
|
||||
'', '', "(com_dr.use_stop_div NOT IN ('01','03','04') OR com_dr.use_stop_div IS NULL)", literal=True))
|
||||
|
||||
# 廃業除外
|
||||
if where_clauses:
|
||||
where_clauses.append(SQLCondition(
|
||||
@ -162,6 +169,7 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
com_alma.alma,
|
||||
com_hometown.hometown,
|
||||
com_dr.grad_y,
|
||||
com_dr.use_stop_div,
|
||||
com_dr.drday_y,
|
||||
com_dr.estab_y
|
||||
FROM src05.com_dr
|
||||
|
||||
@ -16,7 +16,8 @@ class UltmarcDoctorWrkplaceHisRepository(BaseRepository):
|
||||
univ_post.form_post_name as univ_post_name,
|
||||
post.form_post_name as post_name,
|
||||
com_dr_wrkplace_his.aply_start_ymd,
|
||||
com_dr_wrkplace_his.aply_end_ymd
|
||||
com_dr_wrkplace_his.aply_end_ymd,
|
||||
com_dr_wrkplace_his.notdm_flg
|
||||
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
|
||||
|
||||
@ -16,7 +16,8 @@ class UltmarcDoctorWrkplaceRepository(BaseRepository):
|
||||
com_blng_sec.blng_sec_name,
|
||||
univ_post.form_post_name AS univ_post_name,
|
||||
post.form_post_name AS post_name,
|
||||
com_dr_wrkplace.aply_start_ymd
|
||||
com_dr_wrkplace.aply_start_ymd,
|
||||
com_dr_wrkplace.notdm_flg
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_wrkplace ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_inst ON com_dr_wrkplace.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||
|
||||
@ -81,6 +81,7 @@ table{
|
||||
margin-left: 3%;
|
||||
margin-top: 0.8%;
|
||||
margin-bottom: 0.8%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.notFind{
|
||||
|
||||
@ -83,7 +83,7 @@ function clr() {
|
||||
if (formInput.name.startsWith('ctrl_')) {
|
||||
formInput.value = "";
|
||||
}
|
||||
if(formInput.name == 'ikoFlg' || formInput.name == 'delFlg_ctrl'){
|
||||
if (formInput.type === 'checkbox') {
|
||||
formInput.checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -194,3 +194,16 @@ MENTE_CSV_DOWNLOAD_FILE_NAME = 'instEmpData.csv'
|
||||
|
||||
# CSVアップロードの制限サイズ=20MB
|
||||
MENTE_CSV_UPLOAD_MAX_FILE_SIZE_BYTE = 20971520
|
||||
|
||||
# 利用停止区分
|
||||
DISPLAY_USER_STOP_DIV = {
|
||||
'01': '全面的に利用停止',
|
||||
'03': '特定の項目について利用停止',
|
||||
'04': '全てのDM等利用停止'
|
||||
}
|
||||
|
||||
DISPLAY_USER_STOP_DIV_SHORT = {
|
||||
'01': '全面停止',
|
||||
'03': '特定項目停止',
|
||||
'04': '全DM停止'
|
||||
}
|
||||
|
||||
@ -94,6 +94,8 @@
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.sex or ''}}"></td>
|
||||
<td>生年月日:</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.is_input_birthday_format()}}"></td>
|
||||
<td>利用停止区分:</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.is_input_use_stop_div_category_name()}}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="docInfoTd">
|
||||
@ -185,6 +187,7 @@
|
||||
<th>職位</th>
|
||||
<th>開始年月日</th>
|
||||
<th>終了年月日</th>
|
||||
<th>DM不可</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script>
|
||||
@ -206,6 +209,7 @@
|
||||
<td>{{doctor_wrkplace_data.post_name or ''}}</td>
|
||||
<td>{{ultmarc.is_input_aply_start_ymd_format(doctor_wrkplace_data.aply_start_ymd)}}</td>
|
||||
<td>9999/99/99</td>
|
||||
<td>{{ultmarc.is_input_notdm_flg_name(doctor_wrkplace_data.notdm_flg)}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@ -220,6 +224,7 @@
|
||||
<td>{{doctor_wrkplace_his_data.post_name or ''}}</td>
|
||||
<td>{{ultmarc.is_input_his_aply_start_ymd_format(doctor_wrkplace_his_data.aply_start_ymd)}}</td>
|
||||
<td>{{ultmarc.is_input_his_aply_end_ymd_format(doctor_wrkplace_his_data.aply_end_ymd)}}</td>
|
||||
<td>{{ultmarc.is_input_notdm_flg_name(doctor_wrkplace_his_data.notdm_flg)}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@ -105,9 +105,12 @@
|
||||
value="{{ultmarc.is_input_alma()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
<td class="docSearchColumnTd">卒年:</td>
|
||||
<td class="docSearchTextboxTd"><input class="text docSearchTextbox" style="ime-mode:disabled;" type="text" name="ctrl_grad_y"
|
||||
<td class="docSearchTextboxTd">
|
||||
<input class="text docSearchTextbox" style="ime-mode:disabled;" type="text" name="ctrl_grad_y"
|
||||
value="{{ultmarc.is_input_grad_y()}}" maxlength='4' oninput="formBtDisabled()"></td>
|
||||
<td class="search_btTd" colspan="2">
|
||||
<td class="docSearchColumnTd"><label><input type="checkbox" name="use_stop_div_ctrl" value="true"
|
||||
{{ultmarc.is_checked_use_stop_div()}}> 利用停止区分を含む</label></td>
|
||||
<td class="search_btTd">
|
||||
<input class="text ult_bt search_bt" id="clear" type="button" name="clear_bt" value="クリア" onclick="clr();">
|
||||
<input class="ult_bt search_bt" id="search_bt" name="search_bt" value="検索" type="submit">
|
||||
</td>
|
||||
@ -140,6 +143,7 @@
|
||||
<th>役職名</th>
|
||||
<th>出身大学</th>
|
||||
<th>卒年</th>
|
||||
<th>利用停止区分</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="result_data" class="result_data"></tbody>
|
||||
@ -180,6 +184,7 @@
|
||||
sessionStorage.setItem('ctrl_trt_course_name','{{ultmarc.is_input_trt_course_name()}}');
|
||||
sessionStorage.setItem('ctrl_alma','{{ultmarc.is_input_alma()}}');
|
||||
sessionStorage.setItem('ctrl_grad_y','{{ultmarc.is_input_grad_y()}}');
|
||||
sessionStorage.setItem('use_stop_div_ctrl','{{ultmarc.is_input_use_stop_div()}}');
|
||||
|
||||
// ページネーションのページ番号取得
|
||||
let pagination_page_number = Number('{{ultmarc.init_pagination_page_number()}}');
|
||||
@ -234,15 +239,19 @@
|
||||
'trt_course_name',
|
||||
'form_post_name',
|
||||
'alma',
|
||||
'grad_y'
|
||||
'grad_y',
|
||||
'use_stop_div'
|
||||
];
|
||||
const useStopDivCategoryName = JSON.parse('{{ultmarc.get_use_stop_div_category_name_short()|safe}}');
|
||||
return datas.map(function (data) {
|
||||
let td = display_keys.map((key) =>{
|
||||
let inner_content = data[key];
|
||||
if(key=='dcf_pcf_dr_cd')
|
||||
inner_content = `<a href="javascript:void(0);" onclick="transitionTo('/ultmarc/docInfo?id=${data['dcf_pcf_dr_cd']}')">${data['dcf_pcf_dr_cd'] || ''}</a>`;
|
||||
if(key=='dcf_dsf_inst_cd')
|
||||
inner_content = `<a href="javascript:void(0);" onclick="transitionWithClearSearchItem('/ultmarc/instInfo?id=${data['dcf_dsf_inst_cd']}')">${data['form_inst_name_kanji'] || ''}</a>`;
|
||||
inner_content = `<a href="/ultmarc/docInfo?id=${data['dcf_pcf_dr_cd']}">${data['dcf_pcf_dr_cd'] || ''}</a>`;
|
||||
else if(key=='dcf_dsf_inst_cd')
|
||||
inner_content = `<a href="/ultmarc/instInfo?id=${data['dcf_dsf_inst_cd']}" onclick="OnLinkClick()">${data['form_inst_name_kanji'] || ''}</a>`;
|
||||
else if(key=='use_stop_div')
|
||||
inner_content = useStopDivCategoryName[inner_content] || '';
|
||||
return `<td>${inner_content || ''}</td>`
|
||||
});
|
||||
return `
|
||||
|
||||
@ -44,6 +44,7 @@
|
||||
<form name="docSearch" method="post" action="/ultmarc/docSearch" onsubmit="showLoading()">
|
||||
<td class="instHeaderTd">
|
||||
<input type="hidden" name="ctrl_dcf_dsf_inst_cd" value="{{ultmarc.inst_info_data.dcf_dsf_inst_cd or ''}}">
|
||||
<input type="hidden" name="use_stop_div_ctrl" value="true">
|
||||
<input name="docSearchBt" class="transitionBt" type="submit" value="勤務医師" {{ultmarc.is_disabled_doctor_wrkplace()}}>
|
||||
</td>
|
||||
</form>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user