SMMNO04500_임산부보고서.xfdl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMNO04500" position="absolute 0 0 1199 760" titletext="임산부보고서" oninit="SMMNO04500_oninit" onload="SMMNO04500_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="group2" taborder="1" class="div_SA" position="absolute 0 24 1195 64" anchor="left top right">
  8. <Layouts>
  9. <Layout>
  10. <Static id="caption2" text="진료기간 :" class="search_name" position="absolute 15 12 101 29"/>
  11. <Calendar id="ipt_fromdd" taborder="1" class="input_search" position="absolute 97 11 198 30" autoselect="true" autoskip="true"/>
  12. <Static id="caption3" text="~" position="absolute 206 15 221 29"/>
  13. <Calendar id="ipt_todd" taborder="2" class="input_search" position="absolute 221 11 322 30" autoselect="true"/>
  14. <Shape id="line2" linetype="vertical" class="line_4" position="absolute 702 9 708 29" anchor="top right"/>
  15. <Button id="button1" taborder="3" text="조회" class="btn1" position="absolute 715 9 771 31" anchor="top right" onclick="group2_button1_onclick"/>
  16. <Button id="button2" taborder="4" text="자료생성" class="btn1" position="absolute 776 9 856 31" anchor="top right" onclick="group2_button2_onclick"/>
  17. <Button id="button3" taborder="5" text="행추가" class="btn4" position="absolute 861 9 929 31" anchor="top right" onclick="group2_button3_onclick"/>
  18. <Button id="button4" taborder="6" text="행삭제" class="btn4" position="absolute 934 9 1002 31" anchor="top right" onclick="group2_button4_onclick"/>
  19. <Button id="button5" taborder="7" text="저장" class="btn4" position="absolute 1007 9 1063 31" anchor="top right" onclick="group2_button5_onclick"/>
  20. <Button id="button6" taborder="8" text="출력" class="btn6" position="absolute 1068 9 1124 31" anchor="top right" onclick="group2_button6_onclick"/>
  21. <Button id="button7" taborder="9" text="엑셀" class="btn7" position="absolute 1129 9 1185 31" anchor="top right" onclick="group2_button7_onclick"/>
  22. </Layout>
  23. </Layouts>
  24. </Div>
  25. <Grid position="absolute 0 78 1195 753" id="grd_preg" binddataset="ds_main_preginfo_preglist" cellsizingtype="col" anchor="all" selecttype="multirow" autoenter="key" onkeyup="grd_preg_onkeyup">
  26. <Formats>
  27. <Format id="default">
  28. <Columns>
  29. <Column size="19" band="left"/>
  30. <Column size="0"/>
  31. <Column size="0"/>
  32. <Column size="100"/>
  33. <Column size="100"/>
  34. <Column size="100"/>
  35. <Column size="150"/>
  36. <Column size="129"/>
  37. <Column size="80"/>
  38. <Column size="486"/>
  39. </Columns>
  40. <Rows>
  41. <Row size="24" band="head"/>
  42. <Row size="24"/>
  43. </Rows>
  44. <Band id="head">
  45. <Cell/>
  46. <Cell col="1" text="기관코드"/>
  47. <Cell col="2" text="생성번호"/>
  48. <Cell col="3" text="진료일"/>
  49. <Cell col="4" text="환자번호"/>
  50. <Cell col="5" text="임산부명"/>
  51. <Cell col="6" text="주민번호"/>
  52. <Cell col="7" text="전화번호"/>
  53. <Cell col="8" text="우편번호"/>
  54. <Cell col="9" text="주소"/>
  55. </Band>
  56. <Band id="body">
  57. <Cell celltype="head"/>
  58. <Cell col="1" displaytype="text" edittype="text" text="bind:instcd"/>
  59. <Cell col="2" displaytype="text" edittype="text" text="bind:cretno"/>
  60. <Cell col="3" displaytype="date" edittype="date" text="bind:indd" editautoselect="true" editautoskip="true" taborder="1" calendardisplaynulltype="nulltext"/>
  61. <Cell col="4" displaytype="text" edittype="mask" style="align:center middle;" text="bind:pid" mask="#######" maskchar=" " editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="2"/>
  62. <Cell col="5" displaytype="text" edittype="text" style="align:center middle;" text="bind:pname" editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="3"/>
  63. <Cell col="6" displaytype="text" edittype="mask" style="align:center middle;" text="bind:rrgstno" mask="######-#######" maskchar=" " editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="4"/>
  64. <Cell col="7" displaytype="text" edittype="text" style="align:center middle;" text="bind:phone" editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="5"/>
  65. <Cell col="8" displaytype="text" edittype="mask" style="align:center middle;" text="bind:zipcd" mask="###-###" maskchar=" " editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="6"/>
  66. <Cell col="9" displaytype="text" edittype="text" text="bind:address" editautoselect="true" editautoskip="true" editacceptsenter="true" taborder="7"/>
  67. </Band>
  68. </Format>
  69. </Formats>
  70. </Grid>
  71. <Shape position="absolute 0 73 1195 79" linetype="horizontal" id="line1" class="line_10" anchor="left top right"/>
  72. <Static id="caption1" text="임산부 보고서" class="tit_1" position="absolute 0 0 265 24"/>
  73. </Layout>
  74. </Layouts>
  75. <Objects>
  76. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  77. <ColumnInfo>
  78. <Column id="fromdd" type="STRING" size="256"/>
  79. <Column id="todd" type="STRING" size="256"/>
  80. </ColumnInfo>
  81. <Rows>
  82. <Row/>
  83. </Rows>
  84. </Dataset>
  85. <Dataset id="ds_main_preginfo_preglist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  86. <ColumnInfo>
  87. <Column id="instcd" type="STRING" size="256" sumtext="기관코드"/>
  88. <Column id="indd" type="STRING" size="256" sumtext="내원일"/>
  89. <Column id="pid" type="STRING" size="256" sumtext="환자번호"/>
  90. <Column id="cretno" type="STRING" size="256" sumtext="생성번호"/>
  91. <Column id="pname" type="STRING" size="256" sumtext="환자이름"/>
  92. <Column id="rrgstno" type="STRING" size="256" sumtext="주민등록번호"/>
  93. <Column id="husband" type="STRING" size="256" sumtext="배우자명"/>
  94. <Column id="zipcd" type="STRING" size="256" sumtext="우편번호"/>
  95. <Column id="address" type="STRING" size="256" sumtext="주소"/>
  96. <Column id="phone" type="STRING" size="256" sumtext="전화번호"/>
  97. </ColumnInfo>
  98. </Dataset>
  99. <Dataset id="ds_send_preglist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  100. </Objects>
  101. <Bind>
  102. <BindItem id="item0" compid="group2.ipt_fromdd" propid="value" datasetid="ds_main_cond" columnid="fromdd"/>
  103. <BindItem id="item1" compid="group2.ipt_todd" propid="value" datasetid="ds_main_cond" columnid="todd"/>
  104. </Bind>
  105. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  106. * System Name :
  107. * Job Name :
  108. * Creator :
  109. * Make Date : 2015-05-01
  110. * Description :
  111. *---------------------------------------------------------------------------------------
  112. * Modify Date Modifier Modify Description
  113. *---------------------------------------------------------------------------------------
  114. * 2015-05-01 Live Converter TF->XP
  115. *
  116. *---------------------------------------------------------------------------------------
  117. ****************************************************************************************/
  118. include "com_commonxp::comm_main.xjs";
  119. var arErrorCode = new HashArray();
  120. function SMMNO04500_oninit(obj:Form, e:InitEventInfo)
  121. {
  122. frmf_initForm(obj);
  123. }
  124. function SMMNO04500_onload(obj:Form, e:LoadEventInfo)
  125. {
  126. grdf_initGrid(grd_preg);
  127. grdf_setRowTypeIcon(grd_preg, 0);
  128. fInitialize();
  129. }
  130. function fInitialize()
  131. {
  132. ds_main_preginfo_preglist.clearData();
  133. //조회날짜 받아옴
  134. var fromdd = ((utlf_getCurrentDate().toDate()).getAddDate(-30)).getDateFormat();
  135. var todd = utlf_getCurrentDate();
  136. //지난달을 보여줌
  137. ds_main_cond.setColumn(0, "fromdd",fromdd);
  138. ds_main_cond.setColumn(0, "todd",todd);
  139. fSearch();
  140. }
  141. function fSearch()
  142. {
  143. ds_main_preginfo_preglist.clearData();
  144. // 조회 조건을 셋팅 한다.
  145. var oParam = {};
  146. oParam.id = "TRMNO04501";
  147. oParam.service = "outcareapp.OutCareMngt";
  148. oParam.method = "reqGetPregList";
  149. oParam.inds = "req=ds_main_cond";
  150. oParam.outds = "ds_main_preginfo_preglist=preglist";
  151. oParam.async = false;
  152. //oParam.callback = "cf_TRMNO04501";
  153. tranf_submit(oParam);
  154. }
  155. function group2_button1_onclick(obj:Button, e:ClickEventInfo)
  156. {
  157. fSearch();
  158. }
  159. function group2_button2_onclick(obj:Button, e:ClickEventInfo)
  160. {
  161. fCreate();
  162. }
  163. function fCreate()
  164. {
  165. ds_main_preginfo_preglist.clearData();
  166. // 조회 조건을 셋팅 한다.
  167. var oParam = {};
  168. oParam.id = "TRMNO04501";
  169. oParam.service = "outcareapp.OutCareMngt";
  170. oParam.method = "reqGetCreatePregList";
  171. oParam.inds = "req=ds_main_cond";
  172. oParam.outds = "ds_main_preginfo_preglist=preglist";
  173. oParam.async = false;
  174. //oParam.callback = "cf_TRMNO04501";
  175. tranf_submit(oParam);
  176. for(var i = 0; i < ds_main_preginfo_preglist.rowcount; i++)
  177. {
  178. ds_main_preginfo_preglist.updatecontrol = false;
  179. ds_main_preginfo_preglist.setRowType(i, "i");
  180. ds_main_preginfo_preglist.updatecontrol = true;
  181. }
  182. }
  183. function group2_button3_onclick(obj:Button, e:ClickEventInfo)
  184. {
  185. ds_main_preginfo_preglist.addRow();
  186. }
  187. function group2_button4_onclick(obj:Button, e:ClickEventInfo)
  188. {
  189. var selectedRows = grdf_getSelectedRows(grd_preg);
  190. if(selectedRows.length == 0)
  191. {
  192. alert("삭제할 행을 선택해주세요.");
  193. return;
  194. }
  195. var iStatus;
  196. var cur_row;
  197. for(var i = 0; i < selectedRows.length; i++)
  198. {
  199. cur_row = selectedRows[i];
  200. iStatus = ds_main_preginfo_preglist.getRowType(cur_row);
  201. if (iStatus == 2)
  202. {
  203. ds_main_preginfo_preglist.deleteRow(cur_row);
  204. }
  205. else if (iStatus == 8)
  206. {// 삭제로 표시된 행이면
  207. ds_main_preginfo_preglist.updatecontrol = false;
  208. ds_main_preginfo_preglist.setRowType(cur_row, "");
  209. ds_main_preginfo_preglist.updatecontrol = true;
  210. }
  211. else
  212. {
  213. ds_main_preginfo_preglist.updatecontrol = false;
  214. ds_main_preginfo_preglist.setRowType(cur_row, "d");
  215. ds_main_preginfo_preglist.updatecontrol = true;
  216. }
  217. }
  218. }
  219. function group2_button5_onclick(obj:Button, e:ClickEventInfo)
  220. {
  221. fSave();
  222. }
  223. function fSave()
  224. {
  225. for(var iRow = 0; iRow < ds_main_preginfo_preglist.rowcount; iRow++)
  226. {
  227. if(utlf_isNull(ds_main_preginfo_preglist.getColumn(iRow, "indd")))
  228. {
  229. sysf_messageBox("진료일자를","C001");
  230. return;
  231. }
  232. else
  233. {
  234. if(String(ds_main_preginfo_preglist.getColumn(iRow, "indd")).length != 8)
  235. {
  236. sysf_messageBox("8자리 진료일자를","C001");
  237. return;
  238. }
  239. }
  240. if(utlf_isNull(ds_main_preginfo_preglist.getColumn(iRow, "pid")))
  241. {
  242. sysf_messageBox("환자번호를","C001");
  243. return;
  244. }
  245. if(utlf_isNull(ds_main_preginfo_preglist.getColumn(iRow, "pname")))
  246. {
  247. sysf_messageBox("임산부명를","C001");
  248. return;
  249. }
  250. if(utlf_isNull(ds_main_preginfo_preglist.getColumn(iRow, "rrgstno")))
  251. {
  252. sysf_messageBox("주민번호를","C001");
  253. return;
  254. }
  255. else
  256. {
  257. if(String(ds_main_preginfo_preglist.getColumn(iRow, "rrgstno")).length != 13)
  258. {
  259. sysf_messageBox("13자리 주민번호를","C001");
  260. return;
  261. }
  262. }
  263. if(!utlf_isNull(ds_main_preginfo_preglist.getColumn(iRow, "zipcd")) && String(ds_main_preginfo_preglist.getColumn(iRow, "zipcd")).length != 6)
  264. {
  265. sysf_messageBox("6자리 우편번호를","C001");
  266. return;
  267. }
  268. }
  269. var updateData = grdf_getGridUpdateData(grd_preg);
  270. if(updateData.rowcount == 0)
  271. {
  272. sysf_messageBox("저장할 데이터를 입력하지 ","E007");
  273. return;
  274. }
  275. if(sysf_messageBox("저장 " , "S001") == '6')
  276. {
  277. grdf_setStatusColumn(updateData, "status");
  278. ds_send_preglist.copyData(updateData, true);
  279. var oParam = {};
  280. oParam.id = "TXMNO04501";
  281. oParam.service = "outcareapp.OutCareMngt";
  282. oParam.method = "reqSavePregList";
  283. oParam.inds = "preglist=ds_send_preglist";
  284. oParam.outds = "ds_=basecodelistinfo";
  285. oParam.async = false;
  286. oParam.callback = "cf_TXMNO04501";
  287. tranf_submit(oParam);
  288. if(arErrorCode.pop("TXMNO04501") > -1)
  289. {
  290. fSearch();
  291. }
  292. }
  293. }
  294. function cf_TXMNO04501(sSvcId, nErrorCode, sErrorMsg) {
  295. arErrorCode.push(sSvcId, nErrorCode);
  296. }
  297. function group2_button6_onclick(obj:Button, e:ClickEventInfo)
  298. {
  299. var objDOM = rptf_createDOM();
  300. rptf_setNodeListToDOM(objDOM, "/root/main/cond", ds_main_cond);
  301. rptf_setNodeListToDOM(objDOM, "/root/main/preginfo/preglist", ds_main_preginfo_preglist);
  302. var objParam = new Object();
  303. objParam.xml_data_XML1 = objDOM.documentElement.source;
  304. var option = "";
  305. rptf_exeReportPreview30(["RPMNO04500"],[objParam], option);
  306. }
  307. function group2_button7_onclick(obj:Button, e:ClickEventInfo)
  308. {
  309. grdf_exportExcel(grd_preg, "임산부보고서", "임산부보고서", "true", "", "");
  310. }
  311. function grd_preg_onkeyup(obj:Grid, e:KeyEventInfo)
  312. {
  313. if(e.keycode == 13)
  314. {
  315. obj.setCellPos(obj.currentcell+1);
  316. obj.showEditor(true);
  317. }
  318. }
  319. ]]></Script>
  320. </Form>
  321. </FDL>