Пример #1
0
 private void fillNameDetails(PersonName name) {
   if (name == null) return;
   form.ctnDemog().cmbTitle().setValue(name.getTitle());
   form.ctnDemog().txtSurname().setValue(name.getSurname());
   form.ctnDemog().txtForename().setValue(name.getForename());
   form.ctnDemog().txtMidName().setValue(name.getMiddleName());
 }
Пример #2
0
  protected void onFormOpen() throws ims.framework.exceptions.FormOpenException {
    if (form.getGlobalContext().Core.getOtherNamesIsNotNull()) {
      PersonNameCollection names = form.getGlobalContext().Core.getOtherNames();

      GenForm.grdNamesRow row;

      if (names != null) {
        for (int i = 0; i < names.size(); i++) {
          ims.core.vo.PersonName name = names.get(i);

          row = form.grdNames().getRows().newRow();

          if (name.getNameTypeIsNotNull()) row.setcolNameType(name.getNameType().getText());

          if (name.getForenameIsNotNull()) // WDEV-14050
          {
            row.setcolName(name.getForename() + " " + name.getSurname());
          } else row.setcolName(name.getSurname());
        }
      }
    }

    // Unless using local patient registration, this form should go to view mode only
    if (!ConfigFlag.DOM.LOCAL_PATIENT_REGISTRATION.getValue()
        || form.getGlobalContext().Core.getParentFormMode().equals(FormMode.VIEW))
      form.setMode(FormMode.VIEW);
  }