SMMRC00101.xjs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[/****************************************************************************************
  3. * Function : fCheckedBindPid
  4. * Description : 환자번호 합번여부 체크
  5. * Argument : pPid - 환자번호
  6. * return type : String sResult
  7. * Creator :
  8. ****************************************************************************************/
  9. function fCheckedBindPid(pPid){
  10. var sResult = "";
  11. if(!utlf_isNull(pPid)){
  12. /*TRMRC00509에 사용할 환자번호 설정*/
  13. dsf_createDsRow("ds_temp_TRMRC00510", [{col:"pid", type:"string", size:256, val:pPid}] ,"true");
  14. dsf_createDs("ds_temp_rtn", [{col:"pid" , type:"string" , size:256}
  15. ,{col:"hngnm" , type:"string" , size:256}
  16. ,{col:"bindpid", type:"string" , size:256}
  17. ], "true");
  18. var oParam = {};
  19. oParam.id = "TRMRC00510";
  20. oParam.service = "chrtmngtapp.BaseInfoMngt";
  21. oParam.method = "reqGetDblNoPidList";
  22. oParam.inds = "item=ds_temp_TRMRC00510";
  23. oParam.outds = "ds_temp_rtn=item";
  24. oParam.async = false;
  25. // oParam.callback = "";
  26. tranf_submit(oParam);
  27. if(ds_temp_rtn.rowcount > 0) {
  28. var sBindPid = ds_temp_rtn.getColumn(0,"bindpid");
  29. if(sBindPid != "-" && !utlf_isNull(sBindPid) && sBindPid != " "){
  30. var sHngnm = ds_temp_rtn.getColumn(0,"hngnm");
  31. var messageValue = sysf_messageBox(pPid + "(" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호를 사용 하시겠습니까?", "Q999", "");
  32. if(messageValue == "6"){
  33. sResult = sBindPid;
  34. } else {
  35. sResult = pPid;
  36. }
  37. } else {
  38. sResult = pPid;
  39. }
  40. } else {
  41. sResult = pPid;
  42. }
  43. dsf_deleteDs("ds_temp_TRMRC00510");
  44. dsf_deleteDs("ds_temp_rtn");
  45. } else {
  46. sResult = pPid;
  47. }
  48. return sResult;
  49. }
  50. ]]></Script>