指摘事項反映
This commit is contained in:
parent
a5d006249a
commit
2376e6a602
@ -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):
|
||||
@ -47,53 +47,40 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
||||
|
||||
# 利用停止区分
|
||||
def is_input_use_stop_div_category_name(self):
|
||||
if self.doctor_info_data.use_stop_div:
|
||||
use_stop_div = self.doctor_info_data.use_stop_div
|
||||
# 利用停止区分の文言設定
|
||||
# 01:全面的に利用停止
|
||||
# 03:特定の項目について利用停止
|
||||
# 04:全てのDM等利用停止
|
||||
if (use_stop_div == '01'):
|
||||
return '全面的に利用停止'
|
||||
if (use_stop_div == '03'):
|
||||
return '特定の項目について利用停止'
|
||||
if (use_stop_div == '04'):
|
||||
return '全てのDM等利用停止'
|
||||
return ''
|
||||
else:
|
||||
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:
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
aply_start_date = datetime.strptime(aply_start_date_string, '%Y%m%d')
|
||||
return self._format_date(aply_start_date)
|
||||
else:
|
||||
if not aply_start_date_string:
|
||||
return ''
|
||||
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
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:
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
aply_end_date = datetime.strptime(aply_end_date_string, '%Y%m%d')
|
||||
return self._format_date(aply_end_date)
|
||||
else:
|
||||
if not aply_end_date_string:
|
||||
return ''
|
||||
|
||||
# 医師勤務先履歴の適用開始年月日は文字列型なので、日付に変換してから渡す
|
||||
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 notdm_flg and notdm_flg == '1':
|
||||
return '不可'
|
||||
else:
|
||||
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):
|
||||
@ -123,21 +123,8 @@ class UltmarcDoctorSearchViewModel(BaseModel):
|
||||
return ''
|
||||
return self.form_data.use_stop_div or ''
|
||||
|
||||
def is_input_use_stop_div_category_name(self, use_stop_div: str):
|
||||
if use_stop_div:
|
||||
# 利用停止区分の文言設定
|
||||
# 01:全面停止
|
||||
# 03:特定項目停止
|
||||
# 04:全DM停止
|
||||
if (use_stop_div == '01'):
|
||||
return '全面停止'
|
||||
if (use_stop_div == '03'):
|
||||
return '特定項目停止'
|
||||
if (use_stop_div == '04'):
|
||||
return '全DM停止'
|
||||
return ''
|
||||
else:
|
||||
return ''
|
||||
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 ''
|
||||
|
||||
@ -12,17 +12,13 @@ function backToMenu(){
|
||||
function clr() {
|
||||
const formElement = document.search
|
||||
const formInputElements = Array.from(formElement.elements)
|
||||
const checkBoxArr = ['ikoFlg', 'delFlg_ctrl', 'use_stop_div_ctrl']
|
||||
for (const formInput of formInputElements) {
|
||||
if (formInput.name.startsWith('ctrl_')) {
|
||||
formInput.value = "";
|
||||
}
|
||||
if (checkBoxArr.includes(formInput.name)) {
|
||||
if (formInput.type === 'checkbox') {
|
||||
formInput.checked = false;
|
||||
}
|
||||
// if(formInput.name == 'ikoFlg' || formInput.name == 'delFlg_ctrl' || formInput.name == 'use_stop_div_ctrl'){
|
||||
// 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停止'
|
||||
}
|
||||
|
||||
@ -239,23 +239,16 @@
|
||||
'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="/ultmarc/docInfo?id=${data['dcf_pcf_dr_cd']}">${data['dcf_pcf_dr_cd'] || ''}</a>`;
|
||||
if(key=='dcf_dsf_inst_cd')
|
||||
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>`;
|
||||
if(key=='use_stop_div')
|
||||
if(inner_content == '01'){
|
||||
inner_content = '全面停止';
|
||||
}else if(inner_content == '03'){
|
||||
inner_content = '特定項目停止';
|
||||
}else if(inner_content == '04'){
|
||||
inner_content = '全DM停止';
|
||||
}else{
|
||||
inner_content = '';
|
||||
}
|
||||
else if(key=='use_stop_div')
|
||||
inner_content = useStopDivCategoryName[inner_content] || '';
|
||||
return `<td>${inner_content || ''}</td>`
|
||||
});
|
||||
return `
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user