Exemplo n.º 1
0
 private void browseRecored() {
   clearScreen();
   updateBrowseInformation();
   form.getLocalContext().setCurrentMassageVo(null);
   if (form.recbrMassage().getValue() != null) {
     if (engine.isRIEMode()) {
       if (form.recbrMassage().getValue() instanceof MassageShortVo) {
         MassageShortVo voMassageShort = (MassageShortVo) form.recbrMassage().getValue();
         form.getLocalContext()
             .setCurrentMassageVo(domain.getMassageVo(voMassageShort.getID_Massage()));
         populateScreenFromData();
       }
     } else if (form.recbrMassage().getValue() instanceof ClinicalContactShortVo) {
       form.getLocalContext()
           .setCurrentMassageVo(
               domain.getMassageVoByClinicalContact(
                   (ClinicalContactRefVo) form.recbrMassage().getValue()));
       populateScreenFromData();
     }
   }
   isRecordEditable();
 }
Exemplo n.º 2
0
  private void fillRecordBrowser() {
    MassageShortVoCollection voMassageShortVoColl =
        domain.listMassageByCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    loadCurrentCareContext();
    boolean currentClinicalContactFound = false;
    if (voMassageShortVoColl != null) {
      if (engine.isRIEMode()) {
        for (int i = 0; i < voMassageShortVoColl.size(); i++) {
          MassageShortVo voMassageShort = voMassageShortVoColl.get(i);
          if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()
              && form.getGlobalContext()
                  .Core
                  .getCurrentClinicalContact()
                  .getID_ClinicalContact()
                  .equals(voMassageShort.getClinicalContact().getID_ClinicalContact()))
            form.recbrMassage()
                .newRow(
                    voMassageShort,
                    "\t\t\t\tClinical Contact: "
                        + voMassageShort.getClinicalContact().getStartDateTime().toString()
                        + " - "
                        + voMassageShort.getClinicalContact().getSeenBy().toString(),
                    Color.Green);
          else
            form.recbrMassage()
                .newRow(
                    voMassageShort,
                    "\t\t\t\tClinical Contact: "
                        + voMassageShort.getClinicalContact().getStartDateTime().toString()
                        + " - "
                        + voMassageShort.getClinicalContact().getSeenBy().toString());
        }
        if (voMassageShortVoColl.size() > 0)
          form.recbrMassage().setValue(voMassageShortVoColl.get(voMassageShortVoColl.size() - 1));
      } else {
        for (int i = 0; i < voMassageShortVoColl.size(); i++) {
          ClinicalContactShortVo voClinicalContact =
              voMassageShortVoColl.get(i).getClinicalContact();
          if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()
              && form.getGlobalContext()
                  .Core
                  .getCurrentClinicalContact()
                  .getID_ClinicalContact()
                  .equals(voClinicalContact.getID_ClinicalContact())) {
            currentClinicalContactFound = true;
            loadCurrentClinicalContact(voClinicalContact);
          } else
            form.recbrMassage()
                .newRow(
                    voClinicalContact,
                    "\t\t\t\tClinical Contact: "
                        + voClinicalContact.getStartDateTime().toString()
                        + " - "
                        + voClinicalContact.getSeenBy().toString());
        }
      }
    }

    if (!currentClinicalContactFound
        && form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()
        && !engine.isRIEMode())
      loadCurrentClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    browseRecored();
  }