/** * Populates the answer attributes for patient info. * * @param p the parent procedure. * @param pi patient information. */ public static void populateSpecialElements(Procedure p, PatientInfo pi) { if (pi == null || !pi.isConfirmed() || !p.current().hasSpecialElement()) { return; } List<ProcedureElement> specialElements = p.current().getSpecialElements(); for (ProcedureElement element : specialElements) { String id = element.getId(); if (pi != null) { element.setAnswer(pi.getAnswerForId(id)); } } }
private void viewButtonActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_viewButtonActionPerformed // TODO add your handling code here: if (visitTable.getSelectedRow() < 0) { JOptionPane.showMessageDialog( null, "Please select one visit!", "ERROR", JOptionPane.INFORMATION_MESSAGE); } else { if (type == 1) { PatientInfo patientInfo = new PatientInfo(DOCTORVIEW); patientInfo.viewRecordReadOnly(DOCTORVIEW); patientInfo.PatientInfoVisible(); this.dispose(); } else if (type == 2) { PatientInfo patientInfo = new PatientInfo(PATIENTVIEW); patientInfo.viewRecordReadOnly(PATIENTVIEW); patientInfo.PatientInfoVisible(); this.dispose(); } else { JOptionPane.showMessageDialog( null, "Type error!", "ERROR", JOptionPane.INFORMATION_MESSAGE); } } } // GEN-LAST:event_viewButtonActionPerformed