医師情報検索結果1件表示
This commit is contained in:
parent
90944307ae
commit
16a62a9cfc
@ -7,10 +7,8 @@ from starlette import status
|
||||
from src.depends.services import get_service
|
||||
from src.model.internal.session import UserSession
|
||||
from src.model.request.ultmarc_doctor import UltmarcDoctorModel
|
||||
from src.model.view.bio_view_model import BioViewModel
|
||||
from src.router.session_router import AuthenticatedRoute
|
||||
from src.services.batch_status_service import BatchStatusService
|
||||
from src.services.bio_view_service import BioViewService
|
||||
from src.services.ultmarc_view_service import UltmarcViewService
|
||||
from src.services.session_service import set_session
|
||||
from src.system_var import constants
|
||||
@ -97,3 +95,40 @@ def search_doc(
|
||||
headers={'session_key': session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
|
||||
@router.get('/docInfo')
|
||||
def ultmarc_doctor_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()
|
||||
|
||||
# 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.is_batch_processing = is_batch_processing
|
||||
|
||||
# セッション書き換え
|
||||
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(
|
||||
'docInfo.html', {
|
||||
'request': request,
|
||||
'ultmarc': ultmarc,
|
||||
},
|
||||
headers={'session_key': session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
18
ecs/jskult-webapp/src/model/db/ultmarc_doctor_info.py
Normal file
18
ecs/jskult-webapp/src/model/db/ultmarc_doctor_info.py
Normal file
@ -0,0 +1,18 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcDoctorInfoDBModel(BaseDBModel):
|
||||
dcf_pcf_dr_cd: Optional[str]
|
||||
dr_name: Optional[str]
|
||||
dr_name_kana: Optional[str]
|
||||
sex: Optional[str]
|
||||
birthday: Optional[str]
|
||||
alma: Optional[str]
|
||||
hometown: Optional[str]
|
||||
grad_y: Optional[str]
|
||||
drday_y: Optional[str]
|
||||
estab_y: Optional[str]
|
||||
15
ecs/jskult-webapp/src/model/db/ultmarc_doctor_wrkplace.py
Normal file
15
ecs/jskult-webapp/src/model/db/ultmarc_doctor_wrkplace.py
Normal file
@ -0,0 +1,15 @@
|
||||
from typing import Optional
|
||||
from datetime import date
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcDoctorWrkplaceDBModel(BaseDBModel):
|
||||
dcf_dsf_inst_cd: Optional[str]
|
||||
inst_name_kanji: Optional[str]
|
||||
blng_sec_name: Optional[str]
|
||||
univ_post_name: Optional[str]
|
||||
post_name: Optional[str]
|
||||
aply_start_ymd: Optional[date]
|
||||
@ -0,0 +1,16 @@
|
||||
from typing import Optional
|
||||
from datetime import date
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcDoctorWrkplaceHisDBModel(BaseDBModel):
|
||||
dcf_dsf_inst_cd: Optional[str]
|
||||
inst_name_kanji: Optional[str]
|
||||
blng_sec_name: Optional[str]
|
||||
univ_post_name: Optional[str]
|
||||
post_name: Optional[str]
|
||||
aply_start_ymd: Optional[date]
|
||||
aply_end_ymd: Optional[date]
|
||||
10
ecs/jskult-webapp/src/model/db/ultmarc_sosiety.py
Normal file
10
ecs/jskult-webapp/src/model/db/ultmarc_sosiety.py
Normal file
@ -0,0 +1,10 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcSosietyDBModel(BaseDBModel):
|
||||
sosiety_cd: Optional[str]
|
||||
sosiety_name: Optional[str]
|
||||
10
ecs/jskult-webapp/src/model/db/ultmarc_specialist_license.py
Normal file
10
ecs/jskult-webapp/src/model/db/ultmarc_specialist_license.py
Normal file
@ -0,0 +1,10 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcSpecialistLicenseDBModel(BaseDBModel):
|
||||
specialist_cd: Optional[str]
|
||||
specialist_license_name: Optional[str]
|
||||
9
ecs/jskult-webapp/src/model/db/ultmarc_trt_course.py
Normal file
9
ecs/jskult-webapp/src/model/db/ultmarc_trt_course.py
Normal file
@ -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 UltmarcTrtCoursedbmodel(BaseDBModel):
|
||||
trt_course_name: Optional[str]
|
||||
@ -0,0 +1,97 @@
|
||||
import json
|
||||
from collections import OrderedDict
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from src.model.db.ultmarc_doctor_info import UltmarcDoctorInfoDBModel
|
||||
from src.model.db.ultmarc_trt_course import UltmarcTrtCoursedbmodel
|
||||
from src.model.db.ultmarc_sosiety import UltmarcSosietyDBModel
|
||||
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_his import UltmarcDoctorWrkplaceHisDBModel
|
||||
|
||||
from src.system_var import environment
|
||||
|
||||
|
||||
class UltmarcDoctorInfoViewModel(BaseModel):
|
||||
subtitle: str = '医師情報'
|
||||
is_batch_processing: Optional[bool]
|
||||
doctor_info_data: Optional[UltmarcDoctorInfoDBModel]
|
||||
trt_coursed_data: Optional[list[UltmarcTrtCoursedbmodel]]
|
||||
sosiety_data: Optional[list[UltmarcSosietyDBModel]]
|
||||
specialist_license_data: Optional[list[UltmarcSpecialistLicenseDBModel]]
|
||||
doctor_wrkplace_data: Optional[list[UltmarcDoctorWrkplaceDBModel]]
|
||||
doctor_wrkplace_his_data: Optional[list[UltmarcDoctorWrkplaceHisDBModel]]
|
||||
|
||||
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):
|
||||
return self.doctor_info_data.dcf_pcf_dr_cd or ''
|
||||
|
||||
# 氏名(漢字)
|
||||
def is_input_dr_name(self):
|
||||
return self.doctor_info_data.dr_name or ''
|
||||
|
||||
# 氏名(かな・カナ)
|
||||
def is_input_dr_name_kana(self):
|
||||
return self.doctor_info_data.dr_name_kana or ''
|
||||
|
||||
# 性別
|
||||
def is_input_sex(self):
|
||||
return self.doctor_info_data.sex or ''
|
||||
|
||||
# 出身大学
|
||||
def is_input_alma(self):
|
||||
return self.doctor_info_data.alma or ''
|
||||
|
||||
# 出身県
|
||||
def is_input_hometown(self):
|
||||
return self.doctor_info_data.hometown or ''
|
||||
|
||||
# 卒年
|
||||
def is_input_grad_y(self):
|
||||
return self.doctor_info_data.grad_y or ''
|
||||
|
||||
# 登録年
|
||||
def is_input_drday_y(self):
|
||||
return self.doctor_info_data.drday_y or ''
|
||||
|
||||
# 開業年
|
||||
def is_input_estab_y(self):
|
||||
return self.doctor_info_data.estab_y or ''
|
||||
|
||||
def is_input_birthday_fromat(self):
|
||||
return self._format_date_string(self.doctor_info_data.birthday)
|
||||
|
||||
def is_input_trt_course_data_size(self):
|
||||
return len(self.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.BIO_SEARCH_RESULT_MAX_COUNT
|
||||
|
||||
def _format_date_string(self, date_string):
|
||||
if date_string is None:
|
||||
return ''
|
||||
date = datetime.strptime(date_string, '%Y%m%d')
|
||||
return date.strftime('%Y/%m/%d')
|
||||
|
||||
def _selected_value(self, form_value: str, current_value: str):
|
||||
return 'selected' if form_value == current_value else ''
|
||||
@ -2,6 +2,7 @@ from src.db import sql_condition as condition
|
||||
from src.db.sql_condition import SQLCondition
|
||||
from src.model.db.ultmarc_doctor import UltmarcDoctorDBModel
|
||||
from src.model.request.ultmarc_doctor import UltmarcDoctorModel
|
||||
from src.model.db.ultmarc_doctor_info import UltmarcDoctorInfoDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
from src.util.string_util import is_not_empty
|
||||
|
||||
@ -15,7 +16,7 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
com_inst.form_inst_name_kanji,
|
||||
com_inst.dcf_dsf_inst_cd,
|
||||
com_blng_sec.blng_sec_name,
|
||||
com_trt_course.trt_course_name,
|
||||
GROUP_CONCAT(com_trt_course.trt_course_name separator ' / ') AS trt_course_name,
|
||||
com_post.form_post_name,
|
||||
com_alma.alma,
|
||||
com_dr.grad_y,
|
||||
@ -33,6 +34,7 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
LEFT JOIN src05.com_alma ON com_dr.alma_cd = com_alma.alma_cd
|
||||
WHERE
|
||||
{where_clause}
|
||||
GROUP BY com_dr.dcf_pcf_dr_cd
|
||||
ORDER BY
|
||||
com_dr.dcf_pcf_dr_cd,
|
||||
com_dr_wrkplace.dcf_dsf_inst_cd,
|
||||
@ -128,3 +130,38 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
where_clauses_str = ' AND '.join([condition.apply() for condition in where_clauses])
|
||||
|
||||
return where_clauses_str
|
||||
|
||||
FETCH_ONE_SQL = """\
|
||||
SELECT
|
||||
com_dr.dcf_pcf_dr_cd,
|
||||
com_dr.dr_name,
|
||||
com_dr.dr_name_kana,
|
||||
com_sex.sex,
|
||||
com_dr.birthday,
|
||||
com_alma.alma,
|
||||
com_hometown.hometown,
|
||||
com_dr.grad_y,
|
||||
com_dr.drday_y,
|
||||
com_dr.estab_y
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_sex ON com_dr.sex_cd = com_sex.sex_cd
|
||||
LEFT JOIN src05.com_alma ON com_dr.alma_cd = com_alma.alma_cd
|
||||
LEFT JOIN src05.com_hometown ON com_dr.hometown_cd = com_hometown.hometown_cd
|
||||
WHERE dcf_pcf_dr_cd = :id
|
||||
"""
|
||||
|
||||
def fetch_one(self, id) -> UltmarcDoctorInfoDBModel:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_ONE_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcDoctorInfoDBModel(**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,39 @@
|
||||
from src.model.db.ultmarc_doctor_wrkplace_his import UltmarcDoctorWrkplaceHisDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcDoctorWrkplaceHisRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT
|
||||
com_inst.dcf_dsf_inst_cd,
|
||||
com_inst.inst_name_kanji,
|
||||
com_blng_sec.blng_sec_name,
|
||||
univ_post.form_post_name AS univ_post_name,
|
||||
post.form_post_name AS post_name,
|
||||
com_dr_wrkplace.aply_start_ymd
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_wrkplace ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_inst ON com_dr_wrkplace.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||
LEFT JOIN src05.com_blng_sec ON com_dr_wrkplace.blng_sec_cd = com_blng_sec.blng_sec_cd
|
||||
LEFT JOIN src05.com_post as univ_post ON com_dr_wrkplace.identity_cd = univ_post.post_cd
|
||||
LEFT JOIN src05.com_post as post ON com_dr_wrkplace.post_cd = post.post_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_dr_wrkplace.aply_start_ymd DESC
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> list[UltmarcDoctorWrkplaceHisDBModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcDoctorWrkplaceHisDBModel(**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()
|
||||
@ -0,0 +1,39 @@
|
||||
from src.model.db.ultmarc_doctor_wrkplace import UltmarcDoctorWrkplaceDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcDoctorWrkplaceRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT
|
||||
com_inst.dcf_dsf_inst_cd,
|
||||
com_inst.inst_name_kanji,
|
||||
com_blng_sec.blng_sec_name,
|
||||
univ_post.form_post_name AS univ_post_name,
|
||||
post.form_post_name AS post_name,
|
||||
com_dr_wrkplace.aply_start_ymd
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_wrkplace ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_inst ON com_dr_wrkplace.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||
LEFT JOIN src05.com_blng_sec ON com_dr_wrkplace.blng_sec_cd = com_blng_sec.blng_sec_cd
|
||||
LEFT JOIN src05.com_post as univ_post ON com_dr_wrkplace.identity_cd = univ_post.post_cd
|
||||
LEFT JOIN src05.com_post as post ON com_dr_wrkplace.post_cd = post.post_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_dr_wrkplace.aply_start_ymd DESC
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> list[UltmarcDoctorWrkplaceDBModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcDoctorWrkplaceDBModel(**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()
|
||||
@ -0,0 +1,30 @@
|
||||
from src.model.db.ultmarc_sosiety import UltmarcSosietyDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcSosietyRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT com_sosiety.sosiety_cd, com_sosiety.sosiety_name
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_sosiety ON com_dr.dcf_pcf_dr_cd = com_dr_sosiety.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_sosiety ON com_dr_sosiety.sosiety_cd = com_sosiety.sosiety_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_sosiety.sosiety_cd
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> list[UltmarcSosietyDBModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcSosietyDBModel(**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()
|
||||
@ -0,0 +1,31 @@
|
||||
from src.model.db.ultmarc_specialist_license import UltmarcSpecialistLicenseDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcSpecialistLicenseRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT
|
||||
com_specialist_license.specialist_cd, com_specialist_license.specialist_license_name
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_sp_field ON com_dr.dcf_pcf_dr_cd = com_sp_field.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_specialist_license ON com_sp_field.specialist_cd = com_specialist_license.specialist_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_specialist_license.specialist_cd
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> UltmarcSpecialistLicenseDBModel:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcSpecialistLicenseDBModel(**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()
|
||||
@ -0,0 +1,31 @@
|
||||
from src.model.db.ultmarc_trt_course import UltmarcTrtCoursedbmodel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcTrtCourseRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT trt_course_name
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_trt_course ON com_dr.dcf_pcf_dr_cd = com_dr_trt_course.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_trt_course ON com_dr_trt_course.trt_course_cd = com_trt_course.trt_course_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_trt_course.trt_course_cd
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> list[UltmarcTrtCoursedbmodel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
|
||||
models = [UltmarcTrtCoursedbmodel(**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()
|
||||
@ -9,9 +9,15 @@ from src.aws.s3 import S3Client
|
||||
from src.model.internal.session import UserSession
|
||||
from src.model.request.ultmarc_doctor import UltmarcDoctorModel
|
||||
from src.model.view.ultmarc_doctor_view_model import UltmarcDoctorViewModel
|
||||
from src.model.view.ultmarc_doctor_info_view_model import UltmarcDoctorInfoViewModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
from src.repositories.prefc_master_repository import PrefcMasterRepository
|
||||
from src.repositories.ultmarc_doctor_repository import UltmarcDoctorRepository
|
||||
from src.repositories.ultmarc_trt_course_repository import UltmarcTrtCourseRepository
|
||||
from src.repositories.ultmarc_sosiety_repository import UltmarcSosietyRepository
|
||||
from src.repositories.ultmarc_dr_wrkplace_repository import UltmarcDoctorWrkplaceRepository
|
||||
from src.repositories.ultmarc_dr_wrkplace_his_repository import UltmarcDoctorWrkplaceHisRepository
|
||||
from src.repositories.ultmarc_specialist_license_repository import UltmarcSpecialistLicenseRepository
|
||||
from src.services.base_service import BaseService
|
||||
from src.system_var import constants, environment
|
||||
|
||||
@ -19,16 +25,31 @@ from src.system_var import constants, environment
|
||||
class UltmarcViewService(BaseService):
|
||||
REPOSITORIES = {
|
||||
'ultmarc_doctor_repository': UltmarcDoctorRepository,
|
||||
'prefc_repository': PrefcMasterRepository
|
||||
'prefc_repository': PrefcMasterRepository,
|
||||
'ultmarc_trt_course_repository': UltmarcTrtCourseRepository,
|
||||
'ultmarc_sosiety_repository': UltmarcSosietyRepository,
|
||||
'ultmarc_doctor_wrkplace_repository': UltmarcDoctorWrkplaceRepository,
|
||||
'ultmarc_doctor_wrkplace_his_repository': UltmarcDoctorWrkplaceHisRepository,
|
||||
'ultmarc_specialist_license_repository': UltmarcSpecialistLicenseRepository
|
||||
}
|
||||
|
||||
ultmarc_doctor_repository: UltmarcDoctorRepository
|
||||
prefc_repository: PrefcMasterRepository
|
||||
ultmarc_trt_course_repository: UltmarcTrtCourseRepository
|
||||
ultmarc_sosiety_repository: UltmarcSosietyRepository
|
||||
ultmarc_doctor_wrkplace_repository: UltmarcDoctorWrkplaceRepository
|
||||
ultmarc_doctor_wrkplace_his_repository: UltmarcDoctorWrkplaceHisRepository
|
||||
ultmarc_specialist_license_repository: UltmarcSpecialistLicenseRepository
|
||||
|
||||
def __init__(self, repositories: dict[str, BaseRepository], clients: dict[str, AWSAPIClient]) -> None:
|
||||
super().__init__(repositories, clients)
|
||||
self.ultmarc_doctor_repository = repositories['ultmarc_doctor_repository']
|
||||
self.prefc_repository = repositories['prefc_repository']
|
||||
self.ultmarc_trt_course_repository = repositories['ultmarc_trt_course_repository']
|
||||
self.ultmarc_sosiety_repository = repositories['ultmarc_sosiety_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_specialist_license_repository = repositories['ultmarc_specialist_license_repository']
|
||||
|
||||
def prepare_ultmarc_doctor_view(
|
||||
self,
|
||||
@ -46,3 +67,33 @@ class UltmarcViewService(BaseService):
|
||||
# 医師データを検索
|
||||
ultmarc_doctor_data = self.ultmarc_doctor_repository.fetch_many(parameter=search_params)
|
||||
return ultmarc_doctor_data
|
||||
|
||||
def info_ultmarc_doctor_view(
|
||||
self,
|
||||
id,
|
||||
session: UserSession
|
||||
) -> UltmarcDoctorInfoViewModel:
|
||||
|
||||
# 医師情報画面の表示データ取得
|
||||
# 医師情報を取得
|
||||
doctor_info = self.ultmarc_doctor_repository.fetch_one(id)
|
||||
# 診療科目情報を取得
|
||||
trt_course = self.ultmarc_trt_course_repository.fetch_many(id)
|
||||
# 所属学会情報を取得
|
||||
sosiety = self.ultmarc_sosiety_repository.fetch_many(id)
|
||||
# 所属学会専門医情報を取得
|
||||
specialist_license = self.ultmarc_specialist_license_repository.fetch_many(id)
|
||||
# 勤務先情報を取得
|
||||
wrkplace = self.ultmarc_doctor_wrkplace_repository.fetch_many(id)
|
||||
# 勤務先履歴情報を取得
|
||||
wrkplace_his = self.ultmarc_doctor_wrkplace_his_repository.fetch_many(id)
|
||||
|
||||
ultmarc = UltmarcDoctorInfoViewModel(
|
||||
doctor_info_data=doctor_info,
|
||||
trt_coursed_data=trt_course,
|
||||
sosiety_data=sosiety,
|
||||
specialist_license_data=specialist_license,
|
||||
doctor_wrkplace_data=wrkplace,
|
||||
doctor_wrkplace_his_data=wrkplace_his
|
||||
)
|
||||
return ultmarc
|
||||
|
||||
486
ecs/jskult-webapp/src/templates/docInfo.html
Normal file
486
ecs/jskult-webapp/src/templates/docInfo.html
Normal file
@ -0,0 +1,486 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
{% with subtitle = ultmarc.subtitle %}
|
||||
{% include '_header.html' %}
|
||||
{% endwith %}
|
||||
<title>医師情報</title>
|
||||
<link rel="stylesheet" href="/static/css/ultStyle.css">
|
||||
<script type="text/javascript">
|
||||
window.onload = function(){
|
||||
// 見出し固定初期化
|
||||
FixedMidashi.create();
|
||||
// ボタン、テキストボックス初期化
|
||||
formBtDisabled();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<!-- <?php
|
||||
// 検索一覧から表示したいものを配列に入れ直し -->
|
||||
<!-- if(isset($_GET['id'])){
|
||||
$docId[0] = $_GET['id'];
|
||||
$pageNum = 0; -->
|
||||
|
||||
<!-- } else if(isset($_POST['next'])){
|
||||
// ページ数を+1
|
||||
$pageNum = $_POST['pageNum'] + 1;
|
||||
$postCnt = count($_POST);
|
||||
// 施設コード以外の情報を入れないために$postCnt - 2
|
||||
for ($i = 0; $i < $postCnt - 2; $i++) {
|
||||
$docId[$i] = array_shift($_POST);
|
||||
}
|
||||
|
||||
} else if (isset($_POST['prev'])) {
|
||||
// ページ数を-1
|
||||
$pageNum = $_POST['pageNum'] - 1;
|
||||
$postCnt = count($_POST);
|
||||
// 施設コード以外の情報を入れないために$postCnt - 2
|
||||
for ($i = 0; $i < $postCnt - 2; $i++) {
|
||||
$docId[$i] = array_shift($_POST);
|
||||
}
|
||||
|
||||
} else if(isset($_POST['detail'])){
|
||||
$pageNum = 0;
|
||||
$postCnt = count($_POST);
|
||||
for ($i = 0; $i < $postCnt - 1; $i++) {
|
||||
$docId[$i] = array_shift($_POST);
|
||||
}
|
||||
} else{
|
||||
header('Location: ' . $logoutPath);
|
||||
} -->
|
||||
|
||||
<!-- $pageCnt = count($docId);
|
||||
$sqlCls = new sqlClass();
|
||||
$isDBSuccess = $sqlCls->dbConnection($dbs, $user, $pass, $docInfoPath, __LINE__);
|
||||
|
||||
// データベース接続チェック
|
||||
if (!isset($isDBSuccess)) {
|
||||
$isDBSuccess = true;
|
||||
// 医師情報SQL
|
||||
$sql = "
|
||||
SELECT COM_DR.DCF_PCF_DR_CD, COM_DR.DR_NAME, COM_DR.DR_NAME_KANA, COM_SEX.SEX, COM_DR.BIRTHDAY, COM_ALMA.ALMA, COM_HOMETOWN.HOMETOWN, COM_DR.GRAD_Y, COM_DR.DRDAY_Y, COM_DR.ESTAB_Y
|
||||
FROM ((COM_DR
|
||||
LEFT JOIN COM_SEX ON COM_DR.SEX_CD = COM_SEX.SEX_CD)
|
||||
LEFT JOIN COM_ALMA ON COM_DR.ALMA_CD = COM_ALMA.ALMA_CD)
|
||||
LEFT JOIN COM_HOMETOWN ON COM_DR.HOMETOWN_CD = COM_HOMETOWN.HOMETOWN_CD
|
||||
WHERE COM_DR.DCF_PCF_DR_CD = :id";
|
||||
$val[':id'] = $docId[$pageNum];
|
||||
$info = array($sql, $val);
|
||||
$docDt = $sqlCls->dbSelect($info, $docInfoPath, __LINE__);
|
||||
if ($docDt == false) {
|
||||
$isDBSuccess = false;
|
||||
}
|
||||
|
||||
// 診療科目SQL
|
||||
$sql = "
|
||||
SELECT TRT_COURSE_NAME FROM (COM_DR
|
||||
LEFT JOIN COM_DR_TRT_COURSE ON COM_DR.DCF_PCF_DR_CD = COM_DR_TRT_COURSE.DCF_PCF_DR_CD)
|
||||
LEFT JOIN COM_TRT_COURSE ON COM_DR_TRT_COURSE.TRT_COURSE_CD = COM_TRT_COURSE.TRT_COURSE_CD
|
||||
WHERE COM_DR.DCF_PCF_DR_CD = :id
|
||||
ORDER BY COM_TRT_COURSE.TRT_COURSE_CD;";
|
||||
$val[':id'] = $docId[$pageNum];
|
||||
$info = array($sql, $val);
|
||||
$trtDt = $sqlCls->dbSelect($info, $docInfoPath, __LINE__);
|
||||
if ($trtDt == false) {
|
||||
$isDBSuccess = false;
|
||||
}
|
||||
|
||||
// 学会SQL
|
||||
$sql = "
|
||||
SELECT COM_SOSIETY.SOSIETY_CD, COM_SOSIETY.SOSIETY_NAME
|
||||
FROM (COM_DR
|
||||
LEFT JOIN COM_DR_SOSIETY ON COM_DR.DCF_PCF_DR_CD = COM_DR_SOSIETY.DCF_PCF_DR_CD)
|
||||
LEFT JOIN COM_SOSIETY ON COM_DR_SOSIETY.SOSIETY_CD = COM_SOSIETY.SOSIETY_CD
|
||||
WHERE COM_DR.DCF_PCF_DR_CD = :id
|
||||
ORDER BY COM_SOSIETY.SOSIETY_CD;";
|
||||
$val[':id'] = $docId[$pageNum];
|
||||
$info = array($sql, $val);
|
||||
$sosietyDt = $sqlCls->dbSelect($info, $docInfoPath, __LINE__);
|
||||
if ($sosietyDt == false) {
|
||||
$isDBSuccess = false;
|
||||
}
|
||||
|
||||
// 専門医SQL
|
||||
$sql = "
|
||||
SELECT COM_SPECIALIST_LICENSE.SPECIALIST_CD, COM_SPECIALIST_LICENSE.SPECIALIST_LICENSE_NAME
|
||||
FROM (COM_DR
|
||||
LEFT JOIN COM_SP_FIELD ON COM_DR.DCF_PCF_DR_CD = COM_SP_FIELD.DCF_PCF_DR_CD)
|
||||
LEFT JOIN COM_SPECIALIST_LICENSE ON COM_SP_FIELD.SPECIALIST_CD = COM_SPECIALIST_LICENSE.SPECIALIST_CD
|
||||
WHERE COM_DR.DCF_PCF_DR_CD = :id
|
||||
ORDER BY COM_SPECIALIST_LICENSE.SPECIALIST_CD;";
|
||||
$val[':id'] = $docId[$pageNum];
|
||||
$info = array($sql, $val);
|
||||
$spcialistDt = $sqlCls->dbSelect($info, $docInfoPath, __LINE__);
|
||||
if ($spcialistDt == false) {
|
||||
$isDBSuccess = false;
|
||||
}
|
||||
|
||||
// 勤務先SQL
|
||||
$sql = "
|
||||
SELECT COM_INST.DCF_DSF_INST_CD, COM_INST.INST_NAME_KANJI, COM_BLNG_SEC.BLNG_SEC_NAME, UNIV_POST.FORM_POST_NAME AS UNIV_POST_NAME, POST.FORM_POST_NAME AS POST_NAME, COM_DR_WRKPLACE.APLY_START_YMD
|
||||
FROM ((((COM_DR
|
||||
LEFT JOIN COM_DR_WRKPLACE ON COM_DR.DCF_PCF_DR_CD = COM_DR_WRKPLACE.DCF_PCF_DR_CD)
|
||||
LEFT JOIN COM_INST ON COM_DR_WRKPLACE.DCF_DSF_INST_CD = COM_INST.DCF_DSF_INST_CD)
|
||||
LEFT JOIN COM_BLNG_SEC ON COM_DR_WRKPLACE.BLNG_SEC_CD = COM_BLNG_SEC.BLNG_SEC_CD)
|
||||
LEFT JOIN COM_POST AS UNIV_POST ON COM_DR_WRKPLACE.IDENTITY_CD = UNIV_POST.POST_CD)
|
||||
LEFT JOIN COM_POST AS POST ON COM_DR_WRKPLACE.POST_CD = POST.POST_CD
|
||||
WHERE COM_DR.DCF_PCF_DR_CD = :id
|
||||
ORDER BY COM_DR_WRKPLACE.APLY_START_YMD DESC;";
|
||||
$val[':id'] = $docId[$pageNum];
|
||||
$info = array($sql, $val);
|
||||
$wrkplaceDt = $sqlCls->dbSelect($info, $docInfoPath, __LINE__);
|
||||
if ($wrkplaceDt == false) {
|
||||
$isDBSuccess = false;
|
||||
}
|
||||
|
||||
// 勤務先履歴SQL
|
||||
$sql = "
|
||||
SELECT COM_INST.DCF_DSF_INST_CD, COM_INST.INST_NAME_KANJI, COM_BLNG_SEC.BLNG_SEC_NAME, UNIV_POST.FORM_POST_NAME AS UNIV_POST_NAME, POST.FORM_POST_NAME AS POST_NAME, COM_DR_WRKPLACE_HIS.APLY_START_YMD, COM_DR_WRKPLACE_HIS.APLY_END_YMD
|
||||
FROM ((((COM_DR
|
||||
LEFT JOIN COM_DR_WRKPLACE_HIS ON COM_DR.DCF_PCF_DR_CD = COM_DR_WRKPLACE_HIS.DCF_PCF_DR_CD)
|
||||
LEFT JOIN COM_INST ON COM_DR_WRKPLACE_HIS.DCF_DSF_INST_CD = COM_INST.DCF_DSF_INST_CD)
|
||||
LEFT JOIN COM_BLNG_SEC ON COM_DR_WRKPLACE_HIS.BLNG_SEC_CD = COM_BLNG_SEC.BLNG_SEC_CD)
|
||||
LEFT JOIN COM_POST AS UNIV_POST ON COM_DR_WRKPLACE_HIS.IDENTITY_CD = UNIV_POST.POST_CD)
|
||||
LEFT JOIN COM_POST AS POST ON COM_DR_WRKPLACE_HIS.POST_CD = POST.POST_CD
|
||||
WHERE COM_DR.DCF_PCF_DR_CD = :id
|
||||
ORDER BY COM_DR_WRKPLACE_HIS.APLY_END_YMD DESC, COM_DR_WRKPLACE_HIS.APLY_START_YMD DESC;";
|
||||
$val[':id'] = $docId[$pageNum];
|
||||
$info = array($sql, $val);
|
||||
$wrkplaceHisDt = $sqlCls->dbSelect($info, $docInfoPath, __LINE__);
|
||||
if ($wrkplaceHisDt == false) {
|
||||
$isDBSuccess = false;
|
||||
}
|
||||
|
||||
$val = null;
|
||||
$info = null;
|
||||
$sqlCls->dbExit();
|
||||
$sqlCls =null;
|
||||
} else {
|
||||
$docDt = array(array(
|
||||
'DCF_PCF_DR_CD' => '',
|
||||
'DR_NAME' => '',
|
||||
'DR_NAME_KANA' => '',
|
||||
'SEX' => '',
|
||||
'BIRTHDAY' => '',
|
||||
'ALMA' => '',
|
||||
'HOMETOWN' =>'',
|
||||
'GRAD_Y' => '',
|
||||
'DRDAY_Y' => '',
|
||||
'ESTAB_Y' =>'',
|
||||
));
|
||||
$trtDt = array();
|
||||
$sosietyDt = array(array('SOSIETY_CD' => ' ', 'SOSIETY_NAME' => ' '));
|
||||
$spcialistDt = array(array('SPECIALIST_CD' => ' ', 'SPECIALIST_LICENSE_NAME' => ' '));
|
||||
$wrkplaceDt = array(array('DCF_DSF_INST_CD' => '', 'INST_NAME_KANJI' => '', 'BLNG_SEC_NAME' => '', 'UNIV_POST_NAME' => '', 'POST_NAME' => '', 'APLY_START_YMD' => ''));
|
||||
$wrkplaceHisDt = array(array('DCF_DSF_INST_CD' => '', 'INST_NAME_KANJI' => '', 'BLNG_SEC_NAME' => '', 'UNIV_POST_NAME' => '', 'POST_NAME' => '', 'APLY_START_YMD' => ''));
|
||||
}
|
||||
?> -->
|
||||
|
||||
<body>
|
||||
<table class="docHeaderTable">
|
||||
<tr>
|
||||
<td class="docHeaderTd"><h1>医師情報</h1></td>
|
||||
<td class="docHeaderTdCenter docHeaderTdCenter">
|
||||
{% if ultmarc.is_batch_processing %}
|
||||
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="docHeaderTd docHeaderTdRight"><button class="docHeader_bt" onclick="backToMenu()">メニューへ</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 上部のボタン -->
|
||||
<table class="instHeaderTable">
|
||||
<tr>
|
||||
<form name="instInfo" method="post" action="/ultmarc/docInfo">
|
||||
<!-- <?php
|
||||
for ($i = 0; $i < count($docId); $i++) {
|
||||
?> -->
|
||||
<input type="hidden" name="ctrl_docId" value="">
|
||||
<!-- <?php echo $i ?> -->
|
||||
<!-- <?php echo $docId[$i] ?> -->
|
||||
<!-- <?php
|
||||
}
|
||||
?> -->
|
||||
<input type="hidden" name="pageNum" value="">
|
||||
<!-- <?php echo $pageNum ?> -->
|
||||
<td class="instHeaderTd">
|
||||
<input type="submit" name="prev" value="前" class="transitionBt" >
|
||||
<!-- <?php if ($pageNum == 0) {echo "disabled"; } ?> -->
|
||||
</td>
|
||||
<td class="instHeaderTd">
|
||||
<!-- <?php
|
||||
echo $pageNum + 1 , '/', $pageCnt;
|
||||
?> -->
|
||||
</td>
|
||||
<td class="instHeaderTd">
|
||||
<input type="submit" name="next" value="次" class="transitionBt" >
|
||||
<!-- <?php if ($pageNum == $pageCnt - 1) {echo "disabled"; } ?> -->
|
||||
</td>
|
||||
</form>
|
||||
<form name="instSearch" method="get" action="/ultmarc/docSearch">
|
||||
<td class="instHeaderTd">
|
||||
<input type="submit" name="ctrl_docBackBt" class="transitionBt" value="医師検索一覧へ">
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- <?php
|
||||
foreach ($docDt as $value) {
|
||||
?> -->
|
||||
<table class="docInfoTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="docInfoTd">医師コード:</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.is_input_dcf_pcf_dr_cd()}}"></td>
|
||||
<td>氏名(漢字):</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.is_input_dr_name()}}"></td>
|
||||
<td>氏名(カナ):</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.is_input_dr_name_kana()}}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="docInfoTd">性別:</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.is_input_sex()}}"></td>
|
||||
<td>生年月日:</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.is_input_birthday_fromat()}}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="docInfoTd">
|
||||
出身大学:
|
||||
<input class="docInfoTextBox" type="text" readonly="readonly" value="{{ultmarc.is_input_alma()}}">
|
||||
出身県:
|
||||
<input class="docInfoTextBox" type="text" readonly="readonly" value="{{ultmarc.is_input_hometown()}}">
|
||||
卒年:
|
||||
<input class="docInfoTextBox" type="text" readonly="readonly" value="{{ultmarc.is_input_grad_y()}}">
|
||||
登録年:
|
||||
<input class="docInfoTextBox" type="text" readonly="readonly" value="{{ultmarc.is_input_drday_y()}}">
|
||||
開業年:
|
||||
<input class="docInfoTextBox" type="text" readonly="readonly" value="{{ultmarc.is_input_estab_y()}}">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- <?php
|
||||
}
|
||||
|
||||
?> -->
|
||||
<tr>
|
||||
<td colspan="6" class="docInfoTd">
|
||||
診療科目:
|
||||
<!-- <?php
|
||||
{{ultmarc.trt_coursed_data.trt_course_name}}
|
||||
|
||||
$i = 0;
|
||||
foreach ($trtDt as $value) {
|
||||
?> -->
|
||||
{% for trt_coursed_data in ultmarc.trt_coursed_data %}
|
||||
<input class="docInfoTrtTextBox" type="text" readonly="readonly" value="{{trt_coursed_data.trt_course_name}}">
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<!-- <?php echo $value['TRT_COURSE_NAME'] ?>
|
||||
<?php
|
||||
$i++;
|
||||
}
|
||||
while($i < 5){
|
||||
?> -->
|
||||
{% for i in range(5-ultmarc.is_input_trt_course_data_size())%}
|
||||
<input class="docInfoTrtTextBox" type="text" readonly="readonly" value="">
|
||||
{% endfor %}
|
||||
<!-- <?php
|
||||
$i++;
|
||||
}
|
||||
?> -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 所属学会,所属学会専門医 -->
|
||||
<table class="docBelongTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="docBelongTd rightBoderLine">
|
||||
<h1>所属学会</h1>
|
||||
<div class="scroll">
|
||||
<table class="tablesorter docSocietyTable" _fixedhead='rows:1; cols:0;'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>コード</th>
|
||||
<th>所属学会</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- <?php
|
||||
foreach ($sosietyDt as $value) {
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?php if ($value['SOSIETY_CD'] == '') {echo " ";} else{ echo $value['SOSIETY_CD']; } ?></td>
|
||||
<td><?php if ($value['SOSIETY_NAME'] == '') {echo " ";} else{ echo $value['SOSIETY_NAME']; } ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?> -->
|
||||
{% for sosiety_data in ultmarc.sosiety_data %}
|
||||
<tr>
|
||||
<td>{{ultmarc.is_data_string_empty_fromat(sosiety_data.sosiety_cd)}}</td>
|
||||
<td>{{ultmarc.is_data_string_empty_fromat(sosiety_data.sosiety_name)}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td class="docBelongTd">
|
||||
<h1>所属学会専門医</h1>
|
||||
<div class="scroll">
|
||||
<table class="tablesorter docSocietyTable" _fixedhead='rows:1; cols:0; border-color:gray; border-width:2px;'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>コード</th>
|
||||
<th>専門医資格名</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for specialist_license_data in ultmarc.specialist_license_data %}
|
||||
<tr>
|
||||
<td>{{ultmarc.is_data_string_empty_fromat(specialist_license_data.specialist_cd)}}</td>
|
||||
<td>{{ultmarc.is_data_string_empty_fromat(specialist_license_data.specialist_license_name)}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<!-- <?php
|
||||
foreach ($spcialistDt as $value) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php if ($value['SPECIALIST_CD'] == '') {echo " ";} else{ echo $value['SPECIALIST_CD']; } ?></td>
|
||||
<td><?php if ($value['SPECIALIST_LICENSE_NAME'] == '') {echo " ";} else{ echo $value['SPECIALIST_LICENSE_NAME']; } ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?> -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 勤務先履歴 -->
|
||||
<h1 class="wrkplaceH1">勤務先履歴</h1>
|
||||
<div class="scroll">
|
||||
<table class="tablesorter wrkplaceTable" _fixedhead='rows:1; cols:0; border-color:gray; border-width:2px;'>
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- MINE残課題対応No25 START -->
|
||||
<th>ULT施設コード</th>
|
||||
<!-- MINE残課題対応No25 END -->
|
||||
<th>勤務先略名</th>
|
||||
<th>所属部科名</th>
|
||||
<th>役職名</th>
|
||||
<th>職位</th>
|
||||
<!-- MINE残課題対応No10 START -->
|
||||
<th>開始年月日</th>
|
||||
<th>終了年月日</th>
|
||||
<!-- MINE残課題対応No10 END -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- <?php
|
||||
$dispBlankFlg = false;
|
||||
foreach ($wrkplaceDt as $value) {
|
||||
// ヒットしたデータがなかった場合
|
||||
if (empty($value['INST_NAME_KANJI'])) {
|
||||
$dispBlankFlg = true;
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
MINE残課題対応No25 START -->
|
||||
<!-- <td><a href="<?php echo $instInfoPath, "?id=", $value['DCF_DSF_INST_CD'] ?>"><?php echo $value['DCF_DSF_INST_CD']; ?></a></td>
|
||||
<td><?php echo $value['INST_NAME_KANJI']; ?></td> -->
|
||||
<!-- MINE残課題対応No25 END -->
|
||||
<!-- <td><?php if ($value['BLNG_SEC_NAME'] == '') {echo " ";} else{ echo $value['BLNG_SEC_NAME']; } ?></td>
|
||||
<td><?php if ($value['UNIV_POST_NAME'] == '') {echo " ";} else{ echo $value['UNIV_POST_NAME']; } ?></td>
|
||||
<td><?php if ($value['POST_NAME'] == '') {echo " ";} else{ echo $value['POST_NAME']; } ?></td> -->
|
||||
<!-- MINE残課題対応No10 START -->
|
||||
<!-- <td><?php if ($value['APLY_START_YMD'] == '') {echo " ";} else{ echo date('Y/m/d',strtotime($value['APLY_START_YMD'])); } ?></td>
|
||||
<td><?php if ($value['INST_NAME_KANJI'] == '') {echo " ";} else{ echo "9999/99/99"; } ?></td> -->
|
||||
<!-- MINE残課題対応No10 END -->
|
||||
<!-- </tr>-->
|
||||
{% for doctor_wrkplace_data in ultmarc.doctor_wrkplace_data %}
|
||||
{% if ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.dcf_dsf_inst_cd) != ''%}
|
||||
<tr>
|
||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.dcf_dsf_inst_cd)}}</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.blng_sec_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.post_name)}}</td>
|
||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_data.aply_start_ymd)}}</td>
|
||||
<td>9999/99/99</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- <?php
|
||||
}
|
||||
foreach ($wrkplaceHisDt as $value) {
|
||||
$dispHisBlankFlg = empty($value['INST_NAME_KANJI']);
|
||||
// 現在の勤務先が存在し、ヒットした履歴にデータがなかった場合
|
||||
if ($dispHisBlankFlg && !$dispBlankFlg) {
|
||||
// 現在の勤務先だけ表示
|
||||
break;
|
||||
}
|
||||
?> -->
|
||||
{% 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) != ''%}
|
||||
<tr>
|
||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.dcf_dsf_inst_cd)}}</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.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.aply_start_ymd)}}</td>
|
||||
<td>{{ultmarc.is_data_string_empty_fromat(doctor_wrkplace_his_data.aply_end_ymd)}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<!-- <tr> -->
|
||||
<!-- MINE残課題対応No25 START -->
|
||||
<!-- <td><a href="<?php echo $instInfoPath, "?id=", $value['DCF_DSF_INST_CD'] ?>"><?php echo $value['DCF_DSF_INST_CD']; ?></a></td>
|
||||
<td><?php echo $value['INST_NAME_KANJI']; ?></a></td> -->
|
||||
<!-- MINE残課題対応No25 END -->
|
||||
<!-- <td><?php if ($value['BLNG_SEC_NAME'] == '') {echo " ";} else{ echo $value['BLNG_SEC_NAME']; } ?></td>
|
||||
<td><?php if ($value['UNIV_POST_NAME'] == '') {echo " ";} else{ echo $value['UNIV_POST_NAME']; } ?></td>
|
||||
<td><?php if ($value['POST_NAME'] == '') {echo " ";} else{ echo $value['POST_NAME']; } ?></td> -->
|
||||
<!-- MINE残課題対応No10 START -->
|
||||
<!-- <td><?php if ($value['APLY_START_YMD'] == '') {echo " ";} else{ echo date('Y/m/d',strtotime($value['APLY_START_YMD'])); } ?></td>
|
||||
<td><?php if ($dispHisBlankFlg) { echo " "; } elseif ($value['APLY_END_YMD'] == '') {echo "9999/99/99";} else{ echo date('Y/m/d',strtotime($value['APLY_END_YMD'])); } ?></td> -->
|
||||
<!--MINE残課題対応No10 END -->
|
||||
<!-- </tr> -->
|
||||
<!-- <?php
|
||||
}
|
||||
|
||||
// メモリ解放
|
||||
$docDt = null;
|
||||
$trtDt = null;
|
||||
$sosietyDt = null;
|
||||
$spcialistDt = null;
|
||||
$wrkplaceDt = null;
|
||||
$wrkplaceHisDt = null;
|
||||
?> -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- <div id="error" title="エラー">
|
||||
<div style="float: left;width: 15%"><img class="ErrorImg" style="width: 50px;" src="/common/css/image/error.png"></div>
|
||||
<div id="errorTxt" style="float: right; white-space: normal; width: 300px;"></div>
|
||||
</div> -->
|
||||
<!-- <?php
|
||||
// DBエラーしていないか
|
||||
if(!$isDBSuccess){
|
||||
print "<script language=javascript>CreateDialog();</script>";
|
||||
print "<script language=javascript>DisplayErrorDialog('$dbErrMsg');</script>";
|
||||
}
|
||||
?> -->
|
||||
</body>
|
||||
</html>
|
||||
@ -20,19 +20,17 @@
|
||||
|
||||
<!--検索フォーム-->
|
||||
<body>
|
||||
|
||||
<table class="docHeaderTable">
|
||||
<tr>
|
||||
<td class="docHeaderTd"><h1>医師検索一覧</h1></td>
|
||||
<td class="docHeaderTdCenter docHeaderTdCenter">
|
||||
{% if ultmarc.is_batch_processing %}
|
||||
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="docHeaderTd docHeaderTdRight"><button class="docHeader_bt" onclick="backToMenu()">メニューへ</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</h1>
|
||||
<table class="docHeaderTable">
|
||||
<tr>
|
||||
<td class="docHeaderTd"><h1>医師検索一覧</h1></td>
|
||||
<td class="docHeaderTdCenter docHeaderTdCenter">
|
||||
{% if ultmarc.is_batch_processing %}
|
||||
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="docHeaderTd docHeaderTdRight"><button class="docHeader_bt" onclick="backToMenu()">メニューへ</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
<form class="_form" name="search" action="/ultmarc/docSearch" method="POST">
|
||||
<table class="docSearchTableDivTwo">
|
||||
<tbody>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user