123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- /**
- * @desc : 환자번호 합번여부 체크
- * @id :
- * @param : pPid - 환자번호
- * pRef - 'TRMRC00510'의 파라미터 노드
- * pResultref - 'TRMRC00510'의 결과 노드
- * @return : String sResult
- * @authur : 김영기
- *
- */
- function fCheckedBindPid(pPid, pRef, pResultref){
- var sResult;
-
- if(pResultref == null || pResultref == "" || pResultref == "undefined"){
- return pPid;
- }
-
- if(!(pPid == null || pPid == "" || pPid == "undefined")){
-
- /*TRMRC00509에 사용할 환자번호 설정*/
- model.makeValue(pRef + "/pid", pPid);
-
- model.makeNode(pResultref);
-
- var nResultrefLength = pResultref.length;
-
- if(pResultref.substring(eval(nResultrefLength - 1),nResultrefLength) != "/"){
- pResultref = pResultref + "/";
- }
-
- if(submit("TRMRC00510", true, pRef, pResultref)){
-
- var sBindPid = model.getValue( pResultref + "item/bindpid" );
-
- if(sBindPid != '-' && sBindPid != '' && sBindPid != ' '){
- var sHngnm = model.getValue( pResultref + "item/hngnm" );
-
- var messageValue = messageBox(pPid + "(" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호를 사용 하시겠습니까?", "Q999", "");
-
- if( messageValue == '6' ){
- sResult = sBindPid;
- }else{
- sResult = pPid;
- }
-
- }else{
- sResult = pPid;
- }
-
- }else{
- sResult = pPid;
- }
-
- }else{
- sResult = pPid;
- }
-
- var subResultref;
-
- if(pResultref.substring(eval(nResultrefLength - 1),nResultrefLength) != "/"){
- subResultref = pResultref.substring(0,nResultrefLength);
- }else{
- subResultref = pResultref.substring(0,eval(nResultrefLength - 1));
- }
-
- model.removeNode(subResultref);
-
- return sResult;
- }
|