Package open.dolphin.infomodel

Examples of open.dolphin.infomodel.BundleMed


            putValue(AbstractAction.NAME, String.valueOf(value) + " " + item[0].getUnit());
        }
        @Override
        public void actionPerformed(ActionEvent e) {
           
            BundleMed srcBundle = (BundleMed)ctx.getStamp().getModel();
                       
            // 新たなスタンプ作成
            ModuleModel stamp = createModuleModel(ctx.getStamp());
            BundleMed bundle = (BundleMed) stamp.getModel();
            ArrayList<ClaimItem> list = new ArrayList<ClaimItem>();
           
            // ClaimItem をチェックしながらコピー
            boolean changed = false;
            String num = String.valueOf(value);
           
            for(ClaimItem src : srcBundle.getClaimItem()) {
                ClaimItem dist = createClaimItem(src);
                if (src.getCode().startsWith("6") && !src.getNumber().equals(num)) {
                    dist.setNumber(num);
                    changed = true;
                }
                list.add(dist);
            }

            if (changed) {
                // できた list を srcBundle に登録
                bundle.setClaimItem(list.toArray(new ClaimItem[list.size()]));
                propertyChanged(stamp);
            }
        }
View Full Code Here


            putValue(AbstractAction.NAME, "部位・指示...");           
        }
        @Override
        public void actionPerformed(ActionEvent e) {
                       
            BundleMed srcBundle = (BundleMed)ctx.getStamp().getModel();
           
            RegionView dialog = new RegionView(null, true);
            dialog.setValue(srcBundle.getClaimItem());
           
            // ダイアログ表示位置計算 できればスタンプの上に,上にスペースがなければ下に
            Point p = ctx.getLocationOnScreen();
            int y; p.y = (y = p.y - dialog.getHeight() - 10)>30? y: p.y + ctx.getHeight() + 10;
            dialog.setLocation(p);   
            dialog.setVisible(true);

            // キャンセルされた場合はそのまま帰る
            if (dialog.isCancelled()) {
                dialog.dispose();
                return;
            }
           
            // 新たなスタンプ作成
            ModuleModel stamp = createModuleModel(ctx.getStamp());
            BundleMed bundle = (BundleMed) stamp.getModel();
           
            // あらたな ClaimItem を作る
            ArrayList<ClaimItem> list = new ArrayList<ClaimItem>();
           
            // 部位 ClaimItem 以外をコピー  001000607,608,001,002 はマスター設定の問題で別扱い
            for (ClaimItem src : srcBundle.getClaimItem()) {
                if (!src.getCode().startsWith("0010008")
                        && !src.getCode().startsWith("0010009")
                        && !src.getCode().equals("001000607")
                        && !src.getCode().equals("001000608")
                        && !src.getCode().equals("001000001")
                        && !src.getCode().equals("001000002")
                        ) {
                   
                    list.add(createClaimItem(src));
                }
            }
            // 部位 ClaimItem は dialog からデータを取り込む
            list.addAll(dialog.getValue());
           
            // できた list を srcBundle に登録
            bundle.setClaimItem(list.toArray(new ClaimItem[list.size()]));
           
            dialog.dispose();
            propertyChanged(stamp);
        }
View Full Code Here

            value = stringToDouble(str);           
            putValue(AbstractAction.NAME, "用量を " + String.valueOf(str) + " 倍に");
        }
        @Override
        public void actionPerformed(ActionEvent e) {
            BundleMed srcBundle = (BundleMed)ctx.getStamp().getModel();
           
            // 新たなスタンプ作成
            ModuleModel stamp = createModuleModel(ctx.getStamp());
            BundleMed bundle = (BundleMed) stamp.getModel();
           
            // あらたな ClaimItem を作る
            ArrayList<ClaimItem> list = new ArrayList<ClaimItem>();
           
            for (ClaimItem src : srcBundle.getClaimItem()) {
                ClaimItem dist = createClaimItem(src);
               
                // 薬剤コードがあれば,その量を調整
                if (src.getCode().startsWith("6")) {
                    double num = Double.valueOf(src.getNumber());
                    String s = DailyDoseStringTool.doubleToString(num*value, src.getUnit());
                    dist.setNumber(String.valueOf(s));
                }
               
                // 1日量文字列があれば,その量を調節
                String str = src.getName();
                if (str.contains("日量")) {
                    double dose = DailyDoseStringTool.getDose(str);
                    dose *= value;
                    dist.setName(DailyDoseStringTool.getString(str, dose));
                }
                list.add(dist);
            }           
            // できた list を srcBundle に登録
            bundle.setClaimItem(list.toArray(new ClaimItem[list.size()]));
           
            propertyChanged(stamp);
        }
View Full Code Here

TOP

Related Classes of open.dolphin.infomodel.BundleMed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.