private void populateDemographicINfo() {
    PatientShort pat = form.getGlobalContext().Core.getPatientShort();

    if (pat == null) throw new DomainRuntimeException("No Patient Supplied");

    if (pat.getNameIsNotNull()) {
      form.lblSurname().setValue(pat.getName().getSurname());
      form.lblForename().setValue(pat.getName().getForename());
    }

    form.lblSex().setValue(pat.getSexIsNotNull() ? pat.getSex().toString() : "");
    form.lblDOB().setValue(pat.getDobIsNotNull() ? pat.getDob().toString() : "");

    PatientIdCollection identifers = pat.getIdentifiers();
    if (identifers != null) {
      for (int i = 0; i < identifers.size(); i++) {
        ims.core.vo.PatientId id = identifers.get(i);
        ims.RefMan.forms.daycaseadmissiondialog.GenForm.grdIdentifiersRow row =
            form.grdIdentifiers().getRows().newRow();
        bindColType(row, false);
        row.getcolIdType().setValue(id.getType());
        row.setcolIdValue(id.getValue());
        row.setValue(id);
        if (id.getVerifiedIsNotNull() && !id.getVerified() && id.getType().equals(PatIdType.NHSN)) {
          row.setBackColor(Color.Orange);
          row.setReadOnly(true);
        }
        if (id.getTypeIsNotNull()
            && id.getType().equals(PatIdType.NHSN)
            && !ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue()) row.setReadOnly(true);
      }
    }
  }
Beispiel #2
0
  private void addRowToGrid(SurgicalOperationNotesListVo record) {
    if (record == null) return;
    grdSurgicalOPsRow newRow = form.grdSurgicalOPs().getRows().newRow();
    boolean episodeOfCareNotNull =
        record.getCareContextIsNotNull() && record.getCareContext().getEpisodeOfCareIsNotNull();
    newRow.setColumnPatient(
        episodeOfCareNotNull
                && record.getCareContext().getEpisodeOfCare().getCareSpellIsNotNull()
                && record.getCareContext().getEpisodeOfCare().getCareSpell().getPatientIsNotNull()
            ? record
                .getCareContext()
                .getEpisodeOfCare()
                .getCareSpell()
                .getPatient()
                .getISelectedPatientName()
            : null);
    // -----------------------------
    if (episodeOfCareNotNull
        && record.getCareContext().getEpisodeOfCare().getCareSpellIsNotNull()
        && record.getCareContext().getEpisodeOfCare().getCareSpell().getPatientIsNotNull()) {
      String strTemp = new String();
      for (PatientId temp :
          record.getCareContext().getEpisodeOfCare().getCareSpell().getPatient().getIdentifiers()) {
        strTemp = strTemp + temp.getType().toString() + '=' + temp.getValue();
        strTemp += ',';
      }
      if (strTemp.length() > 0) {
        int n = strTemp.lastIndexOf(',');
        strTemp = strTemp.substring(0, n); // take out the last ,
      }
      newRow.setTooltipForColumnPatient(strTemp);
    }
    // ------------------------------
    newRow.setColumnConsultant(
        episodeOfCareNotNull
                && record.getCareContext().getEpisodeOfCare().getResponsibleHCPIsNotNull()
            ? record.getCareContext().getEpisodeOfCare().getResponsibleHCP().getIMosName()
            : null);
    newRow.setColumnOpSurgeon(
        record.getProceduresPerformedIsNotNull()
                && record.getProceduresPerformed().size() > 0
                && (record.getProceduresPerformed().get(0) instanceof PatientProcedureSurgicalOpVo)
                && record.getProceduresPerformed().get(0).getPeformedByIsNotNull()
            ? record.getProceduresPerformed().get(0).getPeformedBy().getIMosName()
            : null);

    newRow.setColumnPrimProcedure(
        record.getMainProcedureIsNotNull() && record.getMainProcedure().getProcedureIsNotNull()
            ? record.getMainProcedure().getProcedure().getProcedureName()
            : null);
    newRow.setColumnSignoffDate(
        record.getSignOffDateTimeIsNotNull() ? record.getSignOffDateTime().getDate() : null);
    newRow.setColumnSignoffHcp(
        record.getSignOffHCPIsNotNull() ? record.getSignOffHCP().getIMosName() : null);
    newRow.setValue(record);
  }