SPMMO32300_응급실의사호출Deactivation.xfdl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPMMO32300" position="absolute 0 0 814 400" titletext="응급실 의사호출 Deactivation" onload="SPMMO32300_onload">
  5. <Layouts>
  6. <Layout>
  7. <Button position="absolute 708 8 750 27" id="btn_del" class="btn2_letter2" taborder="3" visible="false" text="삭제" onclick="btn_del_onclick"/>
  8. <Shape position="absolute 0 27 797 33" linetype="horizontal" id="line5" class="line_1"/>
  9. <Static text="응급실의사 호출 List" position="absolute 0 14 161 28" align="align:center middle;" id="caption2" class="tit_2"/>
  10. <Button position="absolute 736 368 792 390" id="btn_exit" class="btn4" taborder="7" text="종료" onclick="btn_exit_onclick"/>
  11. <Button position="absolute 295 8 436 27" id="btn_correct" class="btn2" taborder="2" visible="true" text="일반호출 Deactivation" onclick="btn_correct_onclick"/>
  12. <Grid position="absolute 0 35 797 360" id="grd_erdrcalllist" taborder="5" binddataset="ds_erdrcalllist" ontextchanged="grd_erdrcalllist_ontextchanged">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="46"/>
  17. <Column size="0"/>
  18. <Column size="0"/>
  19. <Column size="0"/>
  20. <Column size="0"/>
  21. <Column size="0"/>
  22. <Column size="0"/>
  23. <Column size="0"/>
  24. <Column size="40"/>
  25. <Column size="100"/>
  26. <Column size="75"/>
  27. <Column size="0"/>
  28. <Column size="0"/>
  29. <Column size="100"/>
  30. <Column size="74"/>
  31. <Column size="0"/>
  32. <Column size="129"/>
  33. <Column size="127"/>
  34. <Column size="79"/>
  35. <Column size="0"/>
  36. </Columns>
  37. <Rows>
  38. <Row size="24" band="head"/>
  39. <Row size="24"/>
  40. </Rows>
  41. <Band id="head">
  42. <Cell text="상태"/>
  43. <Cell col="1" text="instcd"/>
  44. <Cell col="2" text="pid"/>
  45. <Cell col="3" text="hngnm"/>
  46. <Cell col="4" text="indd"/>
  47. <Cell col="5" text="cretno"/>
  48. <Cell col="6" text="visitno"/>
  49. <Cell col="7" text="erorddeptcd"/>
  50. <Cell col="8" text="주/부"/>
  51. <Cell col="9" text="진료과"/>
  52. <Cell col="10" text="담당의"/>
  53. <Cell col="11" text="담당의ID"/>
  54. <Cell col="12" text="Gr Type"/>
  55. <Cell col="13" text="Call 유형"/>
  56. <Cell col="14" text="호출자"/>
  57. <Cell col="15" text="호출자ID"/>
  58. <Cell col="16" text="호출시간"/>
  59. <Cell col="17" text="도착시간"/>
  60. <Cell col="18" text="등록자"/>
  61. <Cell col="19" text="등록자ID"/>
  62. </Band>
  63. <Band id="body">
  64. <Cell displaytype="combo" edittype="none" text="bind:status" combodataset="ds_status" combocodecol="value" combodatacol="label"/>
  65. <Cell col="1" text="bind:instcd"/>
  66. <Cell col="2" text="bind:pid"/>
  67. <Cell col="3" text="bind:hngnm"/>
  68. <Cell col="4" text="bind:indd"/>
  69. <Cell col="5" text="bind:cretno"/>
  70. <Cell col="6" text="bind:visitno"/>
  71. <Cell col="7" text="bind:erorddeptcd"/>
  72. <Cell col="8" displaytype="combo" edittype="combo" text="bind:mainyn" combodataset="ds_choices" combocodecol="value" combodatacol="label"/>
  73. <Cell col="9" text="bind:erorddeptnm"/>
  74. <Cell col="10" text="bind:erorddoctnm"/>
  75. <Cell col="11" text="bind:erorddoctcd"/>
  76. <Cell col="12" text="bind:grtype"/>
  77. <Cell col="13" text="bind:grtypenm"/>
  78. <Cell col="14" text="bind:callpsnnm"/>
  79. <Cell col="15" text="bind:callpsnid"/>
  80. <Cell col="16" text="bind:calldt" mask="@@@@-@@-@@ @@:@@:@@"/>
  81. <Cell col="17" text="bind:arrivdt" mask="@@@@-@@-@@ @@:@@:@@"/>
  82. <Cell col="18" text="bind:visitrgstrnm"/>
  83. <Cell col="19" text="bind:visitrgstrid"/>
  84. </Band>
  85. </Format>
  86. </Formats>
  87. </Grid>
  88. <Button position="absolute 753 8 795 27" id="button1" class="btn2_letter2" taborder="3" visible="false" text="저장" onclick="button1_onclick"/>
  89. <Button position="absolute 495 8 636 27" id="button2" class="btn2" taborder="2" visible="true" text="중증응급Deactivation" onclick="button2_onclick"/>
  90. </Layout>
  91. </Layouts>
  92. <Objects>
  93. <Dataset id="ds_erdrcalllist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  94. <ColumnInfo>
  95. <Column id="status" type="STRING"/>
  96. <Column id="instcd" type="STRING"/>
  97. <Column id="pid" type="STRING"/>
  98. <Column id="hngnm" type="STRING"/>
  99. <Column id="indd" type="STRING"/>
  100. <Column id="cretno" type="STRING"/>
  101. <Column id="visitno" type="STRING"/>
  102. <Column id="erorddeptcd" type="STRING"/>
  103. <Column id="mainyn" type="STRING"/>
  104. <Column id="erorddeptnm" type="STRING"/>
  105. <Column id="erorddoctnm" type="STRING"/>
  106. <Column id="erorddoctcd" type="STRING"/>
  107. <Column id="grtype" type="STRING"/>
  108. <Column id="grtypenm" type="STRING"/>
  109. <Column id="callpsnnm" type="STRING"/>
  110. <Column id="callpsnid" type="STRING"/>
  111. <Column id="calldt" type="STRING"/>
  112. <Column id="arrivdt" type="STRING"/>
  113. <Column id="visitrgstrnm" type="STRING"/>
  114. <Column id="visitrgstrid" type="STRING"/>
  115. </ColumnInfo>
  116. </Dataset>
  117. <Dataset id="ds_status" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  118. <ColumnInfo>
  119. <Column id="label" type="STRING" size="256"/>
  120. <Column id="value" type="STRING" size="256"/>
  121. </ColumnInfo>
  122. <Rows>
  123. <Row>
  124. <Col id="label">-</Col>
  125. </Row>
  126. <Row>
  127. <Col id="label">신규</Col>
  128. <Col id="value">i</Col>
  129. </Row>
  130. <Row>
  131. <Col id="label">수정</Col>
  132. <Col id="value">u</Col>
  133. </Row>
  134. <Row>
  135. <Col id="label">삭제</Col>
  136. <Col id="value">d</Col>
  137. </Row>
  138. </Rows>
  139. </Dataset>
  140. <Dataset id="ds_choices" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  141. <ColumnInfo>
  142. <Column id="label" type="STRING" size="256"/>
  143. <Column id="value" type="STRING" size="256"/>
  144. </ColumnInfo>
  145. <Rows>
  146. <Row>
  147. <Col id="label">주</Col>
  148. <Col id="value">M</Col>
  149. </Row>
  150. <Row>
  151. <Col id="label">부</Col>
  152. <Col id="value">S</Col>
  153. </Row>
  154. </Rows>
  155. </Dataset>
  156. <Dataset id="ds_erdrinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  157. <ColumnInfo>
  158. <Column id="orddeptcd" type="STRING" size="256"/>
  159. <Column id="orddrid" type="STRING" size="256"/>
  160. <Column id="mainyn" type="STRING" size="256"/>
  161. <Column id="call1" type="STRING" size="256"/>
  162. <Column id="call2" type="STRING" size="256"/>
  163. <Column id="call3" type="STRING" size="256"/>
  164. <Column id="call4" type="STRING" size="256"/>
  165. <Column id="callcnts" type="STRING" size="256"/>
  166. <Column id="callcnts2" type="STRING" size="256"/>
  167. <Column id="callnm" type="STRING" size="256"/>
  168. </ColumnInfo>
  169. <Rows>
  170. <Row>
  171. <Col id="mainyn">M</Col>
  172. </Row>
  173. </Rows>
  174. </Dataset>
  175. <Dataset id="ds_send_reqdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  176. <Dataset id="ds_send_savedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  177. <Dataset id="ds_init_erdeptcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  178. <ColumnInfo>
  179. <Column id="erdeptcd" type="STRING" size="256"/>
  180. <Column id="macaddr" type="STRING" size="256"/>
  181. <Column id="internyn" type="STRING" size="256"/>
  182. </ColumnInfo>
  183. </Dataset>
  184. <Dataset id="ds_init_macaddr" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  185. <Dataset id="ds_init_internyn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  186. </Objects>
  187. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  188. * System Name :
  189. * Job Name :
  190. * Creator :
  191. * Make Date : 2014-08-29
  192. * Description :
  193. *---------------------------------------------------------------------------------------
  194. * Modify Date Modifier Modify Description
  195. *---------------------------------------------------------------------------------------
  196. * 2014-08-29 Live Converter TF->XP
  197. *
  198. *---------------------------------------------------------------------------------------
  199. ****************************************************************************************/
  200. include "com_commonxp::comm_main.xjs";
  201. include "emr_prcpmngtxp::MMOCommon.xjs";
  202. include "emr_prcpmngtxp::MMO001.xjs";
  203. var arErrorCode = new HashArray();
  204. function SPMMO32300_onload(obj:Form, e:LoadEventInfo)
  205. {
  206. frmf_initForm(obj);
  207. fInitialize_SPMMO32300();
  208. }
  209. function fInitialize_SPMMO32300() {
  210. //mmbfGetHardCodeInfo("/root/send/reqdata" , "/root/init/erdeptcd" , 1);
  211. lf_getHardCDList("N", 1, null, ds_init_erdeptcd);
  212. //mmbfGetHardCodeInfo("/root/send/reqdata" , "/root/init/macaddr" , 46);
  213. lf_getHardCDList("N", 46, null, ds_init_macaddr);
  214. //mmbfGetHardCodeInfo("/root/send/reqdata" , "/root/init/internyn" , 217);
  215. lf_getHardCDList("N", 217, null, ds_init_internyn);
  216. fReqCallDrList() ;
  217. }
  218. function fReqCallDrList() {
  219. var param = opener.frmf_getParameter("SPMMO32300_param");
  220. gPARAM = param.split("▦");
  221. ds_send_reqdata.clear();
  222. dsf_makeValue(ds_send_reqdata,"pid" ,"string" , gPARAM[0]);
  223. dsf_makeValue(ds_send_reqdata,"indd" ,"string" , gPARAM[1]);
  224. dsf_makeValue(ds_send_reqdata,"cretno" ,"string" , gPARAM[2]);
  225. dsf_makeValue(ds_send_reqdata,"visitno" ,"string" , gPARAM[3]);
  226. var oParam = {};
  227. oParam.id = "TRMMO32301";
  228. oParam.service = "prcpmngtapp.ErMngt";
  229. oParam.method = "reqGetCallDeactPatList";
  230. oParam.inds = "req=ds_send_reqdata";
  231. oParam.outds = "ds_erdrcalllist=erdrcalllist";
  232. oParam.async = false;
  233. oParam.callback = "cf_TRMMO32301";
  234. tranf_submit(oParam);
  235. }
  236. function cf_TRMMO32301(sSvcId, nErrorCode, sErrorMsg) {
  237. if(nErrorCode < 0) return;
  238. }
  239. // 삭제
  240. function fDelERCallInfo(){
  241. var currow = ds_erdrcalllist.rowposition;
  242. if(currow < 0){
  243. return;
  244. }
  245. if (ds_erdrcalllist.rowcount >1) {
  246. if (ds_erdrcalllist.rowposition == 0 ) {
  247. sysf_messageBox("부유형이 있을때 주 유형은 삭제할수", "I004");
  248. return;
  249. }
  250. }
  251. for (var i = grd_erdrcalllist.selectstartrow; i <= grd_erdrcalllist.selectendrow; i++ ) {
  252. var status = ds_erdrcalllist.getColumn(i,"status");
  253. if(status == "i"){
  254. // grd_erdrcalllist.deleteRow(i);
  255. ds_erdrcalllist.deleteRow(i);
  256. }else{
  257. ds_erdrcalllist.setColumn(i,"status", "d");
  258. }
  259. }
  260. }
  261. function fClkColMainYN(){
  262. var currow = grd_erdrcalllist.currentrow;
  263. var curcol = grd_erdrcalllist.currentcol;
  264. var status = ds_erdrcalllist.getColumn(currow,"status");
  265. if( curcol == grd_erdrcalllist.getBindCellIndex("body","mainyn") ) { //주부유형 클릭한 경우
  266. if(status == "i" || status == "d"){ //신규, 삭제가 아닌 경우
  267. return;
  268. }else{
  269. ds_erdrcalllist.setColumn(currow,"status", "u");
  270. }
  271. }
  272. }
  273. function fSaveERCallInfo(){
  274. var statusCnts = 0;
  275. for (var i = 0; i < ds_erdrcalllist.rowcount; i++ ) {
  276. var status = ds_erdrcalllist.setColumn(i,"status");
  277. if (status != "-") {
  278. statusCnts ++
  279. }
  280. }
  281. if (statusCnts < 1) {
  282. sysf_messageBox("변경된 정보가 없습니다", "I");
  283. return;
  284. }
  285. //var savedata = getNodeListCSV(instance1.selectNodes(sERDRCALLLIST_PATH));
  286. //model.setValue("/root/send/savedata", savedata);
  287. var oParam = {};
  288. oParam.id = "TXMMO32301";
  289. oParam.service = "prcpmngtapp.ErMngt";
  290. oParam.method = "reqExeERDrCallDeActivationList";
  291. oParam.inds = "req=ds_erdrcalllist";
  292. oParam.outds = "ds_erdrcalllist=erdrcalllist";
  293. oParam.async = false;
  294. oParam.callback = "cf_TXMMO32301";
  295. tranf_submit(oParam);
  296. //model.copyNode("/root/temp/ercallmngtinfo", "/root/main/ercallmngtinfo");
  297. }
  298. function cf_TXMMO32301(sSvcId, nErrorCode, sErrorMsg) {
  299. if(nErrorCode < 0) return;
  300. }
  301. // 일반 호출 Deactivation
  302. function fCnclErDrCall(callflag) {
  303. var erorddeptcd = ds_init_erdeptcd.getColumn(0,"hardcd");
  304. var dutplcecd = sysf_getUserInfo("dutplcecd");
  305. var hardcd = ds_init_macaddr.lookup("hardcd" , sysf_getUserInfo("macaddr") , "hardcd");
  306. var internyn = ds_init_internyn.lookup("hardcd" , sysf_getUserInfo("jobposcd") , "hardcd");
  307. if ( (erorddeptcd == dutplcecd)
  308. && (utlf_isNull(internyn) ) ) { //응급의학과 , 인턴은 제외
  309. var param = opener.frmf_getParameter("SPMMO32300_param");
  310. gPARAM = param.split("▦");
  311. ds_send_savedata.clear();
  312. dsf_makeValue(ds_send_savedata, "pid" , "string" , gPARAM[0]);
  313. dsf_makeValue(ds_send_savedata, "indd" , "string" , gPARAM[1]);
  314. dsf_makeValue(ds_send_savedata, "cretno" , "int" , gPARAM[2]);
  315. dsf_makeValue(ds_send_savedata, "visitno" , "int" , gPARAM[3]);
  316. dsf_makeValue(ds_send_savedata, "callflag" , "string" , callflag);
  317. dsf_setTypeFormat(ds_send_savedata, "cretno:INT^visitno:INT");
  318. var oParam = {};
  319. oParam.id = "TXMMO32303";
  320. oParam.service = "prcpmngtapp.ErMngt";
  321. oParam.method = "reqExeERDrCallCnclInfo";
  322. oParam.inds = "req=ds_send_savedata";
  323. oParam.outds = "ds_erdrcalllist=erdrcalllist";
  324. oParam.async = false;
  325. oParam.callback = "cf_TXMMO32303";
  326. tranf_submit(oParam);
  327. if (arErrorCode.pop("TXMMO32303") > -1) {
  328. fReqCallDrList();
  329. sysf_messageBox("Deactivation되었습니다.", "I");
  330. }
  331. } else {
  332. sysf_messageBox("응급의학과 또는 지정된PC에서만 Deactivation이 가능합니다.", "I");
  333. }
  334. }
  335. function cf_TXMMO32303(sSvcId, nErrorCode, sErrorMsg) {
  336. arErrorCode.push(sSvcId, nErrorCode);
  337. }
  338. function btn_del_onclick(obj:Button, e:ClickEventInfo)
  339. {
  340. fDelERCallInfo();
  341. }
  342. function btn_exit_onclick(obj:Button, e:ClickEventInfo)
  343. {
  344. close();
  345. }
  346. function btn_correct_onclick(obj:Button, e:ClickEventInfo)
  347. {
  348. fCnclErDrCall(1);
  349. }
  350. function grd_erdrcalllist_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo)
  351. {
  352. fClkColMainYN();
  353. }
  354. function button1_onclick(obj:Button, e:ClickEventInfo)
  355. {
  356. fSaveERCallInfo();
  357. }
  358. function button2_onclick(obj:Button, e:ClickEventInfo)
  359. {
  360. fCnclErDrCall(2);
  361. }
  362. ]]></Script>
  363. </Form>
  364. </FDL>