SPPID21500_외래미시행처방상병관리.xfdl 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPPID21500" position="absolute 0 0 963 654" titletext="외래미시행오더상병관리" oninit="SPPID21500_oninit" onload="SPPID21500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="상병관리" class="tit_1" position="absolute 0 0 196 23"/>
  8. <Button id="btn_init" taborder="3" text="저장" class="btn2" position="absolute 913 25 955 44" onclick="btn_init_onclick"/>
  9. <Shape id="line1" class="line_10" position="absolute 0 44 450 55"/>
  10. <Grid id="grd_orddiaghist" taborder="4" binddataset="ds_main_diaghist_list01_mmohdiag1" useinputpanel="false" position="absolute 0 51 450 622" autofittype="col" cellsizingtype="col">
  11. <Formats>
  12. <Format id="default">
  13. <Columns>
  14. <Column size="25"/>
  15. <Column size="35"/>
  16. <Column size="54"/>
  17. <Column size="135"/>
  18. <Column size="75"/>
  19. <Column size="80"/>
  20. <Column size="40"/>
  21. <Column size="0"/>
  22. </Columns>
  23. <Rows>
  24. <Row size="23" band="head"/>
  25. <Row size="23"/>
  26. </Rows>
  27. <Band id="head">
  28. <Cell/>
  29. <Cell col="1" text="R/O"/>
  30. <Cell col="2" text="상병코드"/>
  31. <Cell col="3" text="상병명(한글)"/>
  32. <Cell col="4" text="과"/>
  33. <Cell col="5" text="진료일자"/>
  34. <Cell col="6" text="치식"/>
  35. <Cell col="7" text="보험유형"/>
  36. </Band>
  37. <Band id="body">
  38. <Cell celltype="head" expr="currow+1"/>
  39. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:diagkindcd" expr="expr:diagkindcd == 'true' ? 1 : 0"/>
  40. <Cell col="2" text="bind:diagcd"/>
  41. <Cell col="3" text="bind:diaghngnm"/>
  42. <Cell col="4" displaytype="combo" edittype="combo" text="bind:orddeptcd" combodataset="ds_list2_dept" combocodecol="deptcd" combodatacol="depthngnm"/>
  43. <Cell col="5" displaytype="date" text="bind:orddd" mask="yyyy/MM/dd"/>
  44. <Cell col="6" text="bind:toot"/>
  45. <Cell col="7" text="bind:insukind"/>
  46. </Band>
  47. </Format>
  48. </Formats>
  49. </Grid>
  50. <Static id="caption5" text="진료상병" class="tit_2" position="absolute 0 30 105 51"/>
  51. <Grid id="grd_diaglist" taborder="5" binddataset="ds_main_diaghist_list02_mmohdiag2" useinputpanel="false" position="absolute 455 51 955 622" onstartedit="grp_biz_grd_diaglist_onstartedit" oncolumnchanged="grp_biz_grd_diaglist_oncolumnchanged" oncelldblclick="grd_diaglist_oncelldblclick" autofittype="col" cellsizingtype="col">
  52. <Formats>
  53. <Format id="default">
  54. <Columns>
  55. <Column size="22"/>
  56. <Column size="22"/>
  57. <Column size="31"/>
  58. <Column size="54"/>
  59. <Column size="135"/>
  60. <Column size="75"/>
  61. <Column size="86"/>
  62. <Column size="0"/>
  63. <Column size="0"/>
  64. <Column size="50"/>
  65. <Column size="0"/>
  66. <Column size="0"/>
  67. <Column size="0"/>
  68. <Column size="0"/>
  69. <Column size="0"/>
  70. <Column size="0"/>
  71. <Column size="0"/>
  72. <Column size="0"/>
  73. <Column size="0"/>
  74. </Columns>
  75. <Rows>
  76. <Row size="24" band="head"/>
  77. <Row size="24"/>
  78. </Rows>
  79. <Band id="head">
  80. <Cell/>
  81. <Cell col="1" text="S"/>
  82. <Cell col="2" text="R/O"/>
  83. <Cell col="3" text="상병코드"/>
  84. <Cell col="4" text="상 병 명"/>
  85. <Cell col="5" text="과"/>
  86. <Cell col="6" text="진료개시일"/>
  87. <Cell col="7" text="치"/>
  88. <Cell col="8" text="치식EDI"/>
  89. <Cell col="9" text="치식"/>
  90. <Cell col="10" text="pid"/>
  91. <Cell col="11" text="seqno"/>
  92. <Cell col="12" text="cretno"/>
  93. <Cell col="13" text="orddd"/>
  94. <Cell col="14" text="addflag"/>
  95. <Cell col="15" text="drinptyn"/>
  96. <Cell col="16" text="rowstat"/>
  97. <Cell col="17" text="orddeptcdkey"/>
  98. <Cell col="18" text="보험유형"/>
  99. <Cell col="19" text="drinptyn"/>
  100. <Cell col="20" text="addflag"/>
  101. <Cell col="21" text="mskind"/>
  102. </Band>
  103. <Band id="body">
  104. <Cell celltype="head"/>
  105. <Cell col="1" text="bind:diagseq" expr="currow+1"/>
  106. <Cell col="2" displaytype="checkbox" edittype="checkbox" text="bind:ruleoutyn" expr="expr:ruleoutyn == 'Y' ? 1 : 0"/>
  107. <Cell col="3" edittype="normal" text="bind:diagcd"/>
  108. <Cell col="4" edittype="normal" style="align:left middle;" text="bind:diagnm"/>
  109. <Cell col="5" displaytype="combo" edittype="combo" text="bind:diagorddeptcd" combodataset="ds_list2_dept" combocodecol="deptcd" combodatacol="depthngnm"/>
  110. <Cell col="6" displaytype="date" edittype="date" text="bind:ordfromdd" mask="yyyy/MM/dd"/>
  111. <Cell col="7" text="bind:toothyn"/>
  112. <Cell col="8" text="bind:toot"/>
  113. <Cell col="9" text="bind:toot1"/>
  114. <Cell col="10" text="bind:pid"/>
  115. <Cell col="11" text="bind:seqno"/>
  116. <Cell col="12" text="bind:cretno"/>
  117. <Cell col="13" text="bind:orddd"/>
  118. <Cell col="14" text="bind:addflag"/>
  119. <Cell col="15" text="bind:drinptyn"/>
  120. <Cell col="16" text="bind:rowstat"/>
  121. <Cell col="17" text="bind:orddeptcd"/>
  122. <Cell col="18" text="bind:insukind"/>
  123. </Band>
  124. </Format>
  125. </Formats>
  126. </Grid>
  127. <Static id="caption87" text="상병" onclick="grp_biz_caption87_onclick" class="tit_2" position="absolute 455 30 547 51"/>
  128. <Shape id="line34" class="line_10" position="absolute 455 44 955 55"/>
  129. <Button id="btn_close" taborder="7" text="닫기" class="btn4" position="absolute 900 626 956 648" onclick="btn_close_onclick"/>
  130. <Shape id="line9" class="line_6" position="absolute 0 624 952 627"/>
  131. </Layout>
  132. </Layouts>
  133. <Objects>
  134. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  135. <Dataset id="ds_main_diaghist_list01_mmohdiag1" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_diaghist_list01_mmohdiag1_oncolumnchanged">
  136. <ColumnInfo>
  137. <Column id="diagkindcd" type="STRING" size="256" sumtext="R/O"/>
  138. <Column id="diagcd" type="STRING" size="256" sumtext="상병코드"/>
  139. <Column id="diaghngnm" type="STRING" size="256" sumtext="상병명(한글)"/>
  140. <Column id="orddeptcd" type="STRING" size="256" sumtext="진료과"/>
  141. <Column id="orddd" type="STRING" size="256" sumtext="진료과"/>
  142. <Column id="tootfact" type="STRING" size="256" sumtext="치식내용"/>
  143. <Column id="insukind" type="STRING" size="256" sumtext="보험유형"/>
  144. <Column id="toot" type="STRING" size="256"/>
  145. <Column id="toot1" type="STRING" size="256"/>
  146. </ColumnInfo>
  147. </Dataset>
  148. <Dataset id="ds_main_diaghist_list02_mmohdiag2" firefirstcount="0" firenextcount="0" useclientlayout="true" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false" oncolumnchanged="ds_main_diaghist_list02_mmohdiag2_oncolumnchanged">
  149. <ColumnInfo>
  150. <Column id="diagseq" type="STRING" size="256" sumtext="일련번호"/>
  151. <Column id="seqno" type="STRING" size="256" sumtext="일련번호"/>
  152. <Column id="ruleoutyn" type="STRING" size="256" sumtext="처방코드"/>
  153. <Column id="diagcd" type="STRING" size="256" sumtext="상병코드"/>
  154. <Column id="diagnm" type="STRING" size="256" sumtext="상병명"/>
  155. <Column id="orddeptcd" type="STRING" size="256" sumtext="진료과"/>
  156. <Column id="ordfromdd" type="STRING" size="256" sumtext="진료개시일"/>
  157. <Column id="toothyn" type="STRING" size="256" sumtext="치식여부"/>
  158. <Column id="toot" type="STRING" size="256" sumtext="치식EDI"/>
  159. <Column id="toot1" type="STRING" size="256" sumtext="치식"/>
  160. <Column id="pid" type="STRING" size="256" sumtext="등록번호"/>
  161. <Column id="orddd" type="STRING" size="256" sumtext="진료일자"/>
  162. <Column id="addflag" type="STRING" size="256" sumtext="추가구분"/>
  163. <Column id="drinptyn" type="STRING" size="256" sumtext="의사입력여부"/>
  164. <Column id="rowstat" type="STRING" size="256" sumtext="상태"/>
  165. <Column id="diagorddeptcd" type="STRING" size="256" sumtext="상병별 진료과"/>
  166. <Column id="insukind" type="STRING" size="256" sumtext="보험유형"/>
  167. <Column id="cretno" type="STRING" size="256" sumtext="생성번호"/>
  168. </ColumnInfo>
  169. </Dataset>
  170. <Dataset id="ds_list2_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  171. <ColumnInfo>
  172. <Column id="depthngnm" type="STRING" size="256"/>
  173. <Column id="deptcd" type="STRING" size="256"/>
  174. </ColumnInfo>
  175. </Dataset>
  176. <Dataset id="ds_hidden_sppiz00600_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  177. <ColumnInfo>
  178. <Column id="pid" type="STRING" size="256"/>
  179. <Column id="toot" type="STRING" size="256"/>
  180. <Column id="clamym" type="STRING" size="256"/>
  181. <Column id="clamdg" type="STRING" size="256"/>
  182. <Column id="pidsn" type="STRING" size="256"/>
  183. </ColumnInfo>
  184. <Rows>
  185. <Row/>
  186. </Rows>
  187. </Dataset>
  188. <Dataset id="ds_hidden_sppiz00600_rslt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  189. <Dataset id="ds_hidden_sppiz00600_cond_list_toothapplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  190. <ColumnInfo>
  191. <Column id="chos" type="STRING" size="256"/>
  192. </ColumnInfo>
  193. </Dataset>
  194. <Dataset id="ds_hidden_sppiz00400_rslt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  195. <ColumnInfo>
  196. <Column id="diagcd" type="STRING" size="256"/>
  197. <Column id="diagengnm" type="STRING" size="256"/>
  198. <Column id="diaghngnm" type="STRING" size="256"/>
  199. </ColumnInfo>
  200. </Dataset>
  201. <Dataset id="ds_hidden_sppiz00400_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  202. <ColumnInfo>
  203. <Column id="basedd" type="STRING" size="256"/>
  204. <Column id="diagcd" type="STRING" size="256"/>
  205. <Column id="diagnm" type="STRING" size="256"/>
  206. <Column id="selectedrdodiagkind" type="STRING" size="256"/>
  207. </ColumnInfo>
  208. <Rows>
  209. <Row/>
  210. </Rows>
  211. </Dataset>
  212. </Objects>
  213. <Bind/>
  214. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  215. * System Name :
  216. * Job Name :
  217. * Creator :
  218. * Make Date : 2015-05-01
  219. * Description :
  220. *---------------------------------------------------------------------------------------
  221. * Modify Date Modifier Modify Description
  222. *---------------------------------------------------------------------------------------
  223. * 2015-05-01 Live Converter TF->XP
  224. *
  225. *---------------------------------------------------------------------------------------
  226. ****************************************************************************************/
  227. include "com_commonxp::comm_main.xjs";
  228. function SPPID21500_oninit(obj:Form, e:InitEventInfo)
  229. {
  230. frmf_initForm(obj);
  231. }
  232. function SPPID21500_onload(obj:Form, e:LoadEventInfo)
  233. {
  234. grdf_initGrid(grd_orddiaghist);
  235. grdf_initGrid(grd_diaglist);
  236. grdf_setRowTypeIcon(grd_diaglist, 0);
  237. fInitialize();
  238. var oParam = {};
  239. oParam.id = "TRPID21502";
  240. oParam.service = "aftjudgapp.OutUnExecOrd";
  241. oParam.method = "reqGetPatIODiagHistList";
  242. oParam.inds = "req=ds_send";
  243. oParam.outds = "ds_main_diaghist_list01_mmohdiag1=mmohdiag1";
  244. oParam.async = false;
  245. //oParam.callback = "cf_TRPID21502";
  246. tranf_submit(oParam);
  247. var oParam = {};
  248. oParam.id = "TRPID21501";
  249. oParam.service = "aftjudgapp.OutUnExecOrd";
  250. oParam.method = "reqGetDiagHistList";
  251. oParam.inds = "req=ds_send";
  252. oParam.outds = "ds_main_diaghist_list02_mmohdiag2=mmohdiag2";
  253. oParam.async = false;
  254. //oParam.callback = "cf_TRPID21501";
  255. tranf_submit(oParam);
  256. list01cnt = ds_main_diaghist_list01_mmohdiag1.rowcount;
  257. list02cnt = ds_main_diaghist_list02_mmohdiag2.rowcount;
  258. var check = "";
  259. for (var i = 0; i < list01cnt ; i++)
  260. {
  261. check = "false";
  262. var ruleoutyn = ds_main_diaghist_list01_mmohdiag1.getColumn(i, "diagkindcd");
  263. var rdiagcd = ds_main_diaghist_list01_mmohdiag1.getColumn(i, "diagcd");
  264. var diaghngnm = ds_main_diaghist_list01_mmohdiag1.getColumn(i, "diaghngnm");
  265. var orddeptcd = ds_main_diaghist_list01_mmohdiag1.getColumn(i, "orddeptcd");
  266. var orddd = ds_main_diaghist_list01_mmohdiag1.getColumn(i, "orddd");
  267. var toot = ds_main_diaghist_list01_mmohdiag1.getColumn(i, "toot");
  268. var toot1 = ds_main_diaghist_list01_mmohdiag1.getColumn(i, "toot1");
  269. var insukind = ds_main_diaghist_list01_mmohdiag1.getColumn(i, "insukind");
  270. for (var j = 0; j < list02cnt ; j++)
  271. {
  272. var fdiagcd = ds_main_diaghist_list02_mmohdiag2.getColumn(j, "diagcd");
  273. if (rdiagcd == fdiagcd)
  274. {
  275. check = "true";
  276. }
  277. }
  278. if (check == "false")
  279. {
  280. fDiagGridInsertRow(false);
  281. var row = ds_main_diaghist_list02_mmohdiag2.rowcount-1;
  282. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "ruleoutyn", ruleoutyn);
  283. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "diagcd", rdiagcd);
  284. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "diagnm", diaghngnm);
  285. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "orddeptcd", orddeptcd);
  286. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "diagorddeptcd", orddeptcd);
  287. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "ordfromdd", orddd);
  288. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "insukind", insukind);
  289. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "rowstat", "I");
  290. if (utlf_isNull(toot))
  291. {
  292. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "toothyn", "N");
  293. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "toot", "-");
  294. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "toot1", "");
  295. }
  296. else
  297. {
  298. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "toothyn", "Y");
  299. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "toot", toot);
  300. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "toot1", toot1);
  301. }
  302. }
  303. }
  304. fDiagGridInsertRow(false);
  305. }
  306. function fInitialize()
  307. {
  308. if (frmf_checkOpener())
  309. {
  310. if(arg_ds_send)
  311. {
  312. ds_send.copyData(arg_ds_send);
  313. }
  314. }
  315. dsf_createDsRow("ds_req", [{col:"insucd", type:"STRING", size:256 , val : ""}
  316. , {col:"ordfromdd", type:"STRING", size:256 , val : ""}
  317. , {col:"basedd", type:"STRING", size:256 , val : ds_send.getColumn(0, "orddd")}]);
  318. var oParam = {};
  319. oParam.id = "TRPIJ00305";
  320. oParam.service = "bfjudgapp.InHospJudg";
  321. oParam.method = "reqGetDeptList";
  322. oParam.inds = "req=ds_req";
  323. oParam.outds = "ds_list2_dept=dept";
  324. oParam.async = false;
  325. //oParam.callback = "cf_TRPIJ00305";
  326. tranf_submit(oParam);
  327. }
  328. function fDiagGridInsertRow(flag)
  329. {
  330. if (ds_main_diaghist_list02_mmohdiag2.getRowType(0) == 8)
  331. {
  332. var diagrow = ds_main_diaghist_list02_mmohdiag2.addRow();
  333. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "diagseq", diagrow);
  334. fSortDiagNo();
  335. }
  336. else
  337. {
  338. var diagrow = ds_main_diaghist_list02_mmohdiag2.addRow();
  339. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "diagseq", diagrow);
  340. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "pid", ds_send.getColumn(0, "pid"));
  341. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "orddd", ds_send.getColumn(0, "orddd"));
  342. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "orddeptcd", ds_send.getColumn(0, "deptcd"));
  343. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "diagorddeptcd", ds_send.getColumn(0, "deptcd"));
  344. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "insukind", ds_send.getColumn(0, "insukind"));
  345. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "ruleoutyn", "false");
  346. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "toothyn", "N");
  347. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "toot", "-");
  348. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "toot1", "");
  349. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "addflag", "Y");
  350. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "drinptyn", "N");
  351. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "cretno", ds_send.getColumn(0, "cretno"));
  352. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "ordfromdd", ds_send.getColumn(0, "orddd"));
  353. ds_main_diaghist_list02_mmohdiag2.setColumn(diagrow, "rowstat", "I");
  354. if (flag == true)
  355. {
  356. fSortDiagNo();
  357. }
  358. }
  359. }
  360. function fSortDiagNo()
  361. {
  362. if (ds_main_diaghist_list02_mmohdiag2.rowcount > 0)
  363. {
  364. for (var j = ds_main_diaghist_list02_mmohdiag2.rowcount; j > 0; j--)
  365. {
  366. var rowstatus = ds_main_diaghist_list02_mmohdiag2.getRowType(j);
  367. var diagcd = ds_main_diaghist_list02_mmohdiag2.getColumn(j, "diagcd");
  368. var diagnm = ds_main_diaghist_list02_mmohdiag2.getColumn(j, "diagnm");
  369. if (rowstatus != 8 && utlf_isNull(diagcd) && utlf_isNull(diagnm))
  370. {
  371. ds_main_diaghist_list02_mmohdiag2.deleteRow(j);
  372. }
  373. }
  374. var maxRow = parseInt(ds_main_diaghist_list02_mmohdiag2.rowcount);
  375. }
  376. }
  377. function btn_close_onclick(obj:Button, e:ClickEventInfo)
  378. {
  379. this.close();
  380. }
  381. function grd_diaglist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  382. {
  383. var row = e.row;
  384. if (row > -1)
  385. {
  386. var col = e.col;
  387. if (col == grd_diaglist.getBindCellIndex("Body", "diagcd") || col == grd_diaglist.getBindCellIndex("Body", "diagnm"))
  388. {
  389. fSearchDiageCode();
  390. }
  391. else if (col == grd_diaglist.getBindCellIndex("Body", "toot1"))
  392. {
  393. var row = e.row;
  394. var diagcd = ds_main_diaghist_list02_mmohdiag2.getColumn(row, "diagcd");
  395. if (diagcd)
  396. {
  397. ds_hidden_sppiz00600_cond.setColumn(0, "pid", ds_main_diaghist_list02_mmohdiag2.getColumn(row, "pid"));
  398. ds_hidden_sppiz00600_cond.setColumn(0, "toot", ds_main_diaghist_list02_mmohdiag2.getColumn(row, "toot"));
  399. ds_hidden_sppiz00600_cond.setColumn(0, "clamym", "");
  400. ds_hidden_sppiz00600_cond.setColumn(0, "clamdg", "");
  401. ds_hidden_sppiz00600_cond.setColumn(0, "pidsn", "");
  402. fSetToothPop(row, "1");
  403. ds_hidden_sppiz00600_rslt.clearData();
  404. var objArg = new Object();
  405. objArg.arg_ds_hidden_cond= ds_hidden_sppiz00600_cond;
  406. frmf_modal("SPPIZ00600", "SPPIZ00600", objArg, "", "", "", "", "", "", "", "", "", "M");
  407. fGetToothPop();
  408. }
  409. }
  410. }
  411. }
  412. function fSetToothPop(row, flag)
  413. {
  414. ds_hidden_sppiz00600_cond_list_toothapplist.clearData();
  415. var cntcldi = ds_main_diaghist_list02_mmohdiag2.rowcount;
  416. var cd = "";
  417. var cdnm = "";
  418. var orddd = "";
  419. var toot = "";
  420. for (var i = 0; i < cntcldi; i++)
  421. {
  422. cd = ds_main_diaghist_list02_mmohdiag2.getColumn(i, "diagcd");
  423. cdnm = ds_main_diaghist_list02_mmohdiag2.getColumn(i, "diagnm");
  424. orddd = ds_main_diaghist_list02_mmohdiag2.getColumn(i, "ordfromdd");
  425. toot = ds_main_diaghist_list02_mmohdiag2.getColumn(i, "toot");
  426. var rowcnt = ds_hidden_sppiz00600_cond_list_toothapplist.addRow();
  427. if (toot != "-" && !utlf_isNull(toot))
  428. {
  429. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "chos", "string", "", rowcnt);
  430. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "flag", "string", "", rowcnt);
  431. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "cd", "string", "", rowcnt);
  432. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "cdnm", "string", "", rowcnt);
  433. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "rightupper", "string", "", rowcnt);
  434. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "leftupper", "string", "", rowcnt);
  435. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "rightlower", "string", "", rowcnt);
  436. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "leftlower", "string", "", rowcnt);
  437. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "orddd", "string", "", rowcnt);
  438. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "toot", "string", "", rowcnt);
  439. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "row", "string", "", rowcnt);
  440. var milktoothstr = "ABCDE000";
  441. var subTootStr = "";
  442. for (var inx = 0; inx < 32; inx++)
  443. {
  444. var tootnum = toot.substr(inx,1);
  445. if (tootnum == "*")
  446. { // 선택된 영구치의 경우 1~8 사이 숫자로 표시한다.
  447. if (inx < 8)
  448. {
  449. subTootStr += (8 - inx);
  450. }
  451. else if (inx > 7 && inx < 16)
  452. {
  453. subTootStr += (inx - 7);
  454. }
  455. else if (inx > 15 && inx < 24)
  456. {
  457. subTootStr += (24 - inx);
  458. }
  459. else
  460. {
  461. subTootStr += (inx - 23);
  462. }
  463. }
  464. else if (tootnum == "#")
  465. {
  466. if (inx < 8)
  467. {
  468. subTootStr += milktoothstr.charAt(7 - inx);
  469. }
  470. else if (inx > 7 && inx < 16)
  471. {
  472. subTootStr += milktoothstr.charAt(inx - 8);
  473. }
  474. else if (inx > 15 && inx < 24)
  475. {
  476. subTootStr += milktoothstr.charAt(23 - inx);
  477. }
  478. else
  479. {
  480. subTootStr += milktoothstr.charAt(inx - 24);
  481. }
  482. }
  483. else
  484. {
  485. subTootStr += " ";
  486. }
  487. }
  488. if (row == i && flag == "1" )
  489. {
  490. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "chos", "true");
  491. }
  492. else
  493. {
  494. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "chos", "false");
  495. }
  496. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "flag", "상병");
  497. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "cd", cd);
  498. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "cdnm", cdnm);
  499. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "rightupper", String(rightupper).substr(0,8));
  500. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "leftupper", String(rightupper).substr(8,8));
  501. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "rightlower", String(rightupper).substr(16,8));
  502. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "leftlower", String(rightupper).substr(24,8));
  503. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "orddd", orddd);
  504. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "toot", toot);
  505. ds_hidden_sppiz00600_cond_list_toothapplist.setColumn(rowcnt, "row", i);
  506. }
  507. else
  508. {
  509. if (row == i && flag == "1" )
  510. {
  511. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "chos", "string", "true", rowcnt);
  512. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "flag", "string", "상병", rowcnt);
  513. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "cd", "string", cd, rowcnt);
  514. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "cdnm", "string", cdnm, rowcnt);
  515. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "rightupper", "string", "", rowcnt);
  516. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "leftupper", "string", "", rowcnt);
  517. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "rightlower", "string", "", rowcnt);
  518. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "leftlower", "string", "", rowcnt);
  519. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "orddd", "string", orddd, rowcnt);
  520. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "toot", "string", "", rowcnt);
  521. dsf_makeValue(ds_hidden_sppiz00600_cond_list_toothapplist, "row", "string", i, rowcnt);
  522. }
  523. }
  524. }
  525. }
  526. function fGetToothPop()
  527. {
  528. var tootSelectcnt = ds_hidden_sppiz00600_rslt.rowcount;
  529. var flag = "";
  530. var row = "";
  531. var toot = "";
  532. tootSelectcnt = eval(tootSelectcnt) + 1;
  533. for (var i = 0; i < tootSelectcnt; i++)
  534. {
  535. flag = ds_hidden_sppiz00600_rslt.getColumn(i, "flag");
  536. row = ds_hidden_sppiz00600_rslt.getColumn(i, "row");
  537. var rlsttoot = ds_hidden_sppiz00600_rslt.getColumn(i, "toot");
  538. var rlsttoot1 = ds_hidden_sppiz00600_rslt.getColumn(i, "toot1");
  539. if (utlf_isNull(rlsttoot))
  540. {
  541. rlsttoot = "-";
  542. }
  543. if (utlf_isNull(rlsttoot1))
  544. {
  545. rlsttoot1 = "-";
  546. }
  547. if (flag == "1")
  548. {
  549. toot = ds_main_diaghist_list02_mmohdiag2.getColumn(row, "toot");
  550. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "toot", rlsttoot);
  551. ds_main_diaghist_list02_mmohdiag2.setColumn(row, "toot1", rlsttoot1);
  552. if (rlsttoot != toot)
  553. {
  554. var cldistatus = ds_main_diaghist_list02_mmohdiag2.getRowType(row);
  555. if (cldistatus == 2 || cldistatus == 4)
  556. {
  557. ds_main_diaghist_list02_mmohdiag2.setRowType(row, "u");
  558. }
  559. }
  560. }
  561. }
  562. }
  563. function fSearchDiageCode()
  564. {
  565. ds_hidden_sppiz00400_rslt.clearData();
  566. var row = ds_main_diaghist_list02_mmohdiag2.rowposition;
  567. var rows = ds_main_diaghist_list02_mmohdiag2.rowcount;
  568. var diagcd = ds_main_diaghist_list02_mmohdiag2.getColumn(row, "diagcd");
  569. ds_hidden_sppiz00400_cond.setColumn(0, "basedd", utlf_getCurrentDate());
  570. ds_hidden_sppiz00400_cond.setColumn(0, "diagcd", diagcd);
  571. ds_hidden_sppiz00400_cond.setColumn(0, "diagnm", "");
  572. ds_hidden_sppiz00400_cond.setColumn(0, "selectedrdodiagkind", "1");
  573. if (diagcd)
  574. {
  575. var oParam = {};
  576. oParam.id = "TRPIJ00308";
  577. oParam.service = "aftjudgapp.OutAftJudg";
  578. oParam.method = "reqGetSickAndWounded";
  579. oParam.inds = "req=ds_hidden_sppiz00400_cond";
  580. oParam.outds = "ds_hidden_sppiz00400_rslt=rslt";
  581. oParam.async = false;
  582. //oParam.callback = "cf_TRPIJ00308";
  583. tranf_submit(oParam);
  584. var rsltList = ds_hidden_sppiz00400_rslt.rowcount;
  585. if (rsltList == 1)
  586. {
  587. fSetDiagCdNm();
  588. }
  589. else
  590. {
  591. fSearchSPPIZ00400();
  592. }
  593. }
  594. else
  595. {
  596. // 상병코드 입력 없이 상병명 선택 시
  597. fSearchSPPIZ00400();
  598. }
  599. var addrow = row + 1;
  600. if (addrow == rows)
  601. {
  602. var diagcd = ds_hidden_sppiz00400_rslt.getColumn(0, "diagcd");
  603. if (!utlf_isNull(diagcd))
  604. {
  605. fDiagGridInsertRow(false);
  606. }
  607. }
  608. }
  609. function btn_init_onclick(obj:Button, e:ClickEventInfo)
  610. {
  611. var diagnm = "";
  612. var orddeptcd = "";
  613. var rows = ds_main_diaghist_list02_mmohdiag2.rowcount;
  614. var row = rows - 1;
  615. for (var j = rows; j > 0; j--)
  616. {
  617. var rowstatus = ds_main_diaghist_list02_mmohdiag2.getRowType(j);
  618. var diagcd = ds_main_diaghist_list02_mmohdiag2.getColumn(j, "diagcd");
  619. var diagnm = ds_main_diaghist_list02_mmohdiag2.getColumn(j, "diagnm");
  620. if (rowstatus != 8 && utlf_isNull(diagcd) && utlf_isNull(diagnm))
  621. {
  622. ds_main_diaghist_list02_mmohdiag2.deleteRow(j);
  623. }
  624. }
  625. var updateData = grdf_getGridUpdateData(grd_diaglist).rowcount;
  626. if (updateData == 0)
  627. {
  628. sysf_messageBox("저장할 상병 정보가","I004","");
  629. fDiagGridInsertRow();
  630. return;
  631. }
  632. // 저장할 데이터가 올바른지 확인
  633. rows = ds_main_diaghist_list02_mmohdiag2.rowcount;
  634. for (var i = 0; i < rows; i++)
  635. {
  636. var diagstatus = ds_main_diaghist_list02_mmohdiag2.getRowType(i);
  637. diagseq = ds_main_diaghist_list02_mmohdiag2.getColumn(i, "diagseq");
  638. diagnm = ds_main_diaghist_list02_mmohdiag2.getColumn(i, "diagnm");
  639. orddeptcd = ds_main_diaghist_list02_mmohdiag2.getColumn(i, "orddeptcd");
  640. if (utlf_isNull(diagnm) && !utlf_isNull(orddeptcd))
  641. {
  642. sysf_messageBox("상병을 입력하여 주십시요!","E999","");
  643. return;
  644. }
  645. if (!utlf_isNull(diagnm) && utlf_isNull(orddeptcd))
  646. {
  647. sysf_messageBox("진료과를 선택해 주십시요!","E999","");
  648. return;
  649. }
  650. if (utlf_isNull(diagnm) && utlf_isNull(orddeptcd))
  651. {
  652. ds_main_diaghist_list02_mmohdiag2.setRowType(i, "");
  653. }
  654. }
  655. var oParam = {};
  656. oParam.id = "TXPID21501";
  657. oParam.service = "aftjudgapp.OutUnExecOrd";
  658. oParam.method = "reqExeDiag";
  659. oParam.inds = "req=ds_main_diaghist_list02_mmohdiag2:U";
  660. oParam.outds = "ds_main_diaghist_list02_mmohdiag2=mmohdiag2";
  661. oParam.async = false;
  662. oParam.callback = "cf_TXPID21501";
  663. tranf_submit(oParam);
  664. fDiagGridInsertRow();
  665. }
  666. function cf_TXPID21501(sSvcId, nErrorCode, sErrorMsg)
  667. {
  668. if(nErrorCode < 0) return;
  669. else
  670. {
  671. var list02cnt = ds_main_diaghist_list02_mmohdiag2.rowcount;
  672. var openerRows = ds_send.getColumn(0, "row");
  673. if (list02cnt > 0)
  674. {
  675. for (var i = 0; i <openerRows; i++)
  676. {
  677. opener.ds_main_grd2_unexecordlist.setColumn(i, "diagyn", "Y");
  678. }
  679. }
  680. else
  681. {
  682. for (var i = 0; i < openerRows; i++)
  683. {
  684. opener.ds_main_grd2_unexecordlist.setColumn(i, "diagyn", "N");
  685. }
  686. }
  687. }
  688. }
  689. function fSetDiagCdNm()
  690. {
  691. var diagcd = ds_hidden_sppiz00400_rslt.getColumn(0, "diagcd");
  692. var diaghngnm = ds_hidden_sppiz00400_rslt.getColumn(0, "diaghngnm");
  693. var diagengnm = ds_hidden_sppiz00400_rslt.getColumn(0, "diagengnm");
  694. if (diagcd)
  695. {
  696. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "diagcd", diagcd);
  697. }
  698. if (diaghngnm)
  699. {
  700. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "diagnm", diaghngnm);
  701. }
  702. var chk_key = ds_main_diaghist_list02_mmohdiag2.getColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "pid");
  703. if(chk_key)
  704. {
  705. return;
  706. }
  707. else
  708. {
  709. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "pid", ds_send.getColumn(0, "pid"));
  710. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "indd", ds_send.getColumn(0, "indd"));
  711. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "cretno", ds_send.getColumn(0, "cretno"));
  712. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "fromdd", ds_send.getColumn(0, "fromdd"));
  713. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "mskind", ds_send.getColumn(0, "mskind"));
  714. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "drinptyn", "N");
  715. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "addflag", "Y");
  716. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "insukind", ds_send.getColumn(0, "insukind"));
  717. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "diagorddeptcd", ds_send.getColumn(0, "deptcd"));
  718. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "orddeptcd", ds_send.getColumn(0, "deptcd"));
  719. }
  720. }
  721. function fSearchSPPIZ00400()
  722. {
  723. ds_hidden_sppiz00400_rslt.clearData();
  724. var row = ds_main_diaghist_list02_mmohdiag2.rowposition;
  725. var diagcd = ds_main_diaghist_list02_mmohdiag2.getColumn(row, "diagcd");
  726. var objArg = new Object();
  727. objArg.sDiagcd = diagcd;
  728. objArg.sSelectedrdodiagkind = 3;
  729. objArg.sSingleFlag = "M";
  730. var objDs = frmf_modal("SPPIZ00400", "SPPIZ00400", objArg, "", "", "", "", "", "", "", "", "", "M");
  731. ds_hidden_sppiz00400_rslt.copyData(objDs);
  732. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "diagcd", ds_hidden_sppiz00400_rslt.getColumn(0, "diagcd"));
  733. ds_main_diaghist_list02_mmohdiag2.setColumn(ds_main_diaghist_list02_mmohdiag2.rowposition, "diagnm", ds_hidden_sppiz00400_rslt.getColumn(0, "diaghngnm"));
  734. }
  735. function ds_main_diaghist_list01_mmohdiag1_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  736. {
  737. if(e.columnid == "diagkindcd")
  738. {
  739. obj.setColumn(e.row, "diagkindcd", (e.newvalue == "true" || e.newvalue == 1) ? "true" : "false");
  740. }
  741. }
  742. function ds_main_diaghist_list02_mmohdiag2_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  743. {
  744. if(e.columnid == "ruleoutyn")
  745. {
  746. obj.setColumn(e.row, "ruleoutyn", (e.newvalue == "true" || e.newvalue == 1) ? "true" : "false");
  747. }
  748. }
  749. ]]></Script>
  750. </Form>
  751. </FDL>