SMMNW04820_통증관리기록(New).xfdl 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMMNW04820" position="absolute 0 0 877 900" titletext="통증관리기록" oninit="SMMNW04820_oninit" onload="SMMNW04820_onload">
  5. <Layouts>
  6. <Layout>
  7. <Edit id="opt_patinfo" taborder="1" readonly="true" class="edt_transbg" position="absolute 81 70 341 88" anchor="left top" style="font:Dotum,9,bold;" visible="false"/>
  8. <Div position="absolute 0 18 872 93" align="align:center top;" id="grp_sea" class="div_SA" anchor="left top right">
  9. <Layouts>
  10. <Layout width="792" height="75">
  11. <Shape position="absolute 548 31 554 53" linetype="vertical" id="line13" class="line_4" anchor="top right" visible="false"/>
  12. <Static text="기록일자 :" position="absolute 10 54 85 71" id="caption9" class="search_name" anchor="default"/>
  13. <Calendar position="absolute 89 53 194 72" id="ipt_fromdd" class="input_essential" onchanged="grp_sea_ipt_orddd_onchanged" autoselect="true" dateformat="yyyy-MM-dd" value="null" anchor="default"/>
  14. <Calendar id="ipt_todd" taborder="5" autoselect="true" dateformat="yyyy-MM-dd" onchanged="grp_sea_ipt_orddd_onchanged" class="input_essential" position="absolute 217 53 322 72" anchor="default"/>
  15. <Static id="caption4" text="~" position="absolute 197 60 217 67" style="align:center middle;" align="align:center middle;" anchor="default"/>
  16. <Button id="btn_formrecupdt_bk1" taborder="6" text="수정" class="btn2" position="absolute 817 -2 859 17" anchor="top right" onclick="grp_sea_btn_formrecupdt_onclick" visible="false"/>
  17. <Static id="caption00" text="진료과 :" class="search_name" position="absolute 634 8 698 25" anchor="default" visible="false"/>
  18. <Combo id="cmb_dept" taborder="9" autoselect="true" innerdataset="@ds_init_dept" codecolumn="deptcd" datacolumn="depthngnm" type="filter" onitemchanged="group3_cmb_dept_onitemchanged" position="absolute 697 6 869 27" enable="false" anchor="default" visible="false"/>
  19. <Button position="absolute 462 31 545 53" id="button1" class="btn1" taborder="4" text="기록조회" onclick="grp_sea_button1_onclick" anchor="top right" visible="false"/>
  20. <Button id="btn_formrecupdt_bk2" taborder="14" text="수정" class="btn2" position="absolute 825 54 867 73" anchor="top right" onclick="grp_sea_btn_formrecupdt01_onclick" visible="false"/>
  21. <Static id="ctn_ward" text="병 동 :" class="search_name" position="absolute 10 7 65 24" anchor="default"/>
  22. <Combo id="cmb_wardcd" taborder="15" innerdataset="@ds_init_cmb_wardcd" codecolumn="wardcd" datacolumn="wardnm" onitemchanged="grp_sea_cmb_wardcd_onitemchanged" class="combo_s_essential" position="absolute 68 5 207 25" anchor="default"/>
  23. <Static id="ctn_room" text="병 실 :" class="search_name" position="absolute 224 7 283 24" anchor="default"/>
  24. <Combo id="cmb_roomcd" taborder="16" innerdataset="ds_data_roomcdgruplist" codecolumn="roomcd" datacolumn="roomnm" onitemchanged="grp_sea_cmb_roomcd_onitemchanged" class="combo_search" position="absolute 282 5 358 25" anchor="default"/>
  25. <Combo id="cmb_zone" taborder="17" innerdataset="@ds_temp_zoneinfo_zonelist" codecolumn="bedcd" datacolumn="bednm" onitemchanged="grp_sea_cmb_zone_onitemchanged" class="combo_search" visible="false" position="absolute 282 5 358 25" anchor="default"/>
  26. <Static id="ctn_pid" text="환자명/등록번호 :" class="search_name" position="absolute 10 31 127 48" anchor="default"/>
  27. <Combo id="cmb_patientnm" taborder="18" innerdataset="ds_data_patientgruplist" codecolumn="pid" datacolumn="patientnm" onitemchanged="grp_sea_cmb_patientnm_onitemchanged" class="combo_search" position="absolute 130 29 251 48" anchor="default"/>
  28. <Edit id="ipt_pid" taborder="19" onkeyup="grp_sea_ipt_pid_onkeyup" class="input_search" position="absolute 257 29 327 48" anchor="default"/>
  29. <Button id="btn_patSearch" taborder="20" onclick="grp_sea_btn_patSearch_onclick" class="icon_search" position="absolute 339 31 355 48" anchor="default"/>
  30. <Combo id="cmb_erpat" taborder="21" innerdataset="ds_data_patientgruplist" codecolumn="pid" datacolumn="etcinfo" onitemchanged="grp_sea_cmb_erpat_onitemchanged" class="combo_s_essential" visible="false" position="absolute 130 29 358 49" anchor="default"/>
  31. <Button id="btn_formrecupdt_new" taborder="22" text="새로기록" onclick="grp_sea_btn_formrecupdt00_onclick" class="btn2" position="absolute 661 32 725 51" anchor="top right" visible="false"/>
  32. <Button id="btn_formrecupdt_del" taborder="23" text="기록삭제" onclick="button2_onclick" class="btn2" position="absolute 731 32 795 51" anchor="top right"/>
  33. <Button id="btn_signsave" taborder="24" text="인증저장" onclick="btn_signsave_onclick" class="btn5" position="absolute 800 32 864 51" anchor="top right"/>
  34. <Button id="btn_formrecupdt_newhis" taborder="25" text="새이름으로저장" class="btn2" position="absolute 556 32 656 51" anchor="top right" onclick="grp_sea_btn_formrecupdt_newhis_onclick" visible="false"/>
  35. <Static id="cap_mypatlist" text="내환자 정보 :" class="search_name" position="absolute 371 7 460 24"/>
  36. <Combo id="cmb_mypatlist" taborder="26" innerdataset="ds_temp_cond_settingpatient_settingpatientlist" codecolumn="pid" datacolumn="patnm" class="combo_s_essential" position="absolute 466 5 581 25" onitemchanged="grp_sea_cmb_mypatlist_onitemchanged"/>
  37. </Layout>
  38. </Layouts>
  39. </Div>
  40. <Div position="absolute 0 94 874 589" id="ivw_loader" url="emr_medirecxp::SSMMR01100_서식로더.xfdl" anchor="left top right" asyncmode="true"/>
  41. <Static text="통증관리기록" position="absolute 0 0 163 20" id="cpt_title" class="tit_1"/>
  42. <Grid id="grd_wardpatlist" class="datagrid2" taborder="8" binddataset="ds_main_wardpatinfo_wardpatlist" scrollpixel="all" useinputpanel="false" selecttype="multirow" cellsizingtype="col" cellsizebandtype="allband" oncelldblclick="grd_wardpatlist_oncelldblclick" position="absolute 0 566 872 899" anchor="all">
  43. <Formats>
  44. <Format id="default">
  45. <Columns>
  46. <Column size="20" band="left"/>
  47. <Column size="55"/>
  48. <Column size="70"/>
  49. <Column size="40"/>
  50. <Column size="70"/>
  51. <Column size="80"/>
  52. <Column size="60"/>
  53. <Column size="35"/>
  54. <Column size="80"/>
  55. <Column size="50"/>
  56. <Column size="0"/>
  57. <Column size="0"/>
  58. <Column size="0"/>
  59. <Column size="0"/>
  60. <Column size="0"/>
  61. <Column size="60"/>
  62. <Column size="85"/>
  63. <Column size="80"/>
  64. <Column size="70"/>
  65. </Columns>
  66. <Rows>
  67. <Row size="26" band="head"/>
  68. <Row size="24"/>
  69. </Rows>
  70. <Band id="head">
  71. <Cell/>
  72. <Cell col="1" text="구분" taborder="undefined"/>
  73. <Cell col="2" colspan="2" text="평가시간" taborder="undefined"/>
  74. <Cell col="4" text="통증유무" taborder="undefined"/>
  75. <Cell col="5" text="부위" taborder="undefined"/>
  76. <Cell col="6" text="평가도구" taborder="undefined"/>
  77. <Cell col="7" text="강도" taborder="undefined"/>
  78. <Cell col="8" text="양상" taborder="undefined"/>
  79. <Cell col="9" text="빈도" taborder="undefined"/>
  80. <Cell col="10" text="cretno"/>
  81. <Cell col="11" text="instcd"/>
  82. <Cell col="12" text="ordtype"/>
  83. <Cell col="13" text="orddeptcd"/>
  84. <Cell col="14" text="hd"/>
  85. <Cell col="15" text="지속기간" taborder="undefined"/>
  86. <Cell col="16" text="약물중재" taborder="undefined"/>
  87. <Cell col="17" text="비약물중재" taborder="undefined"/>
  88. <Cell col="18" text="작성자"/>
  89. </Band>
  90. <Band id="body">
  91. <Cell celltype="head" expr="expr:currow + 1"/>
  92. <Cell col="1" style="align:center;" text="bind:gubun"/>
  93. <Cell col="2" style="align:center;" text="bind:formrecdd" mask="expr:utlf_isNull(formrecdd) ? '' : '####-##-##'" maskchar=" "/>
  94. <Cell col="3" text="bind:formrechm" mask="expr:!utlf_isNull(formrechm) ? '##:##' : ''" maskchar=" "/>
  95. <Cell col="4" style="align:center;" text="bind:painyn"/>
  96. <Cell col="5" style="align:left;" text="bind:part"/>
  97. <Cell col="6" style="align:left;" text="bind:apptool"/>
  98. <Cell col="7" style="align:center;padding:4 2 2 2;" text="bind:str" wordwrap="word"/>
  99. <Cell col="8" style="align:left;" text="bind:aspt" calendardisplaynulltype="none"/>
  100. <Cell col="9" style="align:center;" text="bind:frqcy" calendardisplaynulltype="none"/>
  101. <Cell col="10" text="bind:cretno"/>
  102. <Cell col="11" text="bind:instcd"/>
  103. <Cell col="12" text="bind:ordtype"/>
  104. <Cell col="13" text="bind:orddeptcd"/>
  105. <Cell col="14" text="bind:hd"/>
  106. <Cell col="15" style="align:center;" text="bind:sustime" calendardisplaynulltype="none"/>
  107. <Cell col="16" style="align:left;" text="bind:mediarbt" calendardisplaynulltype="none"/>
  108. <Cell col="17" style="align:left;" text="bind:arbt" calendardisplaynulltype="none"/>
  109. <Cell col="18" text="bind:formrecuseridnm"/>
  110. </Band>
  111. </Format>
  112. </Formats>
  113. </Grid>
  114. <Shape id="line134" class="line_10" position="absolute -1 560 872 570" anchor="left top right"/>
  115. </Layout>
  116. </Layouts>
  117. <Objects>
  118. <Dataset id="ds_send_del" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  119. <ColumnInfo>
  120. <Column id="wardcd" type="STRING" size="256" sumtext="병동코드"/>
  121. <Column id="fromdd" type="STRING" size="256"/>
  122. <Column id="todd" type="STRING" size="256"/>
  123. <Column id="indschacptstat" type="STRING" size="256"/>
  124. </ColumnInfo>
  125. <Rows>
  126. <Row/>
  127. </Rows>
  128. </Dataset>
  129. <Dataset id="ds_init_cmb_wardcd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  130. <ColumnInfo>
  131. <Column id="wardcd" type="STRING" size="256" sumtext="병동코드"/>
  132. <Column id="wardnm" type="STRING" size="256" sumtext="병동명"/>
  133. </ColumnInfo>
  134. </Dataset>
  135. <Dataset id="ds_init_dept" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  136. <ColumnInfo>
  137. <Column id="deptcd" type="STRING" size="256" sumtext="부서코드"/>
  138. <Column id="depthngnm" type="STRING" size="256" sumtext="부서명"/>
  139. </ColumnInfo>
  140. </Dataset>
  141. <Dataset id="ds_init_settingrn" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  142. <ColumnInfo>
  143. <Column id="settingrnid" type="STRING" size="256" sumtext="세팅간호사ID"/>
  144. <Column id="settingrnnm" type="STRING" size="256" sumtext="세팅간호사명"/>
  145. </ColumnInfo>
  146. </Dataset>
  147. <Dataset id="ds_main_wardpatinfo_wardpatlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  148. <ColumnInfo>
  149. <Column id="pid" type="STRING" size="256"/>
  150. <Column id="orddd" type="STRING" size="256"/>
  151. <Column id="cretno" type="STRING" size="256"/>
  152. <Column id="chosflag" type="STRING" size="256"/>
  153. <Column id="orddeptcd" type="STRING" size="256"/>
  154. <Column id="gubun" type="STRING" size="256"/>
  155. <Column id="painyn" type="STRING" size="256"/>
  156. <Column id="part" type="STRING" size="256"/>
  157. <Column id="apptool" type="STRING" size="256"/>
  158. <Column id="str" type="STRING" size="256"/>
  159. <Column id="aspt" type="STRING" size="256"/>
  160. <Column id="frqcy" type="STRING" size="256"/>
  161. <Column id="sustime" type="STRING" size="256"/>
  162. <Column id="arbt" type="STRING" size="256"/>
  163. <Column id="mediarbt" type="STRING" size="256"/>
  164. <Column id="formprogflag" type="STRING" size="256"/>
  165. <Column id="lastupdtrid" type="STRING" size="256"/>
  166. <Column id="formrecdd" type="STRING" size="256"/>
  167. <Column id="formrechm" type="STRING" size="256"/>
  168. <Column id="formrecuseridnm" type="STRING" size="256"/>
  169. </ColumnInfo>
  170. </Dataset>
  171. <Dataset id="ds_main_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  172. <ColumnInfo>
  173. <Column id="wardcd" type="STRING" size="256"/>
  174. <Column id="roomcd" type="STRING" size="256"/>
  175. <Column id="zonecd" type="STRING" size="256"/>
  176. <Column id="patientnm" type="STRING" size="256"/>
  177. <Column id="fromdd" type="STRING" size="256"/>
  178. <Column id="todd" type="STRING" size="256"/>
  179. <Column id="indschacptstat" type="STRING" size="256"/>
  180. <Column id="recflag" type="STRING" size="256"/>
  181. <Column id="pid" type="STRING" size="256"/>
  182. <Column id="cretno" type="STRING" size="256"/>
  183. <Column id="instcd" type="STRING" size="256"/>
  184. <Column id="indd" type="STRING" size="256"/>
  185. <Column id="dschdd" type="STRING" size="256"/>
  186. <Column id="ordtype" type="STRING" size="256"/>
  187. <Column id="orddd" type="STRING" size="256"/>
  188. <Column id="orgorddd" type="STRING" size="256"/>
  189. <Column id="orddeptcd" type="STRING" size="256"/>
  190. <Column id="hngnm" type="STRING" size="256"/>
  191. <Column id="searchflag" type="STRING" size="256"/>
  192. </ColumnInfo>
  193. <Rows>
  194. <Row/>
  195. </Rows>
  196. </Dataset>
  197. <Dataset id="ds_cond_formdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  198. <ColumnInfo>
  199. <Column id="formcd" type="STRING" size="256"/>
  200. <Column id="formkind" type="STRING" size="256"/>
  201. <Column id="pid" type="STRING" size="256"/>
  202. <Column id="orddd" type="STRING" size="256"/>
  203. <Column id="cretno" type="STRING" size="256"/>
  204. <Column id="btnvisible" type="STRING" size="256"/>
  205. <Column id="btnenable" type="STRING" size="256"/>
  206. <Column id="unpreprec" type="STRING" size="256"/>
  207. <Column id="modalyn" type="STRING" size="256"/>
  208. <Column id="orddeptcd" type="STRING" size="256"/>
  209. <Column id="ioflag" type="STRING" size="256"/>
  210. <Column id="topyn" type="STRING" size="256"/>
  211. <Column id="formrecddenable" type="STRING" size="256"/>
  212. <Column id="formrecdd" type="STRING" size="256"/>
  213. <Column id="wardcd" type="STRING" size="256"/>
  214. </ColumnInfo>
  215. <Rows>
  216. <Row>
  217. <Col id="formkind"/>
  218. <Col id="formcd"/>
  219. <Col id="pid"/>
  220. <Col id="orddd"/>
  221. <Col id="cretno"/>
  222. <Col id="btnvisible"/>
  223. <Col id="orddeptcd"/>
  224. <Col id="modalyn"/>
  225. <Col id="unpreprec"/>
  226. <Col id="btnenable"/>
  227. <Col id="ioflag"/>
  228. <Col id="topyn"/>
  229. <Col id="formrecdd"/>
  230. <Col id="formrecddenable"/>
  231. </Row>
  232. </Rows>
  233. </Dataset>
  234. <Dataset id="ds_main_paminfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  235. <Dataset id="ds_data_roomcdgruplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  236. <ColumnInfo>
  237. <Column id="roomnm" type="STRING"/>
  238. <Column id="roomcd" type="STRING"/>
  239. </ColumnInfo>
  240. </Dataset>
  241. <Dataset id="ds_temp_zoneinfo_zonelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  242. <ColumnInfo>
  243. <Column id="bednm" type="STRING"/>
  244. <Column id="bedcd" type="STRING"/>
  245. </ColumnInfo>
  246. </Dataset>
  247. <Dataset id="ds_codelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  248. <Dataset id="ds_data_patientgruplist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  249. <ColumnInfo>
  250. <Column id="patientnm" type="STRING" size="256"/>
  251. <Column id="pid" type="STRING" size="256"/>
  252. <Column id="indd" type="STRING" size="256"/>
  253. <Column id="cretno" type="STRING" size="256"/>
  254. <Column id="ordtype" type="STRING" size="256"/>
  255. <Column id="instcd" type="STRING" size="256"/>
  256. <Column id="orddeptcd" type="STRING" size="256"/>
  257. <Column id="orddrid" type="STRING" size="256"/>
  258. </ColumnInfo>
  259. <Rows>
  260. <Row>
  261. <Col id="patientnm"/>
  262. <Col id="pid"/>
  263. <Col id="indd"/>
  264. <Col id="cretno"/>
  265. <Col id="ordtype"/>
  266. <Col id="instcd"/>
  267. </Row>
  268. </Rows>
  269. </Dataset>
  270. <Dataset id="ds_paminfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  271. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  272. <ColumnInfo>
  273. <Column id="popupendflag" type="STRING" size="256"/>
  274. </ColumnInfo>
  275. <Rows>
  276. <Row/>
  277. </Rows>
  278. </Dataset>
  279. <Dataset id="ds_main_patinfo_patinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  280. <ColumnInfo>
  281. <Column id="wardcd" type="STRING" size="256" sumtext="병동코드"/>
  282. <Column id="roomcd" type="STRING" size="256" sumtext="병실코드"/>
  283. <Column id="pid" type="STRING" size="256" sumtext="등록번호"/>
  284. <Column id="hngnm" type="STRING" size="256" sumtext="환자명"/>
  285. <Column id="indd" type="STRING" size="256" sumtext="입원일"/>
  286. <Column id="cretno" type="STRING" size="256" sumtext="생성번호"/>
  287. <Column id="dschdd" type="STRING" size="256" sumtext="퇴원일자"/>
  288. <Column id="orddeptcd" type="STRING" size="256" sumtext="진료과"/>
  289. <Column id="medispclid" type="STRING" size="256" sumtext="주치의"/>
  290. <Column id="ordtype" type="STRING" size="256" sumtext="ioflag"/>
  291. </ColumnInfo>
  292. </Dataset>
  293. <Dataset id="ds_send_refCond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  294. <ColumnInfo>
  295. <Column id="flag" type="STRING" size="256"/>
  296. </ColumnInfo>
  297. <Rows>
  298. <Row/>
  299. </Rows>
  300. </Dataset>
  301. <Dataset id="ds_temp_cond_settingpatient_settingpatientlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  302. </Objects>
  303. <Bind>
  304. <BindItem id="item1" compid="grp_sea.ipt_fromdd" propid="value" datasetid="ds_main_cond" columnid="fromdd"/>
  305. <BindItem id="item2" compid="grp_sea.ipt_todd" propid="value" datasetid="ds_main_cond" columnid="todd"/>
  306. <BindItem id="item50" compid="grp_sea.cmb_dept" propid="value" datasetid="ds_main_cond" columnid="orddeptcd"/>
  307. <BindItem id="item0" compid="grp_sea.cmb_wardcd" propid="value" datasetid="ds_main_cond" columnid="wardcd"/>
  308. <BindItem id="item3" compid="grp_sea.cmb_roomcd" propid="value" datasetid="ds_main_cond" columnid="roomcd"/>
  309. <BindItem id="item4" compid="grp_sea.cmb_zone" propid="value" datasetid="ds_main_cond" columnid="zonecd"/>
  310. <BindItem id="item6" compid="grp_sea.cmb_patientnm" propid="value" datasetid="ds_main_cond" columnid="patientnm"/>
  311. <BindItem id="item7" compid="grp_sea.ipt_pid" propid="value" datasetid="ds_main_cond" columnid="pid"/>
  312. <BindItem id="item9" compid="grp_sea.cmb_erpat" propid="value" datasetid="ds_main_cond" columnid="patientnm"/>
  313. </Bind>
  314. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  315. * System Name : 경대 의료정보시스템
  316. * Job Name : emr_wardcarexp -> SMMNW04820
  317. * Creator : ENR
  318. * Make Date : 2019-03-25
  319. * Description : 최초개발
  320. *---------------------------------------------------------------------------------------
  321. * Modify Date Modifier Modify Description
  322. *---------------------------------------------------------------------------------------
  323. * 2019-03-25 ENR XP
  324. *
  325. *---------------------------------------------------------------------------------------
  326. ****************************************************************************************/
  327. //=======================================================================================
  328. // Lib Include
  329. //---------------------------------------------------------------------------------------
  330. include "com_commonxp::comm_main.xjs";
  331. include "emr_medirecxp::MMR01100.xjs";
  332. include "emr_medirecxp::MMR00100.xjs";
  333. include "emr_carecomxp::CareCom.xjs";
  334. include "emr_carerecxp::CareRec.xjs";
  335. include "emr_wardcarexp::SMMNW4800.xjs";
  336. //=======================================================================================
  337. // Global Form Variable
  338. //---------------------------------------------------------------------------------------
  339. //응급실
  340. var eERFLAG = "";
  341. var eERDEPTCD = "";
  342. //가정간호
  343. var HC_homecarecd = '';
  344. var HC_ioflag = '';
  345. var HC_isHomeCare = '';
  346. //=======================================================================================
  347. // Function
  348. //---------------------------------------------------------------------------------------
  349. /****************************************************************************************
  350. * Argument : N/A
  351. * Description : 초기화
  352. ****************************************************************************************/
  353. function finit(){
  354. //var sWardcd = sysf_getUserInfo("dutplcecd");
  355. //ds_main_cond.setColumn(0, "wardcd", sWardcd);
  356. ds_main_cond.setColumn(0, "indschacptstat", "1");
  357. ds_main_cond.setColumn(0, "recflag", "1");
  358. //var wid = parseInt(ivw_loader.position.width);
  359. //var hei = parseInt(ivw_loader.position.height);
  360. dsf_createDsRow("ds_send"
  361. , [{col: "cdgpid", val: "T30"}
  362. ,{col: "wardcd", val: ds_main_cond.getColumn(0,"wardcd")}
  363. ]);
  364. var oParam = {};
  365. oParam.id = "TRMNW04001";
  366. oParam.service = "carerecapp.AsesRec";
  367. oParam.method = "reqGetICUWardList";
  368. oParam.inds = "refCond=ds_send";
  369. oParam.outds = "ds_data_icucdgruplist=icucdgruplist";
  370. oParam.async = false;
  371. //oParam.callback = "cf_TRMNW04001";
  372. tranf_submit(oParam);
  373. //사용자 직급구분에 따른 화면 제어 플래그 설정
  374. sJobKindCD = sysf_getUserInfo("jobkindcd"); // 직급코드
  375. sUserDeptCd = sysf_getUserInfo("dutplcecd");
  376. sUserId = sysf_getUserInfo("userid");
  377. //---------(20101204) 경북대
  378. //추가
  379. //var sJobKindCD = getUserInfo("jobkindcd"); // 직급코드
  380. var ssflag = "";
  381. if( sJobKindCD.substring(0, 2) == "03"){
  382. ssflag = "Y";
  383. }else{
  384. ssflag = "N";
  385. }
  386. //----------------------------
  387. //응급의료센터 부서코드 추출_ 경북대 (2011.03.16 Ahn)
  388. dsf_createDsRow("ds_send"
  389. , [{col: "cdgrupid", val: "'002','220'"}
  390. ,{col: "srchdd", val: utlf_getCurrentDate()} // 조회기준일자
  391. ]);
  392. var oParam = {};
  393. oParam.id = "TRMNW00001";
  394. oParam.service = "wardcareapp.WardCareMngt";
  395. oParam.method = "reqGetNursHardCdInfo";
  396. oParam.inds = "req=ds_send";
  397. oParam.outds = "ds_codelist=codelist";
  398. oParam.async = false;
  399. oParam.callback = "cf_TRMNW00001";
  400. tranf_submit(oParam);
  401. //원본:의사의 경우만
  402. //if(sJobKindCD == "0330" || sJobKindCD == "0310" ){
  403. // if(ssflag=="Y") {
  404. // grp_sea.btn_formrecupdt_del.visible = false;
  405. // grp_sea.btn_formrecupdt_new.visible = false;
  406. // grp_sea.btn_signsave.visible = false;
  407. // }else{
  408. // grp_sea.btn_formrecupdt_del.visible = true;
  409. // grp_sea.btn_formrecupdt_new.visible = true;
  410. // grp_sea.btn_signsave.visible = true;
  411. // }
  412. //병동 조회
  413. var oParam = {};
  414. oParam.id = "TRMNW04705";
  415. oParam.service = "wardcareapp.WardCareMngt";
  416. oParam.method = "reqGetWMInitData";
  417. oParam.inds = "reqcond=ds_main_cond";
  418. oParam.outds = "ds_init_cmb_wardcd=ward ds_init_settingrn=settingrn";
  419. oParam.async = false;
  420. oParam.callback = "cf_TRMNW04705";
  421. tranf_submit(oParam);
  422. if(arErrorCode.pop("TRMNW04705") < 0){
  423. sysf_messageBox('화면 초기화를', 'E009');
  424. return;
  425. }
  426. ds_main_cond.setColumn(0, "todd", utlf_getCurrentDate());
  427. //ds_main_cond.setColumn(0, "fromdd", ds_main_cond.getColumn(0,"todd")-7 );
  428. //var vFromdd = ds_main_cond.getColumn(0,"todd");
  429. ds_main_cond.setColumn(0, "fromdd", utlf_addDate(ds_main_cond.getColumn(0,"todd"), -30) );
  430. //alert("a---------------");
  431. var isOpener = fSetPatInfo();
  432. fGetSettingPatientList_type4(pFlag,flag);
  433. //가정간호 parameter 세팅
  434. if(frmf_checkOpener()){
  435. //처리해야됨
  436. //HC_isHomeCare = fSetHomeCareParamter();
  437. }
  438. //상단정보가 있으면 바로 조회
  439. if(isOpener || HC_isHomeCare){
  440. // fSearch();
  441. fSearch(); //ds_main_detlgrup_detlgruplist를 받아옴
  442. //조회후 그리드의 발생부위, 발생일자를 머지
  443. //fMergeGenrAreaDD(); //그리드 suppress로 대체
  444. }else{
  445. ds_main_cond.setColumn(0, "wardcd", sysf_getUserInfo("dutplcecd"));
  446. // 응급실인 경우 (2011.03.16 Ahn)
  447. fGetWardChngInfo("N");
  448. //병실정보 조회
  449. fSearchRoomcd();
  450. grp_sea.cmb_roomcd.setFocus();
  451. if(eERFLAG == "Y"){
  452. grp_sea.cmb_roomcd.value = ds_data_roomcdgruplist.getColumn(0, "roomcd");
  453. //선택한 병실에 해당하는 환자리스트 조회
  454. fGetCareComPatList(cmb_wardcd.value, grp_sea.cmb_roomcd.value, grp_sea.cmb_zone.value); //ds_data_patientgruplist를 받아옴
  455. ds_data_patientgruplist.addColumn("orddrid", "string");
  456. grp_sea.cmb_erpat.setFocus();
  457. }
  458. }
  459. var pFlag = null;
  460. var flag = 'SMMNW04800';
  461. }
  462. function cf_TRMNW00001(sSvcId, nErrorCode, sErrorMsg) {
  463. if(nErrorCode < 0) return;
  464. eERDEPTCD = ds_codelist.lookup("cdgrupid","002","cdid");
  465. //trace("eERDEPTCD : " + eERDEPTCD);
  466. }
  467. /****************************************************************************************
  468. * Argument : N/A
  469. * Description : 기록 이력 조회
  470. ****************************************************************************************/
  471. function fSearch(nFlag) {
  472. ds_main_cond.setColumn(0, "searchflag", "N"); // 신규조회 구분
  473. var deptcd = ds_main_cond.getColumn(0, "wardcd");
  474. var fromdd = ds_main_cond.getColumn(0, "fromdd");
  475. var todd = ds_main_cond.getColumn(0, "todd");
  476. var diff = utlf_getDateInterval(fromdd, todd, "dd") + 1;
  477. /*
  478. if (utlf_isNull(deptcd)) {
  479. sysf_messageBox("병동을 다시 설정 후 조회하십시오.", "E999");
  480. return;
  481. }
  482. */
  483. if (utlf_isNull(fromdd) || utlf_isNull(todd)) {
  484. sysf_messageBox("조회 일자를 다시 설정 후 조회하십시오 .", "E999");
  485. return;
  486. }
  487. if (fromdd > todd) {
  488. sysf_messageBox("조회 일자를 다시 설정 후 조회하십시오.", "E999");
  489. return;
  490. }
  491. /*
  492. if (diff > 32) {
  493. sysf_messageBox("조회 기간을 한 달 이하로 수정 후 조회하십시오.", "E999");
  494. return;
  495. }
  496. */
  497. /*
  498. var oParam = {};
  499. oParam.id = "SMMNW04820";
  500. oParam.service = "wardcareapp.WardPainCareMngt";
  501. oParam.method = "reqGetPainMngtRecList";
  502. oParam.inds = "req=ds_main_cond";
  503. oParam.outds = "ds_main_wardpatinfo_wardpatlist=painmngtreclist";
  504. oParam.async = false;
  505. //oParam.callback = "cf_TRMNW04802";
  506. tranf_submit(oParam);
  507. */
  508. fRecordListsearch();
  509. ds_main_wardpatinfo_wardpatlist.rowposition = -1;
  510. if( utlf_isNull(nFlag) ){
  511. ivw_loader.ivw_base.url = "";
  512. lf_SetPatInfo(-1);
  513. }
  514. fRecordsearch();
  515. }
  516. /****************************************************************************************
  517. * Argument : N/A
  518. * Description : 기록 리스트 조회
  519. ****************************************************************************************/
  520. function fRecordListsearch() {
  521. var oParam = {};
  522. oParam.id = "SMMNW04820";
  523. oParam.service = "wardcareapp.WardPainCareMngt";
  524. oParam.method = "reqGetPainMngtRecList";
  525. oParam.inds = "req=ds_main_cond";
  526. oParam.outds = "ds_main_wardpatinfo_wardpatlist=painmngtreclist";
  527. oParam.async = false;
  528. //oParam.callback = "cf_TRMNW04802";
  529. tranf_submit(oParam);
  530. }
  531. /****************************************************************************************
  532. * Argument : N/A
  533. * Description : 기록 세부 조회
  534. ****************************************************************************************/
  535. function fRecordsearch() {
  536. // 16.12.07_프로그램 내에서 환자 기본정보에 대한 Parameter을 넘기더라도 우선적으로 상단정보를 가져가는 것을 막기위함.
  537. var nRow = ds_main_wardpatinfo_wardpatlist.rowposition;
  538. if( nRow > 0 ){
  539. var recflag = ds_main_cond.getColumn(0, "recflag");
  540. var formrecseq = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "formrecseq");
  541. var instcd = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "instcd");
  542. var pid = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "pid");
  543. var cretno = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "cretno");
  544. var ordtype = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "chosflag");
  545. var orddeptcd = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "orddeptcd");
  546. var orddd = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "orddd");
  547. var dschdd = "99991231";
  548. }else{
  549. var instcd = ds_main_cond.getColumn(0, "instcd");
  550. var pid = ds_main_cond.getColumn(0, "pid");
  551. var cretno = ds_main_cond.getColumn(0, "cretno");
  552. var dschdd = ds_main_cond.getColumn(0, "dschdd");
  553. var wardcd = ds_main_cond.getColumn(0, "wardcd");
  554. var ordtype = ds_main_cond.getColumn(0, "ordtype");
  555. var orddeptcd= ds_main_cond.getColumn(0, "orddeptcd");
  556. var orddd= ds_main_cond.getColumn(0, "orddd");
  557. var formrecseq = "N";
  558. }
  559. var formcd = '1900023241'; //2019.03.25_통증관리기록 서식
  560. /*
  561. if(ordtype != "O"){
  562. fSearchRoomcd(wardcd);
  563. }
  564. */
  565. /*
  566. if( utlf_isNull(pid) || utlf_isNull(indd) || utlf_isNull(cretno) ){
  567. sysf_messageBox("환자가 선택되지 " , "E007");
  568. return;
  569. }
  570. */
  571. //병실 셋팅
  572. //2017.06.05_상단정보 셋팅 로직 추가
  573. //fGetCareComRoomList(wardcd); //ds_data_roomcdgruplist를 받아옴
  574. var dschdd = ds_main_cond.getColumn(0, "dschdd");
  575. var wardcd = ds_main_cond.getColumn(0, "wardcd");
  576. var param = ordtype + "▦" + pid
  577. + "▦" + orddd
  578. + "▦" + cretno
  579. + "▦" + instcd
  580. + "▦" + dschdd;
  581. /*
  582. if(ordtype =="O"){
  583. var param = ordtype + "▦" + pid
  584. + "▦" + orddd
  585. + "▦" + cretno
  586. + "▦" + instcd
  587. ;
  588. }else{
  589. //fGetCareComRoomList(wardcd); //ds_data_roomcdgruplist를 받아옴
  590. var dschdd = ds_main_cond.getColumn(0, "dschdd");
  591. var wardcd = ds_main_cond.getColumn(0, "wardcd");
  592. var param = ordtype + "▦" + pid
  593. + "▦" + orddd
  594. + "▦" + cretno
  595. + "▦" + instcd
  596. + "▦" + dschdd;
  597. }
  598. */
  599. //sysf_trace("상단 param : " + param);
  600. //appf_initPatientInfo(param);
  601. //trace("상단end");
  602. //
  603. ivw_loader.ivw_base.url = "";
  604. // 서식 로드
  605. // frmf_setParameter("SSMMR01100_recsavechk", "Y");
  606. var objArg = new Object();
  607. var vFormKind = "new";
  608. if(formrecseq != "N"){
  609. vFormKind = "rec";
  610. formcd = formrecseq;
  611. searchdd = "";
  612. }
  613. /*
  614. trace("--------------------------------------------");
  615. trace("formcd : " + formcd);
  616. trace("vFormKind : " + vFormKind);
  617. trace("pid : " + pid);
  618. trace("orddd : " + orddd);
  619. trace("cretno : " + cretno);
  620. trace("orddeptcd : " + orddeptcd);
  621. trace("ordtype : " + ordtype);
  622. trace("wardcd : " + wardcd);
  623. */
  624. ds_cond_formdata.clearData();
  625. ds_cond_formdata.addRow();
  626. ds_cond_formdata.setColumn(0, "formcd", formcd); // 서식목록 - linkcd, 기록목록 - formrecseq 컬럼값.
  627. ds_cond_formdata.setColumn(0, "formkind", vFormKind); // 서식목록 탭 - new , 기록목록 - rec
  628. ds_cond_formdata.setColumn(0, "btnvisible", false);
  629. ds_cond_formdata.setColumn(0, "pid", pid);
  630. ds_cond_formdata.setColumn(0, "orddd", orddd);
  631. ds_cond_formdata.setColumn(0, "cretno", cretno);
  632. ds_cond_formdata.setColumn(0, "orddeptcd", orddeptcd);
  633. ds_cond_formdata.setColumn(0, "ioflag", ordtype); //인증서 관련 처리 필요
  634. ds_cond_formdata.setColumn(0, "topyn", "N");
  635. ds_cond_formdata.setColumn(0, "formrecddenable", "Y"); // 기준일자 활성화 여부
  636. //ds_cond_formdata.setColumn(0, "formrecdd", searchdd);
  637. ds_cond_formdata.setColumn(0, "wardcd", wardcd);
  638. //ds_cond_formdata.setColumn(0, "orddeptcd", orddeptcd);
  639. sysf_trace("###wardcd1####"+wardcd);
  640. objArg.ds_cond_formdata = ds_cond_formdata;
  641. //trace(ds_cond_formdata.saveXML());
  642. lf_loadSMMMR01100(false, objArg);
  643. lf_SetPatInfo(nRow);
  644. //alert("c");
  645. }
  646. /****************************************************************************************
  647. * Argument : N/A
  648. * Description : 기록수정셋팅
  649. ****************************************************************************************/
  650. function fModifyForm(btnenable) {
  651. utlf_addLog("***** fModifyForm() *****");
  652. var formprogflag = "";
  653. var nRow = ds_main_wardpatinfo_wardpatlist.rowposition;
  654. //var cnfmyn = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "cnfmyn");
  655. var formcd = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "formcd");
  656. var formrecseq = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "formrecseq");
  657. //var type = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "type");
  658. var cnfmyn ="Y";
  659. var type ="B";
  660. var formprogflag = "";
  661. var formprogflag = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "formprogflag");
  662. var formprogflag = "";
  663. trace("::::::::::::" + formprogflag);
  664. if (nRow > -1) {
  665. if (type == "A") {
  666. sysf_messageBox("진료기록 화면에서 수정할 수 없는 서식입니다", "I999");
  667. return;
  668. }
  669. if (cnfmyn == "Y") {
  670. //fOpenRecForm(formcd, formrecseq);
  671. lf_openRecForm(formrecseq, formprogflag, btnenable);
  672. } else {
  673. sysf_messageBox("OCS에서 작성한 기록은 수정할 수 없습니다.", "I008");
  674. return;
  675. }
  676. }
  677. /*
  678. if (grp_base.swt_left.tabindex == 0){
  679. var nRow = ds_main_wardpatinfo_wardpatlist.rowposition;
  680. var cnfmyn = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "cnfmyn");
  681. var formcd = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "formcd");
  682. var formrecseq = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "formrecseq");
  683. var type = ds_main_wardpatinfo_wardpatlist.getColumn(nRow, "type");
  684. formprogflag = ds_grd_medireclist.getColumn(nRow, "formprogflag");
  685. if (nRow > -1) {
  686. if (type == "A") {
  687. sysf_messageBox("진료기록 화면에서 수정할 수 없는 서식입니다", "I999");
  688. return;
  689. }
  690. if (cnfmyn == "Y") {
  691. //fOpenRecForm(formcd, formrecseq);
  692. lf_openRecForm(formrecseq, formprogflag, btnenable);
  693. } else {
  694. sysf_messageBox("OCS에서 작성한 기록은 수정할 수 없습니다.", "I008");
  695. return;
  696. }
  697. }
  698. } else if (grp_base.swt_left.tabindex == 1) {
  699. var formcd = frmf_getParameter("SSMMR01200_Param_formcd");
  700. var formrecseq = frmf_getParameter("SSMMR01200_Param_recseq");
  701. var cnfmyn = frmf_getParameter("SSMMR01200_Param_cnfmyn");
  702. var formprogflag = frmf_getParameter("SSMMR01200_Param_formprogflag");
  703. frmf_clearParameter("SSMMR01200_Param_formcd");
  704. frmf_clearParameter("SSMMR01200_Param_recseq");
  705. frmf_clearParameter("SSMMR01200_Param_cnfmyn");
  706. frmf_clearParameter("SSMMR01200_Param_formprogflag");
  707. if(!utlf_isNull(formrecseq)) {
  708. if (cnfmyn == "Y") {
  709. //fOpenRecForm(formcd, formrecseq);
  710. lf_openRecForm(formrecseq, formprogflag, btnenable);
  711. } else {
  712. sysf_messageBox("OCS에서 작성한 기록은 수정할 수 없습니다.", "I008");
  713. return;
  714. }
  715. }
  716. }
  717. */
  718. }
  719. /****************************************************************************************
  720. * Argument : N/A
  721. * Description : 상단정보 셋팅
  722. ****************************************************************************************/
  723. function fpatinfoset(){
  724. ds_paminfo.clearData();
  725. var node = sysf_getGlobalVariable("paminfo");
  726. dsf_setCSVToDs("ds_paminfo", node);
  727. var vOrdtype = appf_getPatientInfoDetail('ioflag');
  728. //팝업화면이 아닐경우 상단에 환자 정보가 있는지 여부를 확인하고
  729. if ( !utlf_isNull(ds_paminfo.getColumn(0,"pid"))) { //상단정보에 환자가 셋팅되어 있을 경우
  730. ds_main_cond.setColumn(0, "instcd", ds_paminfo.getColumn(0, "instcd"));
  731. ds_main_cond.setColumn(0, "pid", ds_paminfo.getColumn(0, "pid"));
  732. ds_main_cond.setColumn(0, "cretno", ds_paminfo.getColumn(0, "cretno"));
  733. ds_main_cond.setColumn(0, "orddeptcd", ds_paminfo.getColumn(0, "orddeptcd"));
  734. ds_main_cond.setColumn(0, "hngnm", ds_paminfo.getColumn(0, "hngnm"));
  735. ds_main_cond.setColumn(0, "ordtype", vOrdtype);
  736. ds_main_cond.setColumn(0, "orddd", ds_paminfo.getColumn(0, "indd")); //기록조회용으로 쓰임
  737. ds_main_cond.setColumn(0, "indd", ds_paminfo.getColumn(0, "indd")); //
  738. ds_main_cond.setColumn(0, "wardcd", ds_paminfo.getColumn(0, "wardcd"));
  739. ds_main_cond.setColumn(0, "roomcd", ds_paminfo.getColumn(0, "roomcd"));
  740. ds_main_cond.setColumn(0, "dschdd", ds_paminfo.getColumn(0, "dschdd"));
  741. /*
  742. // 외래/ 입원 / 응급 / 항암
  743. if( !utlf_isNull(vOrdtype) && vOrdtype == "O" ){
  744. ds_main_cond.setColumn(0, "orddd", ds_main_paminfo.getColumn(0, "orddd"));
  745. //ds_main_cond.setColumn(0, "indd", ds_main_paminfo.getColumn(0, "orddd"));//입원이력 베이스로 indd 셋팅
  746. }else{
  747. //ds_main_cond.setColumn(0, "indd", ds_main_paminfo.getColumn(0, "indd"));
  748. ds_main_cond.setColumn(0, "orddd", ds_main_paminfo.getColumn(0, "indd")); //입원이력 베이스로 indd 셋팅
  749. ds_main_cond.setColumn(0, "wardcd", ds_main_paminfo.getColumn(0, "wardcd"));
  750. ds_main_cond.setColumn(0, "roomcd", ds_main_paminfo.getColumn(0, "roomcd"));
  751. ds_main_cond.setColumn(0, "dschdd", ds_main_paminfo.getColumn(0, "dschdd"));
  752. }
  753. */
  754. } else {
  755. }
  756. }
  757. /****************************************************************************************
  758. * Argument : N/A
  759. * Description : 병동 roomcd 셋팅
  760. ****************************************************************************************/
  761. function fSearchRoomcd(wardcd){
  762. //병실정보 clear
  763. ds_main_cond.setColumn(0,"roomcd", "");
  764. ds_data_roomcdgruplist.clearData();
  765. //해당 병실 환자정보 clear
  766. ds_main_cond.setColumn(0,"patientnm", "");
  767. ds_main_cond.setColumn(0,"pid", "");
  768. ds_data_patientgruplist.clearData();
  769. grp_sea.cmb_patientnm.enable = true;
  770. //선택한 병동에 해당되는 병실 조회
  771. if(utlf_isNull(wardcd)){
  772. wardcd = ds_main_cond.getColumn(0,"wardcd");
  773. ds_paminfo.clearData();
  774. fInitTopInfo();
  775. }
  776. fGetCareComRoomList(wardcd);
  777. }
  778. /****************************************************************************************
  779. * Argument : N/A
  780. * Description : 병실코드에 해당되는 환자정보 조회
  781. ****************************************************************************************/
  782. function fSearchPatInfo(wardcd, roomcd){
  783. //해당 병실 환자정보 clear
  784. ds_main_cond.setColumn(0,"patientnm", "");
  785. ds_main_cond.setColumn(0,"pid", "");
  786. ds_data_patientgruplist.clearData();
  787. //선택한 병동, 병실에 해당되는 환자 조회
  788. if(utlf_isNull(wardcd)){
  789. wardcd = ds_main_cond.getColumn(0,"wardcd");
  790. grp_sea.cmb_patientnm.enable = true;
  791. ds_paminfo.clear();
  792. fInitTopInfo();
  793. }
  794. if(utlf_isNull(roomcd))
  795. roomcd = ds_main_cond.getColumn(0,"roomcd");
  796. fGetCareComPatList(wardcd, roomcd);
  797. }
  798. /****************************************************************************************
  799. * Argument : N/A
  800. * Description : 환자정보 셋팅
  801. ****************************************************************************************/
  802. function fSetPatInfo(){
  803. //var xPamInfoPath = '/root/temp/paminfo'
  804. var node = appf_getPatientInfoDetails(ds_paminfo) ;
  805. var pid = ''; var hngnm = ''; var wardcd = ''; var roomcd = '';
  806. // 응급실 구역정보 (2011.03.16 ahn)
  807. var sectioncd = "";
  808. var isOpener = false;
  809. if(frmf_checkOpener()){
  810. pid = appf_getPatientInfoDetail('pid');
  811. hngnm = appf_getPatientInfoDetail('hngnm');
  812. wardcd = appf_getPatientInfoDetail('wardcd');
  813. roomcd = appf_getPatientInfoDetail('roomcd');
  814. sectioncd = appf_getPatientInfoDetail('basetypecd'); // 응급실 구역정보 (2011.03.16 ahn)
  815. if( !utlf_isNull(pid) ){
  816. isOpener = true;
  817. }
  818. }
  819. if( !utlf_isNull(pid) && !utlf_isNull(hngnm) && !utlf_isNull(wardcd) && !utlf_isNull(roomcd) ){
  820. // 응급실일 경우 (2011.03.16 Ahn)
  821. //alert(sectioncd);
  822. fGetWardChngInfo("Y", wardcd, sectioncd);
  823. //콤보에서 끌고 오기 위한 병실, 환자정보 조회
  824. fSearchRoomcd(wardcd);
  825. if(eERFLAG == "Y"){ // 응급실 환자 조회 (2011.03.15 Ahn)
  826. fGetCareComPatList(wardcd, roomcd, grp_sea.cmb_zone.value); //ds_data_patientgruplist를 받아옴
  827. ds_data_patientgruplist.addColumn("orddrid", "string");
  828. }else{
  829. fSearchPatInfo(wardcd, roomcd);
  830. }
  831. //상단정보를 세팅
  832. ds_main_cond.setColumn(0, "wardcd", wardcd);
  833. ds_main_cond.setColumn(0, "roomcd", roomcd);
  834. //퇴원환자의 경우 환자이름에 조회되지 않으므로 콤보아이템을 추가
  835. if ( utlf_isNull(ds_data_patientgruplist.getColumn(ds_data_patientgruplist.findRow("pid", pid), "patientnm")) ){
  836. frmf_addComboItem( "grp_sea.cmb_patientnm", appf_getPatientInfoDetail('hngnm'), pid, "above" );
  837. ds_main_cond.setColumn(0, "patientnm", pid);
  838. ds_data_patientgruplist.setColumn(0, "indd", appf_getPatientInfoDetail('indd'));
  839. ds_data_patientgruplist.setColumn(0, "cretno", appf_getPatientInfoDetail('cretno'));
  840. ds_data_patientgruplist.setColumn(0, "orddeptcd", appf_getPatientInfoDetail('orddeptcd'));
  841. ds_data_patientgruplist.setColumn(0, "orddrid", appf_getPatientInfoDetail('medispclid'));
  842. ds_data_patientgruplist.setColumn(0, "ordtype", appf_getPatientInfoDetail('ioflag'));
  843. grp_sea.cmb_patientnm.enable = false;
  844. }else{
  845. ds_main_cond.setColumn(0, "patientnm", pid);
  846. grp_sea.cmb_patientnm.enable = true;
  847. }
  848. ds_main_cond.setColumn(0, "pid", pid);
  849. }
  850. return isOpener;
  851. }
  852. /****************************************************************************************
  853. * Argument : N/A
  854. * Description : 구역정보 조회 (응급실인 경우)
  855. ****************************************************************************************/
  856. function fGetWardChngInfo(initFlag, wardCd, sectionCd){
  857. if(initFlag=="Y") {
  858. var sWardCD = wardCd;
  859. }
  860. else{
  861. var sWardCD = ds_main_cond.getColumn(0, "wardcd");
  862. }
  863. if ( sWardCD == eERDEPTCD) {
  864. eERFLAG = "Y";
  865. }else{
  866. eERFLAG = "";
  867. }
  868. //응급실인 경우 구역정보 추가조회
  869. if(eERFLAG == "Y"){ // 응급실
  870. fGetZoneList();
  871. grp_sea.ctn_room.text = "구 역 :";
  872. grp_sea.cmb_roomcd.visible = false;
  873. grp_sea.cmb_erpat.visible = true;
  874. grp_sea.cmb_patientnm.visible = false;
  875. grp_sea.cmb_zone.visible = true;
  876. grp_sea.cap_mypatlist.visible = false;
  877. grp_sea.cmb_mypatlist.visible = false;
  878. // group5.switch1.rec.grp_sea.ipt_pid.position.left = 755; // 위치 변경
  879. // group5.switch1.rec.grp_sea.ipt_pid.position.top = 15;
  880. // group5.switch1.rec.grp_sea.btn_patSearch.position.left = 830; // 위치 변경
  881. // group5.switch1.rec.grp_sea.btn_patSearch.position.top = 16; // 위치 변경
  882. //group5.switch1.rec.grp_sea.cap_mypatlist.position.left = 645;
  883. // group5.switch1.rec.grp_sea.cap_mypatlist.position.top = 40;
  884. //group5.switch1.rec.grp_sea.cmb_mypatlist.position.left = 755;
  885. //group5.switch1.rec.grp_sea.cmb_mypatlist.position.top = 40;
  886. grp_sea.ipt_pid.position = "absolute 369 29 439 48";
  887. grp_sea.btn_patSearch.position = "absolute 451 31 467 48";
  888. if(initFlag=="Y"){ // 처음 상단 정보로 화면 열릴 때
  889. ds_main_cond.setColumn(0, "zonecd", (utlf_isNull(sectionCd) ? "-" : sectionCd));
  890. }else{
  891. ds_main_cond.setColumn(0, "zonecd", "-"); // 'All'로 default
  892. }
  893. }else{
  894. grp_sea.ctn_room.text = "병 실 :";
  895. grp_sea.cmb_roomcd.visible = true;
  896. grp_sea.cmb_erpat.visible = false;
  897. grp_sea.cmb_patientnm.visible = true;
  898. grp_sea.cmb_zone.visible = false;
  899. grp_sea.cap_mypatlist.visible = true;
  900. grp_sea.cmb_mypatlist.visible = true;
  901. grp_sea.ipt_pid.position = "absolute 257 29 327 48";
  902. grp_sea.btn_patSearch.position = "absolute 339 31 355 48";
  903. ds_main_cond.setColumn(0, "zonecd", "");
  904. }
  905. }
  906. /****************************************************************************************
  907. * Argument : 01.nRow : Grid rowposition
  908. * Description : 선택한 기록에 대한 환자정보
  909. ****************************************************************************************/
  910. function lf_SetPatInfo(nRow){
  911. //alert("a");
  912. if( !utlf_isNull(nRow) ){
  913. if( nRow == -1 ){
  914. opt_patinfo.value = "";
  915. return;
  916. }
  917. var grdDs = this.objects["ds_main_wardpatinfo_wardpatlist"];
  918. var nPid = grdDs.getColumn(nRow, "pid");
  919. var nPatnm = grdDs.getColumn(nRow, "patnm");
  920. var nSa = grdDs.getColumn(nRow, "sexage");
  921. var nRoomcd = grdDs.getColumn(nRow, "roomcd");
  922. opt_patinfo.value = "- " + nPid + " " + nPatnm + "(" + nSa + ") " + nRoomcd;
  923. }
  924. }
  925. //=======================================================================================
  926. // Event
  927. //---------------------------------------------------------------------------------------
  928. /****************************************************************************************
  929. * Components : Form
  930. * Components ID : SMMNW04820
  931. * Event : oninit
  932. * Argument : 01.obj : Object Event has occurred
  933. * : 02.e : Event Object
  934. * Description : 화면 처음 초기화시
  935. ****************************************************************************************/
  936. function SMMNW04820_oninit(obj:Form, e:InitEventInfo)
  937. {
  938. frmf_initForm(obj); //폼 초기화
  939. }
  940. /****************************************************************************************
  941. * Components : Form
  942. * Components ID : SMMNW04820
  943. * Event : onload
  944. * Argument : 01.obj : Object Event has occurred
  945. * : 02.e : Event Object
  946. * Description : 화면 로딩 완료시
  947. ****************************************************************************************/
  948. function SMMNW04820_onload(obj:Form, e:LoadEventInfo)
  949. {
  950. grdf_setToolTipBind(grd_wardpatlist);
  951. grdf_setGridSort(grd_wardpatlist);
  952. fpatinfoset();
  953. //상단정보 END
  954. //초기화
  955. finit();
  956. }
  957. /****************************************************************************************
  958. * Components : Button
  959. * Components ID : button1
  960. * Event : onclick
  961. * Argument : 01.obj : Object Event has occurred
  962. * : 02.e : Event Object
  963. * Description : 조회버튼 클릭시
  964. ****************************************************************************************/
  965. function grp_sea_button1_onclick(obj:Button, e:ClickEventInfo)
  966. {
  967. fSearch();
  968. }
  969. /****************************************************************************************
  970. * Components : Grid
  971. * Components ID : grd_wardpatlist
  972. * Event : oncelldblclick
  973. * Argument : 01.obj : Object Event has occurred
  974. * : 02.e : Event Object
  975. * Description : 그리드 셀 더블클릭시
  976. ****************************************************************************************/
  977. function grd_wardpatlist_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  978. {
  979. //fRecordsearch();
  980. //ds_init_tmp.setColumn(0,"fstload","N");
  981. ds_main_cond.setColumn(0, "searchflag", "Y"); // 'All'로 default
  982. fModifyForm(true);
  983. }
  984. /****************************************************************************************
  985. * Components : Button
  986. * Components ID : btn_signsave
  987. * Event : onclick
  988. * Argument : 01.obj : Object Event has occurred
  989. * : 02.e : Event Object
  990. * Description : 인증저장버튼 클릭시
  991. ****************************************************************************************/
  992. function btn_signsave_onclick(obj:Button, e:ClickEventInfo)
  993. {
  994. if( ivw_loader.fClickSave("Y") ) {
  995. fSearch(true);
  996. //ds_main_wardpatinfo_wardpatlist.selectRow(grd_row);
  997. //ds_main_wardpatinfo_wardpatlist.rowposition = grd_row;
  998. //fRecordsearch(); //2019.09.24 중복로딩제거
  999. }
  1000. /*
  1001. var grd_row = grd_wardpatlist.currentrow;
  1002. if (grd_row >= 0) {
  1003. if( utlf_isNull(ivw_loader.ivw_base.url) ){
  1004. sysf_messageBox("선택한 기록이 존재하지 않습니다." , "E");
  1005. return;
  1006. }
  1007. if( ivw_loader.fClickSave("Y") ) {
  1008. fSearch(true);
  1009. ds_main_wardpatinfo_wardpatlist.selectRow(grd_row);
  1010. ds_main_wardpatinfo_wardpatlist.rowposition = grd_row;
  1011. fRecordsearch();
  1012. }
  1013. } else {
  1014. sysf_messageBox("환자를 선택하지" , "E007");
  1015. return;
  1016. }
  1017. */
  1018. }
  1019. /****************************************************************************************
  1020. * Components : Button
  1021. * Components ID : button2
  1022. * Event : onclick
  1023. * Argument : 01.obj : Object Event has occurred
  1024. * : 02.e : Event Object
  1025. * Description : 기록삭제버튼 클릭시
  1026. ****************************************************************************************/
  1027. function button2_onclick(obj:Button, e:ClickEventInfo)
  1028. {
  1029. if( utlf_isNull(ivw_loader.ivw_base.url) ){
  1030. sysf_messageBox("선택한 기록이 존재하지 않습니다." , "E");
  1031. return;
  1032. }
  1033. ivw_loader.grup_btn.btn_del.click();
  1034. fSearch();
  1035. }
  1036. //임시테스트용
  1037. function grp_sea_btn_formrecupdt_onclick(obj:Button, e:ClickEventInfo)
  1038. {
  1039. //ds_init_tmp.setColumn(0,"fstload","N");
  1040. fModifyForm(true);
  1041. }
  1042. /****************************************************************************************
  1043. * Components : Form
  1044. * Components ID : SMMNW04820
  1045. * Event : oninit
  1046. * Argument : 01.obj : Object Event has occurred
  1047. * : 02.e : Event Object
  1048. * Description : 신규 버튼
  1049. ****************************************************************************************/
  1050. function grp_sea_btn_formrecupdt00_onclick(obj:Button, e:ClickEventInfo)
  1051. {
  1052. fSearch();
  1053. }
  1054. //임시테스트용
  1055. function grp_sea_btn_formrecupdt01_onclick(obj:Button, e:ClickEventInfo)
  1056. {
  1057. frmf_setParameter("SMMNW04830_vRecFlag", "O");
  1058. var rtnArg = frmf_modal("SMMNW04830","SMMNW04830","","","","","","","","","","","M");
  1059. }
  1060. /****************************************************************************************
  1061. * Components : Combo
  1062. * Components ID : cmb_wardcd
  1063. * Event : onitemchanged
  1064. * Argument : 01.obj : Object Event has occurred
  1065. * : 02.e : Event Object
  1066. * Description : 병동 콤보 값 변경시
  1067. ****************************************************************************************/
  1068. function grp_sea_cmb_wardcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  1069. {
  1070. obj.updateToDataset();
  1071. // 응급실인 경우 (2011.03.16 Ahn)
  1072. fGetWardChngInfo("N");
  1073. //병실정보 조회
  1074. fSearchRoomcd();
  1075. grp_sea.cmb_roomcd.setFocus();
  1076. if(eERFLAG == "Y"){
  1077. grp_sea.cmb_roomcd.value = ds_data_roomcdgruplist.getColumn(0,"roomcd");
  1078. //선택한 병실에 해당하는 환자리스트 조회
  1079. fGetCareComPatList(grp_sea.cmb_wardcd.value, grp_sea.cmb_roomcd.value, grp_sea.cmb_zone.value);
  1080. grp_sea.cmb_erpat.setFocus();
  1081. }
  1082. //fSearch();
  1083. }
  1084. /****************************************************************************************
  1085. * Components : Form
  1086. * Components ID : SMMNW04820
  1087. * Event : oninit
  1088. * Argument : 01.obj : Object Event has occurred
  1089. * : 02.e : Event Object
  1090. * Description : 병동 room 콤보
  1091. ****************************************************************************************/
  1092. function grp_sea_cmb_roomcd_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  1093. {
  1094. obj.updateToDataset();
  1095. //해당병실의 환자를 조회
  1096. fSearchPatInfo();
  1097. }
  1098. /****************************************************************************************
  1099. * Components : Form
  1100. * Components ID : SMMNW04820
  1101. * Event : oninit
  1102. * Argument : 01.obj : Object Event has occurred
  1103. * : 02.e : Event Object
  1104. * Description : 병동 환자 콤보
  1105. ****************************************************************************************/
  1106. function grp_sea_cmb_patientnm_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  1107. {
  1108. obj.updateToDataset();
  1109. //통증기록조회
  1110. var pid = obj.value;
  1111. if(utlf_isNull(pid)){
  1112. pid = grp_sea.ipt_pid.value;
  1113. }else{
  1114. //병실내 환자정보 선택시 환자등록번호 setting
  1115. grp_sea.ipt_pid.value = pid;
  1116. }
  1117. var sPid = grp_sea.ipt_pid.value;
  1118. var sOrdtype = ds_data_patientgruplist.lookup("pid",sPid,"ordtype" );
  1119. var sIndd = ds_data_patientgruplist.lookup("pid",sPid,"indd" );
  1120. var sCretno = ds_data_patientgruplist.lookup("pid",sPid,"cretno" );
  1121. var sInstcd = ds_data_patientgruplist.lookup("pid",sPid,"instcd" );
  1122. var sOrddeptcd = ds_data_patientgruplist.lookup("pid",sPid,"orddeptcd" );
  1123. var sWardcd = ds_data_patientgruplist.lookup("pid",sPid,"wardcd" );
  1124. fpatinfoset();
  1125. //상단정보 END
  1126. param = sOrdtype + "▦"
  1127. + sPid + "▦"
  1128. + sIndd + "▦"
  1129. + sCretno + "▦"
  1130. + sInstcd + "▦"
  1131. + "▦" ;
  1132. //trace("======상단= :" + param);
  1133. frmf_setParameter("condparam", param);
  1134. appf_initPatientInfo(param);
  1135. //modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
  1136. var node = appf_getPatientInfoDetails(ds_paminfo) ;
  1137. //trace(ds_paminfo.saveXML());
  1138. if( utlf_isNull(ds_paminfo.getColumnInfo("sectioncd")) ){
  1139. ds_paminfo.addColumn("sectioncd", "string");
  1140. ds_paminfo.setColumn(0, "sectioncd", ds_paminfo.getColumn(0, "basetypecd"));
  1141. }
  1142. //
  1143. if( !utlf_isNull(sPid) ){
  1144. ds_main_cond.setColumn(0, "pid", sPid);
  1145. ds_main_cond.setColumn(0, "ordtype", sOrdtype);
  1146. ds_main_cond.setColumn(0, "orddd", sIndd);
  1147. ds_main_cond.setColumn(0, "indd", sIndd);
  1148. ds_main_cond.setColumn(0, "cretno", sCretno);
  1149. ds_main_cond.setColumn(0, "instcd", sInstcd);
  1150. ds_main_cond.setColumn(0, "orddeptcd", sOrddeptcd);
  1151. ds_main_cond.setColumn(0, "wardcd", sWardcd);
  1152. }
  1153. ivw_loader.setFocus();
  1154. finit();
  1155. }
  1156. /****************************************************************************************
  1157. * Components : Form
  1158. * Components ID : SMMNW04820
  1159. * Event : oninit
  1160. * Argument : 01.obj : Object Event has occurred
  1161. * : 02.e : Event Object
  1162. * Description : 응급실 구역 콤보
  1163. ****************************************************************************************/
  1164. function grp_sea_cmb_zone_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  1165. {
  1166. //해당 병실 환자정보 clear
  1167. obj.updateToDataset();
  1168. ds_main_cond.setColumn(0,"patientnm","");
  1169. ds_main_cond.setColumn(0,"pid", "");
  1170. ds_data_patientgruplist.clearData();
  1171. // 응급실정보 추가 (2011.03.16 Ahn)
  1172. //alert(cmb_room.value);
  1173. fGetCareComPatList(grp_sea.cmb_wardcd.value, grp_sea.cmb_roomcd.value, grp_sea.cmb_zone.value);
  1174. grp_sea.cmb_erpat.setFocus();
  1175. }
  1176. /****************************************************************************************
  1177. * Components : Form
  1178. * Components ID : SMMNW04820
  1179. * Event : oninit
  1180. * Argument : 01.obj : Object Event has occurred
  1181. * : 02.e : Event Object
  1182. * Description : 응급실 환자 콤보
  1183. ****************************************************************************************/
  1184. function grp_sea_cmb_erpat_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  1185. {
  1186. // 선택 시 구역정보 기억
  1187. eSECTIONCD = ds_main_cond.getColumn(0,"zonecd");
  1188. //통증기록조회
  1189. var pid = grp_sea.cmb_erpat.value;
  1190. if(utlf_isNull(pid)){
  1191. pid = grp_sea.ipt_pid.value;
  1192. }else{
  1193. //병실내 환자정보 선택시 환자등록번호 setting
  1194. grp_sea.ipt_pid.value = pid;
  1195. }
  1196. var sPid = grp_sea.ipt_pid.value;
  1197. var sOrdtype = ds_data_patientgruplist.lookup("pid",sPid,"ordtype" );
  1198. var sIndd = ds_data_patientgruplist.lookup("pid",sPid,"indd" );
  1199. var sCretno = ds_data_patientgruplist.lookup("pid",sPid,"cretno" );
  1200. var sInstcd = ds_data_patientgruplist.lookup("pid",sPid,"instcd" );
  1201. var sOrddeptcd = ds_data_patientgruplist.lookup("pid",sPid,"orddeptcd" );
  1202. var sWardcd = ds_data_patientgruplist.lookup("pid",sPid,"wardcd" );
  1203. param = sOrdtype + "▦"
  1204. + sPid + "▦"
  1205. + sIndd + "▦"
  1206. + sCretno + "▦"
  1207. + sInstcd + "▦"
  1208. + "▦" ;
  1209. frmf_setParameter("condparam", param);
  1210. appf_initPatientInfo(param);
  1211. //modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
  1212. //model.makeNode(xPamInfoPath);
  1213. var node = appf_getPatientInfoDetails("ds_paminfo") ;
  1214. if( utlf_isNull(ds_paminfo.getColumnInfo("sectioncd")) ){
  1215. ds_paminfo.addColumn("sectioncd", "string");
  1216. ds_paminfo.setColumn(0, "sectioncd", ds_paminfo.getColumn(0, "basetypecd"));
  1217. }
  1218. if( !utlf_isNull(sPid) ){
  1219. ds_main_cond.setColumn(0, "pid", sPid);
  1220. ds_main_cond.setColumn(0, "ordtype", sOrdtype);
  1221. ds_main_cond.setColumn(0, "orddd", sIndd);
  1222. ds_main_cond.setColumn(0, "indd", sIndd);
  1223. ds_main_cond.setColumn(0, "cretno", sCretno);
  1224. ds_main_cond.setColumn(0, "instcd", sInstcd);
  1225. ds_main_cond.setColumn(0, "orddeptcd", sOrddeptcd);
  1226. ds_main_cond.setColumn(0, "wardcd", sWardcd);
  1227. }
  1228. ivw_loader.setFocus();
  1229. finit();
  1230. }
  1231. /****************************************************************************************
  1232. * Components : Form
  1233. * Components ID : SMMNW04820
  1234. * Event : oninit
  1235. * Argument : 01.obj : Object Event has occurred
  1236. * : 02.e : Event Object
  1237. * Description : 병동 환자검색
  1238. ****************************************************************************************/
  1239. function grp_sea_btn_patSearch_onclick(obj:Button, e:ClickEventInfo)
  1240. {
  1241. frmf_modal("SPPMC02500","SPPMC02500","","",1,"150","150","","","","","","M");
  1242. ds_main.setColumn(0, "popupendflag", frmf_getParameter("SPPMC02500_popupendflag"));
  1243. //환자번호 copy
  1244. var popupendflag = ds_main.getColumn(0, "popupendflag");
  1245. if (popupendflag == "ok"){
  1246. ds_main_patinfo_patinfolist.copyData(ds_patinfolist);
  1247. ds_main_cond.setColumn(0, "pid", ds_main_patinfo_patinfolist.getColumn(0, "pid"));
  1248. ds_main_cond.setColumn(0, "patientnm", ds_main_patinfo_patinfolist.getColumn(0, "pid"));
  1249. }
  1250. var pid = ds_main_cond.getColumn(0, "pid");
  1251. //환자번호를 가지고 병동, 병실을 조회하여 조회조건에 세팅한다.
  1252. fGetPidWardInfo(pid);
  1253. //통증 기록 조회
  1254. fSearch();
  1255. }
  1256. /****************************************************************************************
  1257. * Argument : N/A
  1258. * Description : 등록번호만 입력된 상태일때는 병동, 병실정보를 알수 없으므로
  1259. * 해당 등록번호의 환자의 병동정보를 조회해온다.
  1260. ****************************************************************************************/
  1261. function fGetPidWardInfo(pid, zoneflag){
  1262. if( !utlf_isNull(pid) ){
  1263. ds_main_patinfo_patinfolist.clearData();
  1264. ds_send.clearData();
  1265. ds_send.addRow();
  1266. ds_send.addColumn("pid", "string");
  1267. ds_send.setColumn(0, "pid", ds_main_cond.getColumn(0, "pid"));
  1268. if ( appf_getPatientInfoDetail('indschacptstat') == "D" || appf_getPatientInfoDetail('indschacptstat') == "T" ){
  1269. ds_send.setColumn(0, "indd", appf_getPatientInfoDetail('indd'));
  1270. }
  1271. var oParam = {};
  1272. oParam.id = "TRMNW04707";
  1273. oParam.service = "wardcareapp.WardCareRec";
  1274. oParam.method = "reqGetPatWardInfo";
  1275. oParam.inds = "req=ds_send";
  1276. oParam.outds = "ds_main_patinfo_patinfolist=patinfolist";
  1277. oParam.async = false;
  1278. oParam.callback = "cf_TRMNW04707";
  1279. tranf_submit(oParam);
  1280. if( arErrorCode.pop("TRMNW04707") < 0 ){
  1281. sysf_messageBox('환자정보 조회를', 'E009');
  1282. return;
  1283. }else{
  1284. var wardcd = ds_main_patinfo_patinfolist.getColumn(0, "wardcd"); //병동코드,
  1285. var roomcd = ds_main_patinfo_patinfolist.getColumn(0, "roomcd"); //병실코드
  1286. var pid = ds_main_patinfo_patinfolist.getColumn(0, "pid"); //등록번호
  1287. //가정간호의 경우는 상단정보가 아닌 parameter에서 받아온다
  1288. if(HC_isHomeCare){
  1289. wardcd = opener.frmf_getParameter('wardcd');
  1290. roomcd = opener.frmf_getParameter('roomcd');
  1291. pid = opener.frmf_getParameter('pid');
  1292. }
  1293. ds_main_cond.setColumn(0, "pid", ds_main_patinfo_patinfolist.getColumn(0, "pid"));
  1294. ds_main_cond.setColumn(0, "indd", ds_main_patinfo_patinfolist.getColumn(0, "indd"));
  1295. ds_main_cond.setColumn(0, "orddd", ds_main_patinfo_patinfolist.getColumn(0, "indd"));
  1296. ds_main_cond.setColumn(0, "cretno", ds_main_patinfo_patinfolist.getColumn(0, "cretno"));
  1297. ds_main_cond.setColumn(0, "dschdd", ds_main_patinfo_patinfolist.getColumn(0, "dschdd"));
  1298. ds_main_cond.setColumn(0, "ordtype", ds_main_patinfo_patinfolist.getColumn(0, "ordtype"));
  1299. ds_main_cond.setColumn(0, "hngnm", ds_main_patinfo_patinfolist.getColumn(0, "hngnm"));
  1300. ds_main_cond.setColumn(0, "orddeptcd", ds_main_patinfo_patinfolist.getColumn(0, "orddeptcd"));
  1301. //pid를 가지고 병실, 병동 정보를 찾는다.
  1302. fSetWardRoomPidInfo(wardcd, roomcd, pid, zoneflag);
  1303. }
  1304. }
  1305. }
  1306. function cf_TRMNW04707(sSvcId, nErrorCode, sErrorMsg) {
  1307. arErrorCode.push(sSvcId, nErrorCode);
  1308. }
  1309. /****************************************************************************************
  1310. * Argument : N/A
  1311. * Description : pid를 가지고 병실, 병동 정보를 찾아서 조회영역에
  1312. * 병동, 병실, 환자명, 등록번호를 세팅한다.
  1313. ****************************************************************************************/
  1314. function fSetWardRoomPidInfo(wardcd, roomcd, pid, zoneflag){
  1315. grp_sea.cmb_wardcd.value = wardcd; //병동코드 세팅
  1316. fSearchRoomcd(wardcd); //병동에 해당되는 병실조회
  1317. grp_sea.cmb_roomcd.value = roomcd; //병실코드 세팅
  1318. fGetWardChngInfo("N");
  1319. // 응급실일 경우 응급실 환자 조회 (2011.03.16 ahn)
  1320. if(eERFLAG == "Y"){
  1321. fGetCareComPatList(wardcd, roomcd, grp_sea.cmb_zone.value, eRECFLAG); //ds_data_patientgruplist를 받아옴
  1322. ds_data_patientgruplist.addColumn("orddrid", "string");
  1323. // 해당 환자의 section 정보로 재설정
  1324. var sectioncd = ds_data_patientgruplist.getColumn(ds_data_patientgruplist.findRow("pid", pid), "zonecd");
  1325. if(zoneflag== "Chg"){
  1326. //model.setValue("/root/cond/zonecd", "-");
  1327. ds_main_cond.setColumn(0, "zonecd", (utlf_isNull(sectioncd) ? "-" : sectioncd));
  1328. frmf_inputEnterKey("grp_sea.cmb_zone", "onitemchanged", new ItemChangeEventInfo ); //180328_AYS_Combo_강제이벤트_사용시
  1329. //group5.switch1.rec.grp_sea.cmb_zone.onitemchanged.fireEvent(group5.switch1.rec.grp_sea.cmb_zone, new ItemChangeEventInfo); //180328_AYS_Combo_강제이벤트_사용시(다른 방법)
  1330. //group5_switch1_rec_grp_sea_cmb_zone_onitemchanged();
  1331. }else if(zoneflag== "NoChg"){
  1332. ds_main_cond.setColumn(0, "zonecd", eSECTIONCD);
  1333. frmf_inputEnterKey("grp_sea.cmb_zone", "onitemchanged", new ItemChangeEventInfo ); //180328_AYS_Combo_강제이벤트_사용시
  1334. //group5.switch1.rec.grp_sea.cmb_zone.onitemchanged.fireEvent(group5.switch1.rec.grp_sea.cmb_zone, new ItemChangeEventInfo); //180328_AYS_Combo_강제이벤트_사용시(다른 방법)
  1335. //group5_switch1_rec_grp_sea_cmb_zone_onitemchanged();
  1336. }
  1337. grp_sea.cmb_erpat.value = pid;
  1338. }else{
  1339. fSearchPatInfo(wardcd, roomcd); //병실에 해당되는 환자조회
  1340. }
  1341. //퇴원환자의 경우 환자이름에 조회되지 않으므로 콤보아이템을 추가
  1342. if ( utlf_isNull(ds_data_patientgruplist.getColumn(ds_data_patientgruplist.findRow("pid", pid), "patientnm")) ){
  1343. frmf_addComboItem( "grp_sea.cmb_patientnm", appf_getPatientInfoDetail('hngnm'), pid, "above" );
  1344. ds_main_cond.setColumn(0, "patientnm", pid);
  1345. ds_data_patientgruplist.setColumn(0, "indd", appf_getPatientInfoDetail('indd'));
  1346. ds_data_patientgruplist.setColumn(0, "cretno", appf_getPatientInfoDetail('cretno'));
  1347. ds_data_patientgruplist.setColumn(0, "orddeptcd", appf_getPatientInfoDetail('orddeptcd'));
  1348. ds_data_patientgruplist.setColumn(0, "orddrid", appf_getPatientInfoDetail('medispclid'));
  1349. ds_data_patientgruplist.setColumn(0, "ordtype", appf_getPatientInfoDetail('ioflag'));
  1350. grp_sea.cmb_patientnm.enable = false;
  1351. }else{
  1352. // 응급실일 경우 응급실 환자 조회 (2011.03.16 ahn)
  1353. if(eERFLAG == "Y"){
  1354. grp_sea.cmb_erpat.value = pid;
  1355. }else{
  1356. grp_sea.cmb_patientnm.value = pid; //등록번호 세팅
  1357. grp_sea.cmb_patientnm.enable = true;
  1358. }
  1359. }
  1360. grp_sea.ipt_pid.value = pid; //등록번호 세팅
  1361. }
  1362. /****************************************************************************************
  1363. * Argument : N/A
  1364. * Description : 새이름으로 저장.
  1365. ****************************************************************************************/
  1366. function grp_sea_btn_formrecupdt_newhis_onclick(obj:Button, e:ClickEventInfo)
  1367. {
  1368. if(ds_main_cond.getColumn(0, "searchflag") =="N" ) {
  1369. sysf_messageBox('기록 이력 조회 후 저장하세요');
  1370. return;
  1371. }
  1372. ivw_loader.grup_btn.btn_signsaveasnew.click();
  1373. //기록 리스트 조회
  1374. fRecordListsearch();
  1375. }
  1376. /****************************************************************************************
  1377. * Argument : N/A
  1378. * Description : Duty별 통증기록 유무 내환자 세팅 환자 목록에 표기
  1379. ****************************************************************************************/
  1380. function fGetSettingPatientList_type4(pFlag,flag){
  1381. var sRefresh = "true";
  1382. if( !utlf_isNull(pFlag)){
  1383. sRefresh = pFlag
  1384. }
  1385. if( !utlf_isNull(flag) ){
  1386. ds_send_refCond.setColumn(0, "flag", flag);
  1387. }
  1388. var oParam = {};
  1389. oParam.id = "TRMNR00921";
  1390. oParam.service = "carerecapp.ClincObsRec";
  1391. oParam.method = "reqGetsettinpatlist_type4";
  1392. oParam.inds = "refCond=ds_send_refCond";
  1393. oParam.outds = "ds_temp_cond_settingpatient_settingpatientlist=settingpatientlist";
  1394. oParam.async = false;
  1395. //oParam.callback = "cf_TRMNR00921";
  1396. tranf_submit(oParam);
  1397. if(ds_temp_cond_settingpatient_settingpatientlist.rowcount >0){
  1398. grp_sea.cmb_mypatlist.value = ds_main_cond.getColumn(0,"pid");
  1399. }
  1400. }
  1401. function grp_sea_cmb_mypatlist_onitemchanged(obj:Combo, e:ItemChangeEventInfo)
  1402. {
  1403. //grp_sea_cmb_patientnm_onitemchanged
  1404. trace(grp_sea.cmb_mypatlist.value);
  1405. var sPid = grp_sea.cmb_mypatlist.value;
  1406. var sOrdtype = ds_temp_cond_settingpatient_settingpatientlist.getColumn(ds_temp_cond_settingpatient_settingpatientlist.findRow("pid", sPid), "ordtype");
  1407. var sIndd = ds_temp_cond_settingpatient_settingpatientlist.getColumn(ds_temp_cond_settingpatient_settingpatientlist.findRow("pid", sPid), "indd");
  1408. var sCretno = ds_temp_cond_settingpatient_settingpatientlist.getColumn(ds_temp_cond_settingpatient_settingpatientlist.findRow("pid", sPid), "cretno");
  1409. var sInstcd = ds_temp_cond_settingpatient_settingpatientlist.getColumn(ds_temp_cond_settingpatient_settingpatientlist.findRow("pid", sPid), "instcd");
  1410. param = sOrdtype + "▦"
  1411. + sPid + "▦"
  1412. + sIndd + "▦"
  1413. + sCretno + "▦"
  1414. + sInstcd + "▦"
  1415. + "▦" ;
  1416. //setParameter("condparam", param);
  1417. trace(param);
  1418. //frmf_modal("SPMMO08900","SPMMO08900","","",1,"","","","","","","","M");
  1419. appf_initPatientInfo(param); //상단정보 셋팅
  1420. var node = appf_getPatientInfoDetails(xPamInfoPath) ;
  1421. fpatinfoset();
  1422. ivw_loader.setFocus();
  1423. finit();
  1424. }
  1425. ]]></Script>
  1426. </Form>
  1427. </FDL>