SMMNP00211.xjs 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[/* ---------------------------------------------------------------------
  3. 환자 시술전 처치 및 간호상태 확인 사항
  4. - Version :
  5. 1) : Ver.1.00.01
  6. : Created By AYS
  7. : 2015.03.18
  8. ---------------------------------------------------------------------- */
  9. var xPath_curenurgstatspec = ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList; // 환자 수술전 처치 및 간호상태 확인 사항
  10. var xPath_famyinfo = ds_main_ssminfo_ssmlist_famyinfo_famylist_MnwmpfifList; // 가족사항
  11. var xPath_spcinfo = ds_main_ssminfo_ssmlist_spcinfo_spclists; // 검체사항
  12. var xPath_Infecinfo = ds_main_ssminfo_ssmlist_infecinfo_InfectionLists_InfectionList; // 감염정보
  13. var xPath_PatBaseInfo = ds_init_patbaseinfo_patinfo; // 환자기본정보
  14. var xPath_Fmt_curenurgstatspec = ds_init_cureiteminfo_ItemCheckList; // 환자 수술전 처치 및 간호상태 확인 사항
  15. var xPath_MnpmcssrList = ds_main_ssminfo_ssmlist; // 환자 수술전 처치 및 간호상태 확인 사항 정보
  16. /****************************************************************************************
  17. * Argument : N/A
  18. * Description : 초기화
  19. ****************************************************************************************/
  20. function fInit() {
  21. var spid = "";
  22. var sorddd = "";
  23. var scretno = "";
  24. node = sysf_getGlobalVariable("paminfo");
  25. dsf_setCSVToDs("ds_main_paminfo_list", node);
  26. if( utlf_isNull(ds_main_paminfo_list.getColumnInfo("orddd")) ){
  27. ds_main_paminfo_list.addColumn("orddd", "string");
  28. }
  29. if( utlf_isNull(ds_main_paminfo_list.getColumnInfo("ordtype")) ){
  30. ds_main_paminfo_list.addColumn("ordtype", "string");
  31. }
  32. var spid = ds_main_paminfo_list.getColumn(0, "pid");
  33. var orddd = ds_main_paminfo_list.getColumn(0, "orddd");
  34. var indd = ds_main_paminfo_list.getColumn(0, "indd");
  35. var hngnm = ds_main_paminfo_list.getColumn(0, "hngnm");
  36. if(utlf_isNull(spid)) {
  37. sysf_messageBox("상단에 환자정보가 없습니다", "I");
  38. this.close();
  39. return;
  40. }
  41. // 화면 우측상단 환자정보 호출
  42. fGetPatBaseInfo();
  43. var sPatBaseInfo = utlf_transNullToEmpty(xPath_PatBaseInfo.getColumn(0,"wardnm")) + " " // 병동
  44. + utlf_transNullToEmpty(xPath_PatBaseInfo.getColumn(0,"roomcd")) + " " // 병실
  45. + utlf_transNullToEmpty(xPath_PatBaseInfo.getColumn(0,"patnm")) + "(" // 환자명
  46. + utlf_transNullToEmpty(xPath_PatBaseInfo.getColumn(0,"pid")) + ") " // 등록번호
  47. + utlf_transNullToEmpty(xPath_PatBaseInfo.getColumn(0,"sexage")) + " " // SA
  48. + utlf_transNullToEmpty(xPath_PatBaseInfo.getColumn(0,"orddeptnm")) + " " // 진료과
  49. + utlf_transNullToEmpty(xPath_PatBaseInfo.getColumn(0,"medispclnm")) + " " // 주치의
  50. + utlf_transNullToEmpty(xPath_PatBaseInfo.getColumn(0,"atdoctnm")) + " " // 담당의
  51. + utlf_transNullToEmpty(xPath_PatBaseInfo.getColumn(0,"pdano")); // 담당의연락처
  52. ds_init.setColumn(0,"patinfo",sPatBaseInfo);
  53. fGetNursHardCdInfo("'S06'",utlf_getCurrentDate()); //CareCom.xjs
  54. fAddSSList();
  55. ds_init.setColumn(0,"ssbfcureseqno",ds_init_ssinfo_sslist.getColumn(0,"ssbfcureseqno"));
  56. var ssbfcureseqno = ds_init.getColumn(0, "ssbfcureseqno");
  57. sysf_trace("ssbfcureseqno > " + ssbfcureseqno)
  58. if ( utlf_isNull(ssbfcureseqno) ) {
  59. fNew();
  60. } else {
  61. fGetData();
  62. }
  63. // grd_ItemCheckList.fixedcellcheckbox(1,grd_ItemCheckList.colRef("pyes")) = true;
  64. // grd_ItemCheckList.fixedcellcheckbox(1,grd_ItemCheckList.colRef("syes")) = true;
  65. grdf_initGrid(grp_main.grd_ItemCheckList); // 그리드 전체 체크 기능 + 그리드소트
  66. }
  67. /****************************************************************************************
  68. * Argument : N/A
  69. * Description : fAddSSList
  70. ****************************************************************************************/
  71. function fAddSSList() {
  72. var spid = ds_main_paminfo_list.getColumn(0, "pid");
  73. var sorddd = ds_main_paminfo_list.getColumn(0, "orddd");
  74. var sindd = ds_main_paminfo_list.getColumn(0, "indd");
  75. var scretno = ds_main_paminfo_list.getColumn(0, "cretno");
  76. var sordtype = ds_main_paminfo_list.getColumn(0, "ordtype");
  77. var sinstcd = sysf_getUserInfo("dutplceinstcd");
  78. if (!(sordtype == "S" || sordtype =="O")) {
  79. sorddd = sindd;
  80. }
  81. dsf_makeValue( ds_send, "pid", "string", spid);
  82. dsf_makeValue( ds_send, "orddd", "string", sorddd);
  83. dsf_makeValue( ds_send, "cretno", "string", scretno);
  84. dsf_makeValue( ds_send, "instcd", "string", sinstcd);
  85. dsf_makeValue( ds_send, "flag", "string", 2);
  86. var oParam = {};
  87. oParam.id = "TRMNP00213";
  88. oParam.service = "opanstapp.OpAnstPatMngt";
  89. oParam.method = "reqGetSSInfo";
  90. oParam.inds = "req=ds_send";
  91. oParam.outds = "ds_init_ssinfo_sslist=sslist";
  92. oParam.async = false;
  93. //oParam.callback = "cf_TRMNP00213";
  94. tranf_submit(oParam);
  95. fGetData();
  96. }
  97. /****************************************************************************************
  98. * Argument : N/A
  99. * Description : 조회
  100. ****************************************************************************************/
  101. function fGetData() {
  102. ds_send.clearData();
  103. dsf_makeValue( ds_send, "ssbfcureseqno", "string", grp_main.cmb_sslist.value);
  104. ds_data_ItemCheckList.clearData();
  105. ds_data_MnwmpfifList.clearData();
  106. ds_data_InfectionList.clearData();
  107. var oParam = {};
  108. oParam.id = "TRMNP00214";
  109. oParam.service = "opanstapp.OpAnstPatMngt";
  110. oParam.method = "reqGetSSMInfo";
  111. oParam.inds = "req=ds_send";
  112. oParam.outds = "ds_main_ssminfo_ssmlist=ssmlist";
  113. oParam.async = false;
  114. oParam.callback = "cf_TRMNP00214";
  115. tranf_submit(oParam);
  116. var sParamObj = new Object();
  117. sParamObj.pathYN = 'N';
  118. if( !utlf_isNull(ds_main_ssminfo_ssmlist.getColumn(0, "curenurgstatspec")) ){
  119. lf_convertXmlToDs(ds_main_ssminfo_ssmlist.getColumn(0, "curenurgstatspec"), sParamObj); //ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList
  120. }
  121. if( !utlf_isNull(ds_main_ssminfo_ssmlist.getColumn(0, "famyinfo")) ){
  122. lf_convertXmlToDs(ds_main_ssminfo_ssmlist.getColumn(0, "famyinfo"), sParamObj); //ds_main_ssminfo_ssmlist_famyinfo_famylist_MnwmpfifList
  123. }
  124. if( !utlf_isNull(ds_main_ssminfo_ssmlist.getColumn(0, "infecinfo")) ){
  125. lf_convertXmlToDs(ds_main_ssminfo_ssmlist.getColumn(0, "infecinfo"), sParamObj); //ds_main_ssminfo_ssmlist_infecinfo_InfectionLists_InfectionList
  126. }
  127. // if( !utlf_isNull(ds_main_ssminfo_ssmlist.getColumn(0, "spcinfo")) ){
  128. // lf_convertXmlToDs(ds_main_ssminfo_ssmlist.getColumn(0, "spcinfo"), sParamObj); //ds_main_ssminfo_ssmlist_spcinfo_spclists
  129. // }
  130. if(ds_data_ItemCheckList.rowcount > 0)
  131. {
  132. ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.copyData(ds_data_ItemCheckList);
  133. }
  134. if(ds_data_MnwmpfifList.rowcount > 0)
  135. {
  136. ds_main_ssminfo_ssmlist_famyinfo_famylist_MnwmpfifList.copyData(ds_data_MnwmpfifList);
  137. }
  138. else
  139. {
  140. ds_main_ssminfo_ssmlist_famyinfo_famylist_MnwmpfifList.clearData();
  141. }
  142. if(ds_data_InfectionList.rowcount > 0)
  143. {
  144. ds_main_ssminfo_ssmlist_infecinfo_InfectionLists_InfectionList.copyData(ds_data_InfectionList);
  145. }
  146. else
  147. {
  148. ds_main_ssminfo_ssmlist_infecinfo_InfectionLists_InfectionList.clearData();
  149. }
  150. if (xPath_curenurgstatspec.rowcount == 0 ) {
  151. fGetBaseCheckList();
  152. }
  153. // fSetBtn(); //EXPR처리
  154. }
  155. function cf_TRMNP00214(sSvcId, nErrorCode, sErrorMsg) {
  156. if(nErrorCode < 0) return;
  157. if( utlf_isNull(ds_main_ssminfo_ssmlist.getColumnInfo("ordtypeo")) ){
  158. ds_main_ssminfo_ssmlist.addColumn("ordtypeo", "string");
  159. }
  160. if( utlf_isNull(ds_main_ssminfo_ssmlist.getColumnInfo("indd")) ){
  161. ds_main_ssminfo_ssmlist.addColumn("indd", "string");
  162. }
  163. if( utlf_isNull(ds_main_ssminfo_ssmlist.getColumnInfo("orddrid")) ){
  164. ds_main_ssminfo_ssmlist.addColumn("orddrid", "string");
  165. }
  166. if( utlf_isNull(ds_main_ssminfo_ssmlist.getColumnInfo("medispclid")) ){
  167. ds_main_ssminfo_ssmlist.addColumn("medispclid", "string");
  168. }
  169. ds_main_ssminfo_ssmlist.updateColID("ordtypeo","ordtype");
  170. }
  171. /****************************************************************************************
  172. * Argument : N/A
  173. * Description : 신규
  174. ****************************************************************************************/
  175. function fNew() {
  176. ds_init.setColumn(0,"ssbfcureseqno","");
  177. ds_main_ssminfo_ssmlist_famyinfo_famylist_MnwmpfifList.clearData();
  178. ds_main_ssminfo_ssmlist_spcinfo_spclists.clearData();
  179. //16.03.17_추가_AYS
  180. ds_main_ssminfo_ssmlist_infecinfo_InfectionLists_InfectionList.clearData();
  181. xPath_curenurgstatspec.clearData();
  182. xPath_curenurgstatspec.addRow();
  183. ds_main_ssminfo_ssmlist.clearData();
  184. ds_main_ssminfo_ssmlist.addRow();
  185. dsf_makeValue(ds_main_ssminfo_ssmlist,"pid" ,"string",ds_main_paminfo_list.getColumn(0, "pid"));
  186. dsf_makeValue(ds_main_ssminfo_ssmlist,"orddd" ,"string",ds_main_paminfo_list.getColumn(0, "orddd"));
  187. dsf_makeValue(ds_main_ssminfo_ssmlist,"cretno" ,"string",ds_main_paminfo_list.getColumn(0, "cretno"));
  188. dsf_makeValue(ds_main_ssminfo_ssmlist,"indd" ,"string",ds_main_paminfo_list.getColumn(0, "indd"));
  189. dsf_makeValue(ds_main_ssminfo_ssmlist,"orddeptcd" ,"string",ds_main_paminfo_list.getColumn(0, "orddeptcd"));
  190. dsf_makeValue(ds_main_ssminfo_ssmlist,"ordtype" ,"string",ds_main_paminfo_list.getColumn(0, "ioflag"));
  191. dsf_makeValue(ds_main_ssminfo_ssmlist,"orddrid" ,"string",ds_main_paminfo_list.getColumn(0, "orddrid"));
  192. dsf_makeValue(ds_main_ssminfo_ssmlist,"medispclid" ,"string",ds_main_paminfo_list.getColumn(0, "medispclid"));
  193. dsf_makeValue(ds_main_ssminfo_ssmlist,"emeryn" ,"string","N");
  194. fGetBaseCheckList();
  195. //환자정보
  196. // var nodelist = instance1.selectNodes("ds_init_patbaseinfo_MnwmpfifList");
  197. // var nodePath = "ds_main_ssminfo_ssmlist_famyinfo_famylist_MnwmpfifList";
  198. //
  199. // eval(nodePath).addRow();
  200. //
  201. // var desnode = instance1.selectSingleNode(nodePath);
  202. //
  203. // if(nodelist.length > 0) {
  204. // while(node = nodelist.nextNode()) {
  205. // model.duplicate(desnode, node);
  206. // }
  207. // }
  208. if(ds_init_patbaseinfo_MnwmpfifList.rowcount > 0)
  209. {
  210. ds_main_ssminfo_ssmlist_famyinfo_famylist_MnwmpfifList.copyData(ds_init_patbaseinfo_MnwmpfifList);
  211. }
  212. //감염정보
  213. // var nodelist2 = instance1.selectNodes("ds_init_patbaseinfo_InfectionList");
  214. // var nodePath2 ="ds_main_ssminfo_ssmlist_infecinfo_InfectionLists_InfectionList";
  215. //
  216. // eval(nodePath2).addRow();
  217. //
  218. // var desnode2 = instance1.selectSingleNode(nodePath2);
  219. //
  220. // if(nodelist2.length > 0) {
  221. // while(node = nodelist2.nextNode()) {
  222. // model.duplicate(desnode2, node);
  223. // }
  224. // }
  225. var bolpna = false;
  226. var bolsna = false;
  227. if(ds_init_patbaseinfo_InfectionList.rowcount > 0) ds_main_ssminfo_ssmlist_infecinfo_InfectionLists_InfectionList.copyData(ds_init_patbaseinfo_InfectionList);
  228. if(utlf_isNull(ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.getColumnInfo("pna")))
  229. {
  230. ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.addColumn("pna", "string");
  231. bolpna = true;
  232. }
  233. if(utlf_isNull(ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.getColumnInfo("sna")))
  234. {
  235. ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.addColumn("sna", "string");
  236. bolsna = true;
  237. }
  238. for(var i = 0; i < ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.rowcount ;i++)
  239. {
  240. if(bolpna == true)
  241. {
  242. ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.setColumn(i, "pna", "false");
  243. }
  244. if(bolsna == true)
  245. {
  246. ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.setColumn(i, "sna", "false");
  247. }
  248. }
  249. }
  250. function fGridCheckConfirm() {
  251. // var BoolCheck = false;
  252. // var GridNm = grd_ItemCheckList;
  253. // var opchkyn ="";
  254. // var cnt = 0;
  255. //
  256. // for (var iRow = GridNm.fixedrows; iRow < GridNm.rows; iRow++){
  257. // opchkyn = model.getValue(GridNm.nodeset + "[" + (iRow-1) + "]_opchkyn");
  258. //
  259. // if (chk_stay.value == "1") {
  260. // if ((GridNm.valueMatrix(iRow, GridNm.colRef("Syes"))== "false" || GridNm.valueMatrix(iRow, GridNm.colRef("Syes"))== "") &&
  261. // (GridNm.valueMatrix(iRow, GridNm.colRef("Sno"))== "false" || GridNm.valueMatrix(iRow, GridNm.colRef("Sno"))== "") &&
  262. // (GridNm.valueMatrix(iRow, GridNm.colRef("Snothing"))== "false" || GridNm.valueMatrix(iRow, GridNm.colRef("Snothing"))== "")) {
  263. // BoolCheck = true;
  264. // break;
  265. // }
  266. // } else if (chk_stay.value == "2") {
  267. // if ((GridNm.valueMatrix(iRow, GridNm.colRef("Oyes"))== "false" || GridNm.valueMatrix(iRow, GridNm.colRef("Oyes"))== "") &&
  268. // (GridNm.valueMatrix(iRow, GridNm.colRef("Ono"))== "false" || GridNm.valueMatrix(iRow, GridNm.colRef("Ono"))== "") &&
  269. // (GridNm.valueMatrix(iRow, GridNm.colRef("Onothing"))== "false" || GridNm.valueMatrix(iRow, GridNm.colRef("Onothing"))== "") &&
  270. // (opchkyn == "Y" ||opchkyn == "" || opchkyn == null) ) {
  271. // BoolCheck = true;
  272. // break;
  273. // }
  274. // } else {
  275. //
  276. // if ((GridNm.valueMatrix(iRow, GridNm.colRef("pyes"))== "false" || GridNm.valueMatrix(iRow, GridNm.colRef("pyes"))== "") &&
  277. // (GridNm.valueMatrix(iRow, GridNm.colRef("Pno"))== "false" || GridNm.valueMatrix(iRow, GridNm.colRef("Pno"))== "") &&
  278. // (GridNm.valueMatrix(iRow, GridNm.colRef("Pnothing"))== "false" || GridNm.valueMatrix(iRow, GridNm.colRef("Pnothing"))== "")) {
  279. //
  280. // BoolCheck = true;
  281. // break;
  282. // }
  283. // }
  284. // }
  285. //
  286. // return BoolCheck;
  287. }
  288. /****************************************************************************************
  289. * Argument : N/A
  290. * Description : 저장
  291. ****************************************************************************************/
  292. function fSave(pFlag){
  293. var pid = xPath_MnpmcssrList.getColumn(0,"pid" ); // 환자번호
  294. var instcd = xPath_MnpmcssrList.getColumn(0,"instcd" ); // 원무외래_입원등록정보 PK
  295. var ordtype = xPath_MnpmcssrList.getColumn(0,"ordtype" ); // 외래입원구분
  296. var orddd = xPath_MnpmcssrList.getColumn(0,"orddd" ); // 진료일자
  297. var indd = xPath_MnpmcssrList.getColumn(0,"indd" ); // 입원일자
  298. var orddrid = xPath_MnpmcssrList.getColumn(0,"orddrid" ); // 진료의사
  299. var medispclid = xPath_MnpmcssrList.getColumn(0,"medispclid" ); // 주치교수
  300. var cretno = xPath_MnpmcssrList.getColumn(0,"cretno" ); // 원무생성번호
  301. var orddeptcd = xPath_MnpmcssrList.getColumn(0,"orddeptcd" ); // 진료부서
  302. var ssdd = xPath_MnpmcssrList.getColumn(0,"ssdd" ); // 시술일
  303. //var ssplace = xPath_MnpmcssrList.getColumn(0,"ssplace" ); // 시술장소
  304. var ssnm = xPath_MnpmcssrList.getColumn(0,"ssnm" ); // 시술명
  305. var ssnmetc = xPath_MnpmcssrList.getColumn(0,"ssnmetc" ); // 시술명
  306. var nrecnm = xPath_MnpmcssrList.getColumn(0,"nrecnm" ); // 간호단위기록자
  307. var nrecdt = xPath_MnpmcssrList.getColumn(0,"nrecdt" ); // 간호단위기록일시
  308. var nrecdept = xPath_MnpmcssrList.getColumn(0,"nrecdept" ); // 간호단위기록 부서코드
  309. var srecnm = xPath_MnpmcssrList.getColumn(0,"srecnm" ); // 시술실 기록자
  310. var srecdt = xPath_MnpmcssrList.getColumn(0,"srecdt" ); // 시술실 기록일시
  311. var srecdept = xPath_MnpmcssrList.getColumn(0,"srecdept" ); // 시술실기록 부서코드
  312. var semeryn = xPath_MnpmcssrList.getColumn(0,"emeryn" ); // 응급여부
  313. var strans = xPath_MnpmcssrList.getColumn(0,"trans" ); // 이동수단
  314. var snrectel = xPath_MnpmcssrList.getColumn(0,"nrectel" ); // 간호단위 전화번호
  315. var ssrectel = xPath_MnpmcssrList.getColumn(0,"srectel" ); // 시술실 전화번호
  316. if (utlf_isNull(ssdd)) {
  317. sysf_messageBox("시술일이 입력되지 않았습니다","I");
  318. return;
  319. }
  320. if (ssdd.length != 8) {
  321. sysf_messageBox("시술일이 정확히 입력되지 않았습니다","I");
  322. return;
  323. }
  324. if (utlf_isNull(nrecdept)) {
  325. sysf_messageBox("간호단위 기록부서가 입력되지 않았습니다","I");
  326. return;
  327. }
  328. if (utlf_isNull(nrecnm)) {
  329. sysf_messageBox("간호단위 기록자가 입력되지 않았습니다","I");
  330. return;
  331. }
  332. if (utlf_isNull(nrecdt)) {
  333. sysf_messageBox("간호단위 기록일시가 입력되지 않았습니다","I");
  334. return;
  335. }
  336. if (utlf_isNull(semeryn)) {
  337. sysf_messageBox("응급여부가 입력되지 않았습니다","I");
  338. return;
  339. }
  340. if (utlf_isNull(strans)) {
  341. sysf_messageBox("이동수단이 입력되지 않았습니다","I");
  342. return;
  343. }
  344. if (utlf_isNull(snrectel)) {
  345. sysf_messageBox("간호단위 전화번호가 입력되지 않았습니다","I");
  346. return;
  347. }
  348. if (!(ordtype == "S" || ordtype =="O")) {
  349. orddd = indd;
  350. orddrid = medispclid;
  351. }
  352. var curenurgstatspec = "";
  353. var famyinfo = "";
  354. var spcinfo = "";
  355. if(xPath_curenurgstatspec.rowcount > 0) {
  356. // var curenurgstatspec = instance1.selectSingleNode(xPath_curenurgstatspec).xml;
  357. var curenurgstatspec = "";
  358. var sParamObjArr = [{ds: "ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList", path:"ItemCheckLists/ItemCheckList", filter: ""}];
  359. //curenurgstatspec = lf_convertDsToXml(sParamObjArr,"<ItemCheckLists><ItemCheckList><iteminfobk/><iteminfo/><pyes/><pno/><syes/><sno/><itemcode/></ItemCheckList></ItemCheckLists>");
  360. curenurgstatspec = lf_convertDsToXml(sParamObjArr,"<ItemCheckLists><ItemCheckList><iteminfobk/><iteminfo/><pyes/><pno/><pna/><syes/><sno/><sna/><itemcode/></ItemCheckList></ItemCheckLists>");
  361. //<ItemCheckLists><ItemCheckList><iteminfobk/><iteminfo/><pyes/><pno/><pna/><syes/><sno/><sna/><itemcode/></ItemCheckList></ItemCheckLists>
  362. }
  363. if(xPath_famyinfo.rowcount > 0) {
  364. // var famyinfo = instance1.selectSingleNode(xPath_famyinfo).xml;
  365. var famyinfo = "";
  366. var sParamObjArr = [{ds: "ds_main_ssminfo_ssmlist_famyinfo_famylist_MnwmpfifList", path:"famylist/MnwmpfifList", filter: ""}];
  367. //famyinfo = lf_convertDsToXml(sParamObjArr,"<famylist><MnwmpfifList><chkyn/><cdnm/><tel/><mpphone/><addr/><detladdr/></MnwmpfifList></famylist>");
  368. famyinfo = lf_convertDsToXml(sParamObjArr,"<famylist><MnwmpfifList><chkyn/><cdnm/><tel/><mpphone/><rela/><hngnm/><addr/><detladdr/><indd/><instcd/><pid/><recflag/><remfact/></MnwmpfifList></famylist>");
  369. }
  370. // 감염정보 추가('16.03.17 - AYS)
  371. if(xPath_Infecinfo.rowcount > 0) {
  372. // var infecinfo = instance1.selectSingleNode(xPath_Infecinfo).xml;
  373. var infecinfo = "";
  374. var sParamObjArr = [{ds: "ds_main_ssminfo_ssmlist_infecinfo_InfectionLists_InfectionList", path:"InfectionLists/InfectionList", filter: ""}];
  375. infecinfo = lf_convertDsToXml(sParamObjArr,"<InfectionLists><InfectionList><testcd/><tclsscrnnm/><checkrsult/><genrdd/><sortinfo/></InfectionList></InfectionLists>");
  376. }
  377. var nmemo = xPath_MnpmcssrList.getColumn(0,"nmemo" ); // 간호단위메모
  378. var smemo = xPath_MnpmcssrList.getColumn(0,"smemo" ); // 수술,대기 단위메모
  379. var signno = xPath_MnpmcssrList.getColumn(0,"signno" ); // 인증번호
  380. var ssbfcureseqno = xPath_MnpmcssrList.getColumn(0,"ssbfcureseqno" ); // 의뢰번호(년도(4) + 일련번호(6))
  381. if (utlf_isNull(ssbfcureseqno)) {
  382. var stat = "I";
  383. } else {
  384. var stat = "U";
  385. }
  386. if ( pFlag == "D" ) {
  387. var stat = "D";
  388. }
  389. var wUserId = sysf_getUserInfo("userid" ); // 사용자
  390. var wUserNm = sysf_getUserInfo("usernm" ); // 사용자 명
  391. var wDeptCd = sysf_getUserInfo("dutplcecd"); // 사용자 부서코드
  392. var wDeptNm = sysf_getUserInfo("dutplcenm"); // 사용자 부서명
  393. var wRecoDate = utlf_getCurrentDate() + utlf_getCurrentTime(); // 시스템일자 기록
  394. var wSaveDate = utlf_getCurrentDate() + utlf_getCurrentTime(); // 시스템일자 기록
  395. // ds_send.clearData();
  396. // // Title Set
  397. // var sMnpmcssrData = "pid" + "▦" // 환자번호
  398. // + "instcd" + "▦" // 원무외래_입원등록정보 PK
  399. // + "ordtype" + "▦" // 외래입원구분
  400. // + "orddd" + "▦" // 진료일자
  401. // + "cretno" + "▦" // 원무생성번호
  402. // + "orddeptcd" + "▦" // 진료부서
  403. // + "orddrid" + "▦" // 진료의사
  404. // + "curenurgstatspec" + "▦" // 처치및간호상태정보
  405. // + "certflag" + "▦" //
  406. // + "ssdd" + "▦" //
  407. // + "ssnm" + "▦" //
  408. // + "ssnmetc" + "▦" //
  409. // + "nrecnm" + "▦" // 간호단위기록자
  410. // + "nrecdt" + "▦" // 간호단위기록일시
  411. // + "nrecdept" + "▦" // 간호단위기록부서
  412. // + "srecnm" + "▦" // 시술실 기록자ID
  413. // + "srecdt" + "▦" // 시술실 기록일시
  414. // + "srecdept" + "▦" // 시술실 기록부서
  415. // + "nmemo" + "▦" // 간호단위메모
  416. // + "smemo" + "▦" // 수술,대기 단위메모
  417. // + "signno" + "▦" // 인증번호
  418. // + "ssbfcureseqno" + "▦" // 시술에대한의뢰번호(년도(4) + 일련번호(6))
  419. // + "stat" + "▦" // 진행상태
  420. // + "famyinfo" + "▦" // 가족정보
  421. // + "infecinfo" + "▦" // 감염정보
  422. // + "emeryn" + "▦" // 응급여부
  423. // + "trans" + "▦" // 이동수당
  424. // + "nrectel" + "▦" // 간호단위 전화번호
  425. // + "srectel" + "▩"; // 시술실 전화번호
  426. // // Title Set
  427. // sMnpmcssrData += pid + "▦" // 환자번호
  428. // + instcd + "▦" // 원무외래_입원등록정보 PK
  429. // + ordtype + "▦" // 외래입원구분
  430. // + orddd + "▦" // 진료일자
  431. // + cretno + "▦" // 원무생성번호
  432. // + orddeptcd + "▦" // 진료부서
  433. // + orddrid + "▦" // 진료의사
  434. // + curenurgstatspec + "▦" // 처치및간호상태정보
  435. // + pFlag + "▦" // 인증저장구분
  436. // + ssdd + "▦" // 시술일
  437. // + ssnm + "▦" // 시술명
  438. // + ssnmetc + "▦" // 시술명
  439. // + nrecnm + "▦" // 간호단위기록자
  440. // + nrecdt + "▦" // 간호단위기록일시
  441. // + nrecdept + "▦" // 간호단위기록부서
  442. // + srecnm + "▦" // 시술실 기록자
  443. // + srecdt + "▦" // 시술실 기록일시
  444. // + srecdept + "▦" // 시술실 기록부서
  445. // + nmemo + "▦" // 간호단위메모
  446. // + smemo + "▦" // 수술,대기 단위메모
  447. // + signno + "▦" // 인증번호
  448. // + ssbfcureseqno + "▦" // 수술에대한의뢰번호(년도(4) + 일련번호(6))
  449. // + stat + "▦" // 진행상태
  450. // + famyinfo + "▦" // 가족정보
  451. // + infecinfo + "▦" // 감염정보
  452. // + semeryn + "▦" // 응급여부
  453. // + strans + "▦" // 이동수당
  454. // + snrectel + "▦" // 간호단위 전화번호
  455. // + ssrectel + "▩"; // 시술실 전화번호
  456. //
  457. // dsf_makeValue( ds_send, "MnpmcssrList", "string", sMnpmcssrData);
  458. dsf_createDsRow("ds_send_MnpmcssrList", [
  459. {col:"pid", type:"STRING", size:256, val:pid} //1
  460. , {col:"instcd", type:"STRING", size:256, val:instcd} //2
  461. , {col:"ordtype", type:"STRING", size:256, val:ordtype} //3
  462. , {col:"orddd", type:"STRING", size:256, val:orddd} //4
  463. , {col:"cretno", type:"STRING", size:256, val:cretno} //5
  464. , {col:"orddeptcd", type:"STRING", size:256, val:orddeptcd} //6
  465. , {col:"orddrid", type:"STRING", size:256, val:orddrid}
  466. , {col:"curenurgstatspec", type:"STRING", size:256, val:curenurgstatspec}
  467. , {col:"certflag", type:"STRING", size:256, val:pFlag}
  468. , {col:"ssdd", type:"STRING", size:256, val:ssdd}
  469. , {col:"ssnm", type:"STRING", size:256, val:ssnm}
  470. , {col:"ssnmetc", type:"STRING", size:256, val:ssnmetc}
  471. , {col:"nrecnm", type:"STRING", size:256, val:nrecnm}
  472. , {col:"nrecdt", type:"STRING", size:256, val:nrecdt}
  473. , {col:"nrecdept", type:"STRING", size:256, val:nrecdept}
  474. , {col:"srecnm", type:"STRING", size:256, val:srecnm}
  475. , {col:"srecdt", type:"STRING", size:256, val:srecdt}
  476. , {col:"srecdept", type:"STRING", size:256, val:srecdept}
  477. , {col:"nmemo", type:"STRING", size:256, val:nmemo}
  478. , {col:"smemo", type:"STRING", size:256, val:smemo}
  479. , {col:"signno", type:"STRING", size:256, val:signno}
  480. , {col:"ssbfcureseqno", type:"STRING", size:256, val:ssbfcureseqno}
  481. , {col:"stat", type:"STRING", size:256, val:stat}
  482. , {col:"famyinfo", type:"STRING", size:256, val:famyinfo}
  483. , {col:"infecinfo", type:"STRING", size:256, val:infecinfo}
  484. , {col:"emeryn", type:"STRING", size:256, val:semeryn}
  485. , {col:"trans", type:"STRING", size:256, val:strans}
  486. , {col:"nrectel", type:"STRING", size:256, val:snrectel}
  487. , {col:"srectel", type:"STRING", size:256, val:ssrectel}
  488. , {col:"ssplace", type:"STRING", size:256, val:""}
  489. , {col:"spcinfo", type:"STRING", size:256, val:""}
  490. ]);
  491. //grdf_setStatusColumn(ds_send_MnpmcssrList, "stat");
  492. if(pFlag == "C") {
  493. var CertFlag = true;
  494. CertFlag = fSignProcessSet();
  495. if (CertFlag == false){
  496. //2008-10-01 오전 5:54:13 taebum 인증저 취소시 통합기록 조회관련 요구사항 처리로 인한 오류발생 .
  497. //화면 close 시킴.
  498. this.close();
  499. return; // 인증실패
  500. }
  501. }
  502. var oParam = {};
  503. oParam.id = "TXMNP00213";
  504. oParam.service = "opanstapp.OpAnstPatMngt";
  505. oParam.method = "reqExeMnpmcssrInfo";
  506. oParam.inds = "MnpmcssrList=ds_send_MnpmcssrList signinfo=ds_send_signinfo";
  507. oParam.outds = "ds_temp_retdata=retdata";
  508. oParam.async = false;
  509. oParam.callback = "cf_TXMNP00213";
  510. tranf_submit(oParam);
  511. if(arErrorCode.pop("TXMNP00213") > -1) {
  512. fAddSSList();
  513. if(stat == 'I' || stat == 'U'){
  514. if(!utlf_isNull(ssbfcureseqno)) {
  515. dsf_makeValue( ds_init, "ssbfcureseqno", "string", ssbfcureseqno);
  516. frmf_inputEnterKey("grp_main.cmb_sslist", "onitemchanged", new ItemChangeEventInfo);
  517. } else {
  518. var ssbfcureseqno_new = ds_temp_retdata.getColumn(0, "ssbfcureseqno");
  519. dsf_makeValue( ds_init, "ssbfcureseqno", "string", ssbfcureseqno_new);
  520. frmf_inputEnterKey("grp_main.cmb_sslist", "onitemchanged", new ItemChangeEventInfo);
  521. }
  522. sysf_messageBox("저장이 ", "I001");
  523. }
  524. if (pFlag =="D") {
  525. fNew();
  526. sysf_messageBox("삭제가 ", "I001");
  527. }
  528. }
  529. }
  530. function cf_TXMNP00213(sSvcId, nErrorCode, sErrorMsg) {
  531. arErrorCode.push(sSvcId, nErrorCode);
  532. }
  533. /****************************************************************************************
  534. * Argument : N/A
  535. * Description : 전자서명 호출
  536. ****************************************************************************************/
  537. function fSignProcessSet() {
  538. //2009-02-25 YCD 인증서 호출 설정 주석 처리
  539. //Sign.certreload = true;
  540. var ordtype = xPath_MnpmcssrList.getColumn(0,"ordtype" ); // 07 외래입원구분
  541. if( Sign.signprocess() == true ){ // ▶ 전자인증 관련 환자 인적 정보를 보내줌.
  542. var wSigninfo = "pid" +"▦" // 등록번호
  543. + "orddd" +"▦" // 입원일자(입원,응급)_진료일자(외래)
  544. + "cretno" +"▦" // 생성번호
  545. + "signno" +"▦" // 서명번호(인증번호)
  546. + "recdd" +"▦" // 실제 기록이 이루어진 기록일자
  547. + "rectm" +"▦" // 실제 기록이 이루어진 기록시간
  548. + "recsaveflag" +"▦" // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  549. + "signflag" +"▦" // 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  550. + "signgenrflag" +"▦" // 외래_입원구분(코드정의서 M0010 참조)
  551. + "formcd" +"▦" // 각 기록지별 서식코드 0000002473 N57 간호 수술간호기록
  552. + "orddeptcd" +"▦" // 진료부서코드
  553. + "orddrid" +"▦" // 진료의사ID (집도의)
  554. + "signbfcnts" +"▦" // ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  555. + "signaftcnts" +"▩" // ▶ 공인인증 처리후 데이터
  556. + xPath_MnpmcssrList.getColumn(0,"pid" ) +"▦" // 등록번호
  557. + xPath_MnpmcssrList.getColumn(0,"indd" ) + xPath_MnpmcssrList.getColumn(0,"orddd" )+"▦" // 진료일자(입원,응급)_진료일자(외래)
  558. + xPath_MnpmcssrList.getColumn(0,"cretno" ) +"▦" // 생성번호
  559. + xPath_MnpmcssrList.getColumn(0,"signno" ) +"▦" // 서명번호(인증번호)
  560. + utlf_getCurrentDate() +"▦" // 실제 기록이 이루어진 기록일자
  561. + utlf_getCurrentTime() +"▦" // 실제 기록이 이루어진 기록시간
  562. + "N" +"▦" // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  563. + "02" +"▦" // 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  564. + xPath_MnpmcssrList.getColumn(0,"ordtype") +"▦" // 외래_입원구분(코드정의서 M0010 참조)
  565. + "1500016488" +"▦" // 시술전 준비확인
  566. + xPath_MnpmcssrList.getColumn(0,"orddeptcd") +"▦" // 진료부서코드
  567. + xPath_MnpmcssrList.getColumn(0,"medispclid")+ xPath_MnpmcssrList.getColumn(0,"orddrid" )+"▦" // 진료의사ID (주치교수)
  568. + Sign.signedInfos[1] +"▦" // ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  569. + Sign.signedInfos[2] +"▩"; // ▶ 공인인증 처리후 데이터
  570. // dsf_makeValue( ds_send, "signinfo", "string", wSigninfo);
  571. dsf_setCSVToDs("ds_send_signinfo",wSigninfo);
  572. // dsf_makeValue( ds_send_signinfo, "pid", "string", eval(xPath_MnpmcssrList).getColumn(0,"pid" )); // 등록번호
  573. // dsf_makeValue( ds_send_signinfo, "orddd", "string", eval(xPath_MnpmcssrList).getColumn(0,"orddd" )); // 입원일자(입원,응급)_진료일자(외래)
  574. // dsf_makeValue( ds_send_signinfo, "cretno", "string", eval(xPath_MnpmcssrList).getColumn(0,"cretno" )); // 생성번호
  575. // dsf_makeValue( ds_send_signinfo, "signno", "string", eval(xPath_MnpmcssrList).getColumn(0,"certno" )); // 서명번호(인증번호)
  576. // dsf_makeValue( ds_send_signinfo, "recdd", "string", utlf_getCurrentDate() ); // 실제 기록이 이루어진 기록일자
  577. // dsf_makeValue( ds_send_signinfo, "rectm", "string", utlf_getCurrentTime() ); // 실제 기록이 이루어진 기록시간
  578. // dsf_makeValue( ds_send_signinfo, "recsaveflag", "string", "N" ); // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
  579. // dsf_makeValue( ds_send_signinfo, "signflag", "string", "02" ); // 서명자료구분(01 : 진료, 02 : 간호, 03 : LIS, 04 : 진료지원)
  580. // dsf_makeValue( ds_send_signinfo, "signgenrflag", "string", eval(xPath_MnpmcssrList).getColumn(0,"inoutflag" )); // 외래_입원구분(코드정의서 M0010 참조)
  581. // dsf_makeValue( ds_send_signinfo, "formcd", "string", "0000002431" ); // 각 기록지별 서식코드 0000002473 N57 간호 수술간호기록
  582. // dsf_makeValue( ds_send_signinfo, "orddeptcd", "string", eval(xPath_MnpmcssrList).getColumn(0,"orddeptcd" )); // 진료부서코드
  583. // dsf_makeValue( ds_send_signinfo, "orddrid", "string", eval(xPath_MnpmcssrList).getColumn(0,"perfdrid" )); // 진료의사ID (집도의)
  584. // dsf_makeValue( ds_send_signinfo, "signbfcnts", "string", Sign.signedInfos[1]); // ▶ 인증할 데이터 정보(미기록 노드 제거된 정보)
  585. // dsf_makeValue( ds_send_signinfo, "signaftcnts", "string", Sign.signedInfos[2]); // ▶ 공인인증 처리후 데이터
  586. }else{
  587. return false;
  588. }
  589. }
  590. function fMake_SignData(){
  591. // ▶ 기록 관련 인스턴스 전체를 copy, 인증에 저장할 모든 Instance AddNode한다.
  592. Sign.addnode(xPath_MnpmcssrList);
  593. }
  594. /****************************************************************************************
  595. * Argument : N/A
  596. * Description : fAddSSList
  597. ****************************************************************************************/
  598. function fGetBaseCheckList() {
  599. ds_send.clearData();
  600. dsf_makeValue( ds_send, "cdgrupid" , "string", 'S05');
  601. dsf_makeValue( ds_send, "currentdate" , "string", utlf_getCurrentDate());
  602. xPath_curenurgstatspec.clearData();
  603. var oParam = {};
  604. oParam.id = "TRMNP00215";
  605. oParam.service = "opanstapp.OpAnstPatMngt";
  606. oParam.method = "reqGetCureItemInfo";
  607. oParam.inds = "req=ds_send";
  608. oParam.outds = "ds_init_cureiteminfo_ItemCheckList=ItemCheckList";
  609. oParam.async = false;
  610. // oParam.callback = "cf_TRMNP00215";
  611. tranf_submit(oParam);
  612. //sysf_trace(xPath_Fmt_curenurgstatspec.saveXML())
  613. xPath_curenurgstatspec.copyData(xPath_Fmt_curenurgstatspec); // 환자 수술전 처치 및 간호상태 확인 사항
  614. // fSetBtn(); //EXPR처리
  615. }
  616. /* --------------------------------------------------*/
  617. /* type : function */
  618. /* access : public */
  619. /* desc : GRID CheckBox 값변경 */
  620. /* param : pGridNm : DataGrid Name */
  621. /* pRow : DataGrid Row */
  622. /* pCol : DataGrid Col */
  623. /* pTrueFase : 논리값 */
  624. /* return : */
  625. /* --------------------------------------------------*/
  626. function fCheckBox(pGridNm,pRow,pCol,pTrueFase){
  627. // pGridNm.valueMatrix(pRow,pCol) = pTrueFase;
  628. var objDsGrid = eval(pGridNm.binddataset);
  629. objDsGrid.setColumn(pRow, pCol, pTrueFase);
  630. }
  631. /* ------------------------------------------------- */
  632. /* type : function */
  633. /* access : public */
  634. /* desc : GRID CheckBox 값변경 */
  635. /* param : pGridNm : DataGrid Name */
  636. /* return : */
  637. /* -------------------------------------------------*/
  638. function fGridValueChangedCheckBox(pGridNm, columnid){
  639. var wTrueFase;
  640. GridNm = eval(pGridNm);
  641. DsNm = eval(GridNm.binddataset);
  642. if (GridNm.currentcol > 4) {
  643. wTrueFase = DsNm.getColumn(GridNm.currentrow, columnid);
  644. if (wTrueFase == "true") {
  645. switch(GridNm.currentcol){
  646. case 5 :
  647. // if( GridNm.row == "1" ) { // 전체 '예' 체크 시
  648. // fCheckBox(GridNm, ITM002 ,GridNm.colRef("pyes"),"false");
  649. // fCheckBox(GridNm, ITM022 ,GridNm.colRef("pyes"),"false");
  650. // }
  651. // fCheckBox(GridNm, GridNm.currentrow ,GridNm.colRef("pno"),"false");
  652. fCheckBox(GridNm, GridNm.currentrow ,"pna","false");
  653. break;
  654. // case GridNm.colRef("pno") :
  655. // fCheckBox(GridNm,GridNm.row ,GridNm.colRef("pyes"),"false");
  656. // fCheckBox(GridNm, GridNm.row ,GridNm.colRef("pna"),"false");
  657. // break;
  658. case 7 :
  659. fCheckBox(GridNm,GridNm.currentrow ,"pyes","false");
  660. // fCheckBox(GridNm,GridNm.currentrow ,GridNm.colRef("pno"),"false");
  661. break;
  662. case 8 :
  663. // if( GridNm.row == "1" ) { // 전체 '예' 체크 시
  664. // fCheckBox(GridNm, ITM002 ,GridNm.colRef("syes"),"false");
  665. // fCheckBox(GridNm, ITM022 ,GridNm.colRef("syes"),"false");
  666. // }
  667. // fCheckBox(GridNm,GridNm.currentrow ,GridNm.colRef("sno"),"false");
  668. fCheckBox(GridNm,GridNm.currentrow ,"sna","false");
  669. break;
  670. // case GridNm.colRef("sno") :
  671. // fCheckBox(GridNm,GridNm.row ,GridNm.colRef("syes"),"false");
  672. // fCheckBox(GridNm,GridNm.row ,GridNm.colRef("sna"),"false");
  673. // break;
  674. case 10 :
  675. fCheckBox(GridNm,GridNm.currentrow ,"syes","false");
  676. // fCheckBox(GridNm,GridNm.currentrow ,GridNm.colRef("sno"),"false");
  677. break;
  678. }
  679. }
  680. }
  681. }
  682. /****************************************************************************************
  683. * Argument : N/A
  684. * Description : fSetBtn
  685. ****************************************************************************************/
  686. function fSetBtn() {
  687. // for(var i = 0 ; i < ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.rowcount; i++) {
  688. // if ( ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.getColumn(i, "itemcode") == "02" ) {
  689. // grd_ItemCheckList.cellstyle("background-image",i,2) = "../../.._com_commonweb_images_icon_startend.gif";
  690. // grd_ItemCheckList.cellstyle("cursor",i,2) = "hand";
  691. // }
  692. //
  693. // if ( grd_ItemCheckList.valueMatrix(i, grd_ItemCheckList.colRef("itemcode")) == "03") {
  694. // grd_ItemCheckList.cellstyle("background-image",i,2) = "../../.._com_commonweb_images_icon_startend.gif";
  695. // grd_ItemCheckList.cellstyle("cursor",i,2) = "hand";
  696. // }
  697. //
  698. // if ( grd_ItemCheckList.valueMatrix(i, grd_ItemCheckList.colRef("itemcode")) == "09") {
  699. // grd_ItemCheckList.cellstyle("background-image",i,2) = "../../.._com_commonweb_images_icon_startend.gif";
  700. // grd_ItemCheckList.cellstyle("cursor",i,2) = "hand";
  701. // }
  702. //
  703. // // '16.03.30 - 박민지 선생님 요청으로 Invisible 처리
  704. // // if ( grd_ItemCheckList.valueMatrix(i, grd_ItemCheckList.colRef("itemcode")) == "04") {
  705. // // grd_ItemCheckList.cellstyle("background-image",i,4) = "../../.._com_commonweb_images_icon_list.gif";
  706. // // grd_ItemCheckList.cellstyle("cursor",i,4) = "hand";
  707. // // }
  708. // //
  709. // // 16.09.19_보조기구, 장신구 제거 항목 추가
  710. // if ( grd_ItemCheckList.valueMatrix(i, grd_ItemCheckList.colRef("itemcode")) == "05") {
  711. // grd_ItemCheckList.cellstyle("background-image",i,4) = "../../.._com_commonweb_images_icon_list.gif";
  712. // grd_ItemCheckList.cellstyle("cursor",i,4) = "hand";
  713. // }
  714. //
  715. // if ( grd_ItemCheckList.valueMatrix(i, grd_ItemCheckList.colRef("itemcode")) == "06") {
  716. // grd_ItemCheckList.cellstyle("background-image",i,4) = "../../.._com_commonweb_images_icon_list.gif";
  717. // grd_ItemCheckList.cellstyle("cursor",i,4) = "hand";
  718. // }
  719. // }
  720. }
  721. /****************************************************************************************
  722. * Argument : N/A
  723. * Description : 상세내역 조회
  724. ****************************************************************************************/
  725. function fSearchDetlInfo() {
  726. //시술 및 수술동의서
  727. var cRow = grp_main.grd_ItemCheckList.currentrow;
  728. var cCol = grp_main.grd_ItemCheckList.currentcol;
  729. if ( ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.getColumn(cRow, "itemcode") == "02" && cCol == 2 ){
  730. dsf_createDsRow("ds_req", [
  731. {col:"instcd", type:"STRING", size:256, val:sysf_getUserInfo("dutplceinstcd")}
  732. , {col:"pid", type:"STRING", size:256, val:xPath_MnpmcssrList.getColumn(0,"pid")}
  733. , {col:"orddd", type:"STRING", size:256, val:xPath_MnpmcssrList.getColumn(0,"cretno")}
  734. , {col:"cretno", type:"INT", size:256, val:xPath_MnpmcssrList.getColumn(0,"indd")+xPath_MnpmcssrList.getColumn(0,"orddd")}
  735. , {col:"chosflag", type:"STRING", size:256, val:""}
  736. , {col:"reckind", type:"STRING", size:256, val:"EMR"}
  737. , {col:"itemindxseq", type:"STRING", size:256, val:"132184"}
  738. , {col:"sortkind", type:"STRING", size:256, val:"D"}
  739. , {col:"pagingyn", type:"STRING", size:256, val:"N"}
  740. , {col:"keyfromdd", type:"STRING", size:256, val:""}
  741. , {col:"keytodd", type:"STRING", size:256, val:""}
  742. ]);
  743. var oParam = {};
  744. oParam.id = "TRMRI03009";
  745. oParam.service = "recmngtapp.IntegrityRec";
  746. oParam.method = "reqGetKeys";
  747. oParam.inds = "req=ds_req";
  748. oParam.outds = "ds_tmp_keys=item";
  749. oParam.async = false;
  750. //oParam.callback = "cf_TRMRI03009";
  751. tranf_submit(oParam);
  752. var Prtrecinfo = "";
  753. for(var i=0; i < ds_tmp_keys.rowcount; i++){
  754. Prtrecinfo += ds_tmp_keys.getColumn(i, "kind")
  755. + "▦" + ds_tmp_keys.getColumn(i, "signno")
  756. + "▦" + ds_tmp_keys.getColumn(i, "formcd")
  757. + "▩";
  758. }
  759. frmf_setParameter("SPMRI02400_prtrecinfo", Prtrecinfo);
  760. frmf_setParameter("SPMRI02400_prtyn", "N");
  761. frmf_setParameter("SPMRI02400_NurProg", "Y");
  762. //frmf_modal("SPMRI02400", "", "","", "", "", "", "", "", "", "", "", "", "M");
  763. frmf_modal("SPMRI02400", "SPMRI02400", "", "","", "", "", "", "", "", "", "", "M");
  764. }
  765. //ADR
  766. if ( ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.getColumn(cRow, "itemcode") == "09" && cCol == 2 ){
  767. //frmf_open("SPMMD03300", "", "","", "", "", "", "", "", "", "", "", "", "M");
  768. frmf_open("SPMMD03300", "SPMMD03300", "", "","", "", "", "", "", "", "", "", "M");
  769. }
  770. //진정동의서
  771. if ( ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.getColumn(cRow, "itemcode") == "03" && cCol == 2 ){
  772. dsf_createDsRow("ds_req", [
  773. {col:"instcd", type:"STRING", size:256, val:sysf_getUserInfo("dutplceinstcd")}
  774. , {col:"pid", type:"STRING", size:256, val:xPath_MnpmcssrList.getColumn(0,"pid")}
  775. , {col:"orddd", type:"STRING", size:256, val:xPath_MnpmcssrList.getColumn(0,"cretno")}
  776. , {col:"cretno", type:"INT", size:256, val:xPath_MnpmcssrList.getColumn(0,"indd")+xPath_MnpmcssrList.getColumn(0,"orddd")}
  777. , {col:"chosflag", type:"STRING", size:256, val:""}
  778. , {col:"reckind", type:"STRING", size:256, val:"EMR"}
  779. , {col:"itemindxseq", type:"STRING", size:256, val:"132185"}
  780. , {col:"sortkind", type:"STRING", size:256, val:"D"}
  781. , {col:"pagingyn", type:"STRING", size:256, val:"N"}
  782. , {col:"keyfromdd", type:"STRING", size:256, val:""}
  783. , {col:"keytodd", type:"STRING", size:256, val:""}
  784. ]);
  785. var oParam = {};
  786. oParam.id = "TRMRI03009";
  787. oParam.service = "recmngtapp.IntegrityRec";
  788. oParam.method = "reqGetKeys";
  789. oParam.inds = "req=ds_req";
  790. oParam.outds = "ds_tmp_keys=item";
  791. oParam.async = false;
  792. //oParam.callback = "cf_TRMRI03009";
  793. tranf_submit(oParam);
  794. var Prtrecinfo = "";
  795. for(var i=0; i < ds_tmp_keys.rowcount; i++){
  796. if( ds_tmp_keys.getColumn(i, "formcd") == "1100010977"){
  797. Prtrecinfo += ds_tmp_keys.getColumn(i, "kind")
  798. + "▦" + ds_tmp_keys.getColumn(i, "signno")
  799. + "▦" + ds_tmp_keys.getColumn(i, "formcd")
  800. + "▩";
  801. }
  802. }
  803. frmf_setParameter("SPMRI02400_prtrecinfo", Prtrecinfo);
  804. frmf_setParameter("SPMRI02400_prtyn", "N");
  805. frmf_setParameter("SPMRI02400_NurProg", "Y");
  806. //frmf_modal("SPMRI02400", "", "","", "", "", "", "", "", "", "", "", "", "M");
  807. frmf_modal("SPMRI02400", "SPMRI02400", "", "","", "", "", "", "", "", "", "", "M");
  808. }
  809. if ( ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.getColumn(cRow, "itemcode") == "04" && cCol == 4 ){
  810. var parammsg = "B@시술부위표시@HPCD2";
  811. frmf_setParameter("SPMQR06000_param", parammsg); // 파라미터 설정
  812. //frmf_modal("SPMQR06000", "SPMQR06000", "", "", "", "", "", "", "", "", "", "", "", "M"); // 병원코드 팝업
  813. frmf_modal("SPMQR06000", "SPMQR06000", "", "","", "", "", "", "", "", "", "", "M");
  814. }
  815. if ( ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.getColumn(cRow, "itemcode") == "05" && cCol == 4 ){
  816. var parammsg = "B@검사시 확인 사항@HPCD3";
  817. frmf_setParameter("SPMQR06000_param", parammsg); // 파라미터 설정
  818. //frmf_modal("SPMQR06000", "", "", "", "", "", "", "", "", "", "", "", "", "M"); // 병원코드 팝업
  819. frmf_modal("SPMQR06000", "SPMQR06000", "", "","", "", "", "", "", "", "", "", "M");
  820. }
  821. if ( ds_main_ssminfo_ssmlist_curenurgstatspec_ItemCheckLists_ItemCheckList.getColumn(cRow, "itemcode") == "06" && cCol == 4 ){
  822. var parammsg = "B@정맥주사 확보기준@HPCD4";
  823. frmf_setParameter("SPMQR06000_param", parammsg); // 파라미터 설정
  824. //frmf_modal("SPMQR06000", "", "", "", "", "", "", "", "", "", "", "", "", "M"); // 병원코드 팝업
  825. frmf_modal("SPMQR06000", "SPMQR06000", "", "","", "", "", "", "", "", "", "", "M");
  826. }
  827. }
  828. /****************************************************************************************
  829. * Argument : N/A
  830. * Description : 화면 우측상단 환자정보 호출
  831. ****************************************************************************************/
  832. function fGetPatBaseInfo() {
  833. var spid = ds_main_paminfo_list.getColumn(0, "pid");
  834. var sorddd = ds_main_paminfo_list.getColumn(0, "orddd");
  835. var sindd = ds_main_paminfo_list.getColumn(0, "indd");
  836. var scretno = ds_main_paminfo_list.getColumn(0, "cretno");
  837. var sordtype = ds_main_paminfo_list.getColumn(0, "ordtype");
  838. if (!(sordtype == "S" || sordtype =="O")) {
  839. sorddd = sindd;
  840. }
  841. dsf_makeValue( ds_send, "pid" , "string", spid);
  842. dsf_makeValue( ds_send, "orddd" , "string", sorddd);
  843. dsf_makeValue( ds_send, "cretno", "string", scretno);
  844. //sysf_trace(ds_send.saveXML())
  845. var oParam = {};
  846. oParam.id = "TRMNP00216";
  847. oParam.service = "opanstapp.OpAnstPatMngt";
  848. oParam.method = "reqGetPatBaseInfo";
  849. oParam.inds = "req=ds_send";
  850. oParam.outds = "ds_init_patbaseinfo_patinfo=patinfo ds_init_patbaseinfo_emplist=emplist ds_init_patbaseinfo_MnwmpfifList=MnwmpfifList ds_init_patbaseinfo_InfectionList=InfectionList";
  851. oParam.async = false;
  852. oParam.callback = "cf_TRMNP00216";
  853. tranf_submit(oParam);
  854. if(ds_init_patbaseinfo_MnwmpfifList.rowcount > 0)
  855. {
  856. ds_main_ssminfo_ssmlist_famyinfo_famylist_MnwmpfifList.copyData(ds_init_patbaseinfo_MnwmpfifList);
  857. }
  858. if(ds_init_patbaseinfo_InfectionList.rowcount > 0)
  859. {
  860. ds_main_ssminfo_ssmlist_infecinfo_InfectionLists_InfectionList.copyData(ds_init_patbaseinfo_InfectionList);
  861. }
  862. }
  863. function cf_TRMNP00216(sSvcId, nErrorCode, sErrorMsg) {
  864. if(nErrorCode < 0) return;
  865. dsf_setFixVal(ds_init_patbaseinfo_MnwmpfifList, "chkyn:N");
  866. }
  867. function fControlGridAttr(pGrid) {
  868. // var menuParameter = String(frmf_getMenuParam()).;
  869. // var sBool1 = "";
  870. // var sBool2 = "";
  871. //
  872. // if(menuParameter == 'NM') {
  873. // sBool1 = false;
  874. // sBool2 = true;
  875. // } else if(menuParameter == 'IM') {
  876. // sBool1 = true;
  877. // sBool2 = false;
  878. // } else {
  879. // sBool1 = false;
  880. // sBool2 = false;
  881. // }
  882. //
  883. // for (var iRow = pGrid.fixedrows; iRow <= pGrid.rows; iRow++){
  884. // //opchkyn = model.getValue(pGrid.nodeset + "[" + (iRow-1) + "]_opchkyn");
  885. // //onochkyn = model.getValue(pGrid.nodeset + "[" + (iRow-1) + "]_onochkyn");
  886. //
  887. // pGrid.isReadOnly(iRow, pGrid.colRef("pyes"), iRow, pGrid.colRef("pna"))=sBool1;
  888. // pGrid.isReadOnly(iRow, pGrid.colRef("syes"), iRow, pGrid.colRef("sna"))=sBool2;
  889. // //
  890. // // if(sBool3 == false && (onochkyn == "N" || onochkyn == "" || onochkyn == null) ) {
  891. // // pGrid.isReadOnly(iRow, pGrid.colRef("Onothing"), iRow, pGrid.colRef("Onothing"))= false;
  892. // // } else {
  893. // // pGrid.isReadOnly(iRow, pGrid.colRef("Onothing"), iRow, pGrid.colRef("Onothing"))=true;
  894. // // }
  895. // //
  896. // // if(opchkyn == "N") {
  897. // // pGrid.isReadOnly(iRow, pGrid.colRef("Oyes"), iRow, pGrid.colRef("Ono"))= true;
  898. // // }
  899. // //
  900. // // if(pGrid.row == 1 && pGrid.col == pGrid.colRef("Oyes") && opchkyn=="N") {
  901. // // pGrid.valueMatrix(iRow, pGrid.colRef("Oyes")) = false;
  902. // // }
  903. // }
  904. //
  905. // grd_ItemCheckList.fixedcellcheckbox(1,pGrid.colRef("pyes")) = ((sBool1) ? "false" : "true");
  906. // grd_ItemCheckList.fixedcellcheckbox(1,pGrid.colRef("syes")) = ((sBool2) ? "false" : "true");
  907. }
  908. ]]></Script>