SPMRJ00500_간호CarePlan.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>CARE PLAN</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <cond>
  11. <fromdd/>
  12. <todd/>
  13. <dnarflag>3A</dnarflag>
  14. <sortseq>A</sortseq>
  15. <recsrchflag>NR</recsrchflag>
  16. <recusrid>%</recusrid>
  17. <pid/>
  18. <orddd/>
  19. <cretno/>
  20. <ioflag/>
  21. <origincd/>
  22. <diagstmtcd/>
  23. <recverno/>
  24. </cond>
  25. <recinfo/>
  26. </main>
  27. <send/>
  28. <init>
  29. <dnarflag>
  30. <itemset>
  31. <itemcd>%</itemcd>
  32. <itemnm>전체</itemnm>
  33. </itemset>
  34. <itemset>
  35. <itemcd>1D</itemcd>
  36. <itemnm>D</itemnm>
  37. </itemset>
  38. <itemset>
  39. <itemcd>3A</itemcd>
  40. <itemnm>A</itemnm>
  41. </itemset>
  42. <itemset>
  43. <itemcd>4R</itemcd>
  44. <itemnm>R</itemnm>
  45. </itemset>
  46. </dnarflag>
  47. <dnarflagnurs>
  48. <itemset>
  49. <itemcd>%</itemcd>
  50. <itemnm>전체</itemnm>
  51. </itemset>
  52. <itemset>
  53. <itemcd>1D</itemcd>
  54. <itemnm>D</itemnm>
  55. </itemset>
  56. <itemset>
  57. <itemcd>2N</itemcd>
  58. <itemnm>N</itemnm>
  59. </itemset>
  60. <itemset>
  61. <itemcd>3A</itemcd>
  62. <itemnm>A</itemnm>
  63. </itemset>
  64. <itemset>
  65. <itemcd>4R</itemcd>
  66. <itemnm>R</itemnm>
  67. </itemset>
  68. </dnarflagnurs>
  69. <recusrinfo/>
  70. </init>
  71. </root>
  72. </instance>
  73. <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
  74. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  75. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  76. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  77. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  78. <script type="javascript">
  79. <![CDATA[
  80. function fInit(){
  81. grd_careplaninfo.fixedcellcheckbox(0, grd_careplaninfo.colRef("check") ) = true;
  82. grd_careplaninfo.mergeCells = "byrestriccol";
  83. grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("carerecno") ) =true;
  84. grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("diagstmtnm") ) =true;
  85. grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("check") ) = false;
  86. grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("recdd") ) =false;
  87. grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("rectm") ) =false;
  88. grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("dnar") ) =false;
  89. grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("stmtspec") ) =false;
  90. grd_careplaninfo.mergeCol( grd_careplaninfo.colRef("fstrgstrnm") ) =false;
  91. var SPMRJ00500_diaginfo = opener.javascript.getParameter("SPMRJ00500_diaginfo");// diagstmtcd^origincd |
  92. var SPMRJ00500_paminfo = opener.javascript.getParameter("SPMRJ00500_paminfo");// pid^indd^orddd^cretno^ioflag^
  93. var arrDiagInfoCnt = SPMRJ00500_diaginfo.split("|").length -1 ;
  94. var diagstmtcd = "";
  95. var origincd = "";
  96. var recverno = "";
  97. //function getArrayData(pData, pRow, pCol, pRowSep, pColSep){ CareCom.js
  98. for ( var idx = 0 ; idx < arrDiagInfoCnt ; idx++ ){
  99. if ( idx == 0 ){
  100. diagstmtcd = "'"+ getArrayData(SPMRJ00500_diaginfo, idx ,0,"|","^")+"'";
  101. origincd = "'"+ getArrayData(SPMRJ00500_diaginfo, idx ,1,"|","^")+"'";
  102. recverno = "'"+ getArrayData(SPMRJ00500_diaginfo, idx ,2,"|","^")+"'";
  103. }else{
  104. diagstmtcd += ",'"+ getArrayData(SPMRJ00500_diaginfo, idx ,0,"|","^")+"'";
  105. origincd += ",'"+ getArrayData(SPMRJ00500_diaginfo, idx ,1,"|","^")+"'";
  106. recverno += ",'"+ getArrayData(SPMRJ00500_diaginfo, idx ,2,"|","^")+"'";
  107. }
  108. }
  109. model.setValue("/root/main/cond/diagstmtcd", diagstmtcd );
  110. model.setValue("/root/main/cond/origincd", origincd );
  111. model.setValue("/root/main/cond/recverno", recverno );
  112. model.setValue("/root/main/cond/pid", getArrayData(SPMRJ00500_paminfo, 0,0,"|","^") );
  113. model.setValue("/root/main/cond/orddd", getArrayData(SPMRJ00500_paminfo, 0,1,"|","^") );
  114. model.setValue("/root/main/cond/cretno", getArrayData(SPMRJ00500_paminfo, 0,2,"|","^") );
  115. model.setValue("/root/main/cond/ioflag", getArrayData(SPMRJ00500_paminfo, 0,3,"|","^") );
  116. model.setValue("/root/main/cond/fromdd", getCurrentDate().toDate().getAddDate(-1,"M").getDateFormat());
  117. model.setValue("/root/main/cond/todd", getCurrentDate() );
  118. model.setValue("/root/main/cond/dnarflag", "%");
  119. fSearchRecInfo();
  120. model.refresh();
  121. }
  122. function fSearchRecInfo(){
  123. model.removenode("/root/send");
  124. var sSrchHeader = "pid▦indd▦orddd▦cretno▦ioflag▦fromdd▦todd▦dnarflag▦sortseq▦recflag▦reclnkkey▦carediagflag▦recsrchflag▦recusrid▦diagstmtcd▦origincd▦recverno▩";
  125. var sSrchData = model.getValue("/root/main/cond/pid") +"▦"
  126. + model.getValue("/root/main/cond/orddd") +"▦"
  127. + "-▦"
  128. + model.getValue("/root/main/cond/cretno") +"▦"
  129. + model.getValue("/root/main/cond/ioflag") +"▦"
  130. +model.getValue("/root/main/cond/fromdd")+"▦"
  131. +model.getValue("/root/main/cond/todd")+"▦"
  132. +model.getValue("/root/main/cond/dnarflag")+"▦"
  133. +model.getValue("/root/main/cond/sortseq")+"▦"
  134. +"G▦"
  135. +"▦"
  136. +"▦"
  137. +"NR▦"
  138. +model.getValue("/root/main/cond/recusrid")+"▦"
  139. +model.getValue("/root/main/cond/diagstmtcd")+"▦"
  140. +model.getValue("/root/main/cond/origincd")+"▦"
  141. +model.getValue("/root/main/cond/recverno")+ "▩";
  142. model.makeValue("/root/send/srchinfo",sSrchHeader+sSrchData );
  143. if(submit("TRMNR00704")){
  144. if(getNodesetCount("/root/main/recinfo/usersetlist")>0 ){
  145. model.removenodeset("/root/init/recusrinfo/usersetlist");
  146. model.makeNode("/root/init/recusrinfo/usersetlist");
  147. copyNodeset("/root/init/recusrinfo/usersetlist","/root/main/recinfo/usersetlist");
  148. cmb_recusr.refresh();
  149. }
  150. var sRecVerNo = "";
  151. var sDiagStmtNm = "";
  152. var sFstRgstRid = "";
  153. for(var iRow=1; iRow<=getNodesetCount("/root/main/recinfo/nursingrecordlist"); iRow++){
  154. sRecVerNo = model.getValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/recverno");
  155. sDiagStmtNm = model.getValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/diagstmtnm");
  156. if ( !isNull(sRecVerNo) ){
  157. model.setValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/diagstmtnm",getArrayData(sDiagStmtNm,0,1,'|','^') );
  158. model.makeValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/diagcarerecno", getArrayData(sDiagStmtNm,0,0,'|','^') );
  159. }
  160. sFstRgstRid = model.getValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/fstrgstrid");
  161. if ( sFstRgstRid != getUserId() ){
  162. grd_careplaninfo.isReadOnly( iRow, grd_careplaninfo.colRef("stmtspec")) = true;
  163. }else {
  164. grd_careplaninfo.isReadOnly( iRow, grd_careplaninfo.colRef("stmtspec")) = false;
  165. }
  166. }
  167. }
  168. model.refresh();
  169. }
  170. function fSaveCarePlan(){
  171. model.removenode("/root/send");
  172. var xNursRecPath = "/root/main/recinfo/nursingrecordlist";
  173. var sSaveHeader = "m▦instcd▦careplanseq▦pid▦orddd▦cretno▦workflag▦problem▦careplan▦rgstdd▦rgsttm▩";
  174. var sSaveData ="";
  175. for ( var idx = 1 ; idx <= getNodesetCount(xNursRecPath) ; idx++ ){
  176. if ( model.getValue(xNursRecPath +"["+ idx + "]/check") == "Y" ) {
  177. sSaveData += "i▦"
  178. + getUserInfo("dutplceinstcd") +"▦"
  179. + "▦"
  180. + model.getValue("/root/main/cond/pid") +"▦"
  181. + model.getValue("/root/main/cond/orddd") +"▦"
  182. + model.getValue("/root/main/cond/cretno") +"▦"
  183. + "003▦"
  184. +model.getValue(xNursRecPath + "["+ idx + "]/recverno")+" "+model.getValue(xNursRecPath + "["+ idx + "]/diagstmtnm")+"▦"
  185. +model.getValue(xNursRecPath + "["+ idx + "]/stmtspec")+"▦"
  186. +model.getValue(xNursRecPath + "["+ idx + "]/recdd")+"▦"
  187. +model.getValue(xNursRecPath + "["+ idx + "]/rectm")+ "▩";
  188. }
  189. }
  190. if ( isNull(sSaveData) ){
  191. messageBox("저장할 데이타를 ","C002");
  192. return;
  193. }
  194. model.makeValue("/root/send/listdata",sSaveHeader + sSaveData);
  195. if ( submit("TXMRJ00101") ) {
  196. //datagrid1.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  197. messageBox("저장 ","I002");
  198. }
  199. }
  200. ]]>
  201. </script>
  202. <script type="javascript" ev:event="xforms-ready">
  203. <![CDATA[
  204. fInit();
  205. ]]>
  206. </script>
  207. <submission id="TRMNR00704" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/recinfo"/>
  208. <submission id="TXMRJ00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden"/>
  209. </model>
  210. </xhtml:head>
  211. <xhtml:body pagewidth="656" pageheight="420" guideline="1,640;" style="margin-left:8; margin-right:8; ">
  212. <caption id="caption17" class="tit_2" style="left:5px; top:41px; width:137px; height:13px; ">CARE PLAN</caption>
  213. <group id="grp_sea" style="left:0px; top:6px; width:640px; height:27px; vertical-align:top; ">
  214. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:640px; height:25px; "/>
  215. <caption id="caption49" class="search_name" style="left:5px; top:4px; width:86px; height:17px; ">조회일자 :</caption>
  216. <line id="line22" class="line_4" style="x1:570px; y1:3px; x2:570px; y2:22px; "/>
  217. <caption id="caption51" style="left:179px; top:4px; width:14px; height:20px; font-weight:bold; ">~</caption>
  218. <caption id="caption45" class="search_name" style="left:280px; top:5px; width:88px; height:17px; ">조회옵션 :</caption>
  219. <input id="ipt_srchfromdd" ref="/root/main/cond/fromdd" class="input_search" navindex="1" inputtype="date" style="left:95px; top:3px; width:85px; height:19px; "/>
  220. <select1 id="cmb_srchdnarflag" ref="/root/main/cond/dnarflag" class="combo_search" navindex="3" appearance="minimal" style="left:364px; top:3px; width:52px; height:19px; ">
  221. <choices>
  222. <itemset nodeset="/root/init/dnarflag/itemset">
  223. <label ref="itemnm"/>
  224. <value ref="itemcd"/>
  225. </itemset>
  226. </choices>
  227. </select1>
  228. <button id="btn_srchrecinfo" class="btn1_letter2" navindex="6" style="left:578px; top:2px; width:56px; height:22px; ">
  229. <caption>조회</caption>
  230. <script type="javascript" ev:event="DOMActivate">
  231. <![CDATA[
  232. fSearchRecInfo();
  233. ]]>
  234. </script>
  235. </button>
  236. <input id="ipt_srchtodd" ref="/root/main/cond/todd" class="input_search" navindex="2" inputtype="date" style="left:190px; top:3px; width:85px; height:19px; "/>
  237. <select1 id="cmb_srchsortseq" ref="/root/main/cond/sortseq" class="combo_search" navindex="4" appearance="minimal" style="left:417px; top:3px; width:84px; height:19px; ">
  238. <choices>
  239. <item>
  240. <label>기록일자↓</label>
  241. <value>A</value>
  242. </item>
  243. <item>
  244. <label>기록일자↑</label>
  245. <value>D</value>
  246. </item>
  247. </choices>
  248. </select1>
  249. <select1 id="cmb_recusr" ref="/root/main/cond/recusrid" class="combo_search" navindex="4" appearance="minimal" style="left:502px; top:3px; width:64px; height:19px; ">
  250. <choices>
  251. <itemset nodeset="/root/init/recusrinfo/usersetlist">
  252. <label ref="recusrnm"/>
  253. <value ref="recusrid"/>
  254. </itemset>
  255. </choices>
  256. </select1>
  257. </group>
  258. <datagrid id="grd_careplaninfo" nodeset="/root/main/recinfo/nursingrecordlist" autoresize="true" caption="Problem^Problem^^기록일자^시간^DNAR^Care Plan^작성자^작성자id" colsep="^" colwidth="24, 114, 19, 70, 44, 38, 246, 67, 0" mergecellsfixedrows="bycolrec" rowsep="|" tooltip="true" style="left:0px; top:62px; width:640px; height:348px; ">
  259. <col ref="recverno" style="font-weight:bold; text-align:center; border-right-width:0; "/>
  260. <col ref="diagstmtnm"/>
  261. <col checkvalue="Y,N" ref="check" type="checkbox"/>
  262. <col ref="recdd" format="yyyy-mm-dd" style="text-align:center; vertical-align:middle; "/>
  263. <col ref="rectm" format="hh:nn" style="text-align:center; vertical-align:middle; "/>
  264. <col disabled="true" ref="dnar" type="combo" style="text-align:center; vertical-align:middle; ">
  265. <choices>
  266. <itemset nodeset="/root/init/dnarflagnurs/itemset">
  267. <label ref="itemnm"/>
  268. <value ref="itemcd"/>
  269. </itemset>
  270. </choices>
  271. </col>
  272. <col ref="stmtspec" type="input"/>
  273. <col ref="fstrgstrnm" style="text-align:center; "/>
  274. <col ref="fstrgstrid" visibility="hidden"/>
  275. <script type="javascript" ev:event="onclick">
  276. <![CDATA[
  277. var iRow = grd_careplaninfo.row;
  278. sFstRgstRid = model.getValue("/root/main/recinfo/nursingrecordlist["+iRow+"]/fstrgstrid");
  279. if ( sFstRgstRid != getUserId() ){
  280. grd_careplaninfo.isReadOnly( iRow, grd_careplaninfo.colRef("stmtspec")) = true;
  281. } else {
  282. grd_careplaninfo.isReadOnly( iRow, grd_careplaninfo.colRef("stmtspec")) = false;
  283. }
  284. ]]>
  285. </script>
  286. </datagrid>
  287. <line id="line1" class="line_1" style="x1:0px; y1:57px; x2:640px; y2:57px; "/>
  288. <button id="button1" class="btn1_letter2" style="left:578px; top:35px; width:56px; height:22px; ">
  289. <caption>등록</caption>
  290. <script type="javascript" ev:event="DOMActivate">
  291. <![CDATA[
  292. fSaveCarePlan();
  293. ]]>
  294. </script>
  295. </button>
  296. </xhtml:body>
  297. </xhtml:html>