レビュー前完了
This commit is contained in:
parent
227f79932c
commit
ce883d8ad7
@ -22,4 +22,5 @@ AWS_REGION=ap-northeast-1
|
|||||||
AUTHORIZE_ENDPOINT=oauth2/authorize
|
AUTHORIZE_ENDPOINT=oauth2/authorize
|
||||||
TOKEN_ENDPOINT=oauth2/token
|
TOKEN_ENDPOINT=oauth2/token
|
||||||
BIO_SEARCH_RESULT_MAX_COUNT=35000
|
BIO_SEARCH_RESULT_MAX_COUNT=35000
|
||||||
|
SEARCH_RESULT_MAX_COUNT=500
|
||||||
SESSION_EXPIRE_MINUTE=20
|
SESSION_EXPIRE_MINUTE=20
|
||||||
|
|||||||
@ -1,18 +1,15 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from fastapi import APIRouter, Depends, HTTPException, Request
|
from fastapi import APIRouter, Depends, Request
|
||||||
from fastapi.exceptions import HTTPException
|
|
||||||
from starlette import status
|
|
||||||
|
|
||||||
from src.depends.services import get_service
|
from src.depends.services import get_service
|
||||||
from src.model.internal.session import UserSession
|
from src.model.internal.session import UserSession
|
||||||
from src.model.request.ultmarc_doctor import UltmarcDoctorModel, UltmarcDoctorInfoModel
|
from src.model.request.ultmarc_doctor import UltmarcDoctorModel, UltmarcDoctorInfoModel
|
||||||
from src.model.request.ultmarc_inst import UltmarcInstModel
|
from src.model.request.ultmarc_inst import UltmarcInstModel, UltmarcInstInfoModel
|
||||||
from src.router.session_router import AuthenticatedRoute
|
from src.router.session_router import AuthenticatedRoute
|
||||||
from src.services.batch_status_service import BatchStatusService
|
from src.services.batch_status_service import BatchStatusService
|
||||||
from src.services.ultmarc_view_service import UltmarcViewService
|
from src.services.ultmarc_view_service import UltmarcViewService
|
||||||
from src.services.session_service import set_session
|
from src.services.session_service import set_session
|
||||||
from src.system_var import constants
|
|
||||||
from src.templates import templates
|
from src.templates import templates
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
@ -33,9 +30,6 @@ def ultmarc_inst_view(
|
|||||||
# バッチ処理中の場合、機能を利用させない
|
# バッチ処理中の場合、機能を利用させない
|
||||||
is_batch_processing = batch_status_service.is_batch_processing()
|
is_batch_processing = batch_status_service.is_batch_processing()
|
||||||
|
|
||||||
# if batch_status_service.is_batch_processing():
|
|
||||||
# raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BATCH_PROCESSING)
|
|
||||||
|
|
||||||
# 検索項目の取得(都道府県・施設区分)
|
# 検索項目の取得(都道府県・施設区分)
|
||||||
ultmarc = ultmarc_service.ultmarc_inst_view(session)
|
ultmarc = ultmarc_service.ultmarc_inst_view(session)
|
||||||
ultmarc.is_batch_processing = is_batch_processing
|
ultmarc.is_batch_processing = is_batch_processing
|
||||||
@ -66,10 +60,9 @@ def search_inst(
|
|||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||||
):
|
):
|
||||||
session: UserSession = request.session
|
session: UserSession = request.session
|
||||||
|
|
||||||
# バッチ処理中の場合、機能を利用させない
|
# バッチ処理中の場合、機能を利用させない
|
||||||
# is_batch_processing = batch_status_service.is_batch_processing()
|
# is_batch_processing = batch_status_service.is_batch_processing()
|
||||||
# if batch_status_service.is_batch_processing():
|
|
||||||
# raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BATCH_PROCESSING)
|
|
||||||
|
|
||||||
# 施設データを検索
|
# 施設データを検索
|
||||||
ultmarc_inst_data = ultmarc_service.search_inst_data(ultmarc_inst_form)
|
ultmarc_inst_data = ultmarc_service.search_inst_data(ultmarc_inst_form)
|
||||||
@ -98,6 +91,89 @@ def search_inst(
|
|||||||
return templates_response
|
return templates_response
|
||||||
|
|
||||||
|
|
||||||
|
@router.get('/instInfo')
|
||||||
|
def ultmarc_inst_info_view(
|
||||||
|
request: Request,
|
||||||
|
id: str,
|
||||||
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)),
|
||||||
|
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService))
|
||||||
|
):
|
||||||
|
session: UserSession = request.session
|
||||||
|
# バッチ処理中の場合、機能を利用させない
|
||||||
|
is_batch_processing = batch_status_service.is_batch_processing()
|
||||||
|
|
||||||
|
# 施設情報の取得
|
||||||
|
ultmarc = ultmarc_service.info_ultmarc_inst_view(id, session)
|
||||||
|
# バッチ起動判定の取得
|
||||||
|
ultmarc.is_batch_processing = is_batch_processing
|
||||||
|
# instId
|
||||||
|
ultmarc.instId = id
|
||||||
|
# ページ総数(件数)
|
||||||
|
ultmarc.postCnt = 1
|
||||||
|
# ページ数(表示するページNo)
|
||||||
|
ultmarc.pageNum = 0
|
||||||
|
|
||||||
|
# セッション書き換え
|
||||||
|
session.update(
|
||||||
|
actions=[
|
||||||
|
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||||
|
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
session_key = set_session(session)
|
||||||
|
templates_response = templates.TemplateResponse(
|
||||||
|
'instInfo.html', {
|
||||||
|
'request': request,
|
||||||
|
'ultmarc': ultmarc,
|
||||||
|
},
|
||||||
|
headers={'session_key': session_key}
|
||||||
|
)
|
||||||
|
return templates_response
|
||||||
|
|
||||||
|
|
||||||
|
@router.post('/instInfo')
|
||||||
|
def ultmarc_inst_info_search(
|
||||||
|
request: Request,
|
||||||
|
ultmarc_inst_form: Optional[UltmarcInstInfoModel] = Depends(UltmarcInstInfoModel.as_form),
|
||||||
|
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
||||||
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||||
|
):
|
||||||
|
session: UserSession = request.session
|
||||||
|
# バッチ処理中の場合、機能を利用させない
|
||||||
|
is_batch_processing = batch_status_service.is_batch_processing()
|
||||||
|
|
||||||
|
instId = ultmarc_inst_form.instId.split(',')
|
||||||
|
|
||||||
|
# 施設情報の取得
|
||||||
|
ultmarc = ultmarc_service.info_ultmarc_inst_view(instId[ultmarc_inst_form.pageNum], session)
|
||||||
|
|
||||||
|
# バッチ起動判定の取得
|
||||||
|
ultmarc.is_batch_processing = is_batch_processing
|
||||||
|
# InstId
|
||||||
|
ultmarc.instId = ultmarc_inst_form.instId
|
||||||
|
# ページ総数(件数)
|
||||||
|
ultmarc.postCnt = len(instId)
|
||||||
|
# ページ数(表示するページNo)
|
||||||
|
ultmarc.pageNum = ultmarc_inst_form.pageNum
|
||||||
|
|
||||||
|
# セッション書き換え
|
||||||
|
session.update(
|
||||||
|
actions=[
|
||||||
|
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||||
|
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
session_key = set_session(session)
|
||||||
|
templates_response = templates.TemplateResponse(
|
||||||
|
'instInfo.html', {
|
||||||
|
'request': request,
|
||||||
|
'ultmarc': ultmarc,
|
||||||
|
},
|
||||||
|
headers={'session_key': session_key}
|
||||||
|
)
|
||||||
|
return templates_response
|
||||||
|
|
||||||
|
|
||||||
@router.get('/docSearch')
|
@router.get('/docSearch')
|
||||||
def ultmarc_doctor_view(
|
def ultmarc_doctor_view(
|
||||||
request: Request,
|
request: Request,
|
||||||
@ -108,9 +184,6 @@ def ultmarc_doctor_view(
|
|||||||
# バッチ処理中の場合、機能を利用させない
|
# バッチ処理中の場合、機能を利用させない
|
||||||
is_batch_processing = batch_status_service.is_batch_processing()
|
is_batch_processing = batch_status_service.is_batch_processing()
|
||||||
|
|
||||||
# if batch_status_service.is_batch_processing():
|
|
||||||
# raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BATCH_PROCESSING)
|
|
||||||
|
|
||||||
# 検索項目の取得(都道府県)
|
# 検索項目の取得(都道府県)
|
||||||
ultmarc = ultmarc_service.prepare_ultmarc_doctor_view(session)
|
ultmarc = ultmarc_service.prepare_ultmarc_doctor_view(session)
|
||||||
ultmarc.is_batch_processing = is_batch_processing
|
ultmarc.is_batch_processing = is_batch_processing
|
||||||
@ -141,10 +214,9 @@ def search_doc(
|
|||||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||||
):
|
):
|
||||||
session: UserSession = request.session
|
session: UserSession = request.session
|
||||||
|
|
||||||
# バッチ処理中の場合、機能を利用させない
|
# バッチ処理中の場合、機能を利用させない
|
||||||
# is_batch_processing = batch_status_service.is_batch_processing()
|
# is_batch_processing = batch_status_service.is_batch_processing()
|
||||||
# if batch_status_service.is_batch_processing():
|
|
||||||
# raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BATCH_PROCESSING)
|
|
||||||
|
|
||||||
# 医師データを検索
|
# 医師データを検索
|
||||||
ultmarc_doctor_data = ultmarc_service.search_doctor_data(ultmarc_doctor_form)
|
ultmarc_doctor_data = ultmarc_service.search_doctor_data(ultmarc_doctor_form)
|
||||||
@ -184,9 +256,6 @@ def ultmarc_doctor_info_view(
|
|||||||
# バッチ処理中の場合、機能を利用させない
|
# バッチ処理中の場合、機能を利用させない
|
||||||
is_batch_processing = batch_status_service.is_batch_processing()
|
is_batch_processing = batch_status_service.is_batch_processing()
|
||||||
|
|
||||||
# if batch_status_service.is_batch_processing():
|
|
||||||
# raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BATCH_PROCESSING)
|
|
||||||
|
|
||||||
# 医師情報の取得
|
# 医師情報の取得
|
||||||
ultmarc = ultmarc_service.info_ultmarc_doctor_view(id, session)
|
ultmarc = ultmarc_service.info_ultmarc_doctor_view(id, session)
|
||||||
# バッチ起動判定の取得
|
# バッチ起動判定の取得
|
||||||
@ -227,9 +296,6 @@ def ultmarc_doctor_info_search(
|
|||||||
# バッチ処理中の場合、機能を利用させない
|
# バッチ処理中の場合、機能を利用させない
|
||||||
is_batch_processing = batch_status_service.is_batch_processing()
|
is_batch_processing = batch_status_service.is_batch_processing()
|
||||||
|
|
||||||
# if batch_status_service.is_batch_processing():
|
|
||||||
# raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BATCH_PROCESSING)
|
|
||||||
|
|
||||||
docId = ultmarc_doctor_form.docId.split(',')
|
docId = ultmarc_doctor_form.docId.split(',')
|
||||||
|
|
||||||
# 医師情報の取得
|
# 医師情報の取得
|
||||||
|
|||||||
@ -0,0 +1,9 @@
|
|||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from src.model.db.base_db_model import BaseDBModel
|
||||||
|
from src.util.sanitize import sanitize
|
||||||
|
|
||||||
|
|
||||||
|
@sanitize
|
||||||
|
class UltmarcDoctorWrkplaceCountDBModel(BaseDBModel):
|
||||||
|
count: Optional[int]
|
||||||
57
ecs/jskult-webapp/src/model/db/ultmarc_inst_info.py
Normal file
57
ecs/jskult-webapp/src/model/db/ultmarc_inst_info.py
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
from typing import Optional
|
||||||
|
from datetime import datetime
|
||||||
|
from src.model.db.base_db_model import BaseDBModel
|
||||||
|
from src.util.sanitize import sanitize
|
||||||
|
|
||||||
|
|
||||||
|
@sanitize
|
||||||
|
class UltmarcInstInfoDBModel(BaseDBModel):
|
||||||
|
dcf_dsf_inst_cd: Optional[str]
|
||||||
|
unconf_flg: Optional[str]
|
||||||
|
dup_opp_cd: Optional[str]
|
||||||
|
close_start_ym: Optional[str]
|
||||||
|
close_flg: Optional[str]
|
||||||
|
delete_sche_reason_cd: Optional[str]
|
||||||
|
abolish_ymd: Optional[str]
|
||||||
|
estab_sche_ym: Optional[str]
|
||||||
|
estab_sche_flg: Optional[str]
|
||||||
|
form_inst_name_kana: Optional[str]
|
||||||
|
form_inst_name_kanji: Optional[str]
|
||||||
|
inst_name_kana: Optional[str]
|
||||||
|
inst_name_kanji: Optional[str]
|
||||||
|
manage_cd: Optional[str]
|
||||||
|
postal_number: Optional[str]
|
||||||
|
inst_phone_number: Optional[str]
|
||||||
|
addr_unknown_reason_cd: Optional[str]
|
||||||
|
phone_number_non_flg: Optional[str]
|
||||||
|
inst_addr_kana: Optional[str]
|
||||||
|
inst_addr: Optional[str]
|
||||||
|
re_exam_cd: Optional[str]
|
||||||
|
rltd_univ_prnt_cd: Optional[str]
|
||||||
|
insp_item_micrb: Optional[str]
|
||||||
|
insp_item_serum: Optional[str]
|
||||||
|
insp_item_blood: Optional[str]
|
||||||
|
insp_item_patho: Optional[str]
|
||||||
|
insp_item_paras: Optional[str]
|
||||||
|
insp_item_biochem: Optional[str]
|
||||||
|
insp_item_ri: Optional[str]
|
||||||
|
prmit_bed_num_gen: Optional[str]
|
||||||
|
prmit_bed_num_rcup: Optional[str]
|
||||||
|
prmit_bed_num_mental: Optional[str]
|
||||||
|
prmit_bed_num_infection: Optional[str]
|
||||||
|
prmit_bed_num_tuber: Optional[str]
|
||||||
|
prmit_bed_num_other: Optional[str]
|
||||||
|
prmit_bed_num_sum: Optional[str]
|
||||||
|
ward_abolish_flg: Optional[str]
|
||||||
|
bed_num: Optional[str]
|
||||||
|
prmit_bed_maint_ymd: Optional[str]
|
||||||
|
inst_repre_cd: Optional[str]
|
||||||
|
inst_repre_kana: Optional[str]
|
||||||
|
inst_repre: Optional[str]
|
||||||
|
sys_update_date: Optional[datetime]
|
||||||
|
delete_sche_reason: Optional[str]
|
||||||
|
inst_div_name: Optional[str]
|
||||||
|
manage_name: Optional[str]
|
||||||
|
hp_assrt_name: Optional[str]
|
||||||
|
parent_name: Optional[str]
|
||||||
|
dcf_prnt_inst_cd: Optional[str]
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from src.model.db.base_db_model import BaseDBModel
|
||||||
|
from src.util.sanitize import sanitize
|
||||||
|
|
||||||
|
|
||||||
|
@sanitize
|
||||||
|
class UltmarcInstTrtCourseDBModel(BaseDBModel):
|
||||||
|
trt_course_name_abb: Optional[str]
|
||||||
@ -5,5 +5,5 @@ from src.util.sanitize import sanitize
|
|||||||
|
|
||||||
|
|
||||||
@sanitize
|
@sanitize
|
||||||
class UltmarcTrtCoursedbmodel(BaseDBModel):
|
class UltmarcTrtCourseDBModel(BaseDBModel):
|
||||||
trt_course_name: Optional[str]
|
trt_course_name: Optional[str]
|
||||||
|
|||||||
@ -45,17 +45,17 @@ class UltmarcInstModel(BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
class UltmarcInstInfoModel(BaseModel):
|
class UltmarcInstInfoModel(BaseModel):
|
||||||
docId: Optional[str]
|
instId: Optional[str]
|
||||||
pageNum: Optional[int]
|
pageNum: Optional[int]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def as_form(
|
def as_form(
|
||||||
cls,
|
cls,
|
||||||
docId: str = Form(None),
|
instId: str = Form(None),
|
||||||
pageNum: str = Form(None)
|
pageNum: str = Form(None)
|
||||||
):
|
):
|
||||||
|
|
||||||
return cls(
|
return cls(
|
||||||
docId=docId,
|
instId=instId,
|
||||||
pageNum=int(pageNum)
|
pageNum=int(pageNum)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,17 +1,13 @@
|
|||||||
import json
|
from datetime import datetime, date
|
||||||
from collections import OrderedDict
|
|
||||||
from datetime import datetime
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from src.model.db.ultmarc_doctor_info import UltmarcDoctorInfoDBModel
|
from src.model.db.ultmarc_doctor_info import UltmarcDoctorInfoDBModel
|
||||||
from src.model.db.ultmarc_trt_course import UltmarcTrtCoursedbmodel
|
from src.model.db.ultmarc_trt_course import UltmarcTrtCourseDBModel
|
||||||
from src.model.db.ultmarc_sosiety import UltmarcSosietyDBModel
|
from src.model.db.ultmarc_sosiety import UltmarcSosietyDBModel
|
||||||
from src.model.db.ultmarc_specialist_license import UltmarcSpecialistLicenseDBModel
|
from src.model.db.ultmarc_specialist_license import UltmarcSpecialistLicenseDBModel
|
||||||
from src.model.db.ultmarc_doctor_wrkplace import UltmarcDoctorWrkplaceDBModel
|
from src.model.db.ultmarc_doctor_wrkplace import UltmarcDoctorWrkplaceDBModel
|
||||||
from src.model.db.ultmarc_doctor_wrkplace_his import UltmarcDoctorWrkplaceHisDBModel
|
from src.model.db.ultmarc_doctor_wrkplace_his import UltmarcDoctorWrkplaceHisDBModel
|
||||||
|
|
||||||
from src.system_var import environment
|
from src.system_var import environment
|
||||||
|
|
||||||
|
|
||||||
@ -19,7 +15,7 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
|||||||
subtitle: str = '医師情報'
|
subtitle: str = '医師情報'
|
||||||
is_batch_processing: Optional[bool]
|
is_batch_processing: Optional[bool]
|
||||||
doctor_info_data: Optional[UltmarcDoctorInfoDBModel]
|
doctor_info_data: Optional[UltmarcDoctorInfoDBModel]
|
||||||
trt_coursed_data: Optional[list[UltmarcTrtCoursedbmodel]]
|
trt_coursed_data: Optional[list[UltmarcTrtCourseDBModel]]
|
||||||
sosiety_data: Optional[list[UltmarcSosietyDBModel]]
|
sosiety_data: Optional[list[UltmarcSosietyDBModel]]
|
||||||
specialist_license_data: Optional[list[UltmarcSpecialistLicenseDBModel]]
|
specialist_license_data: Optional[list[UltmarcSpecialistLicenseDBModel]]
|
||||||
doctor_wrkplace_data: Optional[list[UltmarcDoctorWrkplaceDBModel]]
|
doctor_wrkplace_data: Optional[list[UltmarcDoctorWrkplaceDBModel]]
|
||||||
@ -28,11 +24,6 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
|||||||
postCnt: Optional[int]
|
postCnt: Optional[int]
|
||||||
pageNum: Optional[int]
|
pageNum: Optional[int]
|
||||||
|
|
||||||
def ultmarc_data_json_str(self):
|
|
||||||
def date_handler(obj):
|
|
||||||
return obj.isoformat() if hasattr(obj, 'isoformat') else obj
|
|
||||||
return json.dumps([model.dict() for model in self.doctor_data], ensure_ascii=False, default=date_handler)
|
|
||||||
|
|
||||||
# 医師コード
|
# 医師コード
|
||||||
def is_input_dcf_pcf_dr_cd(self):
|
def is_input_dcf_pcf_dr_cd(self):
|
||||||
return self.doctor_info_data.dcf_pcf_dr_cd or ''
|
return self.doctor_info_data.dcf_pcf_dr_cd or ''
|
||||||
@ -86,6 +77,11 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
|||||||
def is_input_birthday_fromat(self):
|
def is_input_birthday_fromat(self):
|
||||||
return self._format_date_string(self.doctor_info_data.birthday)
|
return self._format_date_string(self.doctor_info_data.birthday)
|
||||||
|
|
||||||
|
def is_input_ymd_fromat(self, ymd):
|
||||||
|
if ymd is None:
|
||||||
|
return ''
|
||||||
|
return ymd.strftime('%Y/%m/%d')
|
||||||
|
|
||||||
def is_input_trt_course_data_size(self):
|
def is_input_trt_course_data_size(self):
|
||||||
return len(self.trt_coursed_data)
|
return len(self.trt_coursed_data)
|
||||||
|
|
||||||
@ -102,13 +98,16 @@ class UltmarcDoctorInfoViewModel(BaseModel):
|
|||||||
return len(self.doctor_data) == 0
|
return len(self.doctor_data) == 0
|
||||||
|
|
||||||
def is_data_overflow_max_length(self):
|
def is_data_overflow_max_length(self):
|
||||||
return len(self.doctor_data) >= environment.BIO_SEARCH_RESULT_MAX_COUNT
|
return len(self.doctor_data) >= environment.SEARCH_RESULT_MAX_COUNT
|
||||||
|
|
||||||
def _format_date_string(self, date_string):
|
def _format_date_string(self, date_string):
|
||||||
if date_string is None:
|
if date_string is None:
|
||||||
return ''
|
return ''
|
||||||
date = datetime.strptime(date_string, '%Y%m%d')
|
date_str = datetime.strptime(date_string, '%Y%m%d')
|
||||||
return date.strftime('%Y/%m/%d')
|
return date_str.strftime('%Y/%m/%d')
|
||||||
|
|
||||||
def _selected_value(self, form_value: str, current_value: str):
|
def _selected_value(self, form_value: str, current_value: str):
|
||||||
return 'selected' if form_value == current_value else ''
|
return 'selected' if form_value == current_value else ''
|
||||||
|
|
||||||
|
def is_octor_wrkplace_data_count(self):
|
||||||
|
return len(self.doctor_wrkplace_data)
|
||||||
|
|||||||
@ -7,7 +7,7 @@ from pydantic import BaseModel
|
|||||||
|
|
||||||
from src.model.db.prefc_master import PrefcMasterModel
|
from src.model.db.prefc_master import PrefcMasterModel
|
||||||
from src.model.request.ultmarc_doctor import UltmarcDoctorModel
|
from src.model.request.ultmarc_doctor import UltmarcDoctorModel
|
||||||
from src.model.view.bio_disp_model import BisDisplayModel
|
from src.model.db.ultmarc_doctor import UltmarcDoctorDBModel
|
||||||
from src.system_var import environment
|
from src.system_var import environment
|
||||||
|
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ class UltmarcDoctorViewModel(BaseModel):
|
|||||||
subtitle: str = '医師検索一覧'
|
subtitle: str = '医師検索一覧'
|
||||||
is_batch_processing: Optional[bool]
|
is_batch_processing: Optional[bool]
|
||||||
prefc_models: list[PrefcMasterModel]
|
prefc_models: list[PrefcMasterModel]
|
||||||
doctor_data: Optional[list[BisDisplayModel]] = []
|
doctor_data: Optional[list[UltmarcDoctorDBModel]] = []
|
||||||
form_data: Optional[UltmarcDoctorModel]
|
form_data: Optional[UltmarcDoctorModel]
|
||||||
|
|
||||||
def ultmarc_data_json_str(self):
|
def ultmarc_data_json_str(self):
|
||||||
@ -65,6 +65,11 @@ class UltmarcDoctorViewModel(BaseModel):
|
|||||||
return ''
|
return ''
|
||||||
return self._selected_value(self.form_data.prefc_cd, selected_prefc_cd)
|
return self._selected_value(self.form_data.prefc_cd, selected_prefc_cd)
|
||||||
|
|
||||||
|
def is_input_form_prefc_cd(self):
|
||||||
|
if not self.is_form_submitted():
|
||||||
|
return ''
|
||||||
|
return self.form_data.prefc_cd or ''
|
||||||
|
|
||||||
# 所属部科(漢字)
|
# 所属部科(漢字)
|
||||||
def is_input_blng_sec_name(self):
|
def is_input_blng_sec_name(self):
|
||||||
if not self.is_form_submitted():
|
if not self.is_form_submitted():
|
||||||
@ -99,13 +104,13 @@ class UltmarcDoctorViewModel(BaseModel):
|
|||||||
return len(self.doctor_data) == 0
|
return len(self.doctor_data) == 0
|
||||||
|
|
||||||
def is_data_overflow_max_length(self):
|
def is_data_overflow_max_length(self):
|
||||||
return len(self.doctor_data) >= environment.BIO_SEARCH_RESULT_MAX_COUNT
|
return len(self.doctor_data) >= environment.SEARCH_RESULT_MAX_COUNT
|
||||||
|
|
||||||
def _format_date_string(self, date_string):
|
def _format_date_string(self, date_string):
|
||||||
if date_string is None:
|
if date_string is None:
|
||||||
return ''
|
return ''
|
||||||
date = datetime.strptime(date_string, '%Y%m%d')
|
date_str = datetime.strptime(date_string, '%Y%m%d')
|
||||||
return date.strftime('%Y/%m/%d')
|
return date_str.strftime('%Y/%m/%d')
|
||||||
|
|
||||||
def _selected_value(self, form_value: str, current_value: str):
|
def _selected_value(self, form_value: str, current_value: str):
|
||||||
return 'selected' if form_value == current_value else ''
|
return 'selected' if form_value == current_value else ''
|
||||||
|
|||||||
264
ecs/jskult-webapp/src/model/view/ultmarc_inst_info_view_model.py
Normal file
264
ecs/jskult-webapp/src/model/view/ultmarc_inst_info_view_model.py
Normal file
@ -0,0 +1,264 @@
|
|||||||
|
import json
|
||||||
|
from collections import OrderedDict
|
||||||
|
from datetime import datetime
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
from src.model.db.ultmarc_inst_info import UltmarcInstInfoDBModel
|
||||||
|
from src.model.db.ultmarc_inst_trt_course import UltmarcInstTrtCourseDBModel
|
||||||
|
|
||||||
|
from src.system_var import environment
|
||||||
|
|
||||||
|
|
||||||
|
class UltmarcInstInfoViewModel(BaseModel):
|
||||||
|
subtitle: str = '施設情報'
|
||||||
|
is_batch_processing: Optional[bool]
|
||||||
|
inst_info_data: Optional[UltmarcInstInfoDBModel]
|
||||||
|
inst_trt_coursed_data: Optional[list[UltmarcInstTrtCourseDBModel]]
|
||||||
|
doctor_wrkplace_count: Optional[int]
|
||||||
|
instId: Optional[str]
|
||||||
|
postCnt: Optional[int]
|
||||||
|
pageNum: Optional[int]
|
||||||
|
|
||||||
|
# def ultmarc_data_json_str(self):
|
||||||
|
# def date_handler(obj):
|
||||||
|
# return obj.isoformat() if hasattr(obj, 'isoformat') else obj
|
||||||
|
# return json.dumps([model.dict() for model in self.doctor_data], ensure_ascii=False, default=date_handler)
|
||||||
|
|
||||||
|
# 施設コード
|
||||||
|
def is_input_dcf_dsf_inst_cd(self):
|
||||||
|
return self.inst_info_data.dcf_dsf_inst_cd or ''
|
||||||
|
|
||||||
|
# 未確認
|
||||||
|
def is_checked_unconf_flg(self):
|
||||||
|
return 'checked' if self.inst_info_data.unconf_flg == '1' else ''
|
||||||
|
|
||||||
|
# 施設コード変換先
|
||||||
|
def is_input_dup_opp_cd(self):
|
||||||
|
return self.inst_info_data.dup_opp_cd or ''
|
||||||
|
|
||||||
|
# 休院店開始年月
|
||||||
|
def is_input_close_start_ym(self):
|
||||||
|
return self.inst_info_data.close_start_ym or ''
|
||||||
|
|
||||||
|
# 休院店
|
||||||
|
def is_checked_close_flg(self):
|
||||||
|
return 'checked' if self.inst_info_data.close_flg == '1' else ''
|
||||||
|
|
||||||
|
# 削除予定理由
|
||||||
|
def is_input_delete_sche_reason_cd(self):
|
||||||
|
return self.inst_info_data.delete_sche_reason_cd or ''
|
||||||
|
|
||||||
|
def is_input_delete_sche_reason(self):
|
||||||
|
return self.inst_info_data.delete_sche_reason or ''
|
||||||
|
|
||||||
|
# 削除日
|
||||||
|
def is_input_abolish_ymd(self):
|
||||||
|
return self.inst_info_data.abolish_ymd or ''
|
||||||
|
|
||||||
|
# 開業予定年月
|
||||||
|
def is_input_estab_sche_ym(self):
|
||||||
|
return self.inst_info_data.estab_sche_ym or ''
|
||||||
|
|
||||||
|
# 開業
|
||||||
|
def is_checked_estab_sche_flg(self):
|
||||||
|
return 'checked' if self.inst_info_data.estab_sche_flg == '1' else ''
|
||||||
|
|
||||||
|
# 正式施設名(カナ)
|
||||||
|
def is_input_form_inst_name_kana(self):
|
||||||
|
return self.inst_info_data.form_inst_name_kana or ''
|
||||||
|
|
||||||
|
# 正式施設名(漢字)
|
||||||
|
def is_input_form_inst_name_kanji(self):
|
||||||
|
return self.inst_info_data.form_inst_name_kanji or ''
|
||||||
|
|
||||||
|
# 略式施設名(カナ)
|
||||||
|
def is_input_inst_name_kana(self):
|
||||||
|
return self.inst_info_data.inst_name_kana or ''
|
||||||
|
|
||||||
|
# 施設区分名
|
||||||
|
def is_input_inst_div_name(self):
|
||||||
|
return self.inst_info_data.inst_div_name or ''
|
||||||
|
|
||||||
|
# 略式施設名(漢字)
|
||||||
|
def is_input_inst_name_kanji(self):
|
||||||
|
return self.inst_info_data.inst_name_kanji or ''
|
||||||
|
|
||||||
|
# 経営体
|
||||||
|
def is_input_manage_cd(self):
|
||||||
|
return self.inst_info_data.manage_cd or ''
|
||||||
|
|
||||||
|
def is_input_manage_name(self):
|
||||||
|
return self.inst_info_data.manage_name or ''
|
||||||
|
|
||||||
|
# 郵便番号
|
||||||
|
def is_input_postal_number(self):
|
||||||
|
return self.inst_info_data.postal_number or ''
|
||||||
|
|
||||||
|
# 住所不明
|
||||||
|
def is_checked_addr_unknown_reason_cd(self):
|
||||||
|
return 'checked' if self.inst_info_data.addr_unknown_reason_cd else ''
|
||||||
|
|
||||||
|
# 施設電話番号
|
||||||
|
def is_input_inst_phone_number(self):
|
||||||
|
return self.inst_info_data.inst_phone_number or ''
|
||||||
|
|
||||||
|
# 開業
|
||||||
|
def is_checked_phone_number_non_flg(self):
|
||||||
|
return 'checked' if self.inst_info_data.phone_number_non_flg == '1' else ''
|
||||||
|
|
||||||
|
# 住所(カナ)
|
||||||
|
def is_input_inst_addr_kana(self):
|
||||||
|
return self.inst_info_data.inst_addr_kana or ''
|
||||||
|
|
||||||
|
# 住所(漢字)
|
||||||
|
def is_input_inst_addr(self):
|
||||||
|
return self.inst_info_data.inst_addr or ''
|
||||||
|
|
||||||
|
# 病院種別
|
||||||
|
def is_input_hp_assrt_name(self):
|
||||||
|
return self.inst_info_data.hp_assrt_name or ''
|
||||||
|
|
||||||
|
# 再審査区分
|
||||||
|
def is_checked_re_exam_cd(self):
|
||||||
|
return 'checked' if self.inst_info_data.re_exam_cd else ''
|
||||||
|
|
||||||
|
# 関連大学親名
|
||||||
|
def is_input_rltd_univ_prnt_cd(self):
|
||||||
|
return self.inst_info_data.rltd_univ_prnt_cd or ''
|
||||||
|
|
||||||
|
def is_input_parent_name(self):
|
||||||
|
return self.inst_info_data.parent_name or ''
|
||||||
|
|
||||||
|
# 微生物
|
||||||
|
def is_input_insp_item_micrb(self):
|
||||||
|
return self.inst_info_data.insp_item_micrb or ''
|
||||||
|
|
||||||
|
# 血清
|
||||||
|
def is_input_insp_item_serum(self):
|
||||||
|
return self.inst_info_data.insp_item_serum or ''
|
||||||
|
|
||||||
|
# 血液
|
||||||
|
def is_input_insp_item_blood(self):
|
||||||
|
return self.inst_info_data.insp_item_blood or ''
|
||||||
|
|
||||||
|
# 病理
|
||||||
|
def is_input_insp_item_patho(self):
|
||||||
|
return self.inst_info_data.insp_item_patho or ''
|
||||||
|
|
||||||
|
# 寄生虫
|
||||||
|
def is_input_insp_item_paras(self):
|
||||||
|
return self.inst_info_data.insp_item_paras or ''
|
||||||
|
|
||||||
|
# 生化
|
||||||
|
def is_input_insp_item_biochem(self):
|
||||||
|
return self.inst_info_data.insp_item_biochem or ''
|
||||||
|
|
||||||
|
# RI
|
||||||
|
def is_input_insp_item_ri(self):
|
||||||
|
return self.inst_info_data.insp_item_ri or ''
|
||||||
|
|
||||||
|
# 特務医務室
|
||||||
|
def is_input_dcf_prnt_inst_cd(self):
|
||||||
|
return self.inst_info_data.dcf_prnt_inst_cd or ''
|
||||||
|
|
||||||
|
# 一般
|
||||||
|
def is_input_prmit_bed_num_gen(self):
|
||||||
|
return self.inst_info_data.prmit_bed_num_gen or ''
|
||||||
|
|
||||||
|
# 療養
|
||||||
|
def is_input_prmit_bed_num_rcup(self):
|
||||||
|
return self.inst_info_data.prmit_bed_num_rcup or ''
|
||||||
|
|
||||||
|
# 精神
|
||||||
|
def is_input_prmit_bed_num_mental(self):
|
||||||
|
return self.inst_info_data.prmit_bed_num_mental or ''
|
||||||
|
|
||||||
|
# 感染症
|
||||||
|
def is_input_prmit_bed_num_infection(self):
|
||||||
|
return self.inst_info_data.prmit_bed_num_infection or ''
|
||||||
|
|
||||||
|
# 結核
|
||||||
|
def is_input_prmit_bed_num_tuber(self):
|
||||||
|
return self.inst_info_data.prmit_bed_num_tuber or ''
|
||||||
|
|
||||||
|
# その他
|
||||||
|
def is_input_prmit_bed_num_other(self):
|
||||||
|
return self.inst_info_data.prmit_bed_num_other or ''
|
||||||
|
|
||||||
|
# 合計
|
||||||
|
def is_input_prmit_bed_num_sum(self):
|
||||||
|
return self.inst_info_data.prmit_bed_num_sum or ''
|
||||||
|
|
||||||
|
# 病棟閉鎖
|
||||||
|
def is_checked_ward_abolish_flg(self):
|
||||||
|
return 'checked' if self.inst_info_data.ward_abolish_flg == '1' else ''
|
||||||
|
|
||||||
|
# 一部病棟閉鎖
|
||||||
|
def is_checked_ward_abolish_flg_part(self):
|
||||||
|
return 'checked' if self.inst_info_data.ward_abolish_flg == '2' else ''
|
||||||
|
|
||||||
|
# 病床数(定員)
|
||||||
|
def is_input_bed_num(self):
|
||||||
|
return self.inst_info_data.bed_num or ''
|
||||||
|
|
||||||
|
# メンテ年月日
|
||||||
|
def is_input_prmit_bed_maint_ymd(self):
|
||||||
|
return self.inst_info_data.prmit_bed_maint_ymd or ''
|
||||||
|
|
||||||
|
# 代表者個人コード
|
||||||
|
def is_input_inst_repre_cd(self):
|
||||||
|
return self.inst_info_data.inst_repre_cd or ''
|
||||||
|
|
||||||
|
# 施設代表者(カナ)
|
||||||
|
def is_input_inst_repre_kana(self):
|
||||||
|
return self.inst_info_data.inst_repre_kana or ''
|
||||||
|
|
||||||
|
# 施設代表者(漢字)
|
||||||
|
def is_input_inst_repre(self):
|
||||||
|
return self.inst_info_data.inst_repre or ''
|
||||||
|
|
||||||
|
# 修正年月日
|
||||||
|
def is_input_sys_update_date(self):
|
||||||
|
sys_update_date = str(self.inst_info_data.sys_update_date)
|
||||||
|
return sys_update_date[:10]
|
||||||
|
|
||||||
|
# 勤務医師ボタン表示
|
||||||
|
def is_disabled_doctor_wrkplace(self):
|
||||||
|
return 'disabled' if self.doctor_wrkplace_count == 0 else ''
|
||||||
|
|
||||||
|
# 現在のページ(表示用)
|
||||||
|
def is_pageNum_view(self):
|
||||||
|
return self.pageNum + 1
|
||||||
|
|
||||||
|
# 前ボタン
|
||||||
|
def is_disabled_prev(self):
|
||||||
|
return 'disabled' if self.pageNum == 0 else ''
|
||||||
|
|
||||||
|
# 次ボタン
|
||||||
|
def is_disabled_next(self):
|
||||||
|
if self.pageNum == self.postCnt - 1:
|
||||||
|
return 'disabled'
|
||||||
|
return ''
|
||||||
|
|
||||||
|
# 診療科目のデータ件数
|
||||||
|
def is_input_inst_trt_course_data_size(self):
|
||||||
|
if self.inst_trt_coursed_data is None:
|
||||||
|
return 0
|
||||||
|
return len(self.inst_trt_coursed_data)
|
||||||
|
|
||||||
|
def is_data_string_empty_fromat(self, data_string):
|
||||||
|
return data_string or ''
|
||||||
|
|
||||||
|
def disabled_button(self):
|
||||||
|
return 'disabled' if self.is_data_empty() or self.is_data_overflow_max_length() else ''
|
||||||
|
|
||||||
|
def is_form_submitted(self):
|
||||||
|
return self.form_data is not None
|
||||||
|
|
||||||
|
def is_data_empty(self):
|
||||||
|
return len(self.doctor_data) == 0
|
||||||
|
|
||||||
|
def is_data_overflow_max_length(self):
|
||||||
|
return len(self.doctor_data) >= environment.SEARCH_RESULT_MAX_COUNT
|
||||||
@ -7,7 +7,7 @@ from pydantic import BaseModel
|
|||||||
from src.model.db.prefc_master import PrefcMasterModel
|
from src.model.db.prefc_master import PrefcMasterModel
|
||||||
from src.model.db.inst_div_master import InstDivMasterModel
|
from src.model.db.inst_div_master import InstDivMasterModel
|
||||||
from src.model.request.ultmarc_inst import UltmarcInstModel
|
from src.model.request.ultmarc_inst import UltmarcInstModel
|
||||||
from src.model.view.bio_disp_model import BisDisplayModel
|
from src.model.db.ultmarc_inst import UltmarcInstDBModel
|
||||||
from src.system_var import environment
|
from src.system_var import environment
|
||||||
|
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ class UltmarcInstViewModel(BaseModel):
|
|||||||
is_batch_processing: Optional[bool]
|
is_batch_processing: Optional[bool]
|
||||||
prefc_models: list[PrefcMasterModel]
|
prefc_models: list[PrefcMasterModel]
|
||||||
inst_div_models: list[InstDivMasterModel]
|
inst_div_models: list[InstDivMasterModel]
|
||||||
inst_data: Optional[list[BisDisplayModel]] = []
|
inst_data: Optional[list[UltmarcInstDBModel]] = []
|
||||||
form_data: Optional[UltmarcInstModel]
|
form_data: Optional[UltmarcInstModel]
|
||||||
|
|
||||||
def ultmarc_data_json_str(self):
|
def ultmarc_data_json_str(self):
|
||||||
@ -25,7 +25,7 @@ class UltmarcInstViewModel(BaseModel):
|
|||||||
return json.dumps([model.dict() for model in self.inst_data], ensure_ascii=False, default=date_handler)
|
return json.dumps([model.dict() for model in self.inst_data], ensure_ascii=False, default=date_handler)
|
||||||
|
|
||||||
# ULT施設コード
|
# ULT施設コード
|
||||||
def is_input_dcf_dsf_inst_cdd(self):
|
def is_input_dcf_dsf_inst_cd(self):
|
||||||
if not self.is_form_submitted():
|
if not self.is_form_submitted():
|
||||||
return ''
|
return ''
|
||||||
return self.form_data.dcf_dsf_inst_cd or ''
|
return self.form_data.dcf_dsf_inst_cd or ''
|
||||||
@ -36,6 +36,11 @@ class UltmarcInstViewModel(BaseModel):
|
|||||||
return ''
|
return ''
|
||||||
return self._selected_value(self.form_data.inst_div_cd, selected_inst_div_cd)
|
return self._selected_value(self.form_data.inst_div_cd, selected_inst_div_cd)
|
||||||
|
|
||||||
|
def is_input_form_inst_div_cd(self):
|
||||||
|
if not self.is_form_submitted():
|
||||||
|
return ''
|
||||||
|
return self.form_data.inst_div_cd or ''
|
||||||
|
|
||||||
# ULT施設名(漢字)
|
# ULT施設名(漢字)
|
||||||
def is_input_form_inst_name_kanji(self):
|
def is_input_form_inst_name_kanji(self):
|
||||||
if not self.is_form_submitted():
|
if not self.is_form_submitted():
|
||||||
@ -63,9 +68,14 @@ class UltmarcInstViewModel(BaseModel):
|
|||||||
# 削除施設表示
|
# 削除施設表示
|
||||||
def is_checked_delFlg(self):
|
def is_checked_delFlg(self):
|
||||||
if not self.is_form_submitted():
|
if not self.is_form_submitted():
|
||||||
return ''
|
return 'checked'
|
||||||
return self._checked_value(self.form_data.delFlg)
|
return self._checked_value(self.form_data.delFlg)
|
||||||
|
|
||||||
|
def is_input_delFlg(self):
|
||||||
|
if not self.is_form_submitted():
|
||||||
|
return ''
|
||||||
|
return self.form_data.delFlg or ''
|
||||||
|
|
||||||
# ULT施設住所
|
# ULT施設住所
|
||||||
def is_input_inst_addr(self):
|
def is_input_inst_addr(self):
|
||||||
if not self.is_form_submitted():
|
if not self.is_form_submitted():
|
||||||
@ -78,6 +88,11 @@ class UltmarcInstViewModel(BaseModel):
|
|||||||
return ''
|
return ''
|
||||||
return self._selected_value(self.form_data.prefc_cd, selected_prefc_cd)
|
return self._selected_value(self.form_data.prefc_cd, selected_prefc_cd)
|
||||||
|
|
||||||
|
def is_input_form_prefc_cd(self):
|
||||||
|
if not self.is_form_submitted():
|
||||||
|
return ''
|
||||||
|
return self.form_data.prefc_cd or ''
|
||||||
|
|
||||||
def disabled_button(self):
|
def disabled_button(self):
|
||||||
return 'disabled' if self.is_data_empty() or self.is_data_overflow_max_length() else ''
|
return 'disabled' if self.is_data_empty() or self.is_data_overflow_max_length() else ''
|
||||||
|
|
||||||
@ -85,16 +100,16 @@ class UltmarcInstViewModel(BaseModel):
|
|||||||
return self.form_data is not None
|
return self.form_data is not None
|
||||||
|
|
||||||
def is_data_empty(self):
|
def is_data_empty(self):
|
||||||
return len(self.doctor_data) == 0
|
return len(self.inst_data) == 0
|
||||||
|
|
||||||
def is_data_overflow_max_length(self):
|
def is_data_overflow_max_length(self):
|
||||||
return len(self.doctor_data) >= environment.BIO_SEARCH_RESULT_MAX_COUNT
|
return len(self.inst_data) >= environment.SEARCH_RESULT_MAX_COUNT
|
||||||
|
|
||||||
def _format_date_string(self, date_string):
|
def _format_date_string(self, date_string):
|
||||||
if date_string is None:
|
if date_string is None:
|
||||||
return ''
|
return ''
|
||||||
date = datetime.strptime(date_string, '%Y%m%d')
|
date_str = datetime.strptime(date_string, '%Y%m%d')
|
||||||
return date.strftime('%Y/%m/%d')
|
return date_str.strftime('%Y/%m/%d')
|
||||||
|
|
||||||
def _selected_value(self, form_value: str, current_value: str):
|
def _selected_value(self, form_value: str, current_value: str):
|
||||||
return 'selected' if form_value == current_value else ''
|
return 'selected' if form_value == current_value else ''
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class UltmarcDoctorRepository(BaseRepository):
|
|||||||
LEFT JOIN src05.com_alma ON com_dr.alma_cd = com_alma.alma_cd
|
LEFT JOIN src05.com_alma ON com_dr.alma_cd = com_alma.alma_cd
|
||||||
WHERE
|
WHERE
|
||||||
{where_clause}
|
{where_clause}
|
||||||
GROUP BY com_dr.dcf_pcf_dr_cd
|
GROUP BY com_dr.dcf_pcf_dr_cd, com_inst.dcf_dsf_inst_cd, com_blng_sec.blng_sec_cd
|
||||||
ORDER BY
|
ORDER BY
|
||||||
com_dr.dcf_pcf_dr_cd,
|
com_dr.dcf_pcf_dr_cd,
|
||||||
com_dr_wrkplace.dcf_dsf_inst_cd,
|
com_dr_wrkplace.dcf_dsf_inst_cd,
|
||||||
@ -127,6 +127,13 @@ class UltmarcDoctorRepository(BaseRepository):
|
|||||||
parameter.grad_y = f'%{parameter.grad_y}%'
|
parameter.grad_y = f'%{parameter.grad_y}%'
|
||||||
where_clauses.append(SQLCondition('grad_y', condition.LIKE, 'grad_y'))
|
where_clauses.append(SQLCondition('grad_y', condition.LIKE, 'grad_y'))
|
||||||
|
|
||||||
|
# 検索条件が入力されていない場合
|
||||||
|
# if not where_clauses:
|
||||||
|
# where_clauses.append(SQLCondition(
|
||||||
|
# '', '', '(LENGTH(com_inst.abolish_ymd) = 0 OR com_inst.abolish_ymd IS NULL)', literal=True))
|
||||||
|
# where_clauses.append(SQLCondition(
|
||||||
|
# '', '', '(LENGTH(com_dr.abolish_ymd) = 0 OR com_dr.abolish_ymd IS NULL)', literal=True))
|
||||||
|
|
||||||
where_clauses_str = ' AND '.join([condition.apply() for condition in where_clauses])
|
where_clauses_str = ' AND '.join([condition.apply() for condition in where_clauses])
|
||||||
|
|
||||||
return where_clauses_str
|
return where_clauses_str
|
||||||
|
|||||||
@ -5,21 +5,23 @@ from src.repositories.base_repository import BaseRepository
|
|||||||
class UltmarcDoctorWrkplaceHisRepository(BaseRepository):
|
class UltmarcDoctorWrkplaceHisRepository(BaseRepository):
|
||||||
|
|
||||||
FETCH_SQL = """\
|
FETCH_SQL = """\
|
||||||
SELECT
|
SELECT
|
||||||
com_inst.dcf_dsf_inst_cd,
|
com_inst.dcf_dsf_inst_cd,
|
||||||
com_inst.inst_name_kanji,
|
com_inst.inst_name_kanji,
|
||||||
com_blng_sec.blng_sec_name,
|
com_blng_sec.blng_sec_name,
|
||||||
univ_post.form_post_name AS univ_post_name,
|
univ_post.form_post_name as univ_post_name,
|
||||||
post.form_post_name AS post_name,
|
post.form_post_name as post_name,
|
||||||
com_dr_wrkplace.aply_start_ymd
|
com_dr_wrkplace_his.aply_start_ymd,
|
||||||
FROM src05.com_dr
|
com_dr_wrkplace_his.aply_end_ymd
|
||||||
LEFT JOIN src05.com_dr_wrkplace ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace.dcf_pcf_dr_cd
|
FROM com_dr
|
||||||
LEFT JOIN src05.com_inst ON com_dr_wrkplace.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
LEFT JOIN com_dr_wrkplace_his ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace_his.dcf_pcf_dr_cd
|
||||||
LEFT JOIN src05.com_blng_sec ON com_dr_wrkplace.blng_sec_cd = com_blng_sec.blng_sec_cd
|
LEFT JOIN com_inst ON com_dr_wrkplace_his.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||||
LEFT JOIN src05.com_post as univ_post ON com_dr_wrkplace.identity_cd = univ_post.post_cd
|
LEFT JOIN com_blng_sec ON com_dr_wrkplace_his.blng_sec_cd = com_blng_sec.blng_sec_cd
|
||||||
LEFT JOIN src05.com_post as post ON com_dr_wrkplace.post_cd = post.post_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
|
||||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||||
ORDER BY com_dr_wrkplace.aply_start_ymd DESC
|
ORDER BY com_dr_wrkplace_his.aply_end_ymd DESC,
|
||||||
|
com_dr_wrkplace_his.aply_start_ymd DESC
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def fetch_many(self, id) -> list[UltmarcDoctorWrkplaceHisDBModel]:
|
def fetch_many(self, id) -> list[UltmarcDoctorWrkplaceHisDBModel]:
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
from src.model.db.ultmarc_doctor_wrkplace import UltmarcDoctorWrkplaceDBModel
|
from src.model.db.ultmarc_doctor_wrkplace import UltmarcDoctorWrkplaceDBModel
|
||||||
|
from src.model.db.ultmarc_doctor_wrkplace_count import UltmarcDoctorWrkplaceCountDBModel
|
||||||
|
|
||||||
from src.repositories.base_repository import BaseRepository
|
from src.repositories.base_repository import BaseRepository
|
||||||
|
|
||||||
|
|
||||||
@ -37,3 +39,25 @@ class UltmarcDoctorWrkplaceRepository(BaseRepository):
|
|||||||
raise e
|
raise e
|
||||||
finally:
|
finally:
|
||||||
self._database.disconnect()
|
self._database.disconnect()
|
||||||
|
|
||||||
|
FETCH_COUNT_SQL = """\
|
||||||
|
SELECT COUNT(*) AS count
|
||||||
|
FROM src05.com_dr_wrkplace
|
||||||
|
WHERE dcf_dsf_inst_cd = :id
|
||||||
|
"""
|
||||||
|
|
||||||
|
def fetch_count(self, id) -> UltmarcDoctorWrkplaceCountDBModel:
|
||||||
|
try:
|
||||||
|
self._database.connect()
|
||||||
|
query = self.FETCH_COUNT_SQL
|
||||||
|
result = self._database.execute_select(query, {'id': id})
|
||||||
|
models = [UltmarcDoctorWrkplaceCountDBModel(**r) for r in result]
|
||||||
|
if len(models) == 0:
|
||||||
|
return 0
|
||||||
|
return models[0].count
|
||||||
|
except Exception as e:
|
||||||
|
# TODO: ファイルへの書き出しはloggerでやる
|
||||||
|
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||||
|
raise e
|
||||||
|
finally:
|
||||||
|
self._database.disconnect()
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
from src.db import sql_condition as condition
|
from src.db import sql_condition as condition
|
||||||
from src.db.sql_condition import SQLCondition
|
from src.db.sql_condition import SQLCondition
|
||||||
from src.model.db.ultmarc_inst import UltmarcInstDBModel
|
from src.model.db.ultmarc_inst import UltmarcInstDBModel
|
||||||
|
from src.model.db.ultmarc_inst_info import UltmarcInstInfoDBModel
|
||||||
from src.model.request.ultmarc_inst import UltmarcInstModel
|
from src.model.request.ultmarc_inst import UltmarcInstModel
|
||||||
from src.repositories.base_repository import BaseRepository
|
from src.repositories.base_repository import BaseRepository
|
||||||
from src.util.string_util import is_not_empty
|
from src.util.string_util import is_not_empty
|
||||||
@ -95,14 +96,94 @@ class UltmarcInstRepository(BaseRepository):
|
|||||||
where_clauses.append(SQLCondition('inst_addr', condition.LIKE, 'inst_addr'))
|
where_clauses.append(SQLCondition('inst_addr', condition.LIKE, 'inst_addr'))
|
||||||
|
|
||||||
# 削除表示フラグ
|
# 削除表示フラグ
|
||||||
if is_not_empty(parameter.delFlg):
|
if is_not_empty(parameter.delFlg) == False:
|
||||||
# 論理和での検索
|
# 論理和での検索
|
||||||
where_clauses.append(SQLCondition('', '', '(length(abolish_ymd) = 0 OR abolish_ymd IS NULL)', literal=True))
|
where_clauses.append(SQLCondition('', '', '(length(abolish_ymd) = 0 OR abolish_ymd IS NULL)', literal=True))
|
||||||
|
|
||||||
# 検索条件が入力されていない場合
|
# 検索条件が入力されていない場合
|
||||||
if not where_clauses:
|
# if not where_clauses:
|
||||||
where_clauses.append(SQLCondition('', '', '(length(abolish_ymd) = 0 OR abolish_ymd IS NULL)', literal=True))
|
# where_clauses.append(SQLCondition('', '', '(length(abolish_ymd) = 0 OR abolish_ymd IS NULL)', literal=True))
|
||||||
|
|
||||||
where_clauses_str = ' AND '.join([condition.apply() for condition in where_clauses])
|
where_clauses_str = ' AND '.join([condition.apply() for condition in where_clauses])
|
||||||
|
|
||||||
return where_clauses_str
|
return where_clauses_str
|
||||||
|
|
||||||
|
FETCH_ONE_SQL = """\
|
||||||
|
SELECT
|
||||||
|
com_inst.dcf_dsf_inst_cd,
|
||||||
|
com_inst.unconf_flg,
|
||||||
|
com_inst.dup_opp_cd,
|
||||||
|
com_inst.close_start_ym,
|
||||||
|
com_inst.close_flg,
|
||||||
|
com_inst.delete_sche_reason_cd,
|
||||||
|
com_inst.abolish_ymd,
|
||||||
|
com_inst.estab_sche_ym,
|
||||||
|
com_inst.estab_sche_flg,
|
||||||
|
com_inst.form_inst_name_kana,
|
||||||
|
com_inst.form_inst_name_kanji,
|
||||||
|
com_inst.inst_name_kana,
|
||||||
|
com_inst.inst_name_kanji,
|
||||||
|
com_inst.manage_cd,
|
||||||
|
com_inst.postal_number,
|
||||||
|
com_inst.inst_phone_number,
|
||||||
|
com_inst.addr_unknown_reason_cd,
|
||||||
|
com_inst.phone_number_non_flg,
|
||||||
|
com_inst.inst_addr_kana,
|
||||||
|
com_inst.inst_addr,
|
||||||
|
com_inst.re_exam_cd,
|
||||||
|
com_inst.rltd_univ_prnt_cd,
|
||||||
|
com_inst.insp_item_micrb,
|
||||||
|
com_inst.insp_item_serum,
|
||||||
|
com_inst.insp_item_blood,
|
||||||
|
com_inst.insp_item_patho,
|
||||||
|
com_inst.insp_item_paras,
|
||||||
|
com_inst.insp_item_biochem,
|
||||||
|
com_inst.insp_item_ri,
|
||||||
|
com_inst.prmit_bed_num_gen,
|
||||||
|
com_inst.prmit_bed_num_rcup,
|
||||||
|
com_inst.prmit_bed_num_mental,
|
||||||
|
com_inst.prmit_bed_num_infection,
|
||||||
|
com_inst.prmit_bed_num_tuber,
|
||||||
|
com_inst.prmit_bed_num_other,
|
||||||
|
com_inst.prmit_bed_num_sum,
|
||||||
|
com_inst.ward_abolish_flg,
|
||||||
|
com_inst.bed_num,
|
||||||
|
com_inst.prmit_bed_maint_ymd,
|
||||||
|
com_inst.inst_repre_cd,
|
||||||
|
com_inst.inst_repre_kana,
|
||||||
|
com_inst.inst_repre,
|
||||||
|
com_inst.sys_update_date,
|
||||||
|
com_inst_delete_sche_reason.delete_sche_reason,
|
||||||
|
com_inst_div.inst_div_name,
|
||||||
|
com_manage.manage_name,
|
||||||
|
com_hp_assrt.hp_assrt_name,
|
||||||
|
parent_inst.form_inst_name_kanji as parent_name,
|
||||||
|
com_spcare_med_office_dat.dcf_prnt_inst_cd
|
||||||
|
FROM src05.com_inst
|
||||||
|
LEFT JOIN src05.com_inst_div ON com_inst.inst_div_cd = com_inst_div.inst_div_cd
|
||||||
|
LEFT JOIN src05.com_inst_delete_sche_reason ON com_inst.delete_sche_reason_cd = com_inst_delete_sche_reason.delete_sche_reason_cd
|
||||||
|
LEFT JOIN src05.com_manage ON com_inst.manage_cd = com_manage.manage_cd
|
||||||
|
LEFT JOIN src05.com_inst_addr_unknown_reason ON com_inst.addr_unknown_reason_cd = com_inst_addr_unknown_reason.addr_unknown_reason_cd
|
||||||
|
LEFT JOIN src05.com_hp_assrt ON com_hp_assrt.hp_assrt_cd = com_inst.hp_assrt_cd
|
||||||
|
LEFT JOIN src05.com_re_exam ON com_inst.re_exam_cd = com_re_exam.re_exam_cd
|
||||||
|
LEFT JOIN src05.com_spcare_med_office_dat ON com_inst.dcf_dsf_inst_cd = com_spcare_med_office_dat.dcf_chld_inst_cd
|
||||||
|
LEFT JOIN src05.com_inst as parent_inst ON com_inst.rltd_univ_prnt_cd = parent_inst.dcf_dsf_inst_cd
|
||||||
|
WHERE com_inst.dcf_dsf_inst_cd = :id
|
||||||
|
\
|
||||||
|
"""
|
||||||
|
|
||||||
|
def fetch_one(self, id) -> UltmarcInstInfoDBModel:
|
||||||
|
try:
|
||||||
|
self._database.connect()
|
||||||
|
query = self.FETCH_ONE_SQL
|
||||||
|
result = self._database.execute_select(query, {'id': id})
|
||||||
|
models = [UltmarcInstInfoDBModel(**r) for r in result]
|
||||||
|
if len(models) == 0:
|
||||||
|
return None
|
||||||
|
return models[0]
|
||||||
|
except Exception as e:
|
||||||
|
# TODO: ファイルへの書き出しはloggerでやる
|
||||||
|
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||||
|
raise e
|
||||||
|
finally:
|
||||||
|
self._database.disconnect()
|
||||||
|
|||||||
@ -0,0 +1,31 @@
|
|||||||
|
from src.model.db.ultmarc_inst_trt_course import UltmarcInstTrtCourseDBModel
|
||||||
|
from src.repositories.base_repository import BaseRepository
|
||||||
|
|
||||||
|
|
||||||
|
class UltmarcInstTrtCourseRepository(BaseRepository):
|
||||||
|
|
||||||
|
FETCH_SQL = """\
|
||||||
|
SELECT trt_course_name_abb
|
||||||
|
FROM src05.com_inst
|
||||||
|
JOIN src05.com_inst_trt_course ON com_inst.dcf_dsf_inst_cd = com_inst_trt_course.dcf_dsf_inst_cd
|
||||||
|
LEFT JOIN src05.com_trt_course ON com_inst_trt_course.trt_course_cd = com_trt_course.trt_course_cd
|
||||||
|
WHERE com_inst.dcf_dsf_inst_cd = :id
|
||||||
|
ORDER BY com_trt_course.trt_course_cd
|
||||||
|
"""
|
||||||
|
|
||||||
|
def fetch_many(self, id) -> list[UltmarcInstTrtCourseDBModel]:
|
||||||
|
try:
|
||||||
|
self._database.connect()
|
||||||
|
query = self.FETCH_SQL
|
||||||
|
result = self._database.execute_select(query, {'id': id})
|
||||||
|
|
||||||
|
models = [UltmarcInstTrtCourseDBModel(**r) for r in result]
|
||||||
|
if len(models) == 0:
|
||||||
|
return None
|
||||||
|
return models
|
||||||
|
except Exception as e:
|
||||||
|
# TODO: ファイルへの書き出しはloggerでやる
|
||||||
|
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||||
|
raise e
|
||||||
|
finally:
|
||||||
|
self._database.disconnect()
|
||||||
@ -1,4 +1,4 @@
|
|||||||
from src.model.db.ultmarc_trt_course import UltmarcTrtCoursedbmodel
|
from src.model.db.ultmarc_trt_course import UltmarcTrtCourseDBModel
|
||||||
from src.repositories.base_repository import BaseRepository
|
from src.repositories.base_repository import BaseRepository
|
||||||
|
|
||||||
|
|
||||||
@ -13,13 +13,13 @@ class UltmarcTrtCourseRepository(BaseRepository):
|
|||||||
ORDER BY com_trt_course.trt_course_cd
|
ORDER BY com_trt_course.trt_course_cd
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def fetch_many(self, id) -> list[UltmarcTrtCoursedbmodel]:
|
def fetch_many(self, id) -> list[UltmarcTrtCourseDBModel]:
|
||||||
try:
|
try:
|
||||||
self._database.connect()
|
self._database.connect()
|
||||||
query = self.FETCH_SQL
|
query = self.FETCH_SQL
|
||||||
result = self._database.execute_select(query, {'id': id})
|
result = self._database.execute_select(query, {'id': id})
|
||||||
|
|
||||||
models = [UltmarcTrtCoursedbmodel(**r) for r in result]
|
models = [UltmarcTrtCourseDBModel(**r) for r in result]
|
||||||
if len(models) == 0:
|
if len(models) == 0:
|
||||||
return None
|
return None
|
||||||
return models
|
return models
|
||||||
|
|||||||
@ -11,6 +11,7 @@ from src.model.request.ultmarc_doctor import UltmarcDoctorModel
|
|||||||
from src.model.request.ultmarc_inst import UltmarcInstModel
|
from src.model.request.ultmarc_inst import UltmarcInstModel
|
||||||
from src.model.view.ultmarc_doctor_view_model import UltmarcDoctorViewModel
|
from src.model.view.ultmarc_doctor_view_model import UltmarcDoctorViewModel
|
||||||
from src.model.view.ultmarc_inst_view_model import UltmarcInstViewModel
|
from src.model.view.ultmarc_inst_view_model import UltmarcInstViewModel
|
||||||
|
from src.model.view.ultmarc_inst_info_view_model import UltmarcInstInfoViewModel
|
||||||
from src.model.view.ultmarc_doctor_info_view_model import UltmarcDoctorInfoViewModel
|
from src.model.view.ultmarc_doctor_info_view_model import UltmarcDoctorInfoViewModel
|
||||||
from src.repositories.base_repository import BaseRepository
|
from src.repositories.base_repository import BaseRepository
|
||||||
from src.repositories.prefc_master_repository import PrefcMasterRepository
|
from src.repositories.prefc_master_repository import PrefcMasterRepository
|
||||||
@ -18,6 +19,7 @@ from src.repositories.inst_master_repository import InstDivMasterRepository
|
|||||||
from src.repositories.ultmarc_inst_repository import UltmarcInstRepository
|
from src.repositories.ultmarc_inst_repository import UltmarcInstRepository
|
||||||
from src.repositories.ultmarc_doctor_repository import UltmarcDoctorRepository
|
from src.repositories.ultmarc_doctor_repository import UltmarcDoctorRepository
|
||||||
from src.repositories.ultmarc_trt_course_repository import UltmarcTrtCourseRepository
|
from src.repositories.ultmarc_trt_course_repository import UltmarcTrtCourseRepository
|
||||||
|
from src.repositories.ultmarc_inst_trt_course_repository import UltmarcInstTrtCourseRepository
|
||||||
from src.repositories.ultmarc_sosiety_repository import UltmarcSosietyRepository
|
from src.repositories.ultmarc_sosiety_repository import UltmarcSosietyRepository
|
||||||
from src.repositories.ultmarc_dr_wrkplace_repository import UltmarcDoctorWrkplaceRepository
|
from src.repositories.ultmarc_dr_wrkplace_repository import UltmarcDoctorWrkplaceRepository
|
||||||
from src.repositories.ultmarc_dr_wrkplace_his_repository import UltmarcDoctorWrkplaceHisRepository
|
from src.repositories.ultmarc_dr_wrkplace_his_repository import UltmarcDoctorWrkplaceHisRepository
|
||||||
@ -33,6 +35,7 @@ class UltmarcViewService(BaseService):
|
|||||||
'inst_div_repository': InstDivMasterRepository,
|
'inst_div_repository': InstDivMasterRepository,
|
||||||
'ultmarc_inst_repository': UltmarcInstRepository,
|
'ultmarc_inst_repository': UltmarcInstRepository,
|
||||||
'ultmarc_trt_course_repository': UltmarcTrtCourseRepository,
|
'ultmarc_trt_course_repository': UltmarcTrtCourseRepository,
|
||||||
|
'ultmarc_inst_trt_course_repository': UltmarcInstTrtCourseRepository,
|
||||||
'ultmarc_sosiety_repository': UltmarcSosietyRepository,
|
'ultmarc_sosiety_repository': UltmarcSosietyRepository,
|
||||||
'ultmarc_doctor_wrkplace_repository': UltmarcDoctorWrkplaceRepository,
|
'ultmarc_doctor_wrkplace_repository': UltmarcDoctorWrkplaceRepository,
|
||||||
'ultmarc_doctor_wrkplace_his_repository': UltmarcDoctorWrkplaceHisRepository,
|
'ultmarc_doctor_wrkplace_his_repository': UltmarcDoctorWrkplaceHisRepository,
|
||||||
@ -44,6 +47,7 @@ class UltmarcViewService(BaseService):
|
|||||||
inst_div_repository: InstDivMasterRepository
|
inst_div_repository: InstDivMasterRepository
|
||||||
ultmarc_inst_repository: UltmarcInstRepository
|
ultmarc_inst_repository: UltmarcInstRepository
|
||||||
ultmarc_trt_course_repository: UltmarcTrtCourseRepository
|
ultmarc_trt_course_repository: UltmarcTrtCourseRepository
|
||||||
|
ultmarc_inst_trt_course_repository: UltmarcInstTrtCourseRepository
|
||||||
ultmarc_sosiety_repository: UltmarcSosietyRepository
|
ultmarc_sosiety_repository: UltmarcSosietyRepository
|
||||||
ultmarc_doctor_wrkplace_repository: UltmarcDoctorWrkplaceRepository
|
ultmarc_doctor_wrkplace_repository: UltmarcDoctorWrkplaceRepository
|
||||||
ultmarc_doctor_wrkplace_his_repository: UltmarcDoctorWrkplaceHisRepository
|
ultmarc_doctor_wrkplace_his_repository: UltmarcDoctorWrkplaceHisRepository
|
||||||
@ -56,6 +60,7 @@ class UltmarcViewService(BaseService):
|
|||||||
self.inst_div_repository = repositories['inst_div_repository']
|
self.inst_div_repository = repositories['inst_div_repository']
|
||||||
self.ultmarc_inst_repository = repositories['ultmarc_inst_repository']
|
self.ultmarc_inst_repository = repositories['ultmarc_inst_repository']
|
||||||
self.ultmarc_trt_course_repository = repositories['ultmarc_trt_course_repository']
|
self.ultmarc_trt_course_repository = repositories['ultmarc_trt_course_repository']
|
||||||
|
self.ultmarc_inst_trt_course_repository = repositories['ultmarc_inst_trt_course_repository']
|
||||||
self.ultmarc_sosiety_repository = repositories['ultmarc_sosiety_repository']
|
self.ultmarc_sosiety_repository = repositories['ultmarc_sosiety_repository']
|
||||||
self.ultmarc_doctor_wrkplace_repository = repositories['ultmarc_doctor_wrkplace_repository']
|
self.ultmarc_doctor_wrkplace_repository = repositories['ultmarc_doctor_wrkplace_repository']
|
||||||
self.ultmarc_doctor_wrkplace_his_repository = repositories['ultmarc_doctor_wrkplace_his_repository']
|
self.ultmarc_doctor_wrkplace_his_repository = repositories['ultmarc_doctor_wrkplace_his_repository']
|
||||||
@ -93,6 +98,27 @@ class UltmarcViewService(BaseService):
|
|||||||
ultmarc_inst_data = self.ultmarc_inst_repository.fetch_many(parameter=search_params)
|
ultmarc_inst_data = self.ultmarc_inst_repository.fetch_many(parameter=search_params)
|
||||||
return ultmarc_inst_data
|
return ultmarc_inst_data
|
||||||
|
|
||||||
|
def info_ultmarc_inst_view(
|
||||||
|
self,
|
||||||
|
id,
|
||||||
|
session: UserSession
|
||||||
|
) -> UltmarcInstInfoViewModel:
|
||||||
|
|
||||||
|
# 施設情報画面の表示データ取得
|
||||||
|
# 施設情報を取得
|
||||||
|
inst_info = self.ultmarc_inst_repository.fetch_one(id)
|
||||||
|
# 診療科目情報を取得
|
||||||
|
inst_trt_course = self.ultmarc_inst_trt_course_repository.fetch_many(id)
|
||||||
|
# 医師件数を取得
|
||||||
|
doctor_count = self.ultmarc_doctor_wrkplace_repository.fetch_count(id)
|
||||||
|
|
||||||
|
ultmarc = UltmarcInstInfoViewModel(
|
||||||
|
inst_info_data=inst_info,
|
||||||
|
inst_trt_coursed_data=inst_trt_course,
|
||||||
|
doctor_wrkplace_count=doctor_count
|
||||||
|
)
|
||||||
|
return ultmarc
|
||||||
|
|
||||||
def search_doctor_data(self, search_params: UltmarcDoctorModel):
|
def search_doctor_data(self, search_params: UltmarcDoctorModel):
|
||||||
# 医師データを検索
|
# 医師データを検索
|
||||||
ultmarc_doctor_data = self.ultmarc_doctor_repository.fetch_many(parameter=search_params)
|
ultmarc_doctor_data = self.ultmarc_doctor_repository.fetch_many(parameter=search_params)
|
||||||
|
|||||||
@ -19,4 +19,5 @@ DB_PASSWORD = os.environ['DB_PASSWORD']
|
|||||||
DB_SCHEMA = os.environ['DB_SCHEMA']
|
DB_SCHEMA = os.environ['DB_SCHEMA']
|
||||||
|
|
||||||
BIO_SEARCH_RESULT_MAX_COUNT = int(os.environ['BIO_SEARCH_RESULT_MAX_COUNT'])
|
BIO_SEARCH_RESULT_MAX_COUNT = int(os.environ['BIO_SEARCH_RESULT_MAX_COUNT'])
|
||||||
SESSION_EXPIRE_MINUTE=int(os.environ['SESSION_EXPIRE_MINUTE'])
|
SEARCH_RESULT_MAX_COUNT = int(os.environ['SEARCH_RESULT_MAX_COUNT'])
|
||||||
|
SESSION_EXPIRE_MINUTE = int(os.environ['SESSION_EXPIRE_MINUTE'])
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<table class="docHeaderTable">
|
<table class="docHeaderTable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="docHeaderTd"><h1>医師情報</h1></td>
|
<td class="docHeaderTd"><h1>{{ultmarc.subtitle}}</h1></td>
|
||||||
<td class="docHeaderTdCenter docHeaderTdCenter">
|
<td class="docHeaderTdCenter docHeaderTdCenter">
|
||||||
{% if ultmarc.is_batch_processing %}
|
{% if ultmarc.is_batch_processing %}
|
||||||
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||||
@ -50,16 +50,29 @@
|
|||||||
<input type="hidden" name="docId" value="{{ultmarc.DocId}}">
|
<input type="hidden" name="docId" value="{{ultmarc.DocId}}">
|
||||||
<input type="hidden" name="pageNum" id="pageNum" value="{{ultmarc.pageNum}}">
|
<input type="hidden" name="pageNum" id="pageNum" value="{{ultmarc.pageNum}}">
|
||||||
<td class="instHeaderTd">
|
<td class="instHeaderTd">
|
||||||
<input type="button" name="prev" id="prev" value="前" class="transitionBt" {{ultmarc.is_disabled_prev()}}>
|
<input type="button" name="prev" id="prev" value="前" class="transitionBt" {{ultmarc.is_disabled_prev()}}>
|
||||||
</td>
|
</td>
|
||||||
<td class="instHeaderTd">
|
<td class="instHeaderTd">
|
||||||
{{ultmarc.is_pageNum_view()}}/{{ultmarc.postCnt}}
|
{{ultmarc.is_pageNum_view()}}/{{ultmarc.postCnt}}
|
||||||
</td>
|
</td>
|
||||||
<td class="instHeaderTd">
|
<td class="instHeaderTd">
|
||||||
<input type="button" name="next" id="next" value="次" class="transitionBt" {{ultmarc.is_disabled_next()}}>
|
<input type="button" name="next" id="next" value="次" class="transitionBt" {{ultmarc.is_disabled_next()}}>
|
||||||
</td>
|
</td>
|
||||||
</form>
|
</form>
|
||||||
<form name="instSearch" method="get" action="/ultmarc/docSearch">
|
<form id="instSearch" name="instSearch" method="post" action="/ultmarc/docSearch">
|
||||||
|
<script>
|
||||||
|
var form = document.getElementById("instSearch");
|
||||||
|
for (var i = 0, length = sessionStorage.length; i < length; ++i) {
|
||||||
|
let key = sessionStorage.key(i);
|
||||||
|
let value = sessionStorage.getItem(key);
|
||||||
|
const input = document.createElement('input');
|
||||||
|
input.setAttribute('type', 'text');
|
||||||
|
input.value = value;
|
||||||
|
input.name = key;
|
||||||
|
form.appendChild(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
<td class="instHeaderTd">
|
<td class="instHeaderTd">
|
||||||
<input type="submit" name="ctrl_docBackBt" class="transitionBt" value="医師検索一覧へ">
|
<input type="submit" name="ctrl_docBackBt" class="transitionBt" value="医師検索一覧へ">
|
||||||
</td>
|
</td>
|
||||||
@ -175,35 +188,44 @@
|
|||||||
<th>終了年月日</th>
|
<th>終了年月日</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
<script>
|
||||||
|
function OnLinkClick(){
|
||||||
|
sessionStorage.clear();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for doctor_wrkplace_data in ultmarc.doctor_wrkplace_data %}
|
{% for doctor_wrkplace_data in ultmarc.doctor_wrkplace_data %}
|
||||||
{% if ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.dcf_dsf_inst_cd) != ''%}
|
{% if ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.dcf_dsf_inst_cd) != ''%}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.dcf_dsf_inst_cd)}}</td>
|
<td><a href="/ultmarc/instInfo?id={{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.dcf_dsf_inst_cd)}}" onclick="OnLinkClick();">
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.inst_name_kanji)}}</td>
|
{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.dcf_dsf_inst_cd)}}</a></td>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.blng_sec_name)}}</td>
|
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.inst_name_kanji)}}</td>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.univ_post_name)}}</td>
|
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.blng_sec_name)}}</td>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.post_name)}}</td>
|
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.univ_post_name)}}</td>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.aply_start_ymd)}}</td>
|
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.post_name)}}</td>
|
||||||
<td>9999/99/99</td>
|
<td>{{ultmarc.is_input_ymd_fromat(doctor_wrkplace_data.aply_start_ymd)}}</td>
|
||||||
</tr>
|
<td>9999/99/99</td>
|
||||||
{% endif %}
|
</tr>
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
<!-- if ultmarc.is_octor_wrkplace_data_count == 0 -->
|
||||||
{% for doctor_wrkplace_his_data in ultmarc.doctor_wrkplace_his_data %}
|
{% for doctor_wrkplace_his_data in ultmarc.doctor_wrkplace_his_data %}
|
||||||
{% if ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.dcf_dsf_inst_cd) != ''%}
|
{% if ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.dcf_dsf_inst_cd) != ''%}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.dcf_dsf_inst_cd)}}</td>
|
<td><a href="/ultmarc/instInfo?id={{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.dcf_dsf_inst_cd)}}" onclick="OnLinkClick();">
|
||||||
|
{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.dcf_dsf_inst_cd)}}
|
||||||
|
</a></td>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.inst_name_kanji)}}</td>
|
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.inst_name_kanji)}}</td>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.blng_sec_name)}}</td>
|
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.blng_sec_name)}}</td>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.univ_post_name)}}</td>
|
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.univ_post_name)}}</td>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.post_name)}}</td>
|
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.post_name)}}</td>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.aply_start_ymd)}}</td>
|
<td>{{ultmarc.is_input_ymd_fromat(doctor_wrkplace_his_data.aply_start_ymd)}}</td>
|
||||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.aply_end_ymd)}}</td>
|
<td>{{ultmarc.is_input_ymd_fromat(doctor_wrkplace_his_data.aply_end_ymd)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<!-- endif -->
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<table class="docHeaderTable">
|
<table class="docHeaderTable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="docHeaderTd"><h1>医師検索一覧</h1></td>
|
<td class="docHeaderTd"><h1>{{ultmarc.subtitle}}</h1></td>
|
||||||
<td class="docHeaderTdCenter docHeaderTdCenter">
|
<td class="docHeaderTdCenter docHeaderTdCenter">
|
||||||
{% if ultmarc.is_batch_processing %}
|
{% if ultmarc.is_batch_processing %}
|
||||||
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||||
@ -140,7 +140,17 @@
|
|||||||
<tbody id="result_data" class="result_data"></tbody>
|
<tbody id="result_data" class="result_data"></tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
{% if ultmarc.is_form_submitted() and ultmarc.is_data_overflow_max_length() %}
|
||||||
|
<div class="resultAreaMsg">
|
||||||
|
検索結果が最大件数を超えました。検索条件を見直しして下さい。
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if ultmarc.is_form_submitted() and ultmarc.is_data_empty() %}
|
||||||
|
<div class="resultAreaMsg">
|
||||||
|
対象のデータが存在しません。
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!--操作ボタン-->
|
<!--操作ボタン-->
|
||||||
<input class="send ult_bt info_bt" type="submit" name="detail" value="医師情報" >
|
<input class="send ult_bt info_bt" type="submit" name="detail" value="医師情報" >
|
||||||
@ -156,8 +166,24 @@
|
|||||||
const searchResultData = JSON.parse(searchResultString)
|
const searchResultData = JSON.parse(searchResultString)
|
||||||
if (searchResultData.length == 0) {
|
if (searchResultData.length == 0) {
|
||||||
return
|
return
|
||||||
}
|
}else if(searchResultData.length > 500){
|
||||||
$(".pagination").pagination({
|
return
|
||||||
|
}
|
||||||
|
// 検索条件をセッションに入れる
|
||||||
|
sessionStorage.clear();
|
||||||
|
sessionStorage.setItem('ctrl_dcf_pcf_dr_cd','{{ultmarc.is_input_dcf_pcf_dr_cd()}}');
|
||||||
|
sessionStorage.setItem('ctrl_dr_name','{{ultmarc.is_input_dr_name()}}');
|
||||||
|
sessionStorage.setItem('ctrl_dr_name_kana','{{ultmarc.is_input_dr_name_kana()}}');
|
||||||
|
sessionStorage.setItem('ctrl_dcf_dsf_inst_cd','{{ultmarc.is_input_dcf_dsf_inst_cd()}}');
|
||||||
|
sessionStorage.setItem('ctrl_form_inst_name_kanji','{{ultmarc.is_input_form_inst_name_kanji()}}');
|
||||||
|
sessionStorage.setItem('ctrl_form_inst_name_kana','{{ultmarc.is_input_form_inst_name_kana()}}');
|
||||||
|
sessionStorage.setItem('ctrl_prefc_cd','{{ultmarc.is_input_form_prefc_cd()}}');
|
||||||
|
sessionStorage.setItem('ctrl_blng_sec_name','{{ultmarc.is_input_blng_sec_name()}}');
|
||||||
|
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()}}');
|
||||||
|
|
||||||
|
$(".pagination").pagination({
|
||||||
dataSource: function(done) {
|
dataSource: function(done) {
|
||||||
done(searchResultData)
|
done(searchResultData)
|
||||||
},
|
},
|
||||||
@ -175,6 +201,11 @@
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function OnLinkClick(){
|
||||||
|
sessionStorage.clear();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function pagination_content(datas) {
|
function pagination_content(datas) {
|
||||||
const display_keys = [
|
const display_keys = [
|
||||||
'dcf_pcf_dr_cd',
|
'dcf_pcf_dr_cd',
|
||||||
@ -192,7 +223,7 @@
|
|||||||
if(key=='dcf_pcf_dr_cd')
|
if(key=='dcf_pcf_dr_cd')
|
||||||
inner_content = `<a href="/ultmarc/docInfo?id=${data['dcf_pcf_dr_cd']}">${data['dcf_pcf_dr_cd'] || ''}</a>`;
|
inner_content = `<a href="/ultmarc/docInfo?id=${data['dcf_pcf_dr_cd']}">${data['dcf_pcf_dr_cd'] || ''}</a>`;
|
||||||
if(key=='dcf_dsf_inst_cd')
|
if(key=='dcf_dsf_inst_cd')
|
||||||
inner_content = `<a href="/ultmarc/instInfo?id=${data['dcf_dsf_inst_cd']}">${data['form_inst_name_kanji'] || ''}</a>`;
|
inner_content = `<a href="/ultmarc/instInfo?id=${data['dcf_dsf_inst_cd']}" onclick="OnLinkClick()">${data['form_inst_name_kanji'] || ''}</a>`;
|
||||||
return `<td>${inner_content || ''}</td>`
|
return `<td>${inner_content || ''}</td>`
|
||||||
});
|
});
|
||||||
return `
|
return `
|
||||||
@ -208,7 +239,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 配列パラメータを加工にする
|
配列パラメータを加工にする
|
||||||
function CheckBoxListPocessing()
|
function CheckBoxListPocessing()
|
||||||
{
|
{
|
||||||
var vals = []; // 配列を定義
|
var vals = []; // 配列を定義
|
||||||
|
|||||||
285
ecs/jskult-webapp/src/templates/instInfo.html
Normal file
285
ecs/jskult-webapp/src/templates/instInfo.html
Normal file
@ -0,0 +1,285 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ja">
|
||||||
|
<head>
|
||||||
|
{% with subtitle = ultmarc.subtitle %}
|
||||||
|
{% include '_header.html' %}
|
||||||
|
{% endwith %}
|
||||||
|
<link rel="stylesheet" href="/static/css/ultStyle.css">
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.onload = function(){
|
||||||
|
// 見出し固定初期化
|
||||||
|
FixedMidashi.create();
|
||||||
|
// ボタン、テキストボックス初期化
|
||||||
|
formBtDisabled();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
// 前ページ遷移処理
|
||||||
|
$('#prev').click(function(){
|
||||||
|
$('#pageNum').val(Number($('#pageNum').val()) - 1);
|
||||||
|
$('#instInfo').submit();
|
||||||
|
});
|
||||||
|
// 次ページ遷移処理
|
||||||
|
$('#next').click(function(){
|
||||||
|
$('#pageNum').val(Number($('#pageNum').val()) + 1);
|
||||||
|
$('#instInfo').submit();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>
|
||||||
|
{{ultmarc.subtitle}}
|
||||||
|
</h1>
|
||||||
|
{% if ultmarc.is_batch_processing %}
|
||||||
|
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<!-- 上部のボタン -->
|
||||||
|
<table class="instHeaderTable">
|
||||||
|
<tr>
|
||||||
|
<form name="docSearch" method="post" action="/ultmarc/docSearch">
|
||||||
|
<td class="instHeaderTd">
|
||||||
|
<input type="hidden" name="ctrl_dcf_dsf_inst_cd" value="{{ultmarc.is_input_dcf_dsf_inst_cd()}}">
|
||||||
|
<input name="docSearchBt" class="transitionBt" type="submit" value="勤務医師" {{ultmarc.is_disabled_doctor_wrkplace()}}>
|
||||||
|
</td>
|
||||||
|
</form>
|
||||||
|
<form id="instInfo" name="instInfo" method="post" action="/ultmarc/instInfo">
|
||||||
|
<input type="hidden" name="instId" value="{{ultmarc.instId}}">
|
||||||
|
<input type="hidden" name="pageNum" id="pageNum" value="{{ultmarc.pageNum}}">
|
||||||
|
<td class="instHeaderTd">
|
||||||
|
<input type="button" name="prev" id="prev" value="前" class="transitionBt" {{ultmarc.is_disabled_prev()}}>
|
||||||
|
</td>
|
||||||
|
<td class="instHeaderTd">
|
||||||
|
{{ultmarc.is_pageNum_view()}}/{{ultmarc.postCnt}}
|
||||||
|
</td>
|
||||||
|
<td class="instHeaderTd">
|
||||||
|
<input type="button" name="next" id="next" value="次" class="transitionBt" {{ultmarc.is_disabled_next()}}>
|
||||||
|
</td>
|
||||||
|
</form>
|
||||||
|
<form id="instSearch" name="instSearch" method="" action="/ultmarc/instSearch" onsubmit="chg_send_method()">
|
||||||
|
<script>
|
||||||
|
var form = document.getElementById("instSearch");
|
||||||
|
for (var i = 0, length = sessionStorage.length; i < length; ++i) {
|
||||||
|
let key = sessionStorage.key(i);
|
||||||
|
let value = sessionStorage.getItem(key);
|
||||||
|
const input = document.createElement('input');
|
||||||
|
input.setAttribute('type', 'text');
|
||||||
|
input.value = value;
|
||||||
|
input.name = key;
|
||||||
|
form.appendChild(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<td class="instHeaderTd">
|
||||||
|
<input type="submit" name="instSearchBt" class="transitionBt" value="施設検索一覧へ">
|
||||||
|
</td>
|
||||||
|
</form>
|
||||||
|
<script>
|
||||||
|
function chg_send_method(){
|
||||||
|
if(sessionStorage.length == 0){
|
||||||
|
$('#instSearch')('method', 'GET');
|
||||||
|
}else{
|
||||||
|
$('#instSearch').attr('method', 'POST');
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- 施設情報 -->
|
||||||
|
<table class="instInfoTable">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">施設コード</td>
|
||||||
|
<td class="instData instDataLeft">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_dcf_dsf_inst_cd()}}" class="instCdTextbox">
|
||||||
|
<input class="checkbox" type="checkbox" disabled="disabled" {{ultmarc.is_checked_unconf_flg()}}>未確認
|
||||||
|
</td>
|
||||||
|
<td class="instInfoColumn">施設コード変換先</td>
|
||||||
|
<td class="instData instDataCenter">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_dup_opp_cd()}}" class="instDataCenterTextbox">
|
||||||
|
</td>
|
||||||
|
<td class="instInfoColumn">休院店開始年月</td>
|
||||||
|
<td class="instData instDataRight">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_close_start_ym()}}" class="instDataSmallTextbox">
|
||||||
|
<input type="checkbox" disabled="disabled" {{ultmarc.is_checked_close_flg()}}>休院店
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">削除予定理由</td>
|
||||||
|
<td class="instData instDataLeft"><input type="text" readonly="readonly" value="{{ultmarc.is_input_delete_sche_reason_cd()}}" class="delReasonCdTextbox"><input type="text" readonly="readonly" value="{{ultmarc.is_input_delete_sche_reason()}}" class="delReasonTextbox"></td>
|
||||||
|
<td class="instInfoColumn">削除日</td>
|
||||||
|
<td class="instData instDataCenter">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_abolish_ymd()}}" class="instDataCenterTextbox">
|
||||||
|
</td>
|
||||||
|
<td class="instInfoColumn">開業予定年月</td>
|
||||||
|
<td class="instData instDataRight">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_estab_sche_ym()}}" class="instDataSmallTextbox">
|
||||||
|
<input type="checkbox" disabled="disabled" {{ultmarc.is_checked_estab_sche_flg()}}>開業
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">正式施設名(カナ)</td>
|
||||||
|
<td class="instData" colspan="5"><input type="text" readonly="readonly" value="{{ultmarc.is_input_form_inst_name_kana()}}" class="instInfoTextbox"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">正式施設名(漢字)</td>
|
||||||
|
<td class="instData" colspan="5"><input type="text" readonly="readonly" value="{{ultmarc.is_input_form_inst_name_kanji()}}" class="instInfoTextbox"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">略式施設名(カナ)</td>
|
||||||
|
<td class="instData instDataMid" colspan="3"><input type="text" readonly="readonly" value="{{ultmarc.is_input_inst_name_kana()}}" class="instInfoTextbox"></td>
|
||||||
|
<td class="instInfoColumn">施設区分名</td>
|
||||||
|
<td class="instData instDataSmall"><input type="text" readonly="readonly" value="{{ultmarc.is_input_inst_div_name()}}" class="instInfoTextbox"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">略式施設名(漢字)</td>
|
||||||
|
<td class="instData instDataMid" colspan="3"><input type="text" readonly="readonly" value="{{ultmarc.is_input_inst_name_kanji()}}" class="instInfoTextbox"></td>
|
||||||
|
<td class="instInfoColumn">経営体</td>
|
||||||
|
<td class="instData instDataSmall">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_manage_cd()}}" class="manageTextbox">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_manage_name()}}" class="textboxMargin manageTextbox">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">郵便番号</td>
|
||||||
|
<td class="instData instDataMid" colspan="3">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_postal_number()}}">
|
||||||
|
<input type="checkbox" class="checkboxMargin" disabled="disabled" {{ultmarc.is_checked_addr_unknown_reason_cd()}}>住所不明
|
||||||
|
</td>
|
||||||
|
<td class="instInfoColumn">施設電話番号</td>
|
||||||
|
<td class="instData instDataRight">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_inst_phone_number()}}" class="instDataSmallTextbox">
|
||||||
|
<input type="checkbox" class="checkboxMargin" disabled="disabled" {{ultmarc.is_checked_phone_number_non_flg()}}>電話なし
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">住所(カナ)</td>
|
||||||
|
<td class="instData instDataLarge" colspan="5"><input type="text" readonly="readonly" value="{{ultmarc.is_input_inst_addr_kana()}}" class="instInfoTextbox"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">住所(漢字)</td>
|
||||||
|
<td class="instData instDataLarge" colspan="5"><input type="text" readonly="readonly" value="{{ultmarc.is_input_inst_addr()}}" class="instInfoTextbox"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<!-- 病院情報 -->
|
||||||
|
<table class="instInfoTableHalf1">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="hpInfoColumn">病院種別</td>
|
||||||
|
<td class="instData hpAssrtTd"><input type="text" readonly="readonly" value="{{ultmarc.is_input_hp_assrt_name()}}" class="hpAssrtTextbox"></td>
|
||||||
|
<td class="instData reExamTd"><input type="checkbox" disabled="disabled" {{ultmarc.is_checked_re_exam_cd()}}>再審査区分</input></td>
|
||||||
|
<td class="hpInfoColumn">関連大学親名</td>
|
||||||
|
<td class="instData">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_rltd_univ_prnt_cd()}}" class="parentCdTextBox">
|
||||||
|
<input type="text" readonly="readonly" value="{{ultmarc.is_input_parent_name()}}" class="parentNameTextBox">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="hpInfoColumn">診療科目</td>
|
||||||
|
<td class="instData border_bottom_none" colspan="4">
|
||||||
|
{% if ultmarc.inst_trt_coursed_data != None %}
|
||||||
|
{% for inst_trt_course_data in ultmarc.inst_trt_coursed_data %}
|
||||||
|
<input class="trtCourseTextbox" type="text" readonly="readonly" value="{{inst_trt_course_data.trt_course_name_abb}}">
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% for i in range(60-ultmarc.is_input_inst_trt_course_data_size()) %}
|
||||||
|
<input class="trtCourseTextbox" type="text" readonly="readonly">
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="hpInfoColumn">検査工程</td>
|
||||||
|
<td class="instData" colspan="4">
|
||||||
|
<label>微生物</label>
|
||||||
|
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.is_input_insp_item_micrb()}}">
|
||||||
|
<label>血清</label>
|
||||||
|
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.is_input_insp_item_serum()}}">
|
||||||
|
<label>血液</label>
|
||||||
|
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.is_input_insp_item_blood()}}">
|
||||||
|
<label>病理</label>
|
||||||
|
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.is_input_insp_item_patho()}}">
|
||||||
|
<label>寄生虫</label>
|
||||||
|
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.is_input_insp_item_paras()}}">
|
||||||
|
<label>生化</label>
|
||||||
|
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.is_input_insp_item_biochem()}}">
|
||||||
|
<label>RI</label>
|
||||||
|
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.is_input_insp_item_ri()}}">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="instInfoTableHalf2">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="hpInfoColumn">特務医務室</td>
|
||||||
|
<td class="instData xSmallTd"><input type="text" readonly="readonly" value="{{ultmarc.is_input_dcf_prnt_inst_cd()}}" class="xSmallTextbox"></td>
|
||||||
|
<td rowspan="2" class="hpInfoColumn">許可病床数</td>
|
||||||
|
<td class="instData bedTd" rowspan="2">
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>一般</td>
|
||||||
|
<td>療養</td>
|
||||||
|
<td>精神</td>
|
||||||
|
<td>感染症</td>
|
||||||
|
<td>結核</td>
|
||||||
|
<td>その他</td>
|
||||||
|
<td>合計</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.is_input_prmit_bed_num_gen()}}"></td>
|
||||||
|
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.is_input_prmit_bed_num_rcup()}}"></td>
|
||||||
|
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.is_input_prmit_bed_num_mental()}}"></td>
|
||||||
|
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.is_input_prmit_bed_num_infection()}}"></td>
|
||||||
|
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.is_input_prmit_bed_num_tuber()}}"></td>
|
||||||
|
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.is_input_prmit_bed_num_other()}}"></td>
|
||||||
|
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.is_input_prmit_bed_num_sum()}}"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td class="instData" colspan="2"><input type="checkbox" disabled="disabled" {{ultmarc.is_checked_ward_abolish_flg()}}>病棟閉鎖 <input type="checkbox" disabled="disabled" {{ultmarc.is_checked_ward_abolish_flg_part()}}>一部病棟閉鎖</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="hpInfoColumn">病床数(定員)</td>
|
||||||
|
<td class="instData"><input type="text" readonly="readonly" value="{{ultmarc.is_input_bed_num()}}" class="xSmallTextbox numberBox"></td>
|
||||||
|
<td class="hpInfoColumn">メンテ年月日</td>
|
||||||
|
<td class="instData xSmallTd"><input type="text" readonly="readonly" value="{{ultmarc.is_input_prmit_bed_maint_ymd()}}" class="xSmallTextbox"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!-- 施設代表者 -->
|
||||||
|
<table class="instInfoTable">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">代表者個人コード</td>
|
||||||
|
<td class="instData repreTd"><input type="text" readonly="readonly" value="{{ultmarc.is_input_inst_repre_cd()}}" class="repreTextbox"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">施設代表者(カナ)</td>
|
||||||
|
<td class="instData repreTd"><input type="text" readonly="readonly" value="{{ultmarc.is_input_inst_repre_kana()}}" class="repreTextbox"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">施設代表者(漢字)</td>
|
||||||
|
<td class="instData repreTd"><input type="text" readonly="readonly" value="{{ultmarc.is_input_inst_repre()}}" class="repreTextbox"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="instInfoColumn">修正年月日</td>
|
||||||
|
<td class="instData repreTd"><input type="text" readonly="readonly" value="{{ultmarc.is_input_sys_update_date()}}" class="repreTextbox"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -7,7 +7,7 @@
|
|||||||
<link rel="stylesheet" href="/static/css/ultStyle.css">
|
<link rel="stylesheet" href="/static/css/ultStyle.css">
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
controlCount = 11; // 検索フォームの入力ボックスの数 アルトマーク課題管理表No.2の修正
|
controlCount = 8; // 検索フォームの入力ボックスの数 アルトマーク課題管理表No.2の修正
|
||||||
|
|
||||||
window.onload = function(){
|
window.onload = function(){
|
||||||
// 見出し固定初期化
|
// 見出し固定初期化
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<!-- タイトルと上部ボタン -->
|
<!-- タイトルと上部ボタン -->
|
||||||
<table class="instSearchHeaderTable">
|
<table class="instSearchHeaderTable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="instSearchHeaderTd"><h1>施設検索一覧</h1></td>
|
<td class="instSearchHeaderTd"><h1>{{ultmarc.subtitle}}</h1></td>
|
||||||
<td class="instSearchHeaderTdCenter instSearchHeaderTdCenter">
|
<td class="instSearchHeaderTdCenter instSearchHeaderTdCenter">
|
||||||
{% if ultmarc.is_batch_processing %}
|
{% if ultmarc.is_batch_processing %}
|
||||||
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||||
@ -33,14 +33,14 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<!-- 入力フォーム -->
|
<!-- 入力フォーム -->
|
||||||
<form class="_form" name="search" action="/ultmarc/instSearch" method="POST">
|
<form id="inst_search" class="_form" name="search" action="/ultmarc/instSearch" method="POST">
|
||||||
<table class="search_table">
|
<table class="search_table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>ULT施設コード:</td>
|
<td>ULT施設コード:</td>
|
||||||
<td class="search_tb leftSearch_tb">
|
<td class="search_tb leftSearch_tb">
|
||||||
<input class="text search_textbox" style="ime-mode:disabled;" type="text" name="ctrl_dcf_dsf_inst_cd"
|
<input class="text search_textbox" style="ime-mode:disabled;" type="text" name="ctrl_dcf_dsf_inst_cd"
|
||||||
value="{{ultmarc.is_input_dcf_dsf_inst_cdd()}}" oninput="formBtDisabled()">
|
value="{{ultmarc.is_input_dcf_dsf_inst_cd()}}" oninput="formBtDisabled()">
|
||||||
</td>
|
</td>
|
||||||
<td>施設区分:</td>
|
<td>施設区分:</td>
|
||||||
<td class="search_tb">
|
<td class="search_tb">
|
||||||
@ -93,8 +93,8 @@
|
|||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" name="ctrl_delFlg" value="true"
|
<label><input type="checkbox" name="ctrl_delFlg" value="true"
|
||||||
onchange="formBtDisabled()" {{ultmarc.is_checked_delFlg()}}> 削除施設表示
|
onchange="formBtDisabled()" {{ultmarc.is_checked_delFlg()}}> 削除施設表示</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -103,7 +103,6 @@
|
|||||||
<input class="text search_textbox" type="text" name="ctrl_inst_addr"
|
<input class="text search_textbox" type="text" name="ctrl_inst_addr"
|
||||||
value="{{ultmarc.is_input_inst_addr()}}" oninput="formBtDisabled()">
|
value="{{ultmarc.is_input_inst_addr()}}" oninput="formBtDisabled()">
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="search_btTd" colspan="2">
|
<td class="search_btTd" colspan="2">
|
||||||
<input class="text ult_bt search_bt" id="clear" type="button" name="clear_bt" value="クリア" onclick="clr()">
|
<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">
|
<input class="ult_bt search_bt" id="search_bt" name="search_bt" value="検索" type="submit">
|
||||||
@ -116,9 +115,9 @@
|
|||||||
<!--検索結果-->
|
<!--検索結果-->
|
||||||
<form class="_form" name="result" action="/ultmarc/instInfo" method="POST" onsubmit="CheckBoxListPocessing()">
|
<form class="_form" name="result" action="/ultmarc/instInfo" method="POST" onsubmit="CheckBoxListPocessing()">
|
||||||
<input type="button" name="allon" onclick="allOn()" value="全選択" class="ult_bt allOnOffButton">
|
<input type="button" name="allon" onclick="allOn()" value="全選択" class="ult_bt allOnOffButton">
|
||||||
<!-- <?php if ($dtCnt['countNum'] <= 0){ echo "disabled"; } ? -->
|
|
||||||
<input type="button" name="alloff" onclick="allOff()" value="全解除" class="ult_bt allOnOffButton">
|
<input type="button" name="alloff" onclick="allOff()" value="全解除" class="ult_bt allOnOffButton">
|
||||||
<!-- <?php if ($dtCnt['countNum'] <= 0){ echo "disabled"; } ?> -->
|
<input type="hidden" name="instId" id="instId" value="">
|
||||||
|
<input type="hidden" name="pageNum" value="0">
|
||||||
<!--検索件数-->
|
<!--検索件数-->
|
||||||
<!--ページネーション-->
|
<!--ページネーション-->
|
||||||
<div id="light-pagination" class="pagination"></div>
|
<div id="light-pagination" class="pagination"></div>
|
||||||
@ -141,7 +140,18 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody id="result_data" class="result_data"></tbody>
|
<tbody id="result_data" class="result_data"></tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
{% if ultmarc.is_form_submitted() and ultmarc.is_data_overflow_max_length() %}
|
||||||
|
<div class="resultAreaMsg">
|
||||||
|
検索結果が最大件数を超えました。検索条件を見直しして下さい。
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if ultmarc.is_form_submitted() and ultmarc.is_data_empty() %}
|
||||||
|
<div class="resultAreaMsg">
|
||||||
|
対象のデータが存在しません。
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<!--操作ボタン-->
|
<!--操作ボタン-->
|
||||||
<input class="send ult_bt info_bt" type="submit" name="detail" value="施設情報">
|
<input class="send ult_bt info_bt" type="submit" name="detail" value="施設情報">
|
||||||
</form>
|
</form>
|
||||||
@ -149,14 +159,29 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// <! --ページネーションの作成-- >
|
// <! --ページネーションの作成-- >
|
||||||
$(function() {
|
$(function() {
|
||||||
// スピナー出さない場合は以下、エスケープせず埋め込む
|
// {% autoescape False%}
|
||||||
// {% autoescape False%}
|
let searchResultString = '{{ultmarc.ultmarc_data_json_str()}}'
|
||||||
let searchResultString = '{{ultmarc.ultmarc_data_json_str()}}'
|
|
||||||
// {% endautoescape%}
|
// {% endautoescape%}
|
||||||
const searchResultData = JSON.parse(searchResultString)
|
const searchResultData = JSON.parse(searchResultString)
|
||||||
if (searchResultData.length == 0) {
|
if (searchResultData.length == 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (searchResultData.length > 500) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 検索条件をセッションに入れる
|
||||||
|
sessionStorage.clear();
|
||||||
|
sessionStorage.setItem('ctrl_dcf_dsf_inst_cd','{{ultmarc.is_input_dcf_dsf_inst_cd()}}');
|
||||||
|
sessionStorage.setItem('ctrl_inst_div_cd','{{ultmarc.is_input_form_inst_div_cd()}}');
|
||||||
|
sessionStorage.setItem('ctrl_form_inst_name_kanji','{{ultmarc.is_input_form_inst_name_kanji()}}');
|
||||||
|
sessionStorage.setItem('ctrl_form_inst_name_kana','{{ultmarc.is_input_form_inst_name_kana()}}');
|
||||||
|
sessionStorage.setItem('ctrl_postal_number','{{ultmarc.is_input_postal_number()}}');
|
||||||
|
sessionStorage.setItem('ctrl_inst_phone_number','{{ultmarc.is_input_inst_phone_number()}}');
|
||||||
|
sessionStorage.setItem('ctrl_prefc_cd','{{ultmarc.is_input_form_prefc_cd()}}');
|
||||||
|
sessionStorage.setItem('ctrl_delFlg','{{ultmarc.is_input_delFlg()}}');
|
||||||
|
sessionStorage.setItem('ctrl_inst_addr','{{ultmarc.is_input_inst_addr()}}');
|
||||||
|
|
||||||
$(".pagination").pagination({
|
$(".pagination").pagination({
|
||||||
dataSource: function(done) {
|
dataSource: function(done) {
|
||||||
done(searchResultData)
|
done(searchResultData)
|
||||||
@ -187,6 +212,7 @@
|
|||||||
'hp_assrt_name',
|
'hp_assrt_name',
|
||||||
'prefc_name'
|
'prefc_name'
|
||||||
];
|
];
|
||||||
|
|
||||||
return datas.map(function (data) {
|
return datas.map(function (data) {
|
||||||
let td = display_keys.map((key) =>{
|
let td = display_keys.map((key) =>{
|
||||||
let inner_content = data[key];
|
let inner_content = data[key];
|
||||||
@ -207,6 +233,16 @@
|
|||||||
`
|
`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 配列パラメータを加工にする
|
||||||
|
function CheckBoxListPocessing()
|
||||||
|
{
|
||||||
|
var vals = []; // 配列を定義
|
||||||
|
$('input[name="data"]:checked').each(function() {
|
||||||
|
vals.push( $(this).val() ); // 配列に値を追加
|
||||||
|
});
|
||||||
|
$("#instId").val(vals.join(','));
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@ -4,3 +4,4 @@ AUTHORIZE_ENDPOINT=oauth2/authorize
|
|||||||
TOKEN_ENDPOINT=oauth2/token
|
TOKEN_ENDPOINT=oauth2/token
|
||||||
BIO_SEARCH_RESULT_MAX_COUNT=35000
|
BIO_SEARCH_RESULT_MAX_COUNT=35000
|
||||||
SESSION_EXPIRE_MINUTE=20
|
SESSION_EXPIRE_MINUTE=20
|
||||||
|
SEARCH_RESULT_MAX_COUNT=500
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user