Пример #1
0
  public void openKarte() {

    boolean showReceiptMessage = Project.getBoolean("showReceiptMessage", true);
    if (showReceiptMessage) {
      JLabel msg1 = new JLabel("受付リストからオープンしないと診療データをレセコンに");
      JLabel msg2 = new JLabel("送信することができません。続けますか?");
      final JCheckBox cb = new JCheckBox("今後このメッセージを表示しない");
      cb.setFont(new Font("Dialog", Font.PLAIN, 10));
      cb.addActionListener(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
              Project.setBoolean("showReceiptMessage", !cb.isSelected());
            }
          });
      JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 3));
      p1.add(msg1);
      JPanel p2 = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 3));
      p2.add(msg2);
      JPanel p3 = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 3));
      p3.add(cb);
      JPanel box = new JPanel();
      box.setLayout(new BoxLayout(box, BoxLayout.Y_AXIS));
      box.add(p1);
      box.add(p2);
      box.add(p3);
      box.setBorder(BorderFactory.createEmptyBorder(0, 0, 11, 11));

      int option =
          JOptionPane.showConfirmDialog(
              SwingUtilities.getWindowAncestor(getUI()),
              new Object[] {box},
              ClientContext.getFrameTitle(getName()),
              JOptionPane.YES_NO_OPTION,
              JOptionPane.QUESTION_MESSAGE,
              ClientContext.getImageIcon("about_32.gif"));

      if (option != JOptionPane.YES_OPTION) {
        return;
      }
    }

    PatientModel patient = selectedLabo.getPatient();
    PatientVisitModel pvt = new PatientVisitModel();
    pvt.setNumber(number++);
    pvt.setPatientModel(patient);

    // 受け付けを通していないので診療科はユーザ登録してあるものを使用する
    // 診療科名、診療科コード、医師名、医師コード、JMARI
    // 2.0
    pvt.setDeptName(Project.getUserModel().getDepartmentModel().getDepartmentDesc());
    pvt.setDeptCode(Project.getUserModel().getDepartmentModel().getDepartment());
    pvt.setDoctorName(Project.getUserModel().getCommonName());
    if (Project.getUserModel().getOrcaId() != null) {
      pvt.setDoctorId(Project.getUserModel().getOrcaId());
    } else {
      pvt.setDoctorId(Project.getUserModel().getUserId());
    }
    pvt.setJmariNumber(Project.getString(Project.JMARI_CODE));

    // カルテコンテナを生成する
    getContext().openKarte(pvt);
  }
Пример #2
0
  // s.oh^ 2014/08/19 施設患者一括表示機能
  public void visitAll() {
    List<PatientModel> list = getTableModel().getDataProvider();
    if (list == null) return;
    for (PatientModel model : list) {
      // 来院情報を生成する
      PatientVisitModel pvt = new PatientVisitModel();
      pvt.setId(0L);
      pvt.setNumber(number++);
      pvt.setPatientModel(model);

      // --------------------------------------------------------
      // 受け付けを通していないのでログイン情報及び設定ファイルを使用する
      // 診療科名、診療科コード、医師名、医師コード、JMARI
      // 2.0
      // ---------------------------------------------------------
      pvt.setDeptName(Project.getUserModel().getDepartmentModel().getDepartmentDesc());
      pvt.setDeptCode(Project.getUserModel().getDepartmentModel().getDepartment());
      pvt.setDoctorName(Project.getUserModel().getCommonName());
      if (Project.getUserModel().getOrcaId() != null) {
        pvt.setDoctorId(Project.getUserModel().getOrcaId());
      } else {
        pvt.setDoctorId(Project.getUserModel().getUserId());
      }
      String jamri;
      if (Project.claimSenderIsServer()) {
        ServerInfoDelegater sid = new ServerInfoDelegater();
        try {
          jamri = sid.getJamri();
        } catch (Exception ex) {
          jamri = Project.getString(Project.JMARI_CODE);
          Log.outputFuncLog(Log.LOG_LEVEL_0, Log.FUNCTIONLOG_KIND_ERROR, ex.toString());
        }
      } else {
        jamri = Project.getString(Project.JMARI_CODE);
      }
      pvt.setJmariNumber(jamri);

      // 来院日
      pvt.setPvtDate(ModelUtils.getDateTimeAsString(new Date()));

      final PatientVisitModel fPvt = pvt;

      SimpleWorker worker =
          new SimpleWorker<Void, Void>() {

            @Override
            protected Void doInBackground() throws Exception {
              PVTDelegater1 pdl = new PVTDelegater1();
              pdl.addPvt(fPvt);
              return null;
            }

            @Override
            protected void succeeded(Void result) {}

            @Override
            protected void failed(Throwable cause) {}

            @Override
            protected void startProgress() {
              doStartProgress();
            }

            @Override
            protected void stopProgress() {
              doStopProgress();
            }
          };

      worker.execute();
    }
    Window parent = SwingUtilities.getWindowAncestor(getUI());
    JOptionPane.showMessageDialog(parent, "一括受付しました。", "一括受付", JOptionPane.WARNING_MESSAGE);
    Log.outputFuncLog(Log.LOG_LEVEL_0, Log.FUNCTIONLOG_KIND_INFORMATION, "一括受付しました。");
  }