123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673 |
- /**
- * mplus_common
- */
- var mplus_common = function(){
-
- mplus_mobile.call(this);
-
- var self = this;
-
- // ajax 설정
- $.ajaxSetup({
- timeout: 30000,
- error: function(XHR, textStatus, errorThrown ) { //XMLHttpRequest, textStatus(timeout, error, notmodified, parseerror...), errorThrown
- //==== old code : 삭제 예정 { ====
- //function(x, t, m) { //XMLHttpRequest, textStatus(timeout, error, notmodified, parseerror...), errorThrown
- //if(t==="timeout") {
- // self.alert(self.getI18n("error500"));
- // self.loading("hide");
- //} else {
- // self.loading("hide");
- // self.alert(t);
- //}
- //==== old code : 삭제 예정 } ====
-
- self.loading( "hide");
- if( XHR.status == 0){
- self.alert( "You are offline!! <br>Please Check Your Network.");
- }else if( XHR.status == 404){
- self.alert("Requested URL not found.<br>[HTTP 404 ERROR]");
- }else if( XHR.status == 409){
- self.alertDuplicationLogin( "다른 기기에서 같은 ID로 로그인 했습니다.");
- }else if( XHR.status == 500){
- self.alert( "Internel Server Error.<br>[HTTP 500 ERROR]");
- }else if( textStatus == "parsererror"){
- self.alert( "Error. Parsing JSON Request failed.");
- }else if(textStatus == "timeout"){
- self.alert( "Request Time out.");
- }else {
- self.alert( "Unknow Error. " + XHR.responseText);
- }
- console.log( "code:" + XHR.status + "\n" + "message:" + XHR.responseText + "\n"+"error:" + errorThrown);
- },
- dataFilter: function(result){
- if(result!=""){
- resultJson = JSON.parse(result);
- if(resultJson.msg==self.getI18n("unauthenticated")){
- self.common.initLocalStorage();
- location.href = contextPath + "/logout.page";
- return null;
- };
- };
- return result;
- }
- });
-
- $serviceBaseUrl = contextPath + "/mobile";
- this.init = function(){
- addEvent();
- movePageEvent();
- };
-
- var addEvent = function(){
- //로그아웃
- $("#btnLogout").on("click", function(){
- logout();
- });
-
- //로그아웃2
- // $("#btnLogout2").on("click", function(){
- // logout();
- // });
- };
- //화면이동 공통이벤트
- var movePageEvent = function(){
- // //설정창 오픈
- // $('#btnMoveSetting').on('click', function(){
- // /*location.href = contextPath + '/mobile/setting/setting.page';*/
- // var deptList = JSON.parse(localStorage.user).departmentList;
- // var div = $('<div></div>');
- // $('#settingDeptList').empty();
- // for(var i=0; i<deptList.length; i++){
- // var radioOption = div.clone().addClass('radio3 radio-check').append(
- // $('<input></input>').clone().attr('name', 'settingDeptRadio').attr('type', 'radio').attr('id', 'settingDeptRadio'+i).attr('value', deptList[i].departmentCd).attr('deptName', deptList[i].departmentNm)
- // ).append(
- // $('<label></label>').clone().attr('for', 'settingDeptRadio'+i).text(deptList[i].departmentNm)
- // );
- // $('#settingDeptList').append(radioOption);
- // };
- //
- // $('#settingModal').modal("show");
- // $('input:radio[name=settingDeptRadio]:input[value=' + localStorage.selectedDeptCd + ']').attr("checked", true);
- //
- // $('#settingModal .modal-body #settingDeptList').css({'max-height': $(window).height()-180,
- // 'overflow-y': 'auto'});
- //
- // $('#settingModal').modal('show');
- // });
- // //진료과 설정 저장
- // $('#btnSaveSettingModal').unbind();
- // $('#btnSaveSettingModal').on('click', function(){
- // if(localStorage.getItem('selectedDeptCd')!= $('input[name=settingDeptRadio]:checked').val()){
- // localStorage.setItem('selectedDeptCd', $('[name=settingDeptRadio]:checked').val());
- // localStorage.setItem('selectedDeptNm', $('[name=settingDeptRadio]:checked')[0].attributes.deptName.value);
- // $('#panelUserDept').text($('[name=settingDeptRadio]:checked')[0].attributes.deptName.value);
- // $('.slt-my-department').val($('[name=settingDeptRadio]:checked').val());
- // if($('.slt-my-department').val()==null) $('.slt-my-department').val($(".slt-my-department option:first").val());
- // $('.slt-my-department').trigger('change');
- // };
- //
- // $('#settingModal').modal('hide');
- //
- // });
- //
- // //환자상세정보화면이동
- // $('[name=btnMoveDetail]').on('click', function(){
- // /*location.href = contextPath + '/mobile/patient/clinicInfo.page?page=info';*/
- // $('#patientPopup .popup-content:not(#popContentConsultDetail).in').removeClass('in');
- // $('#patientPopup #popContentPatientInfo').addClass('in');
- // $('#newPopupFooter2').css('display', 'block');
- // $('#patientPopup').css({'height': '-webkit-calc(100% - 40px)',
- // 'height': '-moz-calc(100% - 40px)',
- // 'height': 'calc(100% - 40px)',
- // 'bottom': '0px',
- // 'display': 'block'});
- // var mplusPatient = new mplus_mobile_patient();
- // mplusPatient.detailInit();
- // });
- // //처방화면이동
- // $('[name=btnMovePrescription]').on('click', function(){
- // /*location.href = contextPath + '/mobile/patient/clinicInfo.page?page=prescription';*/
- // $('#patientPopup .popup-content:not(#popContentConsultDetail).in').removeClass('in');
- // $('#patientPopup #popContentPrescription').addClass('in');
- // $('#newPopupFooter2').css('display', 'block');
- // $('#patientPopup').css({'height': '-webkit-calc(100% - 40px)',
- // 'height': '-moz-calc(100% - 40px)',
- // 'height': 'calc(100% - 40px)',
- // 'bottom': '0px',
- // 'display': 'block'});
- // var mplusPatient = new mplus_mobile_patient();
- // mplusPatient.prescriptionInit();
- // });
- //
- // //검사화면이동
- // $('[name=btnMoveExamine]').on('click', function(){
- // $('#patientPopup .popup-content:not(#popContentConsultDetail).in').removeClass('in');
- // $('#patientPopup #popContentExamine').addClass('in');
- // $('#newPopupFooter2').css('display', 'block');
- // $('#patientPopup').css({'height': '-webkit-calc(100% - 40px)',
- // 'height': '-moz-calc(100% - 40px)',
- // 'height': 'calc(100% - 40px)',
- // 'bottom': '0px',
- // 'display': 'block'});
- // var mplusPatient = new mplus_mobile_patient();
- // mplusPatient.examineInit();
- // });
- };
-
- var logout = function(){
- self.confirm("로그아웃 하시겠습니까?", function(callback){
- if(callback){
- //자동로그인 기능 제거
- localStorage.setItem("defaultisAuto", "");
- self.common.initLocalStorage();
- location.href = contextPath + "/logout.page";
- console.log("contextPath -- > " + contextPath);
- };
- });
- };
-
- this.dateCalc = function(fromDate, toDate){
- var fromArray = fromDate.split("-");
- var toArray = toDate.split("-");
-
- var calFromDate = new Date(fromArray[0], Number(fromArray[1])-1, fromArray[2]);
- var calToDate = new Date(toArray[0], Number(toArray[1])-1, toArray[2]);
-
- var betweenDate = (calToDate.getTime() - calFromDate.getTime())/1000/60/60/24;
-
- return betweenDate;
- };
-
- this.rotateScreen = function(orientation){
- var jsonmsg = {
- "type" : "command",
- "functionType" : "rotateScreen",
- "value" : {
- "orientation" : orientation,
- "callbackFn":"window.activeObj.init"
- }
- };
-
- self.toNative(jsonmsg);
- };
-
- /* APP배포 --------------------------------------------------------------------- */
- this.deployment = {
- //다운로드 이력 로그 전송
- inputDownloadLog : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/deployment/inputDownloadLog.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- }
- };
-
- // 20190405 iOS 캡쳐 방지 로그 전송
- this.inputLoginLog = function(){
- //디바이스 정보 호출 후 로그 등록
- var msg = {
- type : "command",
- functionType : "getDeviceInfo",
- value : {
- callbackFn : "window.activeObj.getDeviceInfoCallBack2"
- }
- };
- self.toNative( msg );
- };
-
- // 디바이스 정보 전송 추출 callback 처리
- this.getDeviceInfoCallBack2 = function(returnCode){
- var results = new Object();
- if( typeof returnCode === "string" ){
- results = self.util.parseJson( returnCode );
- } else {
- results = returnCode;
- }
-
- if( results.success != undefined && results.success == "true" ) {
- console.log("getDeviceInfo : success");
- console.log( results.result);
- gDeviceId = results.result.deviceId;
- gAppKind = results.result.appKind;
- gAppVersion = results.result.appVersion;
- gPhoneKind = results.result.phoneKind;
- } else {
- console.log("getDeviceInfo : failed");
- self.alert( "getDeviceInfo() APP function 호출 오류 " );
- }
-
- // 20190125 shinsunwoo device id 추출을 실패한 경우 uuid() 스크립트 값을 적용
- if( gDeviceId == "NONE")
- gDeviceId = uuid();
-
- console.log("캡쳐로그방지 로그전송" +
- "\n gLoginUserId : " + gLoginUserId +
- "\n gLoginUserNm : " + gLoginUserNm +
- "\n gDeviceId : " + gDeviceId +
- "\n gAppVersion : " + gAppVersion +
- "\n gAppKind : " + gAppKind +
- "\n gPhoneKind : " + gPhoneKind +
- "\n gClientIp : " + gClientIp
- );
-
- var param = {
- userId : (gLoginUserId === undefined) ? "-" : gLoginUserId,
- userNm : (gLoginUserNm === undefined) ? "-" : gLoginUserNm,
- deviceId: (gDeviceId === undefined) ? "-" : gDeviceId,
- appVersion: (gAppVersion === undefined) ? "-" : gAppVersion,
- appKind: (gAppKind === undefined) ? "-" : gAppKind,
- phoneKind: (gPhoneKind === undefined) ? "-" : gPhoneKind,
- userIp: gClientIp,
- currentDt : moment( new Date()).format("YYYYMMDDHHmmss"),
- successYn : "N",
- failMsg : "화면캡쳐",
- logFlag : "C"
- };
- $.ajax ({
- url : $serviceBaseUrl + "/login/inputLoginLog.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- //callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- };
-
- /* 로그인 --------------------------------------------------------------------- */
- this.login = {
- //로그인 접속 로그 전송
- inputLoginLog : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/login/inputLoginLog.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- }
- };
-
- /* 병원관리 --------------------------------------------------------------------- */
- this.hospital = {
-
- };
- /* 일정관리 --------------------------------------------------------------------- */
- this.schedule = {
- //검사실 부서 리스트 조회 - 의사, 간호사
- getSchExamDeptList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/schedule/getSchExamDeptList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- //진료과 부서 리스트 조회 - 의사, 간호사, 인턴
- getShcDeptList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/schedule/getShcDeptList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- //병동 부서 리스트 조회 - 의사, 간호사
- getShcWardList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/schedule/getShcWardList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- //당직 일정 조회 - 의사, 간호사
- getOnDutyWeekSch : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/schedule/getOnDutyWeekSch.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- //개인 상세 당직 일정 조회 - 의사, 간호사
- getOnDutyMonthSch : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/schedule/getOnDutyMonthSch.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- //외래 진료 일정 조회
- getWorkSch : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/schedule/getWorkSch.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- //의료진 정보 조회
- getDoctorInfo : function(param, callback, type){
- $.ajax ({
- url : $serviceBaseUrl + "/schedule/getDoctorInfo.json",
- type : "POST",
- async: false,
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result, type);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- }
- };
-
-
- /* 진료 --------------------------------------------------------------------- */
- this.medical = {
- /* 진료-서비스 --------------------------------------------------------------------- */
- //과거 입원 이력 조회
- getInHistoryList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getInHistoryList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //과거 외래 진료 이력 조회
- getOutHistoryList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOutHistoryList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //과거 수술 이력 조회
- getOpHistoryList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOpHistoryList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //진료 기록 조회
- getMediRecord : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getMediRecord.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //입원일자 이력 리스트 조회
- getInDateList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getInDateList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //외래 진료일자 이력 리스트 조회
- getOutDateList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOutDateList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //처방 분류 리스트 조회- 입원, 외래
- getPrescriptionClsList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getPrescriptionClsList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //처방 상태 리스트 조회- 입원, 외래
- getPrescriptionStatList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getPrescriptionStatList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //처방 내역 조회 - 입원, 외래, 협진
- getPrescription : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getPrescription.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //복약정보 조회
- getDrugInfo : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getDrugInfo.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //복약정보 조회
- getDrugDetail : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getDrugDetail.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //검사결과 접수부서 리스트 조회
- getExamReceiptDeptList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getExamReceiptDeptList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //검사결과 리스트 조회
- getExamList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getExamList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //검사결과 상세 조회 - 검체검사
- getExamRsltTy1 : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getExamRsltTy1.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //검사결과 상세 조회 - 판독결과
- getExamRsltTy2 : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getExamRsltTy2.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //수술 이력 목록 조회
- getOpDetailHistoryList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOpDetailHistoryList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //수술 상세 조회
- getOperationDetail : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOperationDetail.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //시술 이력 목록 조회
- getTrDetailHistoryList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getTrDetailHistoryList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //시술 상세 조회
- getTreatmentDetail : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getTreatmentDetail.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //협진 이력 목록 조회
- getCoDetailHistoryList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getCoDetailHistoryList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //협진 상세 조회
- getCollaborationDetail : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getCollaborationDetail.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //진료 기록 목록 조회
- getMediRecordList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getMediRecordList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //진료기록서식코드조회
- getMediRecordFormList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getMediRecordFormList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //진료 기록 상세 조회
- getMediRecordDetail : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getMediRecordDetail.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //진료 기록 내용 상세 조회
- getMediRecordContentDetail : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getMediRecordContentDetail.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //임상관찰 조회
- getVitalList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getVitalList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //임상관찰 IO합계 조회
- getVitalListSum : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getVitalListSum.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //임상관찰 IO합계 조회
- getVitalListSum2 : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getVitalListSum2.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //투약실시 내역 조회
- getMedicationList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getMedicationList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //임상관찰 등록
- inputVital : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/inputVital.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //환자의 마지막 임상관찰 조회
- getVitalByLast : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getVitalByLast.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- //환부이미지 전송
- inputWoundImg : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/inputWoundImg.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- /* 진료-환자검색 --------------------------------------------------------------------- */
- //사용자의 진료과 리스트 조회 - 입원, 외래, 응급, 수술, 시술, 협진
- getDeptList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getDeptList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //진료과의 진료의 리스트 조회 - 입원, 외래, 수술, 시술, 협진
- getDoctorListByDept : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getDoctorListByDept.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //사용자의 병동 리스트 조회
- getWardList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getWardList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //병동의 병실 리스트 조회
- getRoomListByWard : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getRoomListByWard.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //입원환자 검색
- getInPatientList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getInPatientList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //외래 진료 상태 리스트 조회
- getOutTreatStatList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOutTreatStatList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //외래환자 검색
- getOutPatientList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOutPatientList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //응급환자 상태 리스트 조회
- getEmTreatStatList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getEmTreatStatList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //응급환자 검색
- getEmPatientList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getEmPatientList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //수술실 리스트 조회
- getOperationCntrList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOperationCntrList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //수술실의 수술방 리스트 조회
- getOperationRoomList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOperationRoomList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //수술 진행 상태 리스트 조회
- getOperationStatList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOperationStatList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //수술환자 검색
- getOpPatientList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getOpPatientList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //시술실 리스트 조회
- getTreatmentCntrList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getTreatmentCntrList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //시술 진행 상태 리스트 조회
- getTreatmentStatList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getTreatmentStatList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //시술환자 검색
- getTrPatientList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getTrPatientList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //협진환자 검색
- getCoPatientList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getCoPatientList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //바코드환자 검색
- getBarPatientList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getBarPatientList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //QR코드 환자 검색
- getQrPatientList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getQrPatientList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //NFC 환자 검색
- getNfcPatientList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getNfcPatientList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- /* 진료-환자정보 --------------------------------------------------------------------- */
- //환자정보(or 진료서비스) 접근 권한 체크
- checkAccessRights : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/checkAccessRights.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //환자정보 조회
- getPatientInfo : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getPatientInfo.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //환자용 notice 조회
- getPatientNotice : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/medical/getPatientNotice.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- }
-
- };
- this.safety = {
- //환자안전관리 투약리스트
- getInjectionList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getInjectionList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //환자안전관리 투약실시
- inputInjection : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/inputInjection.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- //환자안전관리 IVF 처리
- getInfusionList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getInfusionList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //환자안전관리 IVF 실시
- inputStartInfusion: function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/inputStartInfusion.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- //환자안전관리 IVF 종료
- inputEndInfusion : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/inputEndInfusion.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //환자안전관리 체혈 리스트
- getSpecimenList : function(param, checkYn, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getSpecimenList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(checkYn, response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //환자안전관리 체혈 실시
- actSpecimen : function(param){
- var result = "";
- $.ajax ({
- url : $serviceBaseUrl + "/safety/actSpecimen.json",
- type : "POST",
- contentType: "application/json",
- async: false,
- data: JSON.stringify(param),
- success: function(response){
- // if(response.result!=undefined){
- // callback(response.result);
- // }else{
- // self.alert(response.msg);
- // }
- // var returnCd = "";
- // if (response.result == undefined) {
- // returnCd = "0001";
- // } else {
- // returnCd = response.result[0].returnCd;
- // }
- //
- // callback(returnCd, size, key);
-
- if (response.result == undefined) {
- result = "failed";
- } else if (response.result.length == 0) {
- result = "failed";
- } else {
- if (response.result[0].returnCd == "0000") {
- result = "success";
- } else {
- result = "failed";
- }
- }
-
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- },
- error: function (XHR, textStatus, errorThrown) {
- self.loading("hide");
- result = "failed";
- }
- });
-
- return result;
- } ,
- //환자안전관리 혈액신청 리스트
- getBloodRequestList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getBloodRequestList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //환자안전관리 혈액신청
- inputBloodRequest: function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/inputBloodRequest.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- //환자안전관리 혈액 수령 리스트
- getBloodReceiveList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getBloodReceiveList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //환자안전관리 혈액 수령
- inputBloodReceive: function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/inputBloodReceive.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- // Mcare-Fatima 수혈 혈액정보 요청
- getBloodCheckList : function(param, isSecondTrial, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getBloodCheckList.json",
- async : false,
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(isSecondTrial, response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- // Mcare-Fatima 수혈 혈액 상세정보 요청
- getBloodDetailInfo : function(param, index, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getBloodDetailInfo.json",
- type : "POST",
- async : false,
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(index, response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- },
- error: function (XHR, textStatus, errorThrown) {
- self.alert("정보 조회에 실패하였습니다.");
- self.loading("hide");
- }
- });
- },
- //환자안전관리 수혈확인
- inputBloodCheck: function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/inputBloodCheck.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- } ,
- //환자안전관리 혈액반납 리스트
- getBloodCancelList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getBloodCancelList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- //환자안전관리 혈액 반납
- inputBloodCancel: function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/inputBloodCancel.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- getAtcPrescriptionList: function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getAtcPrescriptionList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- // callback(response.result);
- callback(response.result);
- }else{
- // failCallback(param);
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- // 환자안전관리 투약 처방 리스트
- getPrescriptionList: function(param, checkYn, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getPrescriptionList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(checkYn, response.result);
- }else{
- // failCallback(param);
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- /**
- * 대구파티마병원 NFC 태그 시 사용자 정보 호출
- * @param {Object} param 전송될 파라미터
- * @param {function} callback
- */
- getNfcDoctorId: function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getNfcDoctorId.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
- // 환자안전관리 환자 정보 공통
- getPocPatientInfo: function(param, patientId, isSecondTrial, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getPocPatientInfo.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result, patientId, isSecondTrial);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- },
- error: function (XHR, textStatus, errorThrown) {
- self.alert("정보 조회에 실패하였습니다.");
- self.loading("hide");
- }
- });
- },
- // 환자안전관리 투약 실시
- actMedication: function(param){
- var result = "";
- $.ajax ({
- url : $serviceBaseUrl + "/safety/actMedication.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- async: false,
- success: function(response){
- // console.log("response -- > " + JSON.stringify(response));
- // if(response.result!=undefined){
- // callback(response.result);
- // }else{
- // self.alert(response.msg);
- // }
-
- // var returnCd = "";
- // if (response.result.length == 0) {
- // result = "failed";
- // } else if (response.result == undefined) {
- // returnCd = "0001";
- // } else {
- // returnCd = response.result[0].returnCd;
- // }
- //
- // callback(returnCd, size, key);
-
- if (response.result == undefined) {
- result = "failed";
- } else if (response.result.length == 0) {
- result = "failed";
- } else {
- if (response.result[0].returnCd == "0000") {
- result = "success";
- } else {
- result = "failed";
- }
-
- }
-
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- },
- error: function (XHR, textStatus, errorThrown) {
- // self.alert("Error");
- self.loading("hide");
- result = "failed";
- }
- });
- return result;
- },
-
- // 수혈 1단계 저장
- inputCheckupId : function(param, callback, selectItem){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/inputCheckupId.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- // if(response.result!=undefined){
- // callback(response.result);
- // }else{
- // self.alert(response.msg);
- // }
-
- var returnCd = "";
- if (response.result == undefined) {
- returnCd = "0001";
- } else {
- returnCd = response.result[0].returnCd;
- }
-
- callback(returnCd, selectItem);
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- // 수혈 2~4단계 저장
- inputBloodHealthCheck : function(param, item, callback, stepName){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/inputBloodHealthCheck.json",
- type : "POST",
- contentType: "application/json",
- async: false,
- data: JSON.stringify(param),
- success: function(response){
- console.log("response -- > " + JSON.stringify(response));
-
- checkCnt = checkCnt + 1;
- if (response.result == undefined) {
- resultReturnCode += "0001" + ",";
- } else if (response.result.length == 0) {
- resultReturnCode += "0001" + ",";
- } else {
- resultReturnCode += response.result[0].returnCd + ",";
- }
-
- if (item.length == checkCnt) {
- callback(resultReturnCode, checkCnt, item.length, stepName);
- resultReturnCode = "";
- checkCnt = 0;
- }
-
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- },
- error: function (XHR, textStatus, errorThrown) {
- self.loading("hide");
- alert("저장에 실패하였습니다.");
- }
- });
- },
- // 수혈 인증저장
- inputBloodSignData : function(param, item, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/inputBloodSignData.json",
- type : "POST",
- contentType: "application/json",
- async: false,
- data: JSON.stringify(param),
- success: function(response){
- console.log("response -- > " + JSON.stringify(response));
-
- checkCnt = checkCnt + 1;
- if (response.result == undefined) {
- resultReturnCode += "0001" + ",";
- } else if (response.result.length == 0) {
- resultReturnCode += "0001" + ",";
- } else {
- resultReturnCode += response.result[0].returnCd + ",";
- }
-
- if (item.length == checkCnt) {
- callback(resultReturnCode, checkCnt, item.length);
- resultReturnCode = "";
- checkCnt = 0;
- }
-
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- },
- error: function (XHR, textStatus, errorThrown) {
- self.loading("hide");
- alert("저장에 실패하였습니다.");
- }
- });
- },
-
- // 부작용 리스트
- getSideEffectList : function(param, callback){
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getSideEffectList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- },
-
- // 수혈중단 사유 리스트
- getTransStopReasonList: function (param, type, callback) {
- $.ajax ({
- url : $serviceBaseUrl + "/safety/getTransStopReasonList.json",
- type : "POST",
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function(response){
- if(response.result!=undefined){
- callback(type, response.result);
- }else{
- self.alert(response.msg);
- }
- },
- beforeSend: function(){
- self.loading("show");
- },
- complete:function(){
- self.loading("hide");
- }
- });
- }
- };
-
- /* 공통 서비스 --------------------------------------------------------------------- */
- this.common = {
- /**
- * 환자를 선택한 경우, 각 다이얼로그 화면에 사용자 정보를 설정
- *
- * @param {string} patientId 환자 번호
- * @param {string} patientNm 환자 이름
- * @param {string} patientAge 환자 나이
- * @param {string} patientGender 환자 성별
- * @param {string} patientTreatCls ??
- * @param {string} patientReceiptNo 접수 번호
- * @param {string} patientDeptCd 환자 진료과 코드
- * @param {string} patientDoctorId 진료의? 주치의?
- */
- setSelectedPatient : function(patientId, patientNm, patientAge, patientGender, patientTreatCls, patientReceiptNo, patientDeptCd, patientDoctorId){
- // 전역 변수에 값 할당
- gPatientId = patientId;
- gPatientNm = patientNm;
- gPatientAge = patientAge;
- gPatientGender = patientGender;
- gPatientTreatCls = patientTreatCls;
- gPatientReceiptNo = patientReceiptNo;
- gPatientDeptCd = patientDeptCd;
- gPatientDoctorId = patientDoctorId;
-
- $(".modal-patient-id").text(gPatientId);
- $(".modal-patient-name").text(gPatientNm);
- $(".modal-patient-age-gender").text(gPatientAge + " / " + patientGender);
- $(".modal-patient-treat-cls").text(self.common.displayTreatCls( patientTreatCls));
- },
- /**
- * 전역 변수에 어떤 일자를 설정
- *
- * @param {string} hospitalizationDt 어떤 일자
- */
- setHospitalizationDt : function(hospitalizationDt){
- gPatientHospitalizationDt = hospitalizationDt;
- },
- // localstorage 를 초기화 : 로그 아웃에서 사용
- initLocalStorage : function(){
- var hospitalCd = "";
- var defaultDeptCd = "";
- var defaultHomePage = "";
- var defaultUserID = "";
- var defaultData = "";
- var defaultisAuto = "";
-
- if( localStorage.getItem("hospitalCd") != undefined && localStorage.getItem("hospitalCd") != "" )
- hospitalCd = localStorage.getItem("hospitalCd");
- if( localStorage.getItem("defaultDeptCd") != undefined && localStorage.getItem("defaultDeptCd") != "" )
- defaultDeptCd = localStorage.getItem("defaultDeptCd");
- if( localStorage.getItem("defaultHomePage") != undefined && localStorage.getItem("defaultHomePage") != "" )
- defaultHomePage = localStorage.getItem("defaultHomePage");
- if( localStorage.getItem("defaultUserID") != undefined && localStorage.getItem("defaultUserID") != "" )
- defaultUserID = localStorage.getItem("defaultUserID");
- if( localStorage.getItem("defaultData") != undefined && localStorage.getItem("defaultData") != "" )
- defaultData = localStorage.getItem("defaultData");
- if( localStorage.getItem("defaultisAuto") != undefined && localStorage.getItem("defaultisAuto") != "" )
- defaultisAuto = localStorage.getItem("defaultisAuto");
-
- localStorage.clear();
-
- localStorage.setItem("hospitalCd", hospitalCd);
- localStorage.setItem("defaultDeptCd", defaultDeptCd);
- localStorage.setItem("defaultHomePage", defaultHomePage);
- localStorage.setItem("defaultUserID", defaultUserID);
- localStorage.setItem("defaultData", defaultData);
- localStorage.setItem("defaultisAuto", defaultisAuto);
- },
- // localstorage에 선택된 사용자 설정 등록
- setLocalStorageSelectedInfo : function(userDeptInfo){
- localStorage.setItem("selectedUserId", userDeptInfo.userId);
- localStorage.setItem("selectedUserNm", userDeptInfo.userNm);
- localStorage.setItem("selectedDeptCd", userDeptInfo.deptCd);
- localStorage.setItem("selectedDeptNm", userDeptInfo.deptNm);
- localStorage.setItem("selectedJobKindCd", userDeptInfo.jobKindCd);
- localStorage.setItem("selectedJobKindNm", userDeptInfo.jobKindNm);
- localStorage.setItem("selectedUserAuth", userDeptInfo.userAuth);
- },
- // 배열 Object 문자 정렬
- sortArrayObject : function(arrayObject, fieldName, isAscending){
- if( arrayObject.length < 2){
- console.log( "sortArrayObject : 배열이 2개 미만으로 정렬하지 않음");
- return;
- }
-
- if( isAscending){
- arrayObject.sort( function(a, b) { // 오름차순
- return a[fieldName] < b[fieldName] ? -1 : a[fieldName] > b[fieldName] ? 1 : 0;
- });
- } else {
- arrayObject.sort( function(a, b) { // 내림차순
- return a[fieldName] > b[fieldName] ? -1 : a[fieldName] < b[fieldName] ? 1 : 0;
- });
- }
- },
- // 현재 로그인 사용자의 jobKind와 맞는 권한 인지 체크
- checkAccessJobKind : function(jobKindLevel){
- if( localStorage.getItem("selectedJobKindCd") == jobKindLevel)
- return true;
- else
- return false;
- },
- //현재 로그인 사용자의 userAuth와 맞는 권한 인지 체크
- checkAccessUserAuth : function(authLevel){
- if( localStorage.getItem("selectedUserAuth") == authLevel)
- return true;
- else
- return false;
- },
- // 기본 페이지 URL 가져오는 함수
- getDefaultHomePageURL : function(strHomePage){
- if (strHomePage == "injection")
- return contextPath + "/mobile_poc/medicine/medicine.page?menuId=clinic";
- else if (strHomePage == "bleeding")
- return contextPath + "/mobile_poc/bleeding/bleeding.page?menuId=clinic";
- else if (strHomePage == "transfusion")
- return contextPath + "/mobile_poc/transfusion/transfusion.page?menuId=clinic";
- else
- return contextPath + "/mobile_poc/medicine/medicine.page?menuId=clinic";
- },
- // 기본 페이지로 이동해주는 함수
- gotoDefaultHomePage : function(){
- //alert( "[" + localStorage.getItem("defaultHomePage") + "]");
- if (localStorage.getItem("defaultHomePage") == undefined || localStorage.getItem("defaultHomePage") == "") {
- //location.href="index.page";
- //location.href = contextPath + "/mobile/medical/inpatient.page?menuId=clinic";
- location.href = getDefaultHomePageURL("default");
- } else {
- location.href = getDefaultHomePageURL( localStorage.getItem("defaultHomePage"));
- }
- },
- // 화면 element disabled 설정
- enableElements : function(targetObj){
- targetObj.prop("enabled", true);
- targetObj.find("*").prop("enabled", true);
- },
- // 화면 element enable or disabled 설정
- disableElements : function(targetObj){
- targetObj.prop("disabled", true);
- targetObj.find("*").prop("disabled", true);
- },
- //JSON 그룹핑
- JSONGroupBy : function(xs, key) {
- return xs.reduce(function(rv, x) {
- (rv[x[key]] = rv[x[key]] || []).push(x);
- return rv;
- }, {});
- },
-
- displayTreatCls : function(treatCls){
- if( gPatientTreatCls == "I")
- return "입원";
- else if( gPatientTreatCls == "O")
- return "외래";
- else if( gPatientTreatCls == "E")
- return "응급";
- else
- return "";
- },
- /**
- * 각 화면별 입력 화면 권한처리
- */
- authorityCheck : function(objectID){
- var adminID = "29990030";
- if(objectID != null && objectID != "" && adminID != gLoginUserId){
- $(objectID).prop( "disabled", true );
- console.log("authorityCheck call");
- }
- },
- /**
- * 건대 요구사항 : 소속 과에 사용자명이 없을 경우 %전공의로 처리
- * 해당 이름이 있을 경우
- */
- kuhResidentSelect : function(selectElement, targetName, targetValue){
- if( !selectElement){
- return "";
- }
- for( var i = 0; i < selectElement.options.length; i ++){
- if(selectElement.options[i].text == targetName && selectElement.options[i].value == targetValue){
- return targetValue;
- }
- }
- for( var i = 0; i < selectElement.options.length; i ++){
- if((selectElement.options[i].text).indexOf("전공의") > -1){
- return selectElement.options[i].value;
- }
- }
- return "";
- },
- /**
- * 백병원 요구사항 : 소속 과에 사용자명이 없을 경우 %전공의로 처리 부분 제외
- * 해당 이름이 있을 경우
- */
- commonResidentSelect : function(selectElement, targetName, targetValue){
- if( !selectElement){
- return "";
- }
- for( var i = 0; i < selectElement.options.length; i ++){
- if(selectElement.options[i].text == targetName && selectElement.options[i].value == targetValue){
- return targetValue;
- }
- }
- return "";
- }
- };
- };
|