diff --git a/ecs/jskult-webapp/src/controller/ultmarc.py b/ecs/jskult-webapp/src/controller/ultmarc.py new file mode 100644 index 00000000..2f1bd5eb --- /dev/null +++ b/ecs/jskult-webapp/src/controller/ultmarc.py @@ -0,0 +1,90 @@ +from typing import Optional + +from fastapi import APIRouter, Depends, HTTPException, Request +from fastapi.exceptions import HTTPException +from starlette import status + +from src.depends.services import get_service +from src.model.internal.session import UserSession +from src.model.request.bio import BioModel +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.session_service import set_session +from src.system_var import constants +from src.templates import templates + +router = APIRouter() +router.route_class = AuthenticatedRoute + +######################### +# Views # +######################### + + +@router.get('/docSearch') +def ultmarc_view( + request: Request, + # batch_status_service:BatchStatusService=Depends(get_service(BatchStatusService)), + # bio_service: BioViewService=Depends(get_service(BioViewService)) +): + session: UserSession = request.session + # バッチ処理中の場合、機能を利用させない + # if batch_status_service.is_batch_processing(): + # raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BATCH_PROCESSING) + # # 検索項目の取得 + # bio = bio_service.prepare_bio_view(session) + # セッション書き換え + 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( + 'docSearch.html', { + 'request': request, + # 'bio': bio, + }, + headers={'session_key': session_key} + ) + return templates_response + + +@router.post('/BioSearchList') +def search_bio( + request: Request, + bio_form: Optional[BioModel] = Depends(BioModel.as_form), + bio_service: BioViewService = Depends(get_service(BioViewService)), + batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)) +): + # error_log(date("Y/m/d H:i:s") . " [INFO] UserId:" . $UserId . "\r\n", 3, "$execLog"); + session: UserSession = request.session + # バッチ処理中の場合、機能を利用させない + if batch_status_service.is_batch_processing(): + raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BATCH_PROCESSING) + + # 生物由来データを検索 + bio_sales_view_data = bio_service.search_bio_data(bio_form) + # 検索項目などのデータを取得 + bio: BioViewModel = bio_service.prepare_bio_view(session) + bio.bio_data = bio_sales_view_data + bio.form_data = bio_form + # セッション書き換え + 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( + 'bioSearchList.html', { + 'request': request, + 'bio': bio + }, + headers={'session_key': session_key} + ) + return templates_response diff --git a/ecs/jskult-webapp/src/main.py b/ecs/jskult-webapp/src/main.py index f00f5ac3..a15344dc 100644 --- a/ecs/jskult-webapp/src/main.py +++ b/ecs/jskult-webapp/src/main.py @@ -5,7 +5,7 @@ from fastapi.staticfiles import StaticFiles from starlette import status import src.static as static -from src.controller import bio, bio_download, healthcheck, login, logout, menu +from src.controller import bio, bio_download, healthcheck, ultmarc, login, logout, menu from src.core import tasks from src.error.exception_handler import http_exception_handler from src.error.exceptions import UnexpectedException @@ -22,6 +22,8 @@ app.include_router(logout.router, prefix='/logout') app.include_router(menu.router, prefix='/menu') # 生物由来関連のルーター app.include_router(bio.router, prefix='/bio') +# アルトマークデータ照会のルーター +app.include_router(ultmarc.router, prefix='/ultmarc') # 生物由来のダウンロード用APIルーター。 # クライアントから非同期呼出しされるため、共通ルーターとは異なる扱いとする。 app.include_router(bio_download.router, prefix='/bio') diff --git a/ecs/jskult-webapp/src/static/css/ultStyle.css b/ecs/jskult-webapp/src/static/css/ultStyle.css new file mode 100644 index 00000000..936cef77 --- /dev/null +++ b/ecs/jskult-webapp/src/static/css/ultStyle.css @@ -0,0 +1,671 @@ +body { + background-color: LightCyan; + font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "MS Pゴシック", "MS PGothic", sans-serif; +} + +h1 { + font-size: 150%; + margin-left: 2%; + margin-top: 0%; + margin-bottom: 0%; +} + +table{ + border-collapse : collapse; +} + +.header_bt{ + width: 8%; + margin-bottom: 0.8%; + margin-left: 78.5%; +} + +.search_textbox{ + width: 100%; +} + +.search_dropdown{ + width: 100%; +} + +.search_longtextbox{ + width: 100% +} + +.instSearchResult { + width: 100%; +} + +.scroll_table{ + overflow: auto; + white-space: nowrap; + margin-bottom: 2%; + /*スクロール時カラムが動く問題の修正 width: 100%;をコメントアウト*/ + width: 100%; + height: 250px; +} + +.scroll_table::-webkit-scrollbar { + height: 5px; + width: 10px; +} + +.scroll_table::-webkit-scrollbar-track { + border-radius: 5px; + background: #eee; +} + +.scroll_table::-webkit-scrollbar-thumb { + border-radius: 5px; + background: #666; +} + +.ult_bt { + width: 20%; + height: 80%; +} + +.info_bt{ + width: 10% +} + +.search_bt{ + margin-left: 3%; + margin-top: 0.8%; + margin-bottom: 0.8%; +} + +.notFind{ + margin-top: 5%; + text-align: center; + font-size: 150%; +} + +.search_table { + margin-bottom: 1%; + padding-bottom: 1%; + border-bottom: solid 1px gray; + width: 100%; +} + +.search_tb { + padding-right: 2%; + padding-top: 0.2%; + padding-bottom: 0.2%; +} + +.leftSearch_tb{ + width: 35%; +} + +.batchMsg{ + color: red; + font-size: 120%; + text-align: center; + +} + +._form { + width: 95%; + margin-left: 3%; +} + +.result_info { + text-align: right; +} + +/*施設検索一覧ヘッダー*/ +.instSearchHeaderTable{ + width: 100%; +} + +.instSearchHeaderTd{ + width: 24%; +} + +.instSearchHeaderTdCenter{ + text-align: center; + width: 50%; +} + +.instSearchHeaderTdRight{ + text-align: right; + padding-right: 2%; +} + +.instSearchButchMsg{ + font-size: 80%; + color: red; +} + +.instSearchHeader_bt{ + width: 40%; +} + + +/*施設詳細*/ +.instInfoTable{ + margin-top: 1%; + margin-left: 5%; + margin-right: 2%; + margin-bottom: 2%; + width: 93%; +} + +.instInfoTableHalf1{ + margin-top: 1%; + margin-left: 5%; + margin-right: 2%; + width: 93%; +} + +.instInfoTableHalf2{ + margin-top: -0.05%; + margin-left: 5%; + margin-right: 2%; + margin-bottom: 2%; + width: 93%; +} + +.instInfoColumn { + width : 9%; + height: 40px; + background : rgb(225, 233, 250); + border : solid 1px; +} + +.instData { + background : rgb(244, 244, 244); + border : solid 1px; + padding-left : 0.5%; + padding-right : 0.5%; + padding-top: 0.25%; + padding-bottom: 0.25%; +} + +.instDataMid{ + /*NO5修正前 width: 51%;*/ + width: 20%; +} + +/*NO5にて追加 START*/ +.instDataLarge{ + width: 85%; +} + +.instDataLeft{ + width: 20%; +} + +.instDataCenter{ + width: 7%; +} + +.instDataRight{ + width: 25%; +} +/*NO5にて追加 END*/ + +.instDataSmallTextbox{ + width: 45%; +} + +/*NO5にて追加 START*/ +.instDataCenterTextbox{ + width: 80%; +} +/*NO5にて追加 END*/ + +.instInfoTextbox{ + width: 98%; + padding-right: 1%; + padding-left: 1%; +} + +.instCdTextbox{ + /*NO5修正前 width: 13%;*/ + width: 35%; + margin-left: 0.5%; + margin-right: 2%; +} + +.delReasonCdTextbox{ + /*NO5修正前 width: 2%;*/ + width: 5%; + margin-left: 0.5%; + margin-right: 1%; +} + +.delReasonTextbox{ + /*NO5修正前 width: 43%;*/ + width: 88%; + margin-left: 0.5%; + margin-right: 2%; +} + +.manageTextbox{ + width: 40%; +} + +.textboxMargin { + margin-left : 0.1%; +} + +.transitionBt{ + width: 98%; + height: 30px; +} + +.instHeaderTable{ + margin-left: 40%; +} + +.instHeaderTd{ + width: 10%; + font-size: 140%; + text-align: center; + padding-right: 2%; +} + +.trtCourseTextbox{ + width: 6%; +} + +.bedTd{ + width: 46%; +} + +.bedTextbox{ + width: 70%; +} + +.xSmallTd{ + width: 9%; +} + +.xSmallTextbox{ + width: 75%; +} + +.reExamTd{ + width: 13%; +} + +.repreTd{ + width: 50%; +} + +.repreTextbox{ + width: 95%; +} + +.trtTextbox{ + width: 5%; + margin-right: 1.2%; +} + +.parentCdTextBox{ + width: 15%; +} + +.parentNameTextBox{ + width: 75%; +} + +.hpInfoColumn{ + width : 12%; + height: 40px; + background : rgb(225, 233, 250); + border : solid 1px; +} + +.hpAssrtTd{ + width: 12%; +} + +.hpAssrtTextbox{ + width: 85%; +} + +.border_bottom_none { + border-bottom-style:none; +} + +.numberBox{ + text-align: right; +} + +/*医師検索*/ +/*ヘッダー*/ +.docHeaderTable{ + width: 100%; +} + +.docHeaderTd{ + width: 24%; +} + +.docHeaderTdCenter{ + text-align: center; + width: 50%; +} + +.docHeaderTdRight{ + text-align: right; + padding-right: 2%; +} + +.docButchMsg{ + /* font-size: 80%; */ + color: red; +} + +.docHeader_bt{ + width: 40%;s +} + +/* アルトマーク課題管理表No.2の修正 8% → 10% */ +/* アルトマーク課題管理表No.8の修正 10% → 14% */ +.docSearchColumnTd{ + width: 14%; +} + +.docSearchTextboxTd{ + width: 18%; +} + +.docSearchTextbox_td{ + width: 94%; +} + +.docSearchTextbox{ + width: 90%; + margin-right: 5%; + margin-top: 0.8%; + margin-bottom: 0.8%; +} + +.docSearchTableDivOne{ + width: 100%; +} + +.docSearchTableDivTwo{ + margin-bottom: 1%; + padding-bottom: 1%; + border-bottom: solid 1px gray; + width: 100%; +} + +.docSearchScroll{ + overflow: auto; + white-space: nowrap; + margin-bottom: 2%; + width: 100%; + height: 270px; +} + +.docSearchScroll::-webkit-scrollbar { + height: 5px; + width: 10px; +} + +.docSearchScroll::-webkit-scrollbar-track { + border-radius: 5px; + background: #eee; +} + +.docSearchScroll::-webkit-scrollbar-thumb { + border-radius: 5px; + background: #666; +} + +.allOnOffButton{ + width: 6%; +} + +/*医師情報*/ +.docInfoTable{ + margin-top: 1%; + margin-left: 5%; + margin-right: 2%; + margin-bottom: 1%; + width: 93%; + border-bottom: solid 1px gray; +} + +.docInfoTd{ + padding-bottom: 0.5%; +} + +.docInfoTextBox{ + margin-left: 0.5%; + margin-right: 2%; + width: 8%; +} + +.docInfoTrtTextBox{ + margin-left: 0.5%; +} + +.docBelongTable{ + margin-left: 1%; + width: 98%; + border-bottom: solid 1px gray; +} + +.docBelongTd{ + width: 49%; + height: 150px; +} + +.docSocietyTable{ + width: 100%; +} + +.scroll{ + overflow: auto; + height: 120px; + width: 90%; + margin-left: 7%; + margin-bottom: 4%; +} + +.scroll::-webkit-scrollbar { + height: 5px; + width: 10px; +} + +.scroll::-webkit-scrollbar-track { + border-radius: 5px; + background: #eee; +} + +.scroll::-webkit-scrollbar-thumb { + border-radius: 5px; + background: #666; +} + +.rightBoderLine{ + border-right: solid 1px gray; +} + +.wrkplaceH1{ + margin-top: 0.3%; +} + +.wrkplaceTable{ + width: 100%; +} + + + + + + + +/* 生物由来検索、施設検索共通*/ + + + +.clear_bt{ + margin-left: 120px; + width: 60px +} + +.back_bt{ + margin-left: 1042px; + width: 80px +} + +.noLine{ + text-decoration: none; +} + + +/*アルトマーク施設検索*/ + + +/*共通:アルトマーク施設検索,医師検索,施設詳細*/ +.maxWidth_tb { + width: 100%; +} + +/*アルトマーク施設検索,医師検索共通*/ + +.search_btTd { + text-align: right; +} + +.selection { + display: none; +} + +#page-1 { + display: block; +} + + +/*医師検索*/ +.search_middleTd { + padding-right: 25px; + width : 450px; +} + +.docSearchScroll_div { + overflow: auto; + height: 200px; + width: 1132px; +} + +/*共通:施設詳細、医師詳細*/ +.transition{ + text-align: right; + margin-right: 60px; +} + + + + + +.data_width_middle { + width : 300px; +} + + +.border_top_none { + border-top-style:none; +} + + + +.textbox_margin_short { + margin-left : 5px; +} + +.label_margin { + margin-left: 10px; + margin-right: 10px; +} + + +/*医師詳細*/ +.docInfo_table{ + margin-bottom: 30px; + border-bottom: solid 1px gray; + width: 1132px; +} + +.small_tb{ + width: 100px; +} + +.docBelongScroll_div { + overflow: auto; + height: 100px; + width: 500px; + margin: 0px 30px 0px 30px; +} + +.rightPadding_table{ + padding-right: 50px; +} + + +.docPlaceScroll_div { + overflow: auto; + height: 150px; + width: 700px; + margin: 0px 30px 0px 30px; +} + +.result_tr{ + overflow-y: scroll; + overflow-x: scroll; +} + +.result_data{ + overflow-y: scroll; + overflow-x: scroll; + width: 50px; +} + +/* tablesoter */ +table.tablesorter { + font-family:arial; + background-color: #CDCDCD; + font-size: 8pt; + text-align: left; +} + +table.tablesorter thead tr th, table.tablesorter tfoot tr th { + background-color: #e6EEEE; + border: 0.1px solid silver; + font-size: 8pt; + padding: 4px; + padding-right: 20px; +} +table.tablesorter thead tr .header { + background-image: url(bg.gif); + background-repeat: no-repeat; + background-position: center right; + cursor: pointer; +} +table.tablesorter tbody td { + color: #3D3D3D; + padding: 4px; + background-color: #FFF; + border: 0.1px solid silver; + vertical-align: top; +} +table.tablesorter tbody tr.odd td { + background-color:#F0F0F6; +} +table.tablesorter thead tr .headerSortUp { + background-image: url(asc.gif); +} +table.tablesorter thead tr .headerSortDown { + background-image: url(desc.gif); +} +table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp { + background-color: #8dbdd8; +} diff --git a/ecs/jskult-webapp/src/static/function/businessLogicScript.js b/ecs/jskult-webapp/src/static/function/businessLogicScript.js index 90ecc18b..f55e7858 100644 --- a/ecs/jskult-webapp/src/static/function/businessLogicScript.js +++ b/ecs/jskult-webapp/src/static/function/businessLogicScript.js @@ -211,3 +211,63 @@ function DisplayErrorDialog(strMesssage) { $("#errorTxt").html(strMesssage); $("#error").dialog("open"); } + +/* ult.jsから移植 */ +// チェックボックス全選択関数 +// 条件:チェックボックスのクラス名に"selected"というのがついていること +// 条件:ボタンにクラス名 send がついていること +function allOn(){ + $(".selected").prop("checked", true); + $(".send").prop('disabled',false); +} + +// チェックボックス全解除関数 +// 条件:チェックボックスのクラス名に"selectedページ数"というのがついていること +// 条件:ボタンにクラス名 send がついていること +function allOff(){ + $(".selected").prop("checked", false); + $(".send").prop('disabled',true); +} + +// 検索結果のところのボタンをチェックが1個でも付いたら押せるようにして、チェックがなければ押せないようにする関数 +// 条件:チェックボックスのクラス名に"selected"というのがついていること +// 条件:ボタンにクラス名 send がついていること +function resultBtDisablead(){ + var cnt1 = $('.checkNum input:checkbox:checked').length; + console.log(cnt1); + if(cnt1 == 0) { + $(".send").prop('disabled',true); + } + else { + $(".send").prop('disabled',false); + } +} + +// Enter押下時にsubmitさせなくする +$(function() { + $(document).on("keypress", "input:not(.allow_submit)", function(event) { + return event.which !== 13; + }); +}); + +// 数字-以外を許さない入力チェック +function checkNumberForm($this) +{ + var str=$this.value; + while(str.match(/[^\d\-]/)) + { + str=str.replace(/[^\d\-]/,""); + } + $this.value=str; +} + +// 数字以外を許さない入力チェック +function checkNumberOnlyForm($this) +{ + var str=$this.value; + while(str.match(/[^\d]/)) + { + str=str.replace(/[^\d]/,""); + } + $this.value=str; +} \ No newline at end of file diff --git a/ecs/jskult-webapp/src/templates/docSearch.html b/ecs/jskult-webapp/src/templates/docSearch.html new file mode 100644 index 00000000..214ea399 --- /dev/null +++ b/ecs/jskult-webapp/src/templates/docSearch.html @@ -0,0 +1,744 @@ + + + + +
+ {% with subtitle = '医師検索一覧' %} + {% include '_header.html' %} + {% endwith %} + + + + + + + + + + + + + + + + + + + + + + + + + +医師検索一覧 |
+
+
+ 日次バッチ処理中のため、データが正しく表示されない可能性があります
+
+
+ |
+ + |