SMMQR00100.js 112 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698
  1. var checkgrade="true";
  2. var pushbutton="false";
  3. var daychk = "";
  4. var anonybtn = "N";
  5. /**
  6. * @---------------------------------------------------
  7. * @desc : SMMQR00100_안전사고통합보고가 load될때 실행되는 function
  8. * @param :
  9. * @return :
  10. * @---------------------------------------------------
  11. */
  12. function fInitialize(){
  13. iviewer_rept.attribute("border-style") = "hidden";
  14. var lrg = model.getValue("/root/main/condition/lrg");
  15. var ano = "";
  16. var daychk = "";
  17. if(!isNull(opener.javascript.getParameter("ano"))){ //메뉴에서 open -> 신규, Popup -> 과거조회
  18. ano = opener.javascript.getParameter("ano");
  19. daychk = opener.javascript.getParameter("daychk");
  20. }
  21. model.setValue("/root/main/condition/acptno", ano);
  22. model.setValue("/root/main/condition/daychk", daychk);
  23. model.makeValue("/root/temp/btn_value", "익명보고");
  24. zbcfGetCodeList(new Array("M0425" //대상자구분값.
  25. ,"M0427" //임상, 비임상
  26. ,"P0313" //Sex
  27. ,"M0449" //상담중, 감면처리중, 소송(의료분쟁)중, 종결, 취소
  28. ,"M0448"), //진행중, 종결
  29. new Array("/root/init/trgtmanflag"
  30. , "/root/init/lrg"
  31. , "/root/init/trgsex"
  32. , "/root/init/prcsyn"
  33. , "/root/init/rlstyn"),
  34. true);
  35. reqGetAccidentStepList();
  36. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/trgtorddept", "O");
  37. mmbfGetUserComboList("/root/send/reqdata", "/root/init/trgtatdoct", getUserInfo("dutplcecd"), "0330");
  38. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/main/wardlist", "W");
  39. addComboInstance("/root/main/wardlist/ward", "deptcd^depthngnm", "-^전체", "dept");
  40. model.setValue("/root/main/condition/trgtwardcd", "-");
  41. model.removeNodeset("/root/main/reduct/reductlist");
  42. if(model.getValue("/root/main/condition/acptno") == ""){ //신규작성일 경우
  43. var rtnparam = opener.javascript.getParameter("SMMQR00100_PARAM"); // Main에서 open.
  44. var rtnparam2 = opener.javascript.getParameter("SMMQR00100_PARAM2"); // Main에서 open.
  45. if ( rtnparam.getTrim() != "") {
  46. rtnparam = rtnparam.split("▦");
  47. if( rtnparam[10] == "I"){
  48. model.setValue("/root/main/condition/trgtmanflag", "01"); //입원환자
  49. }else if( rtnparam[10] == "O" || rtnparam[10] == "E" ){
  50. model.setValue("/root/main/condition/trgtmanflag", "02"); //외래/응급센터 내원환자
  51. }else{
  52. model.setValue("/root/main/condition/trgtmanflag", "06"); //기타
  53. }
  54. cmb_trgtmanflag.dispatch("xforms-value-changed");
  55. model.setValue("/root/main/condition/trgtid", rtnparam[0]);
  56. model.setValue("/root/main/condition/trgtnm", rtnparam[1]);
  57. model.setValue("/root/main/condition/trgtorddept", rtnparam[2]);
  58. model.setValue("/root/main/condition/trgtdiagcdnm", rtnparam[4]);
  59. model.setValue("/root/main/condition/trgtdiagcd", rtnparam[5]);
  60. model.setValue("/root/main/condition/trgtsextext", rtnparam[6]);
  61. model.setValue("/root/main/condition/trgtage", rtnparam[7]);
  62. model.setValue("/root/main/condition/trgtwardcd", rtnparam[8]);
  63. cmb_trgtorddept.dispatch("xforms-value-changed");
  64. model.setValue("/root/main/condition/trgtroom", rtnparam[9]);
  65. model.setValue("/root/main/condition/trgtatdoct", rtnparam[3]);
  66. } else if(rtnparam2.getTrim() != "") {
  67. rtnparam2 = rtnparam2.split("▦");
  68. model.setValue("/root/send/patinfo/pid", rtnparam2[0]);
  69. model.setValue("/root/send/patinfo/orddd", rtnparam2[1]);
  70. model.setValue("/root/send/patinfo/cretno", rtnparam2[2]);
  71. model.setValue("/root/send/patinfo/ordtype", rtnparam2[3]);
  72. model.setValue("/root/send/patinfo/oprsrvno", rtnparam2[4]);
  73. if(submit("TRMQR00108")) { // 환자정보 조회
  74. model.setValue("/root/main/condition/trgtmanflag", model.getValue("/root/temp/initparam/trgtmanflag")); //입원환자
  75. cmb_trgtmanflag.dispatch("xforms-value-changed");
  76. model.setValue("/root/main/condition/trgtid", model.getValue("/root/temp/initparam/trgtid"));
  77. model.setValue("/root/main/condition/trgtnm", model.getValue("/root/temp/initparam/trgtnm"));
  78. model.setValue("/root/main/condition/trgtorddept", model.getValue("/root/temp/initparam/trgtorddept"));
  79. model.setValue("/root/main/condition/trgtdiagcdnm", model.getValue("/root/temp/initparam/trgtdiagcdnm"));
  80. model.setValue("/root/main/condition/trgtdiagcd", model.getValue("/root/temp/initparam/trgtdiagcd"));
  81. model.setValue("/root/main/condition/trgtsextext", model.getValue("/root/temp/initparam/trgtsextext"));
  82. model.setValue("/root/main/condition/trgtage", model.getValue("/root/temp/initparam/trgtage"));
  83. model.setValue("/root/main/condition/trgtwardcd", model.getValue("/root/temp/initparam/trgtwardcd"));
  84. cmb_trgtorddept.dispatch("xforms-value-changed");
  85. model.setValue("/root/main/condition/trgtroom", model.getValue("/root/temp/initparam/trgtroom"));
  86. model.setValue("/root/main/condition/trgtatdoct", model.getValue("/root/temp/initparam/trgtatdoct"));
  87. }
  88. }
  89. // 보고자정보 설정
  90. submit("TRMQR00100");
  91. model.setValue("/root/main/condition/reptid", model.getValue("/root/main/userinfo/reptid"));
  92. model.setValue("/root/main/condition/reptnm", model.getValue("/root/main/userinfo/reptnm"));
  93. model.setValue("/root/main/condition/reptjobkind", model.getValue("/root/main/userinfo/reptjobkind"));
  94. model.setValue("/root/main/condition/reptjobkindtext", model.getValue("/root/main/userinfo/reptjobkindtext"));
  95. model.setValue("/root/main/condition/reptdutdept", model.getValue("/root/main/userinfo/reptdutdept"));
  96. model.setValue("/root/main/condition/reptdutdepttext", model.getValue("/root/main/userinfo/reptdutdepttext"));
  97. model.setValue("/root/main/condition/reptcntctel", model.getValue("/root/main/userinfo/reptcntctel"));
  98. model.setValue("/root/main/condition/reptdutyearno", model.getValue("/root/main/userinfo/reptdutyearno"));
  99. model.setValue("/root/main/condition/reptposdeptcd", model.getValue("/root/main/userinfo/reptposdeptcd"));
  100. }
  101. else{ //조회일 경우
  102. model.setValue("/root/send/acptno", model.getValue("/root/main/condition/acptno"));
  103. submit("TRMQR00102");
  104. var lrg = model.getValue("/root/tmp/reptinfo/recinfo/lrg");
  105. var mdl = model.getValue("/root/tmp/reptinfo/recinfo/mdl");
  106. var trgsex = model.getValue("/root/tmp/reptinfo/recinfo/trgtsex");
  107. model.setValue("/root/main/condition/lrg", lrg);
  108. model.setValue("/root/main/condition/mdl", mdl);
  109. model.setValue("/root/main/condition/inwritingyn" , model.getValue("/root/tmp/reptinfo/recinfo/inwritingyn"));
  110. model.setValue("/root/main/condition/trgtsex" , trgsex);
  111. model.setValue("/root/main/condition/reptid" , model.getValue("/root/tmp/reptinfo/recinfo/reptid" ));
  112. model.setValue("/root/main/condition/reptnm" , model.getValue("/root/tmp/reptinfo/recinfo/reptnm" ));
  113. model.setValue("/root/main/condition/reptjobkind" , model.getValue("/root/tmp/reptinfo/recinfo/reptjobkind" ));
  114. model.setValue("/root/main/condition/reptjobkindtext" , model.getValue("/root/tmp/reptinfo/recinfo/reptjobkindtext" ));
  115. model.setValue("/root/main/condition/reptdutdept" , model.getValue("/root/tmp/reptinfo/recinfo/reptdutdept" ));
  116. model.setValue("/root/main/condition/reptdutdepttext" , model.getValue("/root/tmp/reptinfo/recinfo/reptdutdepttext" ));
  117. model.setValue("/root/main/condition/reptposdeptcd" , model.getValue("/root/main/userinfo/reptposdeptcd"));
  118. model.setValue("/root/main/condition/reptdutyearno" , model.getValue("/root/tmp/reptinfo/recinfo/reptdutyearno" ));
  119. model.setValue("/root/main/condition/reptcntctel" , model.getValue("/root/tmp/reptinfo/recinfo/reptcntctel" ));
  120. model.setValue("/root/main/condition/serdiaggrde" , model.getValue("/root/tmp/reptinfo/recinfo/serdiaggrde" ));
  121. model.setValue("/root/main/condition/trgtmanflag" , model.getValue("/root/tmp/reptinfo/recinfo/trgtmanflag" ));
  122. model.setValue("/root/main/condition/etctrgtmanflag" , model.getValue("/root/tmp/reptinfo/recinfo/etctrgtmanflag" ));
  123. model.setValue("/root/main/condition/trgtrelemp" , model.getValue("/root/tmp/reptinfo/recinfo/trgtrelemp" ));
  124. model.setValue("/root/main/condition/trgtid" , model.getValue("/root/tmp/reptinfo/recinfo/trgtid" ));
  125. model.setValue("/root/main/condition/trgtnm" , model.getValue("/root/tmp/reptinfo/recinfo/trgtnm" ));
  126. model.setValue("/root/main/condition/trgtage" , model.getValue("/root/tmp/reptinfo/recinfo/trgtage" ));
  127. model.setValue("/root/main/condition/trgtroom" , model.getValue("/root/tmp/reptinfo/recinfo/trgtroom" ));
  128. model.setValue("/root/main/condition/trgtdiagcd" , model.getValue("/root/tmp/reptinfo/recinfo/trgtdiagcd" ));
  129. model.setValue("/root/main/condition/trgtdiagcdnm" , model.getValue("/root/tmp/reptinfo/recinfo/trgtdiagcdnm" ));
  130. model.setValue("/root/main/condition/detlcnts" , model.getValue("/root/tmp/reptinfo/recinfo/detlcnts" ));
  131. model.setValue("/root/main/condition/detlcnts_how" , model.getValue("/root/tmp/reptinfo/recinfo/detlcnts_how" ));
  132. model.setValue("/root/main/condition/detlcnts_why" , model.getValue("/root/tmp/reptinfo/recinfo/detlcnts_why" ));
  133. model.setValue("/root/main/condition/erracdyn" , model.getValue("/root/tmp/reptinfo/recinfo/erracdyn" ));
  134. model.setValue("/root/main/condition/doctorcallyn" , model.getValue("/root/tmp/reptinfo/recinfo/doctorcallyn" ));
  135. model.setValue("/root/main/condition/doctorcalldt" , model.getValue("/root/tmp/reptinfo/recinfo/doctorcalldt"));
  136. model.setValue("/root/main/condition/mediationyn" , model.getValue("/root/tmp/reptinfo/recinfo/mediationyn"));
  137. model.setValue("/root/main/condition/mediationdt" , model.getValue("/root/tmp/reptinfo/recinfo/mediationdt"));
  138. var trgtorddept = model.getValue("/root/tmp/reptinfo/recinfo/trgtorddept");
  139. model.setValue("/root/main/condition/trgtorddept" , trgtorddept);
  140. model.setValue("/root/main/condition/trgtwardcd" , model.getValue("/root/tmp/reptinfo/recinfo/trgtwardcd"));
  141. if(model.getValue("/root/tmp/reptinfo/recinfo/anonyyn")=='Y'){ //익명보고
  142. checkgrade="false";
  143. fCheckgrade();
  144. pushbutton="true";
  145. btn_anony.attribute("class")="btn2_letter6";
  146. model.setValue("/root/temp/btn_value", "익명보고해제");
  147. // btn_anony.disabled="false";
  148. }
  149. if(model.getValue("/root/tmp/reptinfo/recinfo/serdiaggrde") < "4"){ //안전사고단계(M0426)
  150. btn_anony.disabled="false";
  151. }else{
  152. btn_anony.disabled="true";
  153. }
  154. if( trgtorddept != ""){
  155. model.removeNodeset("/root/init/trgtatdoct");
  156. model.makeNode("/root/init/trgtatdoct/usercombo");
  157. mmbfGetUserComboList("/root/send/reqdata", "/root/init/trgtatdoct", trgtorddept, "0330");
  158. }
  159. model.setValue("/root/main/condition/trgtatdoct" , model.getValue("/root/tmp/reptinfo/recinfo/trgtatdoct" ));
  160. model.setValue("/root/main/condition/trgtrrgstno1" , model.getValue("/root/tmp/reptinfo/recinfo/trgtrrgstno1" ));
  161. model.setValue("/root/main/condition/trgtrrgstno2" , model.getValue("/root/tmp/reptinfo/recinfo/trgtrrgstno2" ));
  162. model.setValue("/root/main/condition/trgtcntctel" , model.getValue("/root/tmp/reptinfo/recinfo/trgtcntctel" ));
  163. model.setValue("/root/main/condition/genrdd" , model.getValue("/root/tmp/reptinfo/recinfo/genrdd" ));
  164. model.setValue("/root/main/condition/genrtmmnt" , model.getValue("/root/tmp/reptinfo/recinfo/genrtmmnt" ));
  165. model.setValue("/root/main/condition/discvdd" , model.getValue("/root/tmp/reptinfo/recinfo/discvdd" ));
  166. model.setValue("/root/main/condition/discvtmmnt" , model.getValue("/root/tmp/reptinfo/recinfo/discvtmmnt" ));
  167. model.setValue("/root/main/condition/reptdd" , model.getValue("/root/tmp/reptinfo/recinfo/reptdd" ));
  168. model.setValue("/root/main/condition/repttmmnt" , model.getValue("/root/tmp/reptinfo/recinfo/repttmmnt" ));
  169. model.setValue("/root/main/condition/prgnoacdrsltcnts" , model.getValue("/root/tmp/reptinfo/recinfo/prgnoacdrsltcnts"));
  170. model.setValue("/root/main/condition/imprvactcnts" , model.getValue("/root/tmp/reptinfo/recinfo/imprvactcnts" ));
  171. model.setValue("/root/main/condition/rsltyn" , model.getValue("/root/tmp/reptinfo/recinfo/rsltyn" ));
  172. model.setValue("/root/main/condition/trsmyn" , model.getValue("/root/tmp/reptinfo/recinfo/trsmyn" ));
  173. model.setValue("/root/hidden/rsltyn" , model.getValue("/root/tmp/reptinfo/recinfo/rsltyn" )); //전송할경우 기존상태를 비교하기위해
  174. var genrtmnt = model.getValue("/root/tmp/reptinfo/recinfo/genrtmmnt" );
  175. model.setValue("/root/main/condition/genrthh" , genrtmnt.substring(0,2));
  176. model.setValue("/root/main/condition/genrtmi" , genrtmnt.substring(2,4));
  177. var discvtmmnt = model.getValue("/root/tmp/reptinfo/recinfo/discvtmmnt" );
  178. model.setValue("/root/main/condition/discvthh", discvtmmnt.substring(0,2));
  179. model.setValue("/root/main/condition/discvtmi", discvtmmnt.substring(2,4));
  180. //예측되는 사고결과중 '기타'가있으면 TextAreafmf display 해준다
  181. var chkprgnoacdrslt = model.getValue("/root/tmp/reptinfo/recinfo/chkprgnoacdrslt");
  182. model.setValue("/root/main/chkcond/chkprgnoacdrslt" , chkprgnoacdrslt);
  183. if(chkprgnoacdrslt.search("06") > -1){
  184. tar_prgnoacdcnts.visible = true;
  185. model.setValue("/root/main/condition/prgnoacdcnts" , model.getValue("/root/tmp/reptinfo/recinfo/prgnoacdcnts" ));
  186. }
  187. //개선활동 내용중 '기타'가있으면 TextArea를 display해준다
  188. var ChkImprvAct = model.getValue("/root/tmp/reptinfo/recinfo/chkimprvact" );
  189. model.setValue("/root/main/chkcond/chkimprvact" , ChkImprvAct);
  190. if(ChkImprvAct.search("06") > -1){
  191. tar_imprvactetccnts.visible = true;
  192. model.setValue("/root/main/condition/imprvactetccnts" , model.getValue("/root/tmp/reptinfo/recinfo/imprvactetccnts" ));
  193. }
  194. model.removenodeset("/root/main/reduct/reductlist");
  195. copyNodeListType("/root/main/reduct", "/root/tmp/reptinfo/reductlist", "after");
  196. setLrg(lrg);
  197. SetIviewer(lrg, mdl);
  198. setTrgtView();
  199. setTrgtSex(trgsex);
  200. sortNodeList("/root/main/reduct/reductlist", "reductdd", "asc");
  201. //감면금액 합계 표시
  202. grd_amt.subtotal("sum", -1, grd_amt.colRef("reductamt"),"", "", 2, "총 계");
  203. }
  204. model.refresh();
  205. }
  206. /**
  207. * @---------------------------------------------------
  208. * @desc : 안전사고통합보고를 저장/수정한다.
  209. * @param :
  210. * @return :
  211. * @---------------------------------------------------
  212. */
  213. function fSave(){
  214. // alert("fSave");
  215. var Lrg = model.getValue("/root/main/condition/lrg");
  216. var mdl = model.getValue("/root/main/condition/mdl");
  217. if(Lrg == "01" && mdl == "03"){
  218. if(!iviewer_rept.window.javascript.checkFalldrug()){
  219. return false;
  220. }
  221. iviewer_rept.window.javascript.chkbodystat();
  222. }
  223. GetDetlInfo(); //Iview의 상세내용을 /root/tmp로 불러들인다.
  224. SetRecInfo(); //공통기본정보를 send로 보낸다.
  225. SetDetlInfo(); //tmp의 상세내용을 send로 보낸다.
  226. if(checkgrade=="false" && model.getValue("/root/temp/reptid")!=""){
  227. model.setValue("/root/send/cond/recinfo/reptid", model.getValue("/root/temp/reptid"));
  228. model.setValue("/root/send/cond/recinfo/reptcntctel", model.getValue("/root/temp/reptcntctel"));
  229. model.setValue("/root/send/cond/recinfo/reptdutyearno", model.getValue("/root/temp/reptdutyearno"));
  230. }
  231. if(checkgrade=="false"){
  232. model.makeValue("/root/send/cond/recinfo/anonyyn", "Y");
  233. }else{
  234. model.makeValue("/root/send/cond/recinfo/anonyyn", "N");
  235. }
  236. model.makeValue("/root/send/cond/recinfo/trgtwardcd", model.getValue("/root/main/condition/trgtwardcd")); //병동값 저장
  237. model.makeValue("/root/send/cond/recinfo/status", model.getValue("/root/temp/status")); //저장시 상태값 지정
  238. if(!submit("TXMQR00100")){
  239. messageBox("저장을","E009");
  240. return false;
  241. }
  242. model.setValue("/root/main/condition/acptno", model.getValue("/root/tmp/acptno/acptno"));
  243. setParameter("ano", model.getValue("/root/main/condition/acptno"));
  244. model.refresh();
  245. if(Lrg == "01" && mdl == "03"){
  246. iviewer_rept.window.javascript.dreload();
  247. }
  248. return true;
  249. }
  250. /**
  251. * @---------------------------------------------------
  252. * @desc : 문자열의 Byte 크기가 제한값을 벗어나는지, 필수입력 콘트롤에 값이 입력되어있는지 체크
  253. * @param :
  254. * @return : true or false
  255. * @---------------------------------------------------
  256. */
  257. function fCheck(){
  258. // alert("fCheck");
  259. var lrg = model.getValue("/root/main/condition/lrg");
  260. if(lrg == "03"){
  261. if(grd_amt.rows > 1){
  262. if( grd_amt.findrow("", 1, 2) > -1){
  263. messageBox("감면 날짜를 ", "C001");
  264. return false;
  265. }
  266. if(grd_amt.findrow("", 1, 3) > -1){
  267. messageBox("감면 금액을 ", "C001");
  268. return false;
  269. }
  270. }
  271. }
  272. if( anonybtn == "N" ){
  273. //-------------------------------------------------------- 필수체크 -----------------------------------------------------------
  274. if(model.getValue("/root/main/condition/lrg") == "01"){ //임상
  275. if(!isRequiredControls("cmb_trgtmanflag", "cmb_serdiaggrde", "chk_prgnoacdrslt", "cmb_rsltyn" , "rdo_mdl" , "chk_imprvactcnts")){
  276. return false;
  277. }
  278. }else{ //비임상의 경우 대상자 구분정보 없더라도 수정되도록 변경.
  279. if(!isRequiredControls("cmb_serdiaggrde", "chk_prgnoacdrslt" , "chk_imprvactcnts" , "cmb_rsltyn" , "rdo_mdl")){
  280. return false;
  281. }
  282. }
  283. if(model.getValue("/root/main/condition/trgtmanflag") == "01" || model.getValue("/root/main/condition/trgtmanflag") == "02"){
  284. if ( model.getValue("/root/main/condition/trgtid") ==""){
  285. messageBox("대상자 ID는", "I003");
  286. return false;
  287. }
  288. }
  289. if ( model.getValue("/root/main/condition/genrdd") == "" ||
  290. model.getValue("/root/main/condition/genrthh") == "" ||
  291. model.getValue("/root/main/condition/genrtmi") == "" ){
  292. messageBox("발생일시는", "I003");
  293. return false;
  294. }
  295. if ( model.getValue("/root/main/condition/discvdd" ) == "" ||
  296. model.getValue("/root/main/condition/discvthh") == "" ||
  297. model.getValue("/root/main/condition/discvtmi") == "" ){
  298. messageBox("발견일시는", "I003");
  299. return false;
  300. }
  301. //------------------------------------- iView의 필수, 길이체크 Function 호출 ----------------------------------------------------
  302. if(!iviewer_rept.window.javascript.fDetlCheck()){
  303. return false;
  304. }
  305. var genrthh = model.getValue("/root/main/condition/genrthh");
  306. var genrtmi = model.getValue("/root/main/condition/genrtmi");
  307. var discvthh = model.getValue("/root/main/condition/discvthh");
  308. var discvtmi = model.getValue("/root/main/condition/discvtmi");
  309. var detlcnts=iviewer_rept.model.getValue("/root/main/cond/detlcnts");
  310. if(genrthh.length < 2){
  311. messageBox("발생일시는 2자리 ", "C001");
  312. model.setFocus("ipt_genrthh");
  313. return false;
  314. }
  315. if(genrtmi.length < 2){
  316. messageBox("발생일시는 2자리 ", "C001");
  317. model.setFocus("ipt_genrtmi");
  318. return false;
  319. }
  320. if(discvthh.length < 2){
  321. messageBox("발견일시는 2자리 ", "C001");
  322. model.setFocus("ipt_discvthh");
  323. return false;
  324. }
  325. if(discvtmi.length < 2){
  326. messageBox("발견일시는 2자리 ", "C001");
  327. model.setFocus("ipt_discvtmi");
  328. return false;
  329. }
  330. if(detlcnts==""){
  331. messageBox("상세내용 기술은 필수항목", "I009");
  332. iviewer_rept.model.setFocus("tar_detlcnts");
  333. return false;
  334. }
  335. var doctorcallyn = iviewer_rept.model.getValue("/root/main/cond/doctorcallyn");
  336. var doctorcalldt = iviewer_rept.model.getValue("/root/main/cond/doctorcalldt");
  337. var mediationyn = iviewer_rept.model.getValue("/root/main/cond/mediationyn");
  338. var mediationdt = iviewer_rept.model.getValue("/root/main/cond/mediationdt");
  339. if( doctorcallyn == "Y" ){
  340. if( !isValidDateTime(doctorcalldt,"YYYYMMDDhhmm") ){
  341. messageBox("담당의/당직의 호출시간 입력이 잘못되었습니다.(YYYY-MM-DD HH:MM)", "E");
  342. model.setFocus("ipt_doctorcall");
  343. return false;
  344. }
  345. }
  346. if( mediationyn == "Y" ){
  347. if(!isValidDateTime(mediationdt,"YYYYMMDDhhmm")){
  348. messageBox("중재시간 입력이 잘못되었습니다.(YYYY-MM-DD HH:MM)", "E");
  349. model.setFocus("ipt_mediation");
  350. return false;
  351. }
  352. }
  353. }else{
  354. //20140820 익명보고의 경우 상세기술 내용만 있더라도 저장 될 수 있도록 수정.
  355. if(!isRequiredControls("tar_detlcnts_how", "tar_detlcnts_why", "tar_detlcnts")){
  356. return false;
  357. }
  358. }
  359. return true;
  360. }
  361. /**
  362. * @---------------------------------------------------
  363. * @desc : 종결여부를 설정한다.
  364. * @param :
  365. * @return :
  366. * @---------------------------------------------------
  367. */
  368. function fSetRlstYN(){
  369. // alert("fSetRlstYN");
  370. var rtnval = messageBox("종결여부만 반영됩니다. ", "Q003");
  371. if(rtnval == 6){ //예
  372. SetRecInfo();
  373. if(!submit("TXMQR00101")){
  374. messageBox("종결여부 저장을","E009");//실패하였습니다.
  375. return false;
  376. }
  377. var lrg = model.getValue("/root/main/condition/lrg");
  378. if(lrg == "03"){ //감면사례인경우 처리상태(종결여부)가 04번인경우가 종결이다
  379. if(model.getValue("/root/main/condition/rsltyn") == "04"){ //종결인경우 이전 종결상태를 종결로 만들어준다(재전송을 막기위해)
  380. model.setValue("/root/hidden/rsltyn" , "04"); //종결
  381. }
  382. }else{
  383. if(model.getValue("/root/main/condition/rsltyn") == "03"){ //종결인경우 이전 종결상태를 종결로 만들어준다(재전송을 막기위해)
  384. model.setValue("/root/hidden/rsltyn" , "03"); //종결
  385. }
  386. }
  387. model.refresh();
  388. }else{
  389. return false;
  390. }
  391. return true;
  392. }
  393. /**
  394. * @---------------------------------------------------
  395. * @desc : 대상자구분에 따라 사고 대상자 정보등록 내용이 달라진다.
  396. * @param :
  397. * @return :
  398. * @---------------------------------------------------
  399. */
  400. function setTrgtView(){
  401. // alert("setTrgtView");
  402. var trgtman = model.getValue("/root/main/condition/trgtmanflag");
  403. if(trgtman == "01" || trgtman == "02"){
  404. grp_pat.visible = true;
  405. grp_patInfo.visible = true;
  406. grp_nonpat.visible = false;
  407. grp_nonpatInfo.visible = false;
  408. }
  409. else{
  410. grp_pat.visible = false;
  411. grp_nonpat.visible = true;
  412. grp_patInfo.visible = false;
  413. grp_nonpatInfo.visible = true;
  414. }
  415. if(trgtman == "06"){
  416. ipt_etctrgtmanflag.disabled = false;
  417. }
  418. else{
  419. ipt_etctrgtmanflag.disabled = true;
  420. }
  421. }
  422. /**
  423. * @---------------------------------------------------
  424. * @desc : 성별코드에 따라 성별 텍스틀 설정한다.
  425. * @param :
  426. * @return :
  427. * @---------------------------------------------------
  428. */
  429. function setTrgtSex(trgsex){
  430. // alert("setTrgtSex");
  431. if(trgsex == "M"){
  432. model.setValue("/root/main/condition/trgtsextext", "남자");
  433. }else if(trgsex == "F"){
  434. model.setValue("/root/main/condition/trgtsextext", "여자");
  435. }
  436. }
  437. /**
  438. * @---------------------------------------------------
  439. * @desc : 대분류가 설정되었을때 중분류를 설정하는 fuction
  440. * @param : lrg(대분류)
  441. * @return :
  442. * @---------------------------------------------------
  443. */
  444. function setLrg(lrg){
  445. // alert("setLrg");
  446. iviewer_rept.visible = false;
  447. if(lrg == "03"){
  448. iviewer_rept.attribute("height") = "300px";
  449. // 화면 하단의 버튼 4개 원위치 처리
  450. button1.attribute("top") = "718px";
  451. button2.attribute("top") = "718px";
  452. button3.attribute("top") = "718px";
  453. button9.attribute("top") = "718px";
  454. cap_mdl.visible = false;
  455. rdo_mdl.visible = false;
  456. grp_nonreductcase.visible =false;
  457. grp_reductcase.visible = true;
  458. iviewer_rept.visible = true;
  459. iviewer_rept.src = "SMMQR00900_감면사례보고.xrw" ;
  460. }
  461. else{
  462. cap_mdl.visible =true;
  463. rdo_mdl.visible = true;
  464. grp_nonreductcase.visible =true;
  465. grp_reductcase.visible = false;
  466. if(lrg == "01") {
  467. iviewer_rept.attribute("height") = "440px";
  468. // 예측결과 그룹과 화면 하단의 버튼 4개 원위치 처리
  469. grp_nonreductcase.attribute("top") = "630px";
  470. button1.attribute("top") = "730px";
  471. button2.attribute("top") = "730px";
  472. button3.attribute("top") = "730px";
  473. button9.attribute("top") = "730px";
  474. /*
  475. iviewer_rept.attribute("height") = "405px";
  476. // 예측결과 그룹과 화면 하단의 버튼 4개 원위치 처리
  477. grp_nonreductcase.attribute("top") = "592px";
  478. button1.attribute("top") = "718px";
  479. button2.attribute("top") = "718px";
  480. button3.attribute("top") = "718px";
  481. button9.attribute("top") = "718px";
  482. */
  483. model.removeNodeset("/root/init/mdl/M0428");
  484. zbcfGetCodeList(new Array("M0428"), new Array("/root/init/mdl"), true);
  485. rdo_mdl.choices.itemset.attribute("nodeset") = "/root/init/mdl/M0428";
  486. }
  487. //대분류가 비임상일 경우
  488. if(lrg == "02"){
  489. iviewer_rept.attribute("height") = "460px";
  490. // 예측결과 그룹과 화면 하단의 버튼 4개 70px만큼 아래로 위치 이동
  491. grp_nonreductcase.attribute("top") = "645px";
  492. button1.attribute("top") = "745px";
  493. button2.attribute("top") = "745px";
  494. button3.attribute("top") = "745px";
  495. button9.attribute("top") = "745px";
  496. model.removeNodeset("/root/init/mdl/M0429");
  497. zbcfGetCodeList(new Array("M0429"), new Array("/root/init/mdl"), true);
  498. rdo_mdl.choices.itemset.attribute("nodeset") = "/root/init/mdl/M0429";
  499. iviewer_rept.src = "SMMQR00800_비임상.xrw" ;
  500. }
  501. rdo_mdl.refresh();
  502. }
  503. }
  504. /**
  505. * @---------------------------------------------------
  506. * @desc : 중분류가 설정되었을때 Iview를 설정하는 fuction
  507. * @param : lrg(대분류), mdl(중분류)
  508. * @return :
  509. * @---------------------------------------------------
  510. */
  511. function SetIviewer(lrg, mdl){
  512. //대분류가 선택 안되어있을 경우 되돌려 보낸다
  513. if(lrg == ""){
  514. rdo_mdl.deselect();
  515. return;
  516. }
  517. //대분류가 임상일 경우
  518. else if(lrg == "01"){
  519. switch(mdl){
  520. case "01" : iviewer_rept.src = "SMMQR00200_진료및치료.xrw" ;
  521. break;
  522. case "02" : iviewer_rept.src = "SMMQR00300_투약.xrw" ;
  523. break;
  524. case "03" : iviewer_rept.src = "SMMQR00400_낙상.xrw" ;
  525. break;
  526. case "04" : iviewer_rept.src = "SMMQR00500_수혈.xrw" ;
  527. break;
  528. case "05" : iviewer_rept.src = "SMMQR00600_진단병리영상검사.xrw";
  529. break;
  530. case "06" : iviewer_rept.src = "SMMQR00700_기타.xrw" ;
  531. break;
  532. }
  533. }
  534. //대분류가 비임상일 경우
  535. else if(lrg == "02"){
  536. //iviewer_rept.visible = true;
  537. iviewer_rept.window.javascript.fSetDisabled(mdl);
  538. }
  539. iviewer_rept.visible = true;
  540. }
  541. /**
  542. * @---------------------------------------------------
  543. * @desc : Iview의 상세내용을 /root/tmp로 불러들인다.
  544. * @param :
  545. * @return :
  546. * @---------------------------------------------------
  547. */
  548. function GetDetlInfo(){
  549. // alert("GetDetlInfo");
  550. var Lrg = model.getValue("/root/main/condition/lrg"); //대분류
  551. var Mdl = model.getValue("/root/main/condition/mdl"); //중분류
  552. model.removenode("/root/tmp");
  553. var node = iviewer_rept.model.instance1.selectNodes("/root/main/cond");
  554. model.makeNode("/root/tmp");
  555. while( srcNode = node.nextNode()) {
  556. model.duplicate("/root/tmp", srcNode);
  557. }
  558. }
  559. /**
  560. * @---------------------------------------------------
  561. * @desc : 공통기본정보를 send로 보낸다
  562. * @param :
  563. * @return :
  564. * @---------------------------------------------------
  565. */
  566. function SetRecInfo(){
  567. // alert("SetDetlInfo");
  568. //model.resetInstanceNode("/root/send/cond/recinfo");
  569. model.removeNodeset("/root/send/cond/recinfo");
  570. var Lrg = model.getValue("/root/main/condition/lrg");
  571. if(Lrg == "03"){
  572. if(grd_amt.findrow("", 1, 3) == -1){
  573. grd_amt.subtotal("clear", -1, grd_amt.colRef("reductamt"));
  574. model.makeValue("/root/send/cond/recinfo/reductlist", grd_amt.getUpdateDataAll("s"));
  575. grd_amt.subtotal("sum", -1, grd_amt.colRef("reductamt"),"", "", 2, "총 계");
  576. }
  577. }else{
  578. var ChkImprvAct = model.getValue("/root/main/chkcond/chkimprvact");
  579. if(ChkImprvAct.search("01") > -1) model.makeValue("/root/send/cond/recinfo/bizguideaddyn" , "Y");
  580. if(ChkImprvAct.search("02") > -1) model.makeVaLue("/root/send/cond/recinfo/educyn" , "Y");
  581. if(ChkImprvAct.search("03") > -1) model.makeValue("/root/send/cond/recinfo/bizprcsyn" , "Y");
  582. if(ChkImprvAct.search("04") > -1) model.makeValue("/root/send/cond/recinfo/alertyn" , "Y");
  583. if(ChkImprvAct.search("05") > -1) model.makeValue("/root/send/cond/recinfo/imprvplanyn" , "Y");
  584. if(ChkImprvAct.search("06") > -1) model.makeValue("/root/send/cond/recinfo/imprvactetcyn" , "Y");
  585. }
  586. var ChkPrognoAcdRslt = model.getValue("/root/main/chkcond/chkprgnoacdrslt");
  587. if(ChkPrognoAcdRslt.search("01") > -1) model.makeValue("/root/send/cond/recinfo/patbodylossyn" , "Y");
  588. if(ChkPrognoAcdRslt.search("02") > -1) model.makeValue("/root/send/cond/recinfo/pateconomylossyn" , "Y");
  589. if(ChkPrognoAcdRslt.search("03") > -1) model.makeValue("/root/send/cond/recinfo/hopeconomylossyn" , "Y");
  590. if(ChkPrognoAcdRslt.search("04") > -1) model.makeValue("/root/send/cond/recinfo/bizdelyaddyn" , "Y");
  591. if(ChkPrognoAcdRslt.search("05") > -1) model.makeValue("/root/send/cond/recinfo/healcaretrobyn" , "Y");
  592. if(ChkPrognoAcdRslt.search("06") > -1) model.makeValue("/root/send/cond/recinfo/prgnoacdyn" , "Y");
  593. //copyNodesetType("/root/send/cond/recinfo", "/root/main/condition", "after");
  594. //copyNodeListType("/root/send/cond/recinfo", "/root/main/condition", "after");
  595. copyNodeType("/root/send/cond/recinfo", "/root/main/condition", "after");
  596. }
  597. /**
  598. * @---------------------------------------------------
  599. * @desc : tmp의 상세내용을 send로 보낸다
  600. * @param :
  601. * @return :
  602. * @---------------------------------------------------
  603. */
  604. function SetDetlInfo(){
  605. // alert("SetDetlInfo");
  606. model.removeNodeset("/root/send/cond/detlinfo");
  607. var Lrg = model.getValue("/root/main/condition/lrg"); //대분류
  608. var Mdl = model.getValue("/root/main/condition/mdl"); //중분류
  609. if(Lrg == "01"){ //임상
  610. if(Mdl == "01"){ //진료 및 치료
  611. model.makeValue("/root/send/cond/detlinfo/opdate" , model.getValue("/root/tmp/cond/opdate") ); //수술/시술일
  612. model.makeValue("/root/send/cond/detlinfo/opnm" , model.getValue("/root/tmp/cond/opnm") ); //수술/시술명
  613. model.makeValue("/root/send/cond/detlinfo/pertdr" , model.getValue("/root/tmp/cond/pertdr") ); //집도의
  614. model.makeValue("/root/send/cond/detlinfo/anstdr" , model.getValue("/root/tmp/cond/anstdr") ); //마취의
  615. model.makeValue("/root/send/cond/detlinfo/ordcurekind", model.getValue("/root/tmp/cond/ordcurekind") ); //진료및치료_사고종류
  616. model.makeValue("/root/send/cond/recinfo/detlcnts" , model.getValue("/root/tmp/cond/detlcnts") ); //상세내용 기술
  617. model.makeValue("/root/send/cond/recinfo/detlcnts_how" , model.getValue("/root/tmp/cond/detlcnts_how") ); //상세내용 기술
  618. model.makeValue("/root/send/cond/recinfo/detlcnts_why" , model.getValue("/root/tmp/cond/detlcnts_why") ); //상세내용 기술
  619. model.makeValue("/root/send/cond/recinfo/doctorcallyn" , model.getValue("/root/tmp/cond/doctorcallyn") ); //담당의_당직의 호출여부
  620. model.makeValue("/root/send/cond/recinfo/doctorcalldt" , model.getValue("/root/tmp/cond/doctorcalldt") ); //담당의_당직의 호출시간
  621. model.makeValue("/root/send/cond/recinfo/mediationyn" , model.getValue("/root/tmp/cond/mediationyn") ); //중재여부
  622. model.makeValue("/root/send/cond/recinfo/mediationdt" , model.getValue("/root/tmp/cond/mediationdt") ); //중재시간
  623. var OrdCureKind = model.getValue("/root/tmp/cond/ordcurekind"); //사고의 종류
  624. if(OrdCureKind == ""){
  625. messageBox("사고 종류를 ", "C001");
  626. return false;
  627. }
  628. if(OrdCureKind == "01"){ //수술/시술 관련 사고
  629. model.makeValue("/root/send/cond/detlinfo/opwrsgkind" , model.getValue("/root/tmp/cond/opacd/opwrsgkind") ); //wrong_surgery_종류
  630. model.makeValue("/root/send/cond/detlinfo/tmoutyn" , model.getValue("/root/tmp/cond/opacd/tmoutyn") ); //타임아웃유무
  631. if(model.getValue("/root/tmp/cond/opacd/tmoutyn") == "Y"){
  632. model.makeValue("/root/send/cond/detlinfo/tmoutkind" , model.getValue("/root/tmp/cond/opacd/tmoutkind") ); //타임아웃종류
  633. }
  634. model.makeValue("/root/send/cond/detlinfo/oppartdispyn" , model.getValue("/root/tmp/cond/opacd/oppartdispyn") ); //수술부위표식유무
  635. var ChkOpMngt = model.getValue("/root/tmp/cond/opacd/chkopmngt");
  636. if(ChkOpMngt.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/bfopvaluyn", "Y"); //수술_시술전환자평가부적절여부
  637. if(ChkOpMngt.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/opbfaprvdocudescyn", "Y"); //수술전부적절동의서및불충분설명여부
  638. if(ChkOpMngt.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/blodlossyn", "Y"); //수술_시술관련급격한실혈여부
  639. if(ChkOpMngt.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/toolcntyn", "Y"); //스폰지_거즈_수술기구카운트부적절여부
  640. if(ChkOpMngt.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/opdelyyn", "Y"); //응급수술_시술지연여부
  641. if(ChkOpMngt.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/aftmngtyn", "Y"); //수술_시술후관리부적절df여부
  642. if(ChkOpMngt.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/aftseffcyn", "Y"); //수술_시술후부작용sv여부
  643. if(ChkOpMngt.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/opfuntfaluryn", "Y"); //수술_시술관련급격한기능저하및기능부전여부
  644. if(ChkOpMngt.search("10") > -1) model.makeValue("/root/send/cond/detlinfo/opbfpatvaluyn", "Y");
  645. if(ChkOpMngt.search("11") > -1) model.makeValue("/root/send/cond/detlinfo/opbfdocudescyn", "Y");
  646. if(ChkOpMngt.search("12") > -1) model.makeValue("/root/send/cond/detlinfo/opbfcuredclryn", "Y");
  647. if(ChkOpMngt.search("14") > -1) model.makeValue("/root/send/cond/detlinfo/opaftblodlosyn", "Y");
  648. if(ChkOpMngt.search("15") > -1) model.makeValue("/root/send/cond/detlinfo/opaftprfoayn", "Y");
  649. if(ChkOpMngt.search("16") > -1) model.makeValue("/root/send/cond/detlinfo/opafthyfuntyn", "Y");
  650. if(ChkOpMngt.search("17") > -1) model.makeValue("/root/send/cond/detlinfo/opafdentltrmayn", "Y");
  651. if(ChkOpMngt.search("18") > -1) model.makeValue("/root/send/cond/detlinfo/opafttoolcntyn", "Y");
  652. if(ChkOpMngt.search("19") > -1) model.makeValue("/root/send/cond/detlinfo/eropdelyyn", "Y");
  653. if(ChkOpMngt.search("20") > -1) model.makeValue("/root/send/cond/detlinfo/opaftmngtyn", "Y");
  654. if(ChkOpMngt.search("21") > -1) model.makeValue("/root/send/cond/detlinfo/opaftseffcyn", "Y");
  655. if(ChkOpMngt.search("09") > -1){
  656. model.makeValue("/root/send/cond/detlinfo/opmdlaftetcyn" , "Y");
  657. model.makeValue("/root/send/cond/detlinfo/opmdlaftetccnts" , model.getValue("/root/tmp/cond/opacd/opmdlaftetccnts") );
  658. }
  659. if(ChkOpMngt.search("13") > -1){
  660. model.makeValue("/root/send/cond/detlinfo/opbfdescyn" , "Y");
  661. model.makeValue("/root/send/cond/detlinfo/opbfdesccmt" , model.getValue("/root/tmp/cond/opacd/opbfdesccmt") );
  662. }
  663. if(ChkOpMngt.search("22") > -1){
  664. model.makeValue("/root/send/cond/detlinfo/opaftdescyn", "Y");
  665. model.makeValue("/root/send/cond/detlinfo/opaftdesccmt" , model.getValue("/root/tmp/cond/opacd/opaftdesccmt") );
  666. }
  667. }
  668. if(OrdCureKind == "02"){ //마취관련 사고
  669. var ChkAnstCd = model.getValue("/root/tmp/cond/anstacd/chkanstacd");
  670. if(ChkAnstCd.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/bfpatvaluyn", "Y"); //마취전환자평가부적절여부
  671. if(ChkAnstCd.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/anstbfaprvdocudescyn", "Y"); //마취전부적절동의서및불충분설명여부
  672. if(ChkAnstCd.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/nerveinjyn", "Y"); //마취로인한신경손상및마비여부
  673. if(ChkAnstCd.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/itbtacdyn", "Y"); //intubation관련사고여부
  674. if(ChkAnstCd.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/aftbrethprlsyn", "Y"); //마취후호흡마비여부
  675. if(ChkAnstCd.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/anstfuntfaluryn", "Y"); //마취후급격한기능저하및기능부전여부
  676. if(ChkAnstCd.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/anstbfpatvaluyn", "Y");
  677. if(ChkAnstCd.search("10") > -1) model.makeValue("/root/send/cond/detlinfo/anstbfdocudescyn", "Y");
  678. if(ChkAnstCd.search("12") > -1) model.makeValue("/root/send/cond/detlinfo/anstaftnerveinjyn", "Y");
  679. if(ChkAnstCd.search("13") > -1) model.makeValue("/root/send/cond/detlinfo/anstaftbthprlsyn", "Y");
  680. if(ChkAnstCd.search("14") > -1) model.makeValue("/root/send/cond/detlinfo/anstafthyfuntyn", "Y");
  681. if(ChkAnstCd.search("03") > -1){
  682. model.makeValue("/root/send/cond/detlinfo/anstmedierryn" , "Y"); //마취약제투약오류여부
  683. model.makeValue("/root/send/cond/detlinfo/anstmedidrugcd" , model.getValue("/root/tmp/cond/anstacd/anstmedidrugcd") ); //투약마취약제코드
  684. model.makeValue("/root/send/cond/detlinfo/anstmedidrugnm" , model.getValue("/root/tmp/cond/anstacd/anstmedidrugnm") ); //투약마취약제코드
  685. }
  686. if(ChkAnstCd.search("11") > -1){
  687. model.makeValue("/root/send/cond/detlinfo/anstaftmedierryn", "Y");
  688. model.makeValue("/root/send/cond/detlinfo/anstmedidrugcd" , model.getValue("/root/tmp/cond/anstacd/anstmedidrugcd") );
  689. model.makeValue("/root/send/cond/detlinfo/anstmedidrugnm" , model.getValue("/root/tmp/cond/anstacd/anstmedidrugnm") );
  690. }
  691. if(ChkAnstCd.search("08") > -1){
  692. model.makeValue("/root/send/cond/detlinfo/anstacdetcyn" , "Y");
  693. model.makeValue("/root/send/cond/detlinfo/anstacdetccnts" , model.getValue("/root/tmp/cond/anstacd/anstacdetccnts") );
  694. }
  695. if(ChkAnstCd.search("15") > -1){
  696. model.makeValue("/root/send/cond/detlinfo/anstdescyn" , "Y");
  697. model.makeValue("/root/send/cond/detlinfo/anstdesccmt" , model.getValue("/root/tmp/cond/anstacd/anstdesccmt") );
  698. }
  699. }
  700. if(OrdCureKind == "03"){ //치료/진료 관련 사고
  701. var ChkCureAcd = model.getValue("/root/tmp/cond/mediacd/chkcureacd");
  702. if(ChkCureAcd.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/cureprcsdescyn", "Y"); //부적절불충분한치료과정설명여부
  703. if(ChkCureAcd.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/medirecyn", "Y"); //부적절의무기록여부
  704. if(ChkCureAcd.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/orgninjuryyn", "Y"); //치료과정에발생한신체적손상여부
  705. if(ChkCureAcd.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/oprejtyn", "Y"); //환자_보호자가치료및시술거절여부
  706. if(ChkCureAcd.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/prsryn", "Y"); //욕창여부
  707. if(ChkCureAcd.search("06") > -1){
  708. model.makeValue("/root/send/cond/detlinfo/medierryn", "Y"); //약물투약오류여부
  709. model.makeValue("/root/send/cond/detlinfo/medidrugcd" , model.getValue("/root/tmp/cond/mediacd/medidrugcd") ); //투약약품코드
  710. }
  711. if(ChkCureAcd.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/tnserracdyn", "Y"); //수혈오류로인한사고여부
  712. if(ChkCureAcd.search("08") > -1){
  713. model.makeValue("/root/send/cond/detlinfo/cureacdetcyn" , "Y"); //치료_진료관련사고기타여부
  714. model.makeValue("/root/send/cond/detlinfo/cureacdetccnts" , model.getValue("/root/tmp/cond/mediacd/cureacdetccnts") ); //치료_진료관련사고기타상세
  715. }
  716. }
  717. /*2012/08/16 Start
  718. if(OrdCureKind == "04"){ //진단/영상/병리/핵의학 검사 관련사고
  719. var ChkTestAcd = model.getValue("/root/tmp/cond/testacd/chktestacd");
  720. if(ChkTestAcd.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/rsltreptyn", "Y"); //잘못된진단_영상_병리_핵의학검사결과보고여부
  721. if(ChkTestAcd.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/curedelyyn", "Y"); //결과확인누락으로처치지연여부
  722. if(ChkTestAcd.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/dyeseffcyn", "Y"); //조영제부작용여부
  723. if(ChkTestAcd.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/testorgninjuryyn", "Y"); //진단검사관련신체적손상
  724. if(ChkTestAcd.search("05") > -1){
  725. model.makeValue("/root/send/cond/detlinfo/testacdetcyn" , "Y"); //진단_영상_병리_핵의학검사기타여부
  726. model.makeValue("/root/send/cond/detlinfo/testacdetccnts" , model.getValue("/root/tmp/cond/testacd/testacdetccnts") ); //진단_영상_병리_핵의학검사기타상세
  727. }
  728. }
  729. 2012/08/16 End */
  730. }
  731. if(Mdl == "02"){ //투약
  732. model.makeValue("/root/send/cond/detlinfo/medidrugcd" , model.getValue("/root/tmp/cond/medidrugcd")) ;
  733. model.makeValue("/root/send/cond/detlinfo/medidrugnm" , model.getValue("/root/tmp/cond/medidrugnm")) ;
  734. model.makeValue("/root/send/cond/detlinfo/abnrdrugcd" , model.getValue("/root/tmp/cond/abnrdrugcd")) ;
  735. model.makeValue("/root/send/cond/detlinfo/abnrdrugcdnm" , model.getValue("/root/tmp/cond/abnrdrugcdnm")) ;
  736. model.makeValue("/root/send/cond/detlinfo/medidrugvol" , model.getValue("/root/tmp/cond/medidrugvol")) ;
  737. model.makeValue("/root/send/cond/detlinfo/abnrdrugvol" , model.getValue("/root/tmp/cond/abnrdrugvol")) ;
  738. model.makeValue("/root/send/cond/recinfo/detlcnts" , model.getValue("/root/tmp/cond/detlcnts") ); //상세내용 기술
  739. model.makeValue("/root/send/cond/recinfo/detlcnts_how" , model.getValue("/root/tmp/cond/detlcnts_how") ); //상세내용 기술
  740. model.makeValue("/root/send/cond/recinfo/detlcnts_why" , model.getValue("/root/tmp/cond/detlcnts_why") ); //상세내용 기술
  741. model.makeValue("/root/send/cond/recinfo/doctorcallyn" , model.getValue("/root/tmp/cond/doctorcallyn") ); //담당의_당직의 호출여부
  742. model.makeValue("/root/send/cond/recinfo/doctorcalldt" , model.getValue("/root/tmp/cond/doctorcalldt") ); //담당의_당직의 호출시간
  743. model.makeValue("/root/send/cond/recinfo/mediationyn" , model.getValue("/root/tmp/cond/mediationyn") ); //중재여부
  744. model.makeValue("/root/send/cond/recinfo/mediationdt" , model.getValue("/root/tmp/cond/mediationdt") ); //중재시간
  745. var chkprcperr = model.getValue("/root/tmp/cond/chkprcperr");
  746. if(chkprcperr != ""){
  747. model.makeValue("/root/send/cond/detlinfo/prcperryn" , "Y");
  748. if(chkprcperr.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/difpatprcpyn" , "Y");
  749. if(chkprcperr.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/incgdrugprcpyn" , "Y");
  750. if(chkprcperr.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/duplprcpyn" , "Y");
  751. if(chkprcperr.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/tbooprcpyn" , "Y");
  752. if(chkprcperr.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/difdtprcpyn" , "Y");
  753. if(chkprcperr.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/failcmntunstdyn" , "Y");
  754. if(chkprcperr.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/diffpatprcpyn" , "Y");
  755. if(chkprcperr.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/diffdrugyn" , "Y");
  756. if(chkprcperr.search("10") > -1) model.makeValue("/root/send/cond/detlinfo/diffpathyn" , "Y");
  757. if(chkprcperr.search("11") > -1) model.makeValue("/root/send/cond/detlinfo/difftimeyn" , "Y");
  758. if(chkprcperr.search("12") > -1) model.makeValue("/root/send/cond/detlinfo/diffvolyn" , "Y");
  759. if(chkprcperr.search("13") > -1) model.makeValue("/root/send/cond/detlinfo/diffmedicntyn" , "Y");
  760. if(chkprcperr.search("14") > -1) model.makeValue("/root/send/cond/detlinfo/diffintvlyn" , "Y");
  761. if(chkprcperr.search("15") > -1) model.makeValue("/root/send/cond/detlinfo/prcpomityn" , "Y");
  762. if(chkprcperr.search("16") > -1) model.makeValue("/root/send/cond/detlinfo/dupprcpyn" , "Y");
  763. if(chkprcperr.search("17") > -1) model.makeValue("/root/send/cond/detlinfo/tbooftprcpyn" , "Y");
  764. if(chkprcperr.search("18") > -1) model.makeValue("/root/send/cond/detlinfo/diffdtprcpyn" , "Y");
  765. if(chkprcperr.search("19") > -1) model.makeValue("/root/send/cond/detlinfo/verbrelunstdyn" , "Y");
  766. if(chkprcperr.search("07") > -1){
  767. model.makeValue("/root/send/cond/detlinfo/prcperretcyn", "Y");
  768. model.makeValue("/root/send/cond/detlinfo/prcperretccnts" , model.getValue("/root/tmp/cond/prcperretccnts"));
  769. }
  770. if(chkprcperr.search("20") > -1){
  771. model.makeValue("/root/send/cond/detlinfo/medierrdescyn", "Y");
  772. model.makeValue("/root/send/cond/detlinfo/medierrdesccmt", model.getValue("/root/tmp/cond/medierrdesccmt"));
  773. }
  774. }
  775. var chkprcpdrugerr = model.getValue("/root/tmp/cond/chkprcpdrugerr");
  776. if(chkprcpdrugerr != ""){
  777. model.makeValue("/root/send/cond/detlinfo/prcpdrugerryn" , "Y");
  778. if(chkprcpdrugerr.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/difpatprcpdrugyn" , "Y");
  779. if(chkprcpdrugerr.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/difdrugprcpyn" , "Y");
  780. if(chkprcpdrugerr.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/difvolprcpdrugyn" , "Y");
  781. if(chkprcpdrugerr.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/lblcnfmyn" , "Y");
  782. if(chkprcpdrugerr.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/drugdelivedelyyn" , "Y");
  783. if(chkprcpdrugerr.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/difplcedeliveyn" , "Y");
  784. if(chkprcpdrugerr.search("07") > -1){
  785. model.makeValue("/root/send/cond/detlinfo/prcpdrugerretcyn" , "Y");
  786. model.makeValue("/root/send/cond/detlinfo/prcpdrugerretccnts" , model.getValue("/root/tmp/cond/prcpdrugerretccnts") );
  787. }
  788. }
  789. var chkprcpprcs = model.getValue("/root/tmp/cond/chkprcpprcs") ;
  790. if(chkprcpprcs != ""){
  791. model.makeValue("/root/send/cond/detlinfo/prcpprcsyn" , "Y");
  792. if(chkprcpprcs.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/difpatprcpprcsyn" , "Y");
  793. if(chkprcpprcs.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/difdrugprcpprcsyn" , "Y");
  794. if(chkprcpprcs.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/difpathprcpprcsyn" , "Y");
  795. if(chkprcpprcs.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/diftmprcpprcsyn" , "Y");
  796. if(chkprcpprcs.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/difvolprcpprcsyn" , "Y");
  797. if(chkprcpprcs.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/difmeditimsprcpprcsyn" , "Y");
  798. if(chkprcpprcs.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/difintvlprcpprcsyn" , "Y");
  799. if(chkprcpprcs.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/omitprcpprcsyn" , "Y");
  800. if(chkprcpprcs.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/failcmntunstdprcpprcsyn" , "Y");
  801. if(chkprcpprcs.search("10") > -1){
  802. model.makeValue("/root/send/cond/detlinfo/prcpprcsetcyn" , "Y");
  803. model.makeValue("/root/send/cond/detlinfo/prcpprcsetccnts" , model.getValue("/root/tmp/cond/prcpprcsetccnts") );
  804. }
  805. }
  806. var chkmedierr = model.getValue("/root/tmp/cond/chkmedierr");
  807. if(chkmedierr != ""){
  808. model.makeValue("/root/send/cond/detlinfo/medierryn" , "Y");
  809. if(chkmedierr.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/difpatmedierryn" , "Y");
  810. if(chkmedierr.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/difdrugmedierryn" , "Y");
  811. if(chkmedierr.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/difpathmedierryn" , "Y");
  812. if(chkmedierr.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/diftmmedierryn" , "Y");
  813. if(chkmedierr.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/difvolmedierryn" , "Y");
  814. if(chkmedierr.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/diftimsmedierryn" , "Y");
  815. if(chkmedierr.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/difintvlmedierryn" , "Y");
  816. if(chkmedierr.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/omitmedierryn" , "Y");
  817. if(chkmedierr.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/discontinudirecaftmedierryn" , "Y");
  818. if(chkmedierr.search("10") > -1) model.makeValue("/root/send/cond/detlinfo/faildilumedierryn" , "Y");
  819. if(chkmedierr.search("11") > -1) model.makeValue("/root/send/cond/detlinfo/ownmedierryn" , "Y");
  820. if(chkmedierr.search("12") > -1) model.makeValue("/root/send/cond/detlinfo/injescmedierryn" , "Y");
  821. if(chkmedierr.search("13") > -1) model.makeValue("/root/send/cond/detlinfo/incgpathmedierryn" , "Y");
  822. if(chkmedierr.search("14") > -1) {
  823. model.makeValue("/root/send/cond/detlinfo/medierretcyn" , "Y");
  824. model.makeValue("/root/send/cond/detlinfo/medierretccnts" , model.getValue("/root/tmp/cond/medierretccnts") );
  825. }
  826. }
  827. var chkmediseffc = model.getValue("/root/tmp/cond/chkmediseffc");
  828. if(chkmediseffc != ""){
  829. model.makeValue("/root/send/cond/detlinfo/medierrseffcyn" , "Y");
  830. if(chkmediseffc.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/exermalfcmedierryn" , "Y");
  831. if(chkmediseffc.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/bledyn" , "Y");
  832. if(chkmediseffc.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/brdcadyn" , "Y");
  833. if(chkmediseffc.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/taccadyn" , "Y");
  834. if(chkmediseffc.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/conpayn" , "Y");
  835. if(chkmediseffc.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/diahyn" , "Y");
  836. if(chkmediseffc.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/dzzyn" , "Y");
  837. if(chkmediseffc.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/myathyn" , "Y");
  838. if(chkmediseffc.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/hallucyn" , "Y");
  839. if(chkmediseffc.search("10") > -1) model.makeValue("/root/send/cond/detlinfo/highbsugaryn" , "Y");
  840. if(chkmediseffc.search("11") > -1) model.makeValue("/root/send/cond/detlinfo/lowbsugaryn" , "Y");
  841. if(chkmediseffc.search("12") > -1) model.makeValue("/root/send/cond/detlinfo/lowbpyn" , "Y");
  842. if(chkmediseffc.search("13") > -1) model.makeValue("/root/send/cond/detlinfo/cscschngyn" , "Y");
  843. if(chkmediseffc.search("14") > -1) model.makeValue("/root/send/cond/detlinfo/nephroyn" , "Y");
  844. if(chkmediseffc.search("15") > -1) model.makeValue("/root/send/cond/detlinfo/nauseyn" , "Y");
  845. if(chkmediseffc.search("16") > -1) model.makeValue("/root/send/cond/detlinfo/vomityn" , "Y");
  846. if(chkmediseffc.search("17") > -1) model.makeValue("/root/send/cond/detlinfo/neutrpeyn" , "Y");
  847. if(chkmediseffc.search("18") > -1) model.makeValue("/root/send/cond/detlinfo/panctoyn" , "Y");
  848. if(chkmediseffc.search("19") > -1) model.makeValue("/root/send/cond/detlinfo/thrombyn" , "Y");
  849. if(chkmediseffc.search("20") > -1) model.makeValue("/root/send/cond/detlinfo/purpyn" , "Y");
  850. if(chkmediseffc.search("21") > -1) model.makeValue("/root/send/cond/detlinfo/eruptyn" , "Y");
  851. if(chkmediseffc.search("22") > -1) model.makeValue("/root/send/cond/detlinfo/dyspnyn" , "Y");
  852. if(chkmediseffc.search("23") > -1) model.makeValue("/root/send/cond/detlinfo/sedatyn" , "Y");
  853. if(chkmediseffc.search("24") > -1) model.makeValue("/root/send/cond/detlinfo/sezryn" , "Y");
  854. if(chkmediseffc.search("25") > -1) model.makeValue("/root/send/cond/detlinfo/nystagyn" , "Y");
  855. if(chkmediseffc.search("26") > -1) model.makeValue("/root/send/cond/detlinfo/urinereteyn" , "Y");
  856. if(chkmediseffc.search("27") > -1) model.makeValue("/root/send/cond/detlinfo/mucsinfla" , "Y");
  857. if(chkmediseffc.search("28") > -1){
  858. model.makeValue("/root/send/cond/detlinfo/medierrseffcetcyn" , "Y");
  859. model.makeValue("/root/send/cond/detlinfo/medierrseffcetccnts" , model.getValue("/root/tmp/cond/medierrseffcetccnts") );
  860. }
  861. }
  862. var chkarbitrationcnts = model.getValue("/root/tmp/cond/chkarbitrationcnts");
  863. if(chkarbitrationcnts != ""){
  864. model.makeValue("/root/send/cond/detlinfo/arbitrationcntsyn" , "Y");
  865. if(chkarbitrationcnts.search("01") > -1){
  866. model.makeValue("/root/send/cond/detlinfo/arbitrationmediyn" , "Y");
  867. model.makeValue("/root/send/cond/detlinfo/arbitrationdrugcd" , model.getValue("/root/tmp/cond/arbitrationdrugcd"));
  868. model.makeValue("/root/send/cond/detlinfo/arbitrationdrugnm" , model.getValue("/root/tmp/cond/arbitrationdrugnm"));
  869. }
  870. if(chkarbitrationcnts.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/volupdtyn" , "Y");
  871. if(chkarbitrationcnts.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/medidiscontinu" , "Y");
  872. if(chkarbitrationcnts.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/drugtimsupdtyn" , "Y");
  873. if(chkarbitrationcnts.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/icuchngroomyn" , "Y");
  874. if(chkarbitrationcnts.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/obsyn" , "Y");
  875. if(chkarbitrationcnts.search("06") > -1){
  876. model.makeValue("/root/send/cond/detlinfo/arbitrationetcyn" , "Y"); //기타가 없음
  877. model.makeValue("/root/send/cond/detlinfo/arbitrationetccnts" , model.getValue("/root/tmp/cond/arbitrationetccnts"));
  878. }
  879. }
  880. }
  881. if(Mdl == "03"){ //낙상
  882. model.makeValue("/root/send/cond/detlinfo/fallplcecd" , model.getValue("/root/tmp/cond/fallplcecd" ) ) ; //낙상장소코드
  883. model.makeValue("/root/send/cond/detlinfo/fallplcecnts" , model.getValue("/root/tmp/cond/fallplcecnts" ) ) ; //낙상장소기타 상세
  884. model.makeValue("/root/send/cond/detlinfo/falldngrasesyn" , model.getValue("/root/tmp/cond/falldngrasesyn") ) ; //낙상위험사정 여부
  885. model.makeValue("/root/send/cond/recinfo/detlcnts" , model.getValue("/root/tmp/cond/detlcnts") ); //상세내용 기술
  886. model.makeValue("/root/send/cond/recinfo/detlcnts_how" , model.getValue("/root/tmp/cond/detlcnts_how") ); //상세내용 기술
  887. model.makeValue("/root/send/cond/recinfo/detlcnts_why" , model.getValue("/root/tmp/cond/detlcnts_why") ); //상세내용 기술
  888. model.makeValue("/root/send/cond/recinfo/doctorcallyn" , model.getValue("/root/tmp/cond/doctorcallyn") ); //담당의_당직의 호출여부
  889. model.makeValue("/root/send/cond/recinfo/doctorcalldt" , model.getValue("/root/tmp/cond/doctorcalldt") ); //담당의_당직의 호출시간
  890. model.makeValue("/root/send/cond/recinfo/mediationyn" , model.getValue("/root/tmp/cond/mediationyn") ); //중재여부
  891. model.makeValue("/root/send/cond/recinfo/mediationdt" , model.getValue("/root/tmp/cond/mediationdt") ); //중재시간
  892. model.makeValue("/root/send/cond/detlinfo/drugdump" , model.getValue("/root/tmp/cond/drugdump") ); // 낙상시 투여약품 목록
  893. model.makeNode("/root/send/cond/detlinfo/druglist");
  894. copyNodeType("/root/send/cond/detlinfo/druglist","/root/tmp/cond/druglist");
  895. var fallbfpnt = model.getValue("/root/tmp/cond/fallbfpnt" )
  896. if(fallbfpnt != ""){
  897. model.makeValue("/root/send/cond/detlinfo/fallbfpnt" , fallbfpnt ) ; //낙상전점수
  898. }
  899. var fallaftpnt = model.getValue("/root/tmp/cond/fallaftpnt" )
  900. if(fallaftpnt != ""){
  901. model.makeValue("/root/send/cond/detlinfo/fallaftpnt" , fallaftpnt ) ; //낙상후점수
  902. }
  903. model.makeValue("/root/send/cond/detlinfo/pvneducyn" , model.getValue("/root/tmp/cond/pvneducyn" ) ) ; //예방교육 여부
  904. model.makeValue("/root/send/cond/detlinfo/bodydamcd" , model.getValue("/root/tmp/cond/bodydamcd" ) ) ; // 낙상으로인한신체적손상
  905. model.makeValue("/root/send/cond/detlinfo/bodypart" , model.getValue("/root/tmp/cond/bodypart" ) ) ; // 손상된 신체부위
  906. var cscsstatyn = model.getValue("/root/tmp/cond/cscsstatyn");
  907. if(cscsstatyn != ""){
  908. model.makeValue("/root/send/cond/detlinfo/cscsstatyn" , "Y"); // 의식상태 여부
  909. if(cscsstatyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/clryn" , "Y"); // 명료 여부
  910. if(cscsstatyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/slepyn" , "Y"); // 졸음 여부
  911. if(cscsstatyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/chaosyn" , "Y"); // 혼돈 여부
  912. if(cscsstatyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/bfcomayn" , "Y"); // 반혼수 여부
  913. if(cscsstatyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/comayn" , "Y"); // 혼수 여부
  914. if(cscsstatyn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/cscschildyn " , "Y"); // 7세미만소아 여부
  915. }
  916. var actfuntyn = model.getValue("/root/tmp/cond/actfuntyn");
  917. if(actfuntyn != ""){
  918. model.makeValue("/root/send/cond/detlinfo/actfuntyn" , "Y"); // 활동/기능 여부
  919. if(actfuntyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/indcasefuntyn" , "Y"); // 독립활동 여부
  920. if(actfuntyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/helpneedyn" , "Y"); // 도움필요 여부
  921. if(actfuntyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/actimpsiyn" , "Y"); // 활동불가능 여부
  922. }
  923. var envcasyn = model.getValue("/root/tmp/cond/envcasyn");
  924. if(envcasyn != ""){
  925. model.makeValue("/root/send/cond/detlinfo/envcasyn" , "Y"); // 환경적요인 여부
  926. if(envcasyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/eqmtfallyn" , "Y"); // side rail이 내려져 있어서 여부
  927. if(envcasyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/bedeqmtflxfaluryn" , "Y"); // 침대바퀴미고정 여부
  928. if(envcasyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/wateryn" , "Y"); // 바닥의물기 여부
  929. if(envcasyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/lightbadyn" , "Y"); // 조명불량 여부
  930. if(envcasyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/falurfootwryn" , "Y"); // 부적절한신발 여부
  931. if(envcasyn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/supptoolyn" , "Y"); // 보조기구사용중 여부
  932. if(envcasyn.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/healcaretoolyn" , "Y"); // 의료기구및관련 여부
  933. if(envcasyn.search("08") > -1) {
  934. model.makeValue("/root/send/cond/detlinfo/envcasetcyn" , "Y"); // 환경적요인기타 여부
  935. model.makeValue("/root/send/cond/detlinfo/envcasetccntsyn" , model.getValue("/root/tmp/cond/envcasetccntsyn" ) ) ; // 환경적요인기타 상세}
  936. }
  937. }
  938. var bodystatyn = model.getValue("/root/tmp/cond/bodystatyn");
  939. if(bodystatyn != ""){
  940. model.makeValue("/root/send/cond/detlinfo/bodystatyn" , "Y"); // 신체상태 여부
  941. if(bodystatyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/dzzyn" , "Y"); // 어지러움 여부
  942. if(bodystatyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/paralyn" , "Y"); // 마비 여부
  943. if(bodystatyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/weakyn" , "Y"); // 전신쇠약 여부
  944. if(bodystatyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/msclabltyfallyn" , "Y"); // 근력저하 여부
  945. if(bodystatyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/workdifyn" , "Y"); // 보행장애 여부
  946. if(bodystatyn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/posturelowbpyn" , "Y"); // 체위성저혈압 여부
  947. if(bodystatyn.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/equbrmhandcapyn" , "Y"); // 평형장애 여부
  948. if(bodystatyn.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/emothandcapyn" , "Y"); // 정서장애 여부
  949. if(bodystatyn.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/visacthandcapyn" , "Y"); // 시력장애 여부
  950. if(bodystatyn.search("10") > -1) model.makeValue("/root/send/cond/detlinfo/slephandcapyn" , "Y"); // 수면장애 여부
  951. if(bodystatyn.search("11") > -1) model.makeValue("/root/send/cond/detlinfo/awarhandcapyn" , "Y"); // 인지장애 여부
  952. if(bodystatyn.search("12") > -1) model.makeValue("/root/send/cond/detlinfo/orgnchildyn" , "Y"); // 신체상태7세미만소아 여부
  953. if(bodystatyn.search("13") > -1){
  954. model.makeValue("/root/send/cond/detlinfo/tmedyn" , "Y"); // 약물복용 여부
  955. model.makeValue("/root/send/cond/detlinfo/medidrugcd" , model.getValue("/root/tmp/cond/medidrugcd" ) ) ; // 복용약물코드
  956. }
  957. if(bodystatyn.search("14") > -1) model.makeValue("/root/send/cond/detlinfo/orgnfactrelyn" , "Y"); // 신체사항해당사항없음 여부
  958. if(bodystatyn.search("15") > -1) {
  959. model.makeValue("/root/send/cond/detlinfo/bodystatetcyn" , "Y"); // 신체상태 기타여부
  960. model.makeValue("/root/send/cond/detlinfo/bodystatetccnts" , model.getValue("/root/tmp/cond/bodystatetccnts" ) ) ; // 신체상태 기타상세
  961. }
  962. }
  963. var arbitrationcntsyn = model.getValue("/root/tmp/cond/arbitrationcntsyn");
  964. if(arbitrationcntsyn != ""){
  965. model.makeValue("/root/send/cond/detlinfo/arbitrationcntsyn" , "Y"); //즉각적중재내용 여부
  966. if(arbitrationcntsyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/obsyn" , "Y"); //관찰 여부
  967. if(arbitrationcntsyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/drssyn" , "Y"); //드레싱 여부
  968. if(arbitrationcntsyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/sutryn" , "Y"); //봉합 여부
  969. if(arbitrationcntsyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/drugcureyn" , "Y"); //약물치료 여부
  970. if(arbitrationcntsyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/physiccureyn" , "Y"); //물리치료 여부
  971. if(arbitrationcntsyn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/opyn" , "Y"); //수술 여부
  972. if(arbitrationcntsyn.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/cureyn " , "Y"); //치료하지않음 여부
  973. if(arbitrationcntsyn.search("07") > -1){
  974. model.makeValue("/root/send/cond/detlinfo/arbitrationcntsetcyn" , "Y"); //즉각적중재내용기타 여부
  975. model.makeValue("/root/send/cond/detlinfo/arbitrationetccnts" , model.getValue("/root/tmp/cond/arbitrationetccnts" ) ) ; // 즉각적증재내용기타 상세
  976. }
  977. }
  978. }
  979. if(Mdl == "04"){ //수혈
  980. model.makeValue("/root/send/cond/detlinfo/patrh" , model.getValue("/root/tmp/cond/patrh" ) ) ;
  981. model.makeValue("/root/send/cond/detlinfo/patbtype" , model.getValue("/root/tmp/cond/patbtype" ) ) ;
  982. model.makeValue("/root/send/cond/detlinfo/tnsrh" , model.getValue("/root/tmp/cond/tnsrh" ) ) ;
  983. model.makeValue("/root/send/cond/detlinfo/tnsbtype" , model.getValue("/root/tmp/cond/tnsbtype" ) ) ;
  984. model.makeValue("/root/send/cond/recinfo/detlcnts" , model.getValue("/root/tmp/cond/detlcnts" ) ); //상세내용 기술
  985. model.makeValue("/root/send/cond/recinfo/detlcnts_how" , model.getValue("/root/tmp/cond/detlcnts_how") ); //상세내용 기술
  986. model.makeValue("/root/send/cond/recinfo/detlcnts_why" , model.getValue("/root/tmp/cond/detlcnts_why") ); //상세내용 기술
  987. model.makeValue("/root/send/cond/recinfo/doctorcallyn" , model.getValue("/root/tmp/cond/doctorcallyn") ); //담당의_당직의 호출여부
  988. model.makeValue("/root/send/cond/recinfo/doctorcalldt" , model.getValue("/root/tmp/cond/doctorcalldt") ); //담당의_당직의 호출시간
  989. model.makeValue("/root/send/cond/recinfo/mediationyn" , model.getValue("/root/tmp/cond/mediationyn") ); //중재여부
  990. model.makeValue("/root/send/cond/recinfo/mediationdt" , model.getValue("/root/tmp/cond/mediationdt") ); //중재시간
  991. var prcperryn = model.getValue("/root/tmp/cond/prcperryn");
  992. if(prcperryn != ""){
  993. model.makeValue("/root/send/cond/detlinfo/prcperryn" , "Y");
  994. if(prcperryn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/difpatprcpyn" , "Y");
  995. if(prcperryn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/incgblodprcpyn" , "Y");
  996. if(prcperryn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/difddprcpyn" , "Y");
  997. if(prcperryn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/failcmntunstdyn" , "Y");
  998. if(prcperryn.search("05") > -1){
  999. model.makeValue("/root/send/cond/detlinfo/prcperretcyn" , "Y");
  1000. model.makeValue("/root/send/cond/detlinfo/prcperretccnts" , model.getValue("/root/tmp/cond/prcperretccnts" ) ) ;
  1001. }
  1002. }
  1003. var brodbankerryn = model.getValue("/root/tmp/cond/brodbankerryn");
  1004. if(brodbankerryn != ""){
  1005. model.makeValue("/root/send/cond/detlinfo/brodbankerryn" , "Y");
  1006. if(brodbankerryn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/difbrodproddeliveyn" , "Y");
  1007. if(brodbankerryn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/difbtypedeliveyn" , "Y");
  1008. if(brodbankerryn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/keeperryn" , "Y");
  1009. if(brodbankerryn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/prepdelyyn" , "Y");
  1010. if(brodbankerryn.search("05") > -1){
  1011. model.makeValue("/root/send/cond/detlinfo/brodbankerretcyn" , "Y");
  1012. model.makeValue("/root/send/cond/detlinfo/brodbankerretccnts" , model.getValue("/root/tmp/cond/brodbankerretccnts" ) ) ;
  1013. }
  1014. }
  1015. var prcpprcsyn = model.getValue("/root/tmp/cond/prcpprcsyn");
  1016. if(prcpprcsyn != ""){
  1017. model.makeValue("/root/send/cond/detlinfo/prcpprcsyn" , "Y");
  1018. if(prcpprcsyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/prcpdifpatyn" , "Y");
  1019. if(prcpprcsyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/prcpdifbrodprodyn" , "Y");
  1020. if(prcpprcsyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/prcpdifbtypeyn" , "Y");
  1021. if(prcpprcsyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/prcpdiftmyn" , "Y");
  1022. if(prcpprcsyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/prcpdifvolyn" , "Y");
  1023. if(prcpprcsyn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/prcpmismatcherryn" , "Y");
  1024. if(prcpprcsyn.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/prcpfailcmntunstdyn" , "Y");
  1025. if(prcpprcsyn.search("08") > -1){
  1026. model.makeValue("/root/send/cond/detlinfo/prcpprcsetcyn" , "Y");
  1027. model.makeValue("/root/send/cond/detlinfo/prcpprcsetccnts" , model.getValue("/root/tmp/cond/prcpprcsetccnts" ) ) ;
  1028. }
  1029. }
  1030. var tnsprcserryn = model.getValue("/root/tmp/cond/tnsprcserryn");
  1031. if(tnsprcserryn != ""){
  1032. model.makeValue("/root/send/cond/detlinfo/tnsprcserryn" , "Y");
  1033. if(tnsprcserryn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsdifpatyn" , "Y");
  1034. if(tnsprcserryn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsdifbrodprodyn" , "Y");
  1035. if(tnsprcserryn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsdifbtypeyn" , "Y");
  1036. if(tnsprcserryn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsdiftmyn" , "Y");
  1037. if(tnsprcserryn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsdifvolyn" , "Y");
  1038. if(tnsprcserryn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsomityn" , "Y");
  1039. if(tnsprcserryn.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsinfserryn" , "Y");
  1040. if(tnsprcserryn.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsseterryn" , "Y");
  1041. if(tnsprcserryn.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsspderryn" , "Y");
  1042. if(tnsprcserryn.search("10") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsoutflyn" , "Y");
  1043. if(tnsprcserryn.search("11") > -1) model.makeValue("/root/send/cond/detlinfo/tnsprcsobsomityn" , "Y");
  1044. if(tnsprcserryn.search("12") > -1){
  1045. model.makeValue("/root/send/cond/detlinfo/tnsprcsetcyn" , "Y");
  1046. model.makeValue("/root/send/cond/detlinfo/tnsprcsetccnts" , model.getValue("/root/tmp/cond/tnsprcsetccnts" ) ) ;
  1047. }
  1048. }
  1049. var tnsseffcyn = model.getValue("/root/tmp/cond/tnsseffcyn");
  1050. if(tnsseffcyn != ""){
  1051. model.makeValue("/root/send/cond/detlinfo/tnsseffcyn" , "Y");
  1052. if(tnsseffcyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/perspryn" , "Y");
  1053. if(tnsseffcyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/rigoryn" , "Y");
  1054. if(tnsseffcyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/chstpainyn" , "Y");
  1055. if(tnsseffcyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/abdmnpainyn" , "Y");
  1056. if(tnsseffcyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/shockyn" , "Y");
  1057. if(tnsseffcyn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/blodcoaguhandcapyn" , "Y");
  1058. if(tnsseffcyn.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/dyspnyn" , "Y");
  1059. if(tnsseffcyn.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/hematyn" , "Y");
  1060. if(tnsseffcyn.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/pyrexyn" , "Y");
  1061. if(tnsseffcyn.search("10") > -1) model.makeValue("/root/send/cond/detlinfo/lowbpyn" , "Y");
  1062. if(tnsseffcyn.search("11") > -1) model.makeValue("/root/send/cond/detlinfo/highbpyn" , "Y");
  1063. if(tnsseffcyn.search("12") > -1) model.makeValue("/root/send/cond/detlinfo/urticayn" , "Y");
  1064. if(tnsseffcyn.search("13") > -1) model.makeValue("/root/send/cond/detlinfo/eruptyn" , "Y");
  1065. if(tnsseffcyn.search("14") > -1) model.makeValue("/root/send/cond/detlinfo/anpshockyn" , "Y");
  1066. if(tnsseffcyn.search("15") > -1) model.makeValue("/root/send/cond/detlinfo/lungedemayn" , "Y");
  1067. if(tnsseffcyn.search("16") > -1){
  1068. model.makeValue("/root/send/cond/detlinfo/tnsseffcetcyn" , "Y");
  1069. model.makeValue("/root/send/cond/detlinfo/tnsseffcetccnts" , model.getValue("/root/tmp/cond/tnsseffcetccnts" ) ) ;
  1070. }
  1071. }
  1072. var arbitrationcntsyn = model.getValue("/root/tmp/cond/arbitrationcntsyn");
  1073. if(arbitrationcntsyn != ""){
  1074. model.makeValue("/root/send/cond/detlinfo/arbitrationcntsyn" , "Y");
  1075. if(arbitrationcntsyn.search("01") > -1){
  1076. model.makeValue("/root/send/cond/detlinfo/arbitrationdrugcd" , model.getValue("/root/tmp/cond/arbitrationdrugcd" ) ) ;
  1077. model.makeValue("/root/send/cond/detlinfo/arbitrationdrugnm" , model.getValue("/root/tmp/cond/arbitrationdrugnm" ) ) ;
  1078. model.makeValue("/root/send/cond/detlinfo/arbitrationmediyn" , "Y");
  1079. }
  1080. if(arbitrationcntsyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/tnsdiscontinuyn" , "Y");
  1081. if(arbitrationcntsyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/icuchngroomyn" , "Y");
  1082. if(arbitrationcntsyn.search("04") > -1){
  1083. model.makeValue("/root/send/cond/detlinfo/arbitrationetcyn" , "Y");
  1084. model.makeValue("/root/send/cond/detlinfo/arbitrationetccntsyn" , model.getValue("/root/tmp/cond/arbitrationetccntsyn" ) ) ;
  1085. }
  1086. }
  1087. }
  1088. if(Mdl == "05"){ //진단병리영상검사{
  1089. model.makeValue("/root/send/cond/detlinfo/testreadnm" , model.getValue("/root/tmp/cond/testreadnm" ) ) ;
  1090. model.makeValue("/root/send/cond/recinfo/detlcnts" , model.getValue("/root/tmp/cond/detlcnts" ) ); //상세내용 기술
  1091. model.makeValue("/root/send/cond/recinfo/detlcnts_how" , model.getValue("/root/tmp/cond/detlcnts_how") ); //상세내용 기술
  1092. model.makeValue("/root/send/cond/recinfo/detlcnts_why" , model.getValue("/root/tmp/cond/detlcnts_why") ); //상세내용 기술
  1093. model.makeValue("/root/send/cond/recinfo/doctorcallyn" , model.getValue("/root/tmp/cond/doctorcallyn") ); //담당의_당직의 호출여부
  1094. model.makeValue("/root/send/cond/recinfo/doctorcalldt" , model.getValue("/root/tmp/cond/doctorcalldt") ); //담당의_당직의 호출시간
  1095. model.makeValue("/root/send/cond/recinfo/mediationyn" , model.getValue("/root/tmp/cond/mediationyn") ); //중재여부
  1096. model.makeValue("/root/send/cond/recinfo/mediationdt" , model.getValue("/root/tmp/cond/mediationdt") ); //중재시간
  1097. var prcperryn = model.getValue("/root/tmp/cond/prcperryn");
  1098. if(prcperryn != ""){
  1099. model.makeValue("/root/send/cond/detlinfo/prcperryn" , "Y");
  1100. if(prcperryn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/difpatprcpyn" , "Y");
  1101. if(prcperryn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/difpartprcpyn" , "Y");
  1102. if(prcperryn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/diftestprcpyn" , "Y");
  1103. if(prcperryn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/duplprcpyn" , "Y");
  1104. if(prcperryn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/difddprcpyn" , "Y");
  1105. if(prcperryn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/failcmntunstdyn" , "Y");
  1106. if(prcperryn.search("07") > -1){
  1107. model.makeValue("/root/send/cond/detlinfo/prcperretcyn" , "Y");
  1108. model.makeValue("/root/send/cond/detlinfo/prcperretccnts" , model.getValue("/root/tmp/cond/prcperretccnts" ) ) ;
  1109. }
  1110. }
  1111. var prcpprcsyn = model.getValue("/root/tmp/cond/prcpprcsyn");
  1112. if(prcpprcsyn != ""){
  1113. model.makeValue("/root/send/cond/detlinfo/prcpprcsyn" , "Y");
  1114. if(prcpprcsyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/prcpdifpatyn" , "Y");
  1115. if(prcpprcsyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/prcpdifpartyn" , "Y");
  1116. if(prcpprcsyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/prcpdiftestyn" , "Y");
  1117. if(prcpprcsyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/prcpdifddyn" , "Y");
  1118. if(prcpprcsyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/prcpfailcmntunstdyn" , "Y");
  1119. if(prcpprcsyn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/prcpseffccnfmomityn" , "Y");
  1120. if(prcpprcsyn.search("07") > -1){
  1121. model.makeValue("/root/send/cond/detlinfo/prcpprcsetcyn" , "Y");
  1122. model.makeValue("/root/send/cond/detlinfo/prcpprcsetccnts" , model.getValue("/root/tmp/cond/prcpprcsetccnts" ) ) ;
  1123. }
  1124. }
  1125. var testprcsyn = model.getValue("/root/tmp/cond/testprcsyn");
  1126. if(testprcsyn != ""){
  1127. model.makeValue("/root/send/cond/detlinfo/testprcsyn" , "Y");
  1128. if(testprcsyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/testdifpatyn" , "Y");
  1129. if(testprcsyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/testdifpartyn" , "Y");
  1130. if(testprcsyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/testdiftestyn" , "Y");
  1131. if(testprcsyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/testdifddyn" , "Y");
  1132. if(testprcsyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/testempseffcyn" , "Y");
  1133. if(testprcsyn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/testcompuhandcapyn" , "Y");
  1134. if(testprcsyn.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/testfailcmntunstdyn" , "Y");
  1135. if(testprcsyn.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/testdyeseffcyn" , "Y");
  1136. //if(testprcsyn.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/testbarcderryn" , "Y");
  1137. if(testprcsyn.search("10") > -1){
  1138. model.makeValue("/root/send/cond/detlinfo/testprcsetcyn" , "Y")
  1139. model.makeValue("/root/send/cond/detlinfo/testprcsetccnts" , model.getValue("/root/tmp/cond/testprcsetccnts" ) ) ;
  1140. }
  1141. }
  1142. var tranreptyn = model.getValue("/root/tmp/cond/tranreptyn");
  1143. if(tranreptyn != ""){
  1144. model.makeValue("/root/send/cond/detlinfo/tranreptyn" , "Y");
  1145. if(tranreptyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/spcmissyn" , "Y");
  1146. if(tranreptyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/spcexchyn" , "Y");
  1147. if(tranreptyn.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/testbarcderryn" , "Y");
  1148. if(tranreptyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/spctrandelyyn" , "Y");
  1149. if(tranreptyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/spcdiftranyn" , "Y");
  1150. if(tranreptyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/rsltreptyn" , "Y");
  1151. if(tranreptyn.search("06") > -1){
  1152. model.makeValue("/root/send/cond/detlinfo/tranreptetcyn" , "Y")
  1153. model.makeValue("/root/send/cond/detlinfo/tranreptetccnts" , model.getValue("/root/tmp/cond/tranreptetccnts" ) ) ;
  1154. }
  1155. if(tranreptyn.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/testbarcderryn" , "Y");
  1156. }
  1157. var testseffcyn = model.getValue("/root/tmp/cond/testseffcyn");
  1158. if(testseffcyn != ""){
  1159. model.makeValue("/root/send/cond/detlinfo/testseffcyn" , "Y");
  1160. if(testseffcyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/urticayn" , "Y");
  1161. if(testseffcyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/dyspnyn" , "Y");
  1162. if(testseffcyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/lowbpyn" , "Y");
  1163. if(testseffcyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/vomityn" , "Y");
  1164. if(testseffcyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/bledyn" , "Y");
  1165. if(testseffcyn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/cscslowyn" , "Y");
  1166. if(testseffcyn.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/dethyn" , "Y");
  1167. if(testseffcyn.search("08") > -1){
  1168. model.makeValue("/root/send/cond/detlinfo/testseffcetcyn" , "Y")
  1169. model.makeValue("/root/send/cond/detlinfo/testseffcetccntsyn" , model.getValue("/root/tmp/cond/testseffcetccntsyn" ) ) ;
  1170. }
  1171. }
  1172. var arbitrationcntsyn = model.getValue("/root/tmp/cond/arbitrationcntsyn");
  1173. if(arbitrationcntsyn != ""){
  1174. model.makeValue("/root/send/cond/detlinfo/arbitrationcntsyn" , "Y");
  1175. if(arbitrationcntsyn.search("01") > -1){
  1176. model.makeValue("/root/send/cond/detlinfo/arbitrationmediyn" , "Y");
  1177. model.makeValue("/root/send/cond/detlinfo/medidrugcd" , model.getValue("/root/tmp/cond/medidrugcd" ));
  1178. }
  1179. if(arbitrationcntsyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/testdiscontinuyn" , "Y");
  1180. if(arbitrationcntsyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/rpttestyn" , "Y");
  1181. if(arbitrationcntsyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/icuchngroomyn" , "Y");
  1182. if(arbitrationcntsyn.search("05") > -1){
  1183. model.makeValue("/root/send/cond/detlinfo/arbitrationetcyn" , "Y")
  1184. model.makeValue("/root/send/cond/detlinfo/arbitrationetccntsyn" , model.getValue("/root/tmp/cond/arbitrationetccntsyn" ) ) ;
  1185. }
  1186. }
  1187. }
  1188. if(Mdl == "06"){ //임상 기타
  1189. model.makeValue("/root/send/cond/detlinfo/acptno" , model.getValue("/root/tmp/cond/acptno" ) ) ;
  1190. model.makeValue("/root/send/cond/detlinfo/clincetckind" , model.getValue("/root/tmp/cond/clincetckind" ) ) ;
  1191. model.makeValue("/root/send/cond/detlinfo/burngrdecd" , model.getValue("/root/tmp/cond/burngrdecd" ) ) ;
  1192. model.makeValue("/root/send/cond/detlinfo/clincetccnts" , model.getValue("/root/tmp/cond/clincetccnts" ) ) ;
  1193. model.makeValue("/root/send/cond/recinfo/detlcnts" , model.getValue("/root/tmp/cond/detlcnts") ); //상세내용 기술
  1194. model.makeValue("/root/send/cond/recinfo/detlcnts_how" , model.getValue("/root/tmp/cond/detlcnts_how") ); //상세내용 기술
  1195. model.makeValue("/root/send/cond/recinfo/detlcnts_why" , model.getValue("/root/tmp/cond/detlcnts_why") ); //상세내용 기술
  1196. model.makeValue("/root/send/cond/recinfo/doctorcallyn" , model.getValue("/root/tmp/cond/doctorcallyn") ); //담당의_당직의 호출여부
  1197. model.makeValue("/root/send/cond/recinfo/doctorcalldt" , model.getValue("/root/tmp/cond/doctorcalldt") ); //담당의_당직의 호출시간
  1198. model.makeValue("/root/send/cond/recinfo/mediationyn" , model.getValue("/root/tmp/cond/mediationyn") ); //중재여부
  1199. model.makeValue("/root/send/cond/recinfo/mediationdt" , model.getValue("/root/tmp/cond/mediationdt") ); //중재시간
  1200. var burnpart = model.getValue("/root/tmp/cond/burnpart");
  1201. if(burnpart != ""){
  1202. if(burnpart.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/headyn" , "Y");
  1203. if(burnpart.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/faceyn" , "Y");
  1204. if(burnpart.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/neckyn" , "Y");
  1205. if(burnpart.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/armyn" , "Y");
  1206. if(burnpart.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/handyn" , "Y");
  1207. if(burnpart.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/trunkyn" , "Y");
  1208. if(burnpart.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/hipyn" , "Y");
  1209. if(burnpart.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/prnlregyn" , "Y");
  1210. if(burnpart.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/legyn" , "Y");
  1211. if(burnpart.search("10") > -1) model.makeValue("/root/send/cond/detlinfo/footyn" , "Y");
  1212. if(burnpart.search("11") > -1){
  1213. model.makeValue("/root/send/cond/detlinfo/burnpartetcyn" , "Y");
  1214. model.makeValue("/root/send/cond/detlinfo/burnpartetccnts" , model.getValue("/root/tmp/cond/burnpartetccnts" ) ) ;
  1215. }
  1216. model.makeValue("/root/send/cond/detlinfo/burnscop1" , model.getValue("/root/tmp/cond/burnscop1" ) ) ;
  1217. model.makeValue("/root/send/cond/detlinfo/burnscop2" , model.getValue("/root/tmp/cond/burnscop2" ) ) ;
  1218. }
  1219. var burncas = model.getValue("/root/tmp/cond/burncas");
  1220. if(burncas != ""){
  1221. if(burncas.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/wateryn" , "Y");
  1222. if(burncas.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/cauteryn" , "Y");
  1223. if(burncas.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/dfibrilyn" , "Y");
  1224. if(burncas.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/chemiyn" , "Y");
  1225. if(burncas.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/fireyn" , "Y");
  1226. if(burncas.search("06") > -1){
  1227. model.makeValue("/root/send/cond/detlinfo/burncasetcyn" , "Y");
  1228. model.makeValue("/root/send/cond/detlinfo/burncasetccnts" , model.getValue("/root/tmp/cond/burncasetccnts" ) ) ;
  1229. }
  1230. }
  1231. var meal = model.getValue("/root/tmp/cond/meal");
  1232. if(meal != ""){
  1233. if(meal.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/mealprcperryn" , "Y");
  1234. if(meal.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/mealomityn" , "Y");
  1235. if(meal.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/difmealyn" , "Y");
  1236. if(meal.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/badmealyn" , "Y");
  1237. if(meal.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/suplmealerryn" , "Y");
  1238. if(meal.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/suplmealdelyyn" , "Y");
  1239. if(meal.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/matrkeepprobyn" , "Y");
  1240. if(meal.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/cookprcsprobyn" , "Y");
  1241. if(meal.search("09") > -1) {
  1242. model.makeValue("/root/send/cond/detlinfo/mealetcyn" , "Y");
  1243. model.makeValue("/root/send/cond/detlinfo/mealetccnts" , model.getValue("/root/tmp/cond/mealetccnts" ) ) ;
  1244. }
  1245. }
  1246. var sucid = model.getValue("/root/tmp/cond/sucid");
  1247. if(sucid != ""){
  1248. if(sucid.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/falldwnyn" , "Y");
  1249. if(sucid.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/hanginyn" , "Y");
  1250. if(sucid.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/selfmulyn" , "Y");
  1251. if(sucid.search("04") > -1){
  1252. model.makeValue("/root/send/cond/detlinfo/sucidetcyn" , "Y");
  1253. model.makeValue("/root/send/cond/detlinfo/sucidetccnts" , model.getValue("/root/tmp/cond/sucidetccnts" ) ) ;
  1254. }
  1255. }
  1256. var arbitrationcntsyn = model.getValue("/root/tmp/cond/arbitrationcntsyn");
  1257. if(arbitrationcntsyn != ""){
  1258. model.makeValue("/root/send/cond/detlinfo/arbitrationcntsyn" , "Y");
  1259. if(arbitrationcntsyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/obsyn" , "Y");
  1260. if(arbitrationcntsyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/drssyn" , "Y");
  1261. if(arbitrationcntsyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/sutryn" , "Y");
  1262. if(arbitrationcntsyn.search("04") > -1) {
  1263. model.makeValue("/root/send/cond/detlinfo/drugcureyn" , "Y");
  1264. model.makeValue("/root/send/cond/detlinfo/arbitrationdrugcd" , model.getValue("/root/tmp/cond/arbitrationdrugcd" ) ) ;
  1265. }
  1266. if(arbitrationcntsyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/opyn" , "Y");
  1267. if(arbitrationcntsyn.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/repetsuplmealyn" , "Y");
  1268. if(arbitrationcntsyn.search("07") > -1) model.makeValue("/root/send/cond/detlinfo/suplmealdiscontinuyn" , "Y");
  1269. if(arbitrationcntsyn.search("08") > -1) model.makeValue("/root/send/cond/detlinfo/icuchngroomyn" , "Y");
  1270. if(arbitrationcntsyn.search("09") > -1) model.makeValue("/root/send/cond/detlinfo/cureyn" , "Y");
  1271. if(arbitrationcntsyn.search("10") > -1){
  1272. model.makeValue("/root/send/cond/detlinfo/arbitrationetcyn" , "Y");
  1273. model.makeValue("/root/send/cond/detlinfo/arbitrationetccntsyn" , model.getValue("/root/tmp/cond/arbitrationetccntsyn" ) ) ;
  1274. }
  1275. }
  1276. }
  1277. }
  1278. if(Lrg == "02"){ //비임상
  1279. model.makeValue("/root/send/cond/detlinfo/genrplce" , model.getValue("/root/tmp/cond/genrplce" ));
  1280. model.makeValue("/root/send/cond/detlinfo/etcreptcnts" , model.getValue("/root/tmp/cond/etcreptcnts" ));
  1281. model.makeValue("/root/send/cond/detlinfo/tretinstcd" , model.getValue("/root/tmp/cond/tretinstcd" ));
  1282. model.makeValue("/root/send/cond/detlinfo/lossyn" , model.getValue("/root/tmp/cond/lossyn" ));
  1283. model.makeValue("/root/send/cond/recinfo/detlcnts" , model.getValue("/root/tmp/cond/detlcnts") ); //상세내용 기술
  1284. model.makeValue("/root/send/cond/recinfo/detlcnts_how" , model.getValue("/root/tmp/cond/detlcnts_how") ); //상세내용 기술
  1285. model.makeValue("/root/send/cond/recinfo/detlcnts_why" , model.getValue("/root/tmp/cond/detlcnts_why") ); //상세내용 기술
  1286. if (model.getValue("/root/tmp/cond/losscnt") != ""){
  1287. model.makeValue("/root/send/cond/detlinfo/losscnt" , model.getValue("/root/tmp/cond/losscnt" ));
  1288. }
  1289. model.makeValue("/root/send/cond/detlinfo/locktmcd" , model.getValue("/root/tmp/cond/locktmcd" ));
  1290. model.makeValue("/root/send/cond/detlinfo/locktmetccnts" , model.getValue("/root/tmp/cond/locktmetccnts" ));
  1291. model.makeValue("/root/send/cond/detlinfo/handcaptermcd" , model.getValue("/root/tmp/cond/handcaptermcd" ));
  1292. model.makeValue("/root/send/cond/detlinfo/lossitem" , model.getValue("/root/tmp/cond/lossitem" ));
  1293. model.makeValue("/root/send/cond/detlinfo/tranyn" , model.getValue("/root/tmp/cond/tranyn" ));
  1294. model.makeValue("/root/send/cond/detlinfo/trannotoccrplce" , model.getValue("/root/tmp/cond/trannotoccrplce" ));
  1295. model.makeValue("/root/send/cond/detlinfo/actpsn" , model.getValue("/root/tmp/cond/actpsn" ));
  1296. model.makeValue("/root/send/cond/detlinfo/losspsn" , model.getValue("/root/tmp/cond/losspsn" ));
  1297. model.makeValue("/root/send/cond/detlinfo/actpid" , model.getValue("/root/tmp/cond/actpid" ));
  1298. model.makeValue("/root/send/cond/detlinfo/losspid" , model.getValue("/root/tmp/cond/losspid" ));
  1299. var chkkind = model.getValue("/root/tmp/cond/chkkind");
  1300. if(chkkind != ""){
  1301. if(chkkind.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/oxydiscontinuyn" , "Y");
  1302. if(chkkind.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/vacumdiscontinuyn" , "Y");
  1303. if(chkkind.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/compryn" , "Y");
  1304. if(chkkind.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/gasdiscontinuyn" , "Y");
  1305. if(chkkind.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/electcdiscontinuyn" , "Y");
  1306. }
  1307. var patlossyn = model.getValue("/root/tmp/cond/patlossyn");
  1308. if(patlossyn != ""){
  1309. model.makeValue("/root/send/cond/detlinfo/patlossyn" , "Y");
  1310. if(patlossyn.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/artficrespdiscontinuyn" , "Y");
  1311. if(patlossyn.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/patoxydiscontinuyn" , "Y");
  1312. if(patlossyn.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/anstdiscontinuyn" , "Y");
  1313. if(patlossyn.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/lossnotoccryn" , "Y");
  1314. if(patlossyn.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/lossetcyn" , "Y");
  1315. }
  1316. }
  1317. if(Lrg == "03"){ //감면사례 보고
  1318. model.makeValue("/root/send/cond/detlinfo/insuflagcd" , model.getValue("/root/tmp/cond/insuflagcd" ));
  1319. model.makeValue("/root/send/cond/detlinfo/opdate" , model.getValue("/root/tmp/cond/opdate" ));
  1320. model.makeValue("/root/send/cond/detlinfo/opnm" , model.getValue("/root/tmp/cond/opnm" ));
  1321. model.makeValue("/root/send/cond/detlinfo/civilapldeptcd" , model.getValue("/root/tmp/cond/civilapldeptcd" ));
  1322. model.makeValue("/root/send/cond/detlinfo/pertdr" , model.getValue("/root/tmp/cond/pertdr" ));
  1323. model.makeValue("/root/send/cond/detlinfo/anstdr" , model.getValue("/root/tmp/cond/anstdr" ));
  1324. model.makeValue("/root/send/cond/detlinfo/reldremp" , model.getValue("/root/tmp/cond/reldremp" ));
  1325. model.makeValue("/root/send/cond/detlinfo/detldesccnts" , model.getValue("/root/tmp/cond/detldesccnts" ));
  1326. var chkcase = model.getValue("/root/tmp/cond/chkcase");
  1327. if(chkcase != ""){
  1328. if(chkcase.search("01") > -1) model.makeValue("/root/send/cond/detlinfo/optestacdyn" , "Y");
  1329. if(chkcase.search("02") > -1) model.makeValue("/root/send/cond/detlinfo/anstacdyn" , "Y");
  1330. if(chkcase.search("03") > -1) model.makeValue("/root/send/cond/detlinfo/ordacdyn" , "Y");
  1331. if(chkcase.search("04") > -1) model.makeValue("/root/send/cond/detlinfo/noncuresatsfctyn" , "Y");
  1332. if(chkcase.search("05") > -1) model.makeValue("/root/send/cond/detlinfo/nondescsatsfctyn" , "Y");
  1333. if(chkcase.search("06") > -1) model.makeValue("/root/send/cond/detlinfo/envacdyn" , "Y");
  1334. if(chkcase.search("07") > -1){
  1335. model.makeValue("/root/send/cond/detlinfo/caseetcyn" , "Y");
  1336. model.makeValue("/root/send/cond/detlinfo/caseetccnts" , model.getValue("/root/tmp/cond/caseetccnts" ));
  1337. }
  1338. }
  1339. }
  1340. }
  1341. /**
  1342. * @---------------------------------------------------
  1343. * @desc : report를 작성하기 위한 Instance 생성 function
  1344. * @param :
  1345. * @return :
  1346. * @---------------------------------------------------
  1347. */
  1348. function SetRepDetlInfo(){
  1349. // alert("SetRepDetlInfo+");
  1350. if(model.getValue("/root/main/condition/acptno") == ""){
  1351. return;
  1352. }
  1353. model.setValue("/root/send/acptno", model.getValue("/root/main/condition/acptno"));
  1354. submit("TRMQR00102");
  1355. var lrg = model.getValue("/root/tmp/reptinfo/recinfo/lrg");
  1356. var mdl = model.getValue("/root/tmp/reptinfo/recinfo/mdl");
  1357. model.removenode("/root/send/report/recinfo");
  1358. model.removenode("/root/send/report/detlinfo");
  1359. model.makeNode("/root/send/report/recinfo");
  1360. model.makeNode("/root/send/report/detlinfo");
  1361. //2012/07/26 Start
  1362. var grade=model.getValue("/root/main/condition/serdiaggrde");
  1363. if(grade<"4" && checkgrade=="false"){
  1364. model.setValue("/root/tmp/reptinfo/recinfo/reptid", "");
  1365. model.setValue("/root/tmp/reptinfo/recinfo/reptnm", "");
  1366. model.setValue("/root/tmp/reptinfo/recinfo/reptjobkindtext", "");
  1367. model.setValue("/root/tmp/reptinfo/recinfo/reptdutdepttext", "");
  1368. model.setValue("/root/tmp/reptinfo/recinfo/reptcntctel", "");
  1369. model.setValue("/root/tmp/reptinfo/recinfo/reptdutyearno", "");
  1370. }
  1371. //2012/07/26 End
  1372. copyNodeType("/root/send/report/recinfo", "/root/tmp/reptinfo/recinfo", "after");
  1373. if(lrg == "01") {
  1374. if(mdl == "01"){ //진료 및 치료
  1375. copyNodeType("/root/send/report/detlinfo", "/root/tmp/reptinfo/detlinfo", "after");
  1376. exeReportPreview("RPMQR00100", "XMLSTR", "/root/send/report");
  1377. }
  1378. if(mdl == "02"){ // 투약
  1379. copyNodeType("/root/send/report/detlinfo", "/root/tmp/reptinfo/mediinfo", "after");
  1380. exeReportPreview("RPMQR00200", "XMLSTR", "/root/send/report");
  1381. }
  1382. if(mdl == "03"){ // 낙상
  1383. copyNodeType("/root/send/report/detlinfo", "/root/tmp/reptinfo/fallinfo", "after");
  1384. exeReportPreview("RPMQR00300", "XMLSTR", "/root/send/report");
  1385. }
  1386. if(mdl == "04"){ // 수혈
  1387. copyNodeType("/root/send/report/detlinfo", "/root/tmp/reptinfo/tnsinfo", "after");
  1388. exeReportPreview("RPMQR00400", "XMLSTR", "/root/send/report");
  1389. }
  1390. if(mdl == "05"){ // 진단/병리/영상/핵의학 검사
  1391. copyNodeType("/root/send/report/detlinfo", "/root/tmp/reptinfo/diagtestinfo", "after");
  1392. exeReportPreview("RPMQR00500", "XMLSTR", "/root/send/report");
  1393. }
  1394. if(mdl == "06"){ // 기타
  1395. copyNodeType("/root/send/report/detlinfo", "/root/tmp/reptinfo/etcinfo", "after");
  1396. exeReportPreview("RPMQR00600", "XMLSTR", "/root/send/report");
  1397. }
  1398. }
  1399. if(lrg == "02") { //비임상
  1400. copyNodeType("/root/send/report/detlinfo", "/root/tmp/reptinfo/nonclincinfo", "after");
  1401. if(mdl == "01"){ //화재
  1402. exeReportPreview("RPMQR00700", "XMLSTR", "/root/send/report");
  1403. }
  1404. if(mdl == "02"){ //의료가스/의료전기
  1405. exeReportPreview("RPMQR00800", "XMLSTR", "/root/send/report");
  1406. }
  1407. if(mdl == "03"){ //전산장애
  1408. exeReportPreview("RPMQR00900", "XMLSTR", "/root/send/report");
  1409. }
  1410. if(mdl == "04"){ //도난
  1411. exeReportPreview("RPMQR01000", "XMLSTR", "/root/send/report");
  1412. }
  1413. if(mdl == "05"){ //탈원
  1414. exeReportPreview("RPMQR01100", "XMLSTR", "/root/send/report");
  1415. }
  1416. if(mdl == "06"){ //폭력/난동/성폭력
  1417. exeReportPreview("RPMQR01200", "XMLSTR", "/root/send/report");
  1418. }
  1419. if(mdl == "07"){ //기타
  1420. exeReportPreview("RPMQR01300", "XMLSTR", "/root/send/report");
  1421. }
  1422. }
  1423. if(lrg == "03") {
  1424. copyNodeType("/root/send/report/detlinfo", "/root/tmp/reptinfo/reductinfo", "replace");
  1425. copyNodeListType("/root/send/report/reductlist", "/root/tmp/reptinfo/reductlist", "replace");
  1426. exeReportPreview("RPMQR01400", "XMLSTR", "/root/send/report");
  1427. }
  1428. }
  1429. /**
  1430. * @---------------------------------------------------
  1431. * @desc : 중등도 단계에 따라서 보고자 정보 등록 감추기
  1432. * @param :
  1433. * @return :
  1434. * @---------------------------------------------------
  1435. */
  1436. function fCheckgrade(){
  1437. // alert("fCheckgrade");
  1438. if(checkgrade=="false"){
  1439. model.makeValue("/root/temp/reptid", model.getValue("/root/main/condition/reptid"));
  1440. model.makeValue("/root/temp/reptnm", model.getValue("/root/main/condition/reptnm"));
  1441. model.makeValue("/root/temp/reptjobkindtext", model.getValue("/root/main/condition/reptjobkindtext"));
  1442. model.makeValue("/root/temp/reptdutdepttext", model.getValue("/root/main/condition/reptdutdepttext"));
  1443. model.makeValue("/root/temp/reptcntctel", model.getValue("/root/main/condition/reptcntctel"));
  1444. model.makeValue("/root/temp/reptdutyearno", model.getValue("/root/main/condition/reptdutyearno"));
  1445. model.setValue("/root/main/condition/reptid", "");
  1446. model.setValue("/root/main/condition/reptnm", "");
  1447. model.setValue("/root/main/condition/reptjobkindtext", "");
  1448. model.setValue("/root/main/condition/reptdutdepttext", "");
  1449. model.setValue("/root/main/condition/reptcntctel", "");
  1450. model.setValue("/root/main/condition/reptdutyearno", "");
  1451. }if(checkgrade=="true"){
  1452. model.setValue("/root/main/condition/reptid", model.getValue("/root/temp/reptid"));
  1453. model.setValue("/root/main/condition/reptnm", model.getValue("/root/temp/reptnm"));
  1454. model.setValue("/root/main/condition/reptjobkindtext", model.getValue("/root/temp/reptjobkindtext"));
  1455. model.setValue("/root/main/condition/reptdutdepttext", model.getValue("/root/temp/reptdutdepttext"));
  1456. model.setValue("/root/main/condition/reptcntctel", model.getValue("/root/temp/reptcntctel"));
  1457. model.setValue("/root/main/condition/reptdutyearno", model.getValue("/root/temp/reptdutyearno"));
  1458. }
  1459. model.refresh();
  1460. }
  1461. /**
  1462. * @---------------------------------------------------
  1463. * @desc : 익명보고 버튼 클릭시 이벤트
  1464. * @param :
  1465. * @return :
  1466. * @---------------------------------------------------
  1467. */
  1468. function fChangeValue(){
  1469. // alert("fChangeValue");
  1470. if(pushbutton=="false"){
  1471. var ans=messageBox("익명 보고로 진행하시겠습니까?", "Q999");
  1472. if(ans=="6"){
  1473. pushbutton="true";
  1474. btn_anony.attribute("class")="btn2_letter6";
  1475. model.setValue("/root/temp/btn_value", "익명보고해제");
  1476. checkgrade="false";
  1477. anonybtn = "Y";
  1478. fCheckgrade();
  1479. }
  1480. }else if(pushbutton=="true"){
  1481. var ans=messageBox("익명 보고를 해제하시겠습니까?", "Q999");
  1482. if(ans=="6"){
  1483. pushbutton="false";
  1484. btn_anony.attribute("class")="btn2_letter4";
  1485. model.setValue("/root/temp/btn_value", "익명보고");
  1486. checkgrade="true";
  1487. anonybtn = "N";
  1488. fCheckgrade();
  1489. }
  1490. }
  1491. model.refresh();
  1492. }
  1493. /**
  1494. * @---------------------------------------------------
  1495. * @desc : 안전사고단계 클릭시 이벤트 ( 익명보고 체크 )
  1496. * @param :
  1497. * @return :
  1498. * @---------------------------------------------------
  1499. */
  1500. function fChangegrade(){
  1501. // alert("fChangegrade");
  1502. if(model.getValue("/root/tmp/reptinfo/recinfo/anonyyn")!="Y" && pushbutton=="false"){
  1503. btn_anony.disabled="false";
  1504. model.makeValue("/root/temp/befserdiaggrde", model.getValue("/root/main/condition/serdiaggrde"));
  1505. }
  1506. if(model.getValue("/root/tmp/reptinfo/recinfo/anonyyn")=="Y" && pushbutton=="false"){
  1507. btn_anony.disabled="false";
  1508. }
  1509. }
  1510. /**
  1511. * @desc : 병실리스트 - 병동에 해당하는 병실코드 조회
  1512. * @param : wardcd - 병동코드
  1513. * @return : void
  1514. * @authur : 오지훈 2007. 6. 14
  1515. */
  1516. function reqGetRoomList(wardcd){
  1517. // alert("reqGetRoomList");
  1518. model.removeNodeset("/root/send/reqdata/wardcd");
  1519. model.makeValue("/root/send/reqdata/wardcd", wardcd);
  1520. submit("TRMMO04107");
  1521. }
  1522. function reqGetAccidentStepList(){
  1523. // alert("reqGetAccidentStepList");
  1524. submit("TRMQR00104");
  1525. }