SPMMO03600_협진환자관리.xfdl 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMMO03600" position="absolute 0 0 885 487" titletext="협진관리" oninit="SPMMO03600_oninit" onload="SPMMO03600_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static text="협진내역" position="absolute 472 6 593 26" id="caption18" class="tit_2"/>
  8. <Static text="협진환자등록" position="absolute 3 6 124 26" id="caption1" class="tit_2"/>
  9. <Static text="등록번호" position="absolute 0 26 70 50" id="caption5" class="cell_1"/>
  10. <Static text="환자명" position="absolute 214 26 284 50" id="caption4" class="cell_1"/>
  11. <Static text="성별/나이" position="absolute 0 52 70 76" id="caption9" class="cell_1"/>
  12. <Static text="적용기간" position="absolute 0 78 70 101" id="caption2" class="cell_1"/>
  13. <Static text="협진분류" position="absolute 0 128 70 151" id="caption3" class="cell_1"/>
  14. <Button position="absolute 378 0 420 20" id="button37" class="btn2" text="삭제" onclick="button37_onclick"/>
  15. <Button position="absolute 421 0 463 20" id="button2" class="btn5" text="저장" onclick="button2_onclick"/>
  16. <Button position="absolute 215 130 279 150" id="button1" class="btn2" text="분류등록" onclick="button1_onclick"/>
  17. <Button position="absolute 324 0 377 20" id="button4" class="btn2" text="초기화" onclick="button4_onclick"/>
  18. <Static text="~" position="absolute 172 81 180 101" id="caption10"/>
  19. <Static text="협진회의록" position="absolute 0 158 121 178" id="caption11" class="tit_2"/>
  20. <Static text="상정과" position="absolute 0 103 70 126" id="caption12" class="cell_1"/>
  21. <Static text="진료의" position="absolute 214 104 284 127" id="caption13" class="cell_1"/>
  22. <Edit position="absolute 287 105 400 125" id="cmb_cnstorddrid" enable="false"/>
  23. <Button position="absolute 190 28 210 48" id="btn_spctcle" class="icon_search" text="" onclick="btn_spctcle_onclick"/>
  24. <Combo position="absolute 74 130 212 150" id="cmb_cnsttypecd" innerdataset="ds_M0525" datacolumn="cdnm" codecolumn="cdid" onitemchanged="cmb_cnsttypecd_onitemchanged"/>
  25. <Edit position="absolute 73 28 188 48" id="ipt_pid" taborder="1" onkeydown="ipt_pid_onkeydown"/>
  26. <Edit position="absolute 287 28 400 48" id="ipt_hngnm" taborder="2" onkeydown="ipt_hngnm_onkeydown"/>
  27. <Edit readonly="false" position="absolute 74 54 140 74" align="align:center middle;" id="opt_sa" enable="false" style="align:center middle;"/>
  28. <Calendar position="absolute 187 80 280 100" align="align:center middle;" id="ipt_valitodd" class="input_s_essential" taborder="1" mask="yyyy-mm-dd" onchanged="ipt_valitodd_onchanged" dateformat="yyyy-MM-dd" value="null"/>
  29. <Calendar position="absolute 74 80 167 100" align="align:center middle;" id="ipt_valifromdd" class="input_s_essential" taborder="1" mask="yyyy-mm-dd" onchanged="ipt_valifromdd_onchanged" dateformat="yyyy-MM-dd" value="null"/>
  30. <Combo position="absolute 74 105 212 125" id="cmb_cnstorddeptcd" innerdataset="@ds_orddept" datacolumn="depthngnm" codecolumn="deptcd"/>
  31. <Grid position="absolute 470 26 885 150" id="grd_cnstpathistinfo" binddataset="ds_grd_cnstpathistinfo" anchor="left top right" cellsizingtype="col">
  32. <Formats>
  33. <Format id="default">
  34. <Columns>
  35. <Column size="0"/>
  36. <Column size="0"/>
  37. <Column size="0"/>
  38. <Column size="0"/>
  39. <Column size="0"/>
  40. <Column size="0"/>
  41. <Column size="0"/>
  42. <Column size="0"/>
  43. <Column size="0"/>
  44. <Column size="0"/>
  45. <Column size="0"/>
  46. <Column size="0"/>
  47. <Column size="197"/>
  48. <Column size="119"/>
  49. <Column size="96"/>
  50. </Columns>
  51. <Rows>
  52. <Row size="24" band="head"/>
  53. <Row size="24"/>
  54. </Rows>
  55. <Band id="head">
  56. <Cell text="genrdd"/>
  57. <Cell col="1" text="genrno"/>
  58. <Cell col="2" text="cnsttypecd"/>
  59. <Cell col="3" text="cnsttrgtcd"/>
  60. <Cell col="4" text="valitodd"/>
  61. <Cell col="5" text="cnstorddeptcd"/>
  62. <Cell col="6" text="cnstorddrid"/>
  63. <Cell col="7" text="pid"/>
  64. <Cell col="8" text="orddd"/>
  65. <Cell col="9" text="cretno"/>
  66. <Cell col="10" text="hngnm"/>
  67. <Cell col="11" text="sa"/>
  68. <Cell col="12" text="협진팀명"/>
  69. <Cell col="13" text="상정과"/>
  70. <Cell col="14" text="적용일"/>
  71. </Band>
  72. <Band id="body">
  73. <Cell text="bind:genrdd"/>
  74. <Cell col="1" text="bind:genrno"/>
  75. <Cell col="2" text="bind:coopteamcd"/>
  76. <Cell col="3" text="bind:cnstteamseq"/>
  77. <Cell col="4" text="bind:valitodd"/>
  78. <Cell col="5" text="bind:cnstorddeptcd"/>
  79. <Cell col="6" text="bind:cnstorddrid"/>
  80. <Cell col="7" text="bind:pid"/>
  81. <Cell col="8" text="bind:cretno"/>
  82. <Cell col="9" text="bind:orddd"/>
  83. <Cell col="10" text="bind:hngnm"/>
  84. <Cell col="11" text="bind:sa"/>
  85. <Cell col="12" text="bind:coopteamnm"/>
  86. <Cell col="13" text="bind:cnstdeptnm"/>
  87. <Cell col="14" text="bind:valifromdd" mask="####-##-##"/>
  88. </Band>
  89. </Format>
  90. </Formats>
  91. </Grid>
  92. <Button position="absolute 808 155 883 175" id="button3" class="btn2" text="회의록작성" onclick="button3_onclick" anchor="top right"/>
  93. <Grid position="absolute 0 179 885 487" id="grd_cnstconflist" binddataset="ds_grd_cnstconflist" oncelldblclick="grd_cnstconflist_oncelldblclick" anchor="all" cellsizingtype="col">
  94. <Formats>
  95. <Format id="default">
  96. <Columns>
  97. <Column size="0"/>
  98. <Column size="0"/>
  99. <Column size="0"/>
  100. <Column size="116"/>
  101. <Column size="100"/>
  102. <Column size="659"/>
  103. </Columns>
  104. <Rows>
  105. <Row size="24" band="head"/>
  106. <Row size="24"/>
  107. </Rows>
  108. <Band id="head">
  109. <Cell text="genrdd"/>
  110. <Cell col="1" text="genrno"/>
  111. <Cell col="2" text="confrecno"/>
  112. <Cell col="3" text="회의일시"/>
  113. <Cell col="4" text="협진분류명"/>
  114. <Cell col="5" text="회의제목"/>
  115. </Band>
  116. <Band id="body">
  117. <Cell text="bind:genrdd"/>
  118. <Cell col="1" text="bind:genrno"/>
  119. <Cell col="2" text="bind:confrecno"/>
  120. <Cell col="3" style="align:left middle;" text="bind:confdt" mask="####-##-## ##:##"/>
  121. <Cell col="4" style="align:left middle;padding:0 0 0 0;" text="bind:coopteamnm"/>
  122. <Cell col="5" style="align:left middle;" text="bind:conftitl"/>
  123. </Band>
  124. </Format>
  125. </Formats>
  126. </Grid>
  127. <Static id="opt_status" position="absolute 325 80 400 100"/>
  128. </Layout>
  129. </Layouts>
  130. <Objects>
  131. <Dataset id="ds_grd_cnstpathistinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" onrowposchanged="ds_grd_cnstpathistinfo_onrowposchanged">
  132. <ColumnInfo>
  133. <Column id="genrdd" type="STRING"/>
  134. <Column id="genrno" type="STRING"/>
  135. <Column id="coopteamcd" type="STRING"/>
  136. <Column id="cnstteamseq" type="STRING"/>
  137. <Column id="valitodd" type="STRING"/>
  138. <Column id="cnstorddeptcd" type="STRING"/>
  139. <Column id="cnstorddrid" type="STRING"/>
  140. <Column id="pid" type="STRING"/>
  141. <Column id="cretno" type="STRING"/>
  142. <Column id="orddd" type="STRING"/>
  143. <Column id="hngnm" type="STRING"/>
  144. <Column id="sa" type="STRING"/>
  145. <Column id="coopteamnm" type="STRING"/>
  146. <Column id="cnstdeptnm" type="STRING"/>
  147. <Column id="valifromdd" type="STRING"/>
  148. </ColumnInfo>
  149. <Rows/>
  150. </Dataset>
  151. <Dataset id="ds_grd_cnstconflist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  152. <ColumnInfo>
  153. <Column id="genrdd" type="STRING"/>
  154. <Column id="genrno" type="STRING"/>
  155. <Column id="confrecno" type="STRING"/>
  156. <Column id="confdt" type="STRING"/>
  157. <Column id="coopteamnm" type="STRING"/>
  158. <Column id="conftitl" type="STRING"/>
  159. </ColumnInfo>
  160. </Dataset>
  161. <Dataset id="ds_cnstpatinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  162. <ColumnInfo>
  163. <Column id="genrdd" type="STRING" size="256"/>
  164. <Column id="genrno" type="STRING" size="256"/>
  165. <Column id="status" type="STRING" size="256"/>
  166. <Column id="pid" type="STRING" size="256"/>
  167. <Column id="hngnm" type="STRING" size="256"/>
  168. <Column id="sa" type="STRING" size="256"/>
  169. <Column id="valifromdd" type="STRING" size="256"/>
  170. <Column id="valitodd" type="STRING" size="256"/>
  171. <Column id="cnstorddeptcd" type="STRING" size="256"/>
  172. <Column id="cnstorddrnm" type="STRING" size="256"/>
  173. <Column id="cnstteamseq" type="STRING" size="256"/>
  174. <Column id="coopteamcd" type="STRING" size="256"/>
  175. <Column id="coopteamnm" type="STRING" size="256"/>
  176. <Column id="orddd" type="STRING" size="256"/>
  177. <Column id="cretno" type="STRING" size="256"/>
  178. <Column id="ioflag" type="STRING" size="256"/>
  179. <Column id="roomcd" type="STRING" size="256"/>
  180. </ColumnInfo>
  181. <Rows>
  182. <Row/>
  183. </Rows>
  184. </Dataset>
  185. <Dataset id="ds_orddept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  186. <ColumnInfo>
  187. <Column id="deptcd" type="STRING" size="256"/>
  188. <Column id="depthngnm" type="STRING" size="256"/>
  189. </ColumnInfo>
  190. </Dataset>
  191. <Dataset id="ds_reqTRMMO03603" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  192. <ColumnInfo>
  193. <Column id="pid" type="STRING" size="256"/>
  194. </ColumnInfo>
  195. <Rows>
  196. <Row/>
  197. </Rows>
  198. </Dataset>
  199. <Dataset id="ds_reqTRMMO03604" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  200. <ColumnInfo>
  201. <Column id="confdt" type="STRING" size="256"/>
  202. <Column id="genrdd" type="STRING" size="256"/>
  203. <Column id="genrno" type="STRING" size="256"/>
  204. <Column id="confrecno" type="STRING" size="256"/>
  205. <Column id="state" type="STRING" size="256"/>
  206. <Column id="pid" type="STRING" size="256"/>
  207. </ColumnInfo>
  208. <Rows>
  209. <Row/>
  210. </Rows>
  211. </Dataset>
  212. <Dataset id="ds_M0525" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  213. <Dataset id="ds_tmpcnstpatinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  214. <Dataset id="ds_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  215. </Objects>
  216. <Bind>
  217. <BindItem id="item0" compid="ipt_pid" propid="value" datasetid="ds_cnstpatinfo" columnid="pid"/>
  218. <BindItem id="item1" compid="ipt_hngnm" propid="value" datasetid="ds_cnstpatinfo" columnid="hngnm"/>
  219. <BindItem id="item2" compid="opt_sa" propid="value" datasetid="ds_cnstpatinfo" columnid="sa"/>
  220. <BindItem id="item3" compid="ipt_valifromdd" propid="value" datasetid="ds_cnstpatinfo" columnid="valifromdd"/>
  221. <BindItem id="item4" compid="ipt_valitodd" propid="value" datasetid="ds_cnstpatinfo" columnid="valitodd"/>
  222. <BindItem id="item5" compid="cmb_cnstorddeptcd" propid="value" datasetid="ds_cnstpatinfo" columnid="cnstorddeptcd"/>
  223. <BindItem id="item6" compid="cmb_cnstorddrid" propid="value" datasetid="ds_cnstpatinfo" columnid="cnstorddrnm"/>
  224. <BindItem id="item7" compid="cmb_cnsttypecd" propid="value" datasetid="ds_cnstpatinfo" columnid="coopteamcd"/>
  225. </Bind>
  226. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  227. * System Name :
  228. * Job Name :
  229. * Creator :
  230. * Make Date : 2014-08-29
  231. * Description :
  232. *---------------------------------------------------------------------------------------
  233. * Modify Date Modifier Modify Description
  234. *---------------------------------------------------------------------------------------
  235. * 2014-08-29 Live Converter TF->XP
  236. *
  237. *---------------------------------------------------------------------------------------
  238. ****************************************************************************************/
  239. include "com_commonxp::comm_main.xjs";
  240. include "emr_prcpmngtxp::MMO001.xjs";
  241. function SPMMO03600_oninit(obj:Form, e:InitEventInfo)
  242. {
  243. frmf_initForm(obj);
  244. }
  245. function SPMMO03600_onload(obj:Form, e:LoadEventInfo)
  246. {
  247. grdf_setToolTipBind(grd_cnstpathistinfo);
  248. grdf_setToolTipBind(grd_cnstconflist);
  249. fInitialize_SPMMO03600();
  250. fChkStatus();
  251. }
  252. function button4_onclick(obj:Button, e:ClickEventInfo)
  253. {
  254. fInitCnstPatInfo();
  255. fChkStatus();
  256. }
  257. function button37_onclick(obj:Button, e:ClickEventInfo)
  258. {
  259. fClkBtnDel();
  260. fChkStatus();
  261. }
  262. function button2_onclick(obj:Button, e:ClickEventInfo)
  263. {
  264. fReqExeSaveCnstPatInfo();
  265. fChkStatus();
  266. }
  267. function ipt_pid_onkeydown(obj:Edit, e:KeyEventInfo)
  268. {
  269. if(e.keycode == 13)
  270. btn_spctcle.onclick.fireEvent(btn_spctcle, new ClickEventInfo);
  271. }
  272. function btn_spctcle_onclick(obj:Button, e:ClickEventInfo)
  273. {
  274. var pid = utlf_trim(ds_cnstpatinfo.getColumn(0, "pid"));
  275. ds_cnstpatinfo.setColumn(0, "pid", pid);
  276. frmf_setParameter("SPMMO017300_pid", pid);
  277. frmf_modal("SPMMO17300", "SPMMO17300", null, null, null, null, null, null, null, null, null, null, "M");
  278. var pid = frmf_getParameter("SPMMO017300_pid");
  279. if(!utlf_isNull(pid)) {
  280. var hngnm = frmf_getParameter("SPMMO017300_hngnm");
  281. var sa = frmf_getParameter("SPMMO017300_sa");
  282. var cretno = frmf_getParameter("SPMMO017300_cretno");
  283. var orddd = frmf_getParameter("SPMMO017300_orddd");
  284. var cnstdeptcd = frmf_getParameter("SPMMO017300_cnstdeptcd");
  285. var coopteamcd = frmf_getParameter("SPMMO017300_coopteamcd");
  286. var orddrnm = frmf_getParameter("SPMMO017300_orddrnm");
  287. var ioflag = frmf_getParameter("SPMMO017300_ioflag");
  288. ds_cnstpatinfo.setColumn(0, "pid" , pid);
  289. ds_cnstpatinfo.setColumn(0, "hngnm" , hngnm);
  290. ds_cnstpatinfo.setColumn(0, "sa" , sa);
  291. ds_cnstpatinfo.setColumn(0, "cretno" , cretno);
  292. ds_cnstpatinfo.setColumn(0, "orddd" , orddd);
  293. ds_cnstpatinfo.setColumn(0, "cnstorddeptcd", cnstdeptcd);
  294. ds_cnstpatinfo.setColumn(0, "coopteamcd" , coopteamcd);
  295. ds_cnstpatinfo.setColumn(0, "cnstorddrnm" , orddrnm);
  296. ds_cnstpatinfo.setColumn(0, "ioflag" , ioflag);
  297. fReqGetCnstPatHistList(); // 협진환자 이력조회
  298. fReqGetCnstConfRecList(pid);
  299. }
  300. }
  301. function ipt_hngnm_onkeydown(obj:Edit, e:KeyEventInfo)
  302. {
  303. if(e.keycode == 13)
  304. btn_spctcle.onclick.fireEvent(btn_spctcle, new ClickEventInfo);
  305. }
  306. function ipt_valifromdd_onchanged(obj:Calendar, e:ChangeEventInfo)
  307. {
  308. if(ipt_valifromdd.value > ipt_valitodd.value){
  309. sysf_messageBox("시작일이 종요일보다 클 수", "I004");
  310. ipt_valitodd.value = ipt_valifromdd.value;
  311. }
  312. }
  313. function ipt_valitodd_onchanged(obj:Calendar, e:ChangeEventInfo)
  314. {
  315. if(ipt_valifromdd.value > ipt_valitodd.value){
  316. sysf_messageBox("종료일이 시작일보다 작을 수", "I004");
  317. ipt_valifromdd.value = ipt_valitodd.value;
  318. }
  319. }
  320. function cmb_cnsttypecd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  321. {
  322. // 아래 코드 의미 없어서 주석
  323. // var coopteamcd = cmb_cnsttypecd.value;
  324. // var coopteamnm = cmb_cnsttypecd.text;
  325. //
  326. // ds_cnstpatinfo.setColumn(0, "coopteamcd" , coopteamcd);
  327. // ds_cnstpatinfo.setColumn(0, "coopteamnm" , coopteamnm);
  328. }
  329. function button1_onclick(obj:Button, e:ClickEventInfo)
  330. {
  331. frmf_modal("SPMMO03900", "SPMMO03900", null, null, null, null, null, null, null, null, null, null, "M");
  332. }
  333. function ds_grd_cnstpathistinfo_onrowposchanged(obj:Dataset, e:DSRowPosChangeEventInfo)
  334. {
  335. fClkCnstPatHistListGrid();
  336. fChkStatus();
  337. }
  338. function button3_onclick(obj:Button, e:ClickEventInfo)
  339. {
  340. fClkBtnCnstConfRec();
  341. }
  342. function grd_cnstconflist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  343. {
  344. fDbClkGrdCnstConfRec();
  345. }
  346. /**
  347. * @desc : 화면 초기화
  348. * @
  349. * @param :
  350. * @return :
  351. * @author : 오지훈
  352. * @---------------------------------------------------
  353. */
  354. function fInitialize_SPMMO03600(){
  355. appf_getCodeList([{dsNm: "ds_M0525", cdGrpId: "M0525"}], true);
  356. var inreq = opener.frmf_getParameter("SPMMO03600_inreqpid");
  357. lf_mmbfGetDeptCodeComboList(ds_orddept, "A");
  358. // if (isNull(inreq)) { // 진료대상자에서 오픈할 경우
  359. fInitCnstPatInfo(); //협진환자정보 초기화
  360. fReqGetCnstPatHistList(); //협진환자 이력조회
  361. var pid = ds_cnstpatinfo.getColumn(0, "pid");
  362. fReqGetCnstConfRecList(pid);
  363. /*
  364. } else { // 입원의뢰서에서 띄울경우
  365. model.setValue(sCNSTPATINFO_PATH + "/status", "i");
  366. model.setValue(sCNSTPATINFO_PATH + "/pid", inreq);
  367. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "A"); //부서코드 콤보
  368. fGetCnstInfo();
  369. model.setValue(sCNSTPATINFO_PATH + "/valifromdd" , getCurrentDate());
  370. model.setValue(sCNSTPATINFO_PATH + "/valitodd" , "99991231");
  371. }
  372. */
  373. }
  374. /**
  375. * @desc : 협진환자이력조회조회 조회
  376. * @
  377. * @param :
  378. * @return :
  379. * @author : 오지훈
  380. * @---------------------------------------------------
  381. */
  382. function fReqGetCnstPatHistList(){
  383. var pid = ds_cnstpatinfo.getColumn(0, "pid");
  384. ds_reqTRMMO03603.setColumn(0, "pid", pid);
  385. ds_grd_cnstpathistinfo.enableevent = false;
  386. var oParam = {};
  387. oParam.id = "TRMMO03603";
  388. oParam.service = "prcpmngtapp.ConcPatMngt";
  389. oParam.method = "reqGetCnstPatHistInfo";
  390. oParam.inds = "req=" + "ds_reqTRMMO03603";
  391. oParam.outds = "ds_grd_cnstpathistinfo=cnstpathistlist";
  392. oParam.async = false;
  393. tranf_submit(oParam);
  394. ds_grd_cnstpathistinfo.enableevent = true;
  395. ds_grd_cnstpathistinfo.rowposition = -1;
  396. }
  397. /**
  398. * @desc : 협진환자 저장
  399. * @
  400. * @param :
  401. * @return :
  402. * @author : 오지훈
  403. * @---------------------------------------------------
  404. */
  405. function fReqExeSaveCnstPatInfo(){
  406. var coopteamcd = ds_cnstpatinfo.getColumn(0, "coopteamcd");
  407. //var cnstteamseq = model.getValue(sCNSTPATINFO_PATH + "/cnstteamseq");
  408. //if(coopteamcd == "" || cnstteamseq == ""){
  409. if(utlf_isNull(coopteamcd)){
  410. sysf_messageBox("협진분류를", "C001");
  411. return;
  412. }
  413. var status = ds_cnstpatinfo.getColumn(0, "status");
  414. if(status == "u"){ //수정인 경우, 변경된 사항 여부 확인
  415. if(lf_compareNodeVal(ds_cnstpatinfo, ds_tmpcnstpatinfo)==false){
  416. sysf_messageBox("변경된 사항이", "I004");
  417. return;
  418. }
  419. }
  420. ds_savedata.copyData(ds_cnstpatinfo);
  421. var oParam = {};
  422. oParam.id = "TXMMO03601";
  423. oParam.service = "prcpmngtapp.ConcPatMngt";
  424. oParam.method = "reqExeSaveCnstPatInfo";
  425. oParam.inds = "req=" + "ds_savedata";
  426. oParam.async = false;
  427. oParam.callback = "cf_TXMMO03601";
  428. tranf_submit(oParam);
  429. }
  430. function cf_TXMMO03601(sSvcId, nErrorCode, sErrorMsg) {
  431. if(nErrorCode < 0) return;
  432. var status = ds_cnstpatinfo.getColumn(0, "status");
  433. fReqGetCnstPatHistList(); //협진환자 이력 조회
  434. if(status == "d"){ //삭제인 경우
  435. fInitCnstPatInfo();
  436. }else if(status == "i"){ //신규인 경우, 협진내역 최상단 정보가 신규등록된 정보
  437. ds_grd_cnstpathistinfo.rowposition = 0;
  438. fClkCnstPatHistListGrid();
  439. }else if(status == "u"){ //수정인 경우,
  440. var genrdd = ds_cnstpatinfo.getColumn(0, "genrdd");
  441. var genrno = ds_cnstpatinfo.getColumn(0, "genrno");
  442. var startrow = ds_grd_cnstpathistinfo.findRow("genrdd", genrdd, 0);
  443. var rsltrow = ds_grd_cnstpathistinfo.findRow("genrno", genrno, startrow);
  444. ds_grd_cnstpathistinfo.rowposition = rsltrow;
  445. //ds_grd_cnstpathistinfo.onrowposchanged.fireEvent(ds_grd_cnstpathistinfo, new DSRowPosChangeEventInfo);
  446. ds_tmpcnstpatinfo.copyData(ds_savedata); //수정 저장의 경우, 변경된 사항여부를 확인하기 위해 tmp instance copy
  447. }
  448. }
  449. /**
  450. * @desc : 협진환자 정보 초기화
  451. * @
  452. * @param :
  453. * @return :
  454. * @author : 오지훈
  455. * @---------------------------------------------------
  456. */
  457. function fInitCnstPatInfo(){
  458. var inreq = opener.frmf_getParameter("SPMMO03600_inreqpid");
  459. var paminfo = sysf_getGlobalVariable("paminfo");
  460. var pid = opener.frmf_getParameter("SPMMO03600_pid");
  461. var orddd = opener.frmf_getParameter("SPMMO03600_orddd");
  462. var ioflag = opener.frmf_getParameter("SPMMO03600_ioflag");
  463. var patinfo = opener.frmf_getParameter("SPMMO03600_patinfo");
  464. var roomcd = opener.frmf_getParameter("SPMMO03600_roomcd");
  465. if(!utlf_isNull(patinfo)){ //화면 parameter처리
  466. var patinfoarray = patinfo.split("▦");
  467. var hngnm = patinfoarray[0];
  468. var sa = patinfoarray[1];
  469. var cnstorddeptcd = patinfoarray[2];
  470. var cnstorddrid = patinfoarray[3];
  471. var cretno = patinfoarray[4];
  472. var orddrnm = patinfoarray[5];
  473. var coopteamcd = patinfoarray[6];
  474. ds_cnstpatinfo.setColumn(0, "status" , "i");
  475. ds_cnstpatinfo.setColumn(0, "pid" , pid);
  476. ds_cnstpatinfo.setColumn(0, "orddd" , orddd);
  477. ds_cnstpatinfo.setColumn(0, "cretno" , cretno);
  478. ds_cnstpatinfo.setColumn(0, "hngnm" , hngnm);
  479. ds_cnstpatinfo.setColumn(0, "cnstorddrnm" , orddrnm);
  480. ds_cnstpatinfo.setColumn(0, "ioflag" , ioflag);
  481. ds_cnstpatinfo.setColumn(0, "sa" , sa);
  482. ds_cnstpatinfo.setColumn(0, "coopteamcd" , coopteamcd);
  483. ds_cnstpatinfo.setColumn(0, "coopteamnm" , cmb_cnsttypecd.text);
  484. ds_cnstpatinfo.setColumn(0, "cnstorddeptcd" , cnstorddeptcd);
  485. ds_cnstpatinfo.setColumn(0, "valifromdd" , utlf_getCurrentDate());
  486. ds_cnstpatinfo.setColumn(0, "valitodd" , "99991231");
  487. if (utlf_isNull(roomcd)) {
  488. ds_cnstpatinfo.setColumn(0, "roomcd", "외래");
  489. } else {
  490. ds_cnstpatinfo.setColumn(0, "roomcd", roomcd);
  491. }
  492. } else if(!utlf_isNull(paminfo) && paminfo.length > 0){
  493. var pid = appf_getPatientInfoDetail("pid");
  494. var ioflag = appf_getPatientInfoDetail("ioflag");
  495. var hngnm = appf_getPatientInfo("pname");
  496. var sa = appf_getPatientInfo("age");
  497. var cnstorddeptcd = appf_getPatientInfoDetail("orddeptcd");
  498. var cretno = appf_getPatientInfoDetail("cretno");
  499. var orddrnm = appf_getPatientInfo("apntdr");
  500. var coopteamcd = appf_getPatientInfoDetail("coopteamcd");
  501. if (ioflag == "O") {
  502. var orddd = appf_getPatientInfoDetail("orddd");
  503. } else {
  504. var orddd = appf_getPatientInfoDetail("indd");
  505. }
  506. ds_cnstpatinfo.setColumn(0, "status" , "i");
  507. ds_cnstpatinfo.setColumn(0, "pid" , pid);
  508. ds_cnstpatinfo.setColumn(0, "orddd" , orddd);
  509. ds_cnstpatinfo.setColumn(0, "cretno" , cretno);
  510. ds_cnstpatinfo.setColumn(0, "hngnm" , hngnm);
  511. ds_cnstpatinfo.setColumn(0, "cnstorddrnm" , orddrnm);
  512. ds_cnstpatinfo.setColumn(0, "ioflag" , ioflag);
  513. ds_cnstpatinfo.setColumn(0, "sa" , sa);
  514. ds_cnstpatinfo.setColumn(0, "coopteamcd" , coopteamcd);
  515. ds_cnstpatinfo.setColumn(0, "coopteamnm" , cmb_cnsttypecd.text);
  516. ds_cnstpatinfo.setColumn(0, "cnstorddeptcd", cnstorddeptcd);
  517. ds_cnstpatinfo.setColumn(0, "valifromdd" , utlf_getCurrentDate());
  518. ds_cnstpatinfo.setColumn(0, "valitodd" , "99991231");
  519. if (utlf_isNull(roomcd)) {
  520. ds_cnstpatinfo.setColumn(0, "roomcd", "외래");
  521. } else {
  522. ds_cnstpatinfo.setColumn(0, "roomcd", roomcd);
  523. }
  524. } else if (utlf_isNull(inreq)) { // 진료대상자에서 오픈할 경우
  525. ds_cnstpatinfo.setColumn(0, "status", "i");
  526. ds_cnstpatinfo.setColumn(0, "pid", inreq);
  527. fGetCnstInfo();
  528. ds_cnstpatinfo.setColumn(0, "valifromdd" , utlf_getCurrentDate());
  529. ds_cnstpatinfo.setColumn(0, "valitodd" , "99991231");
  530. }
  531. }
  532. /**
  533. * @desc : 협진환자 이력정보 그리드 클릭
  534. * @
  535. * @param :
  536. * @return :
  537. * @author : 오지훈
  538. * @---------------------------------------------------
  539. */
  540. function fClkCnstPatHistListGrid(){
  541. if(ds_grd_cnstpathistinfo.rowposition > -1){
  542. var currow = ds_grd_cnstpathistinfo.rowposition;
  543. var genrdd = ds_grd_cnstpathistinfo.getColumn(currow, "genrdd");
  544. var genrno = ds_grd_cnstpathistinfo.getColumn(currow, "genrno");
  545. var pid = ds_grd_cnstpathistinfo.getColumn(currow, "pid");
  546. var coopteamcd = ds_grd_cnstpathistinfo.getColumn(currow, "coopteamcd");
  547. var cnstteamseq = ""//ds_grd_cnstpathistinfo.getColumn(currow, "cnstteamseq");
  548. var valifromdd = ds_grd_cnstpathistinfo.getColumn(currow, "valifromdd");
  549. var valitodd = ds_grd_cnstpathistinfo.getColumn(currow, "valitodd");
  550. var orddd = ds_grd_cnstpathistinfo.getColumn(currow, "orddd");
  551. var cretno = ds_grd_cnstpathistinfo.getColumn(currow, "cretno");
  552. var coopteamnm = ds_grd_cnstpathistinfo.getColumn(currow, "coopteamnm");
  553. var cnstorddeptcd = ds_grd_cnstpathistinfo.getColumn(currow, "cnstorddeptcd");
  554. ds_cnstpatinfo.setColumn(0, "status" , "u");
  555. ds_cnstpatinfo.setColumn(0, "genrdd" , genrdd);
  556. ds_cnstpatinfo.setColumn(0, "genrno" , genrno);
  557. ds_cnstpatinfo.setColumn(0, "coopteamcd" , coopteamcd);
  558. ds_cnstpatinfo.setColumn(0, "cnstteamseq" , cnstteamseq);
  559. ds_cnstpatinfo.setColumn(0, "valifromdd" , valifromdd);
  560. ds_cnstpatinfo.setColumn(0, "valitodd" , valitodd);
  561. ds_cnstpatinfo.setColumn(0, "coopteamnm" , coopteamnm);
  562. ds_cnstpatinfo.setColumn(0, "orddd" , orddd);
  563. ds_cnstpatinfo.setColumn(0, "cretno" , cretno);
  564. ds_cnstpatinfo.setColumn(0, "cnstorddeptcd" , cnstorddeptcd);
  565. //협진이력의 진료과에 해당 의사리스트로 변경
  566. //mmbfGetUserComboList("/root/send/reqdata" ,"/root/init/userlist", cnstorddeptcd, "0330");
  567. //model.setValue(sCNSTPATINFO_PATH + "/cnstorddrid", cnstorddrid);
  568. //협진이력의 진료과에 해당하는 협진분류로 변경
  569. //mmofReqGetCnstTypeComboList("/root/send/reqdata", "/root/init/cnsttypecombo", cnstorddeptcd);
  570. ds_tmpcnstpatinfo.copyData(ds_cnstpatinfo); //수정 저장의 경우, 변경된 사항여부를 확인하기 위해 tmp instance copy
  571. //선택한 협진에 대한 협진회의록 조회
  572. fReqGetCnstConfRecList(pid);
  573. }
  574. }
  575. /**
  576. * @desc : 회의록 작성 버튼 클릭(회의록 화면 신규등록으로 open)
  577. * @
  578. * @param :
  579. * @return :
  580. * @author : 오지훈
  581. * @---------------------------------------------------
  582. */
  583. function fClkBtnCnstConfRec(){
  584. //SPMMO04100_confinfo
  585. //genrdd 발생일자
  586. //genrno 발생번호
  587. //confrecno 회의록번호
  588. var genrdd = ds_cnstpatinfo.getColumn(0, "genrdd");
  589. var genrno = ds_cnstpatinfo.getColumn(0, "genrno");
  590. var confrecno = 0;
  591. var confinfo = genrdd + "▦" + genrno + "▦" + confrecno;
  592. if(utlf_isNull(genrdd) || utlf_isNull(genrno)) { //if(genrdd == "" || genrno == ""){
  593. sysf_messageBox("환자의 협진 등록없이 회의록을 작성", "E001");
  594. return;
  595. }
  596. var cnstorddeptcd = cmb_cnstorddeptcd.text;
  597. if(utlf_isNull(cnstorddeptcd)){
  598. sysf_messageBox("진료과를", "C002");
  599. cmb_cnstorddeptcd.setFocus();
  600. return;
  601. }
  602. /*
  603. var orddrnm = cmb_cnstorddrid.label;
  604. if(orddrnm.length < 1){
  605. messageBox("진료의를", "C002");
  606. model.setFocus("cmb_cnstorddrid");
  607. return;
  608. }
  609. */
  610. //SPMMO04100_patinfo
  611. //pid 등록번호
  612. //hngnm 환자명
  613. //sa 성별
  614. //orddeptcd 진료과코드
  615. //orddrid 진료의ID
  616. //roomcd 병실
  617. var pid = ds_cnstpatinfo.getColumn(0, "pid");
  618. var hngnm = ds_cnstpatinfo.getColumn(0, "hngnm");
  619. var sa = ds_cnstpatinfo.getColumn(0, "sa");
  620. var orddeptcd = ds_cnstpatinfo.getColumn(0, "cnstorddeptcd");
  621. var orddrid = ds_cnstpatinfo.getColumn(0, "cnstorddrnm");
  622. var orddd = ds_cnstpatinfo.getColumn(0, "orddd");
  623. var roomcd = ds_cnstpatinfo.getColumn(0, "roomcd");
  624. var coopteamcd = ds_cnstpatinfo.getColumn(0, "coopteamcd");
  625. var coopteamnm = ds_cnstpatinfo.getColumn(0, "coopteamnm");
  626. var ioflag = ds_cnstpatinfo.getColumn(0, "ioflag");
  627. var patinfo = pid + "▦" + hngnm + "▦" + sa + "▦" + orddeptcd + "▦" + orddrid + "▦" + orddd + "▦" + roomcd + "▦" + coopteamnm + "▦" + coopteamcd;
  628. frmf_setParameter("SPMMO04100_status" , "i");
  629. frmf_setParameter("SPMMO04100_patinfo" , patinfo);
  630. frmf_setParameter("SPMMO04100_confinfo", confinfo);
  631. frmf_setParameter("SPMMO04100_ioflag" , ioflag);
  632. frmf_modal("SPMMO04100", "SPMMO04100", null, null, null, null, null, null, null, null, null, null, "M");
  633. fReqGetCnstConfRecList(pid); //회의록 작성 종료 후 재조회
  634. }
  635. /**
  636. * @desc : 협진회의록 이력조회
  637. * @
  638. * @param :
  639. * @return :
  640. * @author : 오지훈
  641. * @---------------------------------------------------
  642. */
  643. function fReqGetCnstConfRecList(pid, confdt, genrdd, genrno, confrecno, state){
  644. ds_reqTRMMO03604.setColumn(0, "confdt" , confdt);
  645. ds_reqTRMMO03604.setColumn(0, "genrdd" , genrdd);
  646. ds_reqTRMMO03604.setColumn(0, "genrno" , genrno);
  647. ds_reqTRMMO03604.setColumn(0, "confrecno" , confrecno);
  648. ds_reqTRMMO03604.setColumn(0, "state" , state);
  649. ds_reqTRMMO03604.setColumn(0, "pid" , pid);
  650. var oParam = {};
  651. oParam.id = "TRMMO03604";
  652. oParam.service = "prcpmngtapp.ConcPatMngt";
  653. oParam.method = "reqGetCnstConfRecList";
  654. oParam.inds = "req=" + "ds_reqTRMMO03604";
  655. oParam.outds = "ds_grd_cnstconflist=cnstconfreclist";
  656. oParam.async = false;
  657. tranf_submit(oParam);
  658. ds_grd_cnstconflist.rowposition = -1;
  659. }
  660. /**
  661. * @desc : 협진회의록 정보 보기
  662. * @ : 협진회의록 화면을 통해 보여줌, 수정가능 하도록 처리
  663. * @param :
  664. * @return :
  665. * @author : 오지훈
  666. * @---------------------------------------------------
  667. */
  668. function fDbClkGrdCnstConfRec(){
  669. var currow = ds_grd_cnstconflist.rowposition;
  670. if(currow < 0){
  671. return;
  672. }
  673. //SPMMO04100_patinfo
  674. //pid 등록번호
  675. //hngnm 환자명
  676. //sa 성별
  677. //orddeptcd 진료과코드
  678. //orddrid 진료의ID
  679. var pid = ds_cnstpatinfo.getColumn(0, "pid");
  680. var hngnm = ds_cnstpatinfo.getColumn(0, "hngnm");
  681. var sa = ds_cnstpatinfo.getColumn(0, "sa");
  682. var orddeptcd = ds_cnstpatinfo.getColumn(0, "cnstorddeptcd");
  683. var orddrid = ds_cnstpatinfo.getColumn(0, "cnstorddrnm");
  684. var orddd = ds_cnstpatinfo.getColumn(0, "orddd");
  685. var roomcd = ds_cnstpatinfo.getColumn(0, "roomcd");
  686. var coopteamcd = ds_cnstpatinfo.getColumn(0, "coopteamcd");
  687. var coopteamnm = ds_cnstpatinfo.getColumn(0, "coopteamnm");
  688. var ioflag = ds_cnstpatinfo.getColumn(0, "ioflag");
  689. var patinfo = pid + "▦" + hngnm + "▦" + sa + "▦" + orddeptcd + "▦" + orddrid + "▦" + orddd + "▦" + roomcd + "▦" + coopteamnm + "▦" + coopteamcd ;
  690. //SPMMO04100_confinfo
  691. //genrdd 발생일자
  692. //genrno 발생번호
  693. //confrecno 회의록번호
  694. var genrdd = ds_grd_cnstconflist.getColumn(currow, "genrdd");
  695. var genrno = ds_grd_cnstconflist.getColumn(currow, "genrno");
  696. var confrecno = ds_grd_cnstconflist.getColumn(currow, "confrecno");
  697. var confdt = ds_grd_cnstconflist.getColumn(currow, "confdt");
  698. var confinfo = genrdd + "▦" + genrno + "▦" + confrecno + "▦" + confdt + "▦" + pid + "▦A";
  699. frmf_setParameter("SPMMO04100_status" , "u");
  700. frmf_setParameter("SPMMO04100_patinfo" , patinfo);
  701. frmf_setParameter("SPMMO04100_confinfo", confinfo);
  702. frmf_modal("SPMMO04100", "SPMMO04100", null, null, null, null, null, null, null, null, null, null, "M");
  703. fReqGetCnstConfRecList(pid);
  704. }
  705. /**
  706. * @desc : 삭제버튼 클릭
  707. * @ : 사용자에게 삭제 여부 확인 후, 처리
  708. * @ : 신규인 경우는 협진내역을 사용자에게 선택하도록 메시지처리
  709. * @param :
  710. * @return :
  711. * @author : 오지훈
  712. * @---------------------------------------------------
  713. */
  714. function fClkBtnDel(){
  715. var status = ds_cnstpatinfo.getColumn(0, "status");
  716. if(status == "i"){ //신규인 경우는 바로 return;
  717. sysf_messageBox("삭제할 환자의 협진 정보를", "C001");
  718. return;
  719. }
  720. var coopteamnm = ds_cnstpatinfo.getColumn(0, "coopteamnm");
  721. var hngnm = ds_cnstpatinfo.getColumn(0, "hngnm");
  722. var rtnval = sysf_messageBox("[" + coopteamnm + "]협진 [" + hngnm + "]환자를", "Q001");
  723. if(rtnval == 6){ //yes
  724. ds_cnstpatinfo.setColumn(0, "status", "d");
  725. fReqExeSaveCnstPatInfo();
  726. }else{ //no
  727. return;
  728. }
  729. }
  730. /**
  731. * @desc : 환자 등록번호를 통한 협진환자의 내역 가져오기
  732. * @
  733. * @param :
  734. * @return :
  735. * @author : 김영학
  736. * @---------------------------------------------------
  737. */
  738. function fGetCnstInfo() {
  739. frmf_setParameter("SPMMO017300_pid", ds_cnstpatinfo.getColumn(0, "pid"));
  740. frmf_modal("SPMMO17300", "SPMMO17300", null, null, null, null, null, null, null, null, null, null, "M");
  741. var pid = frmf_getParameter("SPMMO017300_pid");
  742. var hngnm = frmf_getParameter("SPMMO017300_hngnm");
  743. var sa = frmf_getParameter("SPMMO017300_sa");
  744. var cretno = frmf_getParameter("SPMMO017300_cretno");
  745. var orddd = frmf_getParameter("SPMMO017300_orddd");
  746. var cnstdeptcd = frmf_getParameter("SPMMO017300_cnstdeptcd");
  747. var coopteamcd = frmf_getParameter("SPMMO017300_coopteamcd");
  748. var orddrnm = frmf_getParameter("SPMMO017300_orddrnm");
  749. var ioflag = frmf_getParameter("SPMMO017300_ioflag");
  750. var roomcd = frmf_getParameter("SPMMO017300_roomcd");
  751. fReqGetCnstPatHistList(); // 협진환자 이력조회
  752. ds_cnstpatinfo.setColumn(0, "pid" , pid);
  753. ds_cnstpatinfo.setColumn(0, "hngnm" , hngnm);
  754. ds_cnstpatinfo.setColumn(0, "sa" , sa);
  755. ds_cnstpatinfo.setColumn(0, "cretno" , cretno);
  756. ds_cnstpatinfo.setColumn(0, "orddd" , orddd);
  757. ds_cnstpatinfo.setColumn(0, "cnstorddeptcd" , cnstdeptcd);
  758. ds_cnstpatinfo.setColumn(0, "coopteamcd" , coopteamcd);
  759. ds_cnstpatinfo.setColumn(0, "cnstorddrnm" , orddrnm);
  760. ds_cnstpatinfo.setColumn(0, "ioflag" , ioflag);
  761. ds_cnstpatinfo.setColumn(0, "roomcd" , roomcd);
  762. fReqGetCnstConfRecList(pid);
  763. }
  764. /**
  765. * @desc : 입력상태를 보여줌
  766. * @
  767. * @param :
  768. * @return :
  769. * @author : 김영학
  770. * @---------------------------------------------------
  771. */
  772. function fChkStatus() {
  773. var status = ds_cnstpatinfo.getColumn(0, "status");
  774. if (status == "u") {
  775. opt_status.text = "수정상태";
  776. } else {
  777. opt_status.text = "삽입";
  778. }
  779. }]]></Script>
  780. </Form>
  781. </FDL>