123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- /* ---------------------------------------------------------------------
- 마취방법등록(SMMNP01100.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By K. J. M
- : 2010.02.09
- ---------------------------------------------------------------------- */
- /* ------------------------------------------------- */
- /* SMMNP01100_마취방법등록 */
- /* On Load 시 Call */
- /* ------------------------------------------------- */
- /* group : EMR 간호 수술마취 */
- /* ver : 2010.02.09 */
- /* by : 김진명 */
- /* --------------------------------------------------*/
- /* type : function */
- /* access : public */
- /* desc : xforms-ready시 수행한다 */
- /* return : */
- /* --------------------------------------------------*/
- function fInit() {
- model.removeNodeset("/root/main/anstdrinfo/anstdrlist");
- model.removeNodeset("/root/main/copyanstdringo/copyanstdrlist");
- model.removenode("/root/send");
- model.makeValue("/root/send/reqdata/cdgrupid", "061");//마취과
- model.makeValue("/root/send/reqdata/supcdid", "");//서브구분
- model.makeValue("/root/send/reqdata/cdid", "");//서브구분
- model.makeValue("/root/send/reqdata/cdnm", "A1");//서브구분
- submit("TRMNP04903", false);
- model.setValue("/root/main/cond/orddeptcd", model.getValue("/root/init/hardcodeinfo/cdid"));
- model.removenode("/root/send" );
- model.makeNode("/root/send" );
- model.makeNode("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/orddept", model.getValue("/root/init/hardcodeinfo/cdid"));
- submit("TRMNP00103");
- model.copyNode("/root/temp/DrInfo/DrLists", "root/init/DrLists");
- model.copyNode("/root/temp/DrInfo2/DrLists", "root/init/DrLists");
- addComboItem("cmb_perf" , "전 체", "", "above" );
- addComboItem("cmb_perf2" , "전 체", "", "above" );
- grd_anstdrlist.explorerbar = "sort";
- grd_copyanstlist.explorerbar = "sort";
- grd_anstdrlist.fixedcellcheckbox(0,1) = true;
- grd_copyanstlist.fixedcellcheckbox(0,1) = true;
- model.refresh();
- }
- /* ------------------------------------------------- */
- /* group : EMR 간호 수술마취 */
- /* ver : 2010.02.09 */
- /* by : 김진명 */
- /* ------------------------------------------------- */
- /* SMMNP01100_마취방법등록 */
- /* desc : 마취방법등록 조회 */
- /* --------------------------------------------------*/
- function fSearch(){
- model.removenode("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- submit("TRMNP01100");
- }
- /* ------------------------------------------------- */
- /* group : EMR 간호 수술마취 */
- /* ver : 2010.02.09 */
- /* by : 김진명 */
- /* ------------------------------------------------- */
- /* SMMNP01100_마취방법등록 */
- /* desc : 마취방법등록 초기화 */
- /* --------------------------------------------------*/
- function fClear(){
- model.removenode("/root/main/copyanstdringo/copyanstdrlist");//마취명복사 그리드 초기화
- model.makeNode("/root/main/copyanstdringo/copyanstdrlist");//마취명복사 인스턴스 생성
- model.refresh();
- }
- /* ------------------------------------------------- */
- /* group : EMR 간호 수술마취 */
- /* ver : 2010.02.10 */
- /* by : 김진명 */
- /* ------------------------------------------------- */
- /* SMMNP01100_마취방법등록 */
- /* desc : 마취명 복사 */
- /* --------------------------------------------------*/
- function fCopyAnstNm(){
- var cnt = 0;
- model.removenode("/root/main/copyanstdringo/copyanstdrlist");//마취명복사 그리드 초기화
- model.makeNode("/root/main/copyanstdringo/copyanstdrlist");//마취명복사 인스턴스 생성
- for( var iRow = 1; iRow < grd_anstdrlist.rows; iRow++ ) {
- if( model.getValue("/root/main/anstdrinfo/anstdrlist[" + iRow + "]/chkflag") == "true" ) {
- if( model.getValue("/root/main/anstdrinfo/anstdrlist[" + iRow + "]/anstccrtno") != "" ) {
- if( model.getValue("/root/main/anstdrinfo/anstdrlist[" + iRow + "]/anstuseflag") == "N" ) {
- messageBox("미 사용중인 마취명은 선택 ", "E001");
- model.removenode("/root/main/copyanstdringo/copyanstdrlist");//마취명복사 그리드 초기화
- model.makeNode("/root/main/copyanstdringo/copyanstdrlist");//마취명복사 인스턴스 생성
- model.refresh();
- return;
- }
- model.duplicate("/root/main/copyanstdringo/copyanstdrlist", "/root/main/anstdrinfo/anstdrlist["+ iRow +"]");
- cnt++;
- }else {
- messageBox("미 등록된 마취명은 선택 ", "E001");
- model.removenode("/root/main/copyanstdringo/copyanstdrlist");//마취명복사 그리드 초기화
- model.makeNode("/root/main/copyanstdringo/copyanstdrlist");//마취명복사 인스턴스 생성
- model.refresh();
- return;
- }
- }
- }
- if( cnt < 1 ) {
- messageBox("선택하신 마취명이 없습니다.!", "E000");
- return;
- }else {
- model.refresh();
- }
- }
- /* ------------------------------------------------- */
- /* group : EMR 간호 수술마취 */
- /* ver : 2010.02.10 */
- /* by : 김진명 */
- /* ------------------------------------------------- */
- /* desc : Case Cart MASTER 자료저장하기 */
- /* param : S:저장, D:삭제 */
- /* return : */
- /* ------------------------------------------------- */
- function fSave(pFlag){
- var anstccrtno, anstmthdnm, anstuseflag, anstdrid, cartgubn, orddeptcd, newanstdrid, rgstflag, anstappdd;
- var cnt = 0;
- var anstsavelist = "m▦anstdrid▦orddeptcd▦anstmthdnm▦cartgubn▦anstuseflag▦anstccrtno▦deptinit▦anstappdd";
- var orddeptcd = model.getValue("/root/init/hardcodeinfo/cdid");
- var anstdrid = model.getValue("/root/main/cond/anstdrid");
- var cartgubn = model.getValue("/root/main/cond/cartgubn");
- if( anstdrid == "" ) {
- messageBox("마취의를 선택하지 않았습니다.!", "E000");
- model.setFocus("cmb_perf");
- return;
- }
- for(var iRow = 1; iRow < grd_anstdrlist.rows; iRow++ ) {
- if( model.getValue("/root/main/anstdrinfo/anstdrlist[" + iRow + "]/chkflag") == "true" ) {
- anstccrtno = model.getValue("/root/main/anstdrinfo/anstdrlist[" + iRow +"]/anstccrtno");
- anstmthdnm = model.getValue("/root/main/anstdrinfo/anstdrlist[" + iRow +"]/anstmthdnm");
- anstuseflag = model.getValue("/root/main/anstdrinfo/anstdrlist[" + iRow +"]/anstuseflag");
- newanstdrid = model.getValue("/root/main/anstdrinfo/anstdrlist[" + iRow +"]/anstdrid");
- anstappdd = model.getValue("/root/main/anstdrinfo/anstdrlist[" + iRow +"]/anstappdd");
- if( anstdrid != newanstdrid ) {
- messageBox("선택한 마취의와 저장할려는 마취의가 같지 않습니다.!", "E000");
- model.setFocus("cmb_perf");
- return;
- }
- if( anstmthdnm == "" ) {
- messageBox("마취명을 입력하셔야 합니다.!", "E000");
- return;
- }
- if( anstccrtno == "" ) {//등록된 카트가 아니면 신규등록, 등록된 카트이면서 미사용중이면 수정
- rgstflag = "I";
- }else {
- rgstflag = "U";
- }
- if( pFlag == "D" ) {//삭제이면
- rgstflag = "D";
- anstuseflag = "N";
- }
- if( !((anstccrtno == "")&&(pFlag == "D")) ) {//신규등록인데 삭제인경우는 스킵
- cnt++
- anstsavelist = anstsavelist + "▩" + rgstflag + "▦" + newanstdrid + "▦" + orddeptcd + "▦" + anstmthdnm + "▦" + cartgubn + "▦" + anstuseflag
- + "▦" + anstccrtno + "▦" + "AN" + "▦" + anstappdd;
- }
- }
- }
- if( cnt > 0 ) {
- model.removenode("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- model.makeValue("/root/send/savedata", anstsavelist);
- submit("TXMNP01102");
- }else {
- messageBox("선택하신 마취명이 ", "E007");
- return;
- }
- }
- /* ------------------------------------------------- */
- /* desc : 마취명 복사 */
- /* param : */
- /* return : */
- /* -------------------------------------------------- */
- function fAnstCopy(){
- var copylist = "anstccrtno▦anstmthdnm▦cartgubn▦anstuseflag▦copyanstdrid▦deptinit▦anstappdd▦orddeptcd";
- var orddeptcd = model.getValue("/root/init/hardcodeinfo/cdid");
- var copyanstdrid = model.getValue("/root/main/cond/copyanstdrid");
- var copyflag = model.getValue("/root/main/cond/copyflag");
- var cartgubn = model.getValue("/root/main/cond/cartgubn");
- if( copyanstdrid == "" ) {
- messageBox("복사할 마취의를 선택하지 않았습니다.", "E000");
- model.setFocus("cmb_perf2");
- return;
- }else if( copyflag == "" ) {
- messageBox("복사 조건을 선택하지 않았습니다.!", "E000");
- model.setFocus("rdo_copyflag");
- return;
- }
- var cnt = 0;
- for( var i=0; i < grd_copyanstlist.rows; i++ ) {
- var chk = model.getValue("/root/main/copyanstdringo/copyanstdrlist/anstdrlist[" + i + "]/chkflag");
- var anstmthdnm = model.getValue("/root/main/copyanstdringo/copyanstdrlist/anstdrlist[" + i + "]/anstmthdnm");
- var anstccrtno = model.getValue("/root/main/copyanstdringo/copyanstdrlist/anstdrlist[" + i + "]/anstccrtno");
- var anstappdd = model.getValue("/root/main/copyanstdringo/copyanstdrlist/anstdrlist[" + i +"]/anstappdd");
- if( chk == "true" ) {
- copylist = copylist + "▩" + anstccrtno + "▦" + anstmthdnm + "▦" + cartgubn + "▦" + "Y" + "▦" + copyanstdrid + "▦" + "AN"
- + "▦" + anstappdd + "▦" + orddeptcd;
- cnt++;
- }
- }
- if( cnt > 0 ) {
- model.removenode("/root/send");
- model.makeValue("/root/send/reqdata/copyflag", copyflag);
- model.makeValue("/root/send/savedata", copylist);
- submit("TXMNP01103", false);
- fClear();//수술명 복사 초기화
- }else {
- messageBox("선택하신 마취명이 ", "I004");
- }
- }
- /* ------------------------------------------------- */
- /* ------End Of List ------------------------------- */
- /* -------------------------------------------------- */
|