コード例 #1
0
ファイル: Logic.java プロジェクト: HobbesFNM/openMAXIMS
 @Override
 protected void onQmbCompletingClinianTextSubmited(String value)
     throws ims.framework.exceptions.PresentationLogicException {
   HcpLiteVoCollection listHcpLite = domain.listHcpLite(value, null);
   form.qmbCompletingClinian().clear();
   if (listHcpLite == null || listHcpLite.size() == 0) return;
   for (int i = 0; i < listHcpLite.size(); i++) {
     form.qmbCompletingClinian().newRow(listHcpLite.get(i), listHcpLite.get(i).getIMosName());
   }
   if (listHcpLite.size() == 1) {
     form.qmbCompletingClinian().setValue(listHcpLite.get(0));
   } else {
     form.qmbCompletingClinian().showOpened();
   }
 }
コード例 #2
0
ファイル: Logic.java プロジェクト: HobbesFNM/openMAXIMS
  protected void onFormOpen(Object[] args)
      throws ims.framework.exceptions.PresentationLogicException {
    LocationLiteVo locVo = null;
    LocSiteLiteVo locSiteVo = null;
    initialize();
    if (domain.getCurrentLocation() instanceof LocationLiteVo) {
      locVo = (LocationLiteVo) domain.getCurrentLocation();
    } else if (domain.getCurrentLocation() instanceof LocSiteLiteVo) {
      locSiteVo = (LocSiteLiteVo) domain.getCurrentLocation();
    }

    // WDEV-15691
    if (form.getGlobalContext().Clinical.getSelectedHcpIsNotNull()
        && (form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.ANAESTHETIST)
            || form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.MEDICAL))) {
      MedicLiteVoCollection medicColl = null;

      if (locVo != null) {
        if (locVo.getTypeIsNotNull() && locVo.getType().equals(LocationType.HOSP)) {
          if (form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.ANAESTHETIST)
              && MedicGrade.CONS.equals(form.getGlobalContext().Clinical.getSelectedHcpGrade()))
            medicColl =
                domain.getMedics(
                    locVo,
                    HcpDisType.MEDICAL,
                    form.getGlobalContext().Clinical.getSelectedHcp(),
                    MedicGrade.CONS);
          else if (form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.ANAESTHETIST)
              && form.getGlobalContext().Clinical.getSelectedHcpGrade() == null)
            medicColl =
                domain.getMedics(
                    locVo,
                    HcpDisType.MEDICAL,
                    form.getGlobalContext().Clinical.getSelectedHcp(),
                    null);
          else if (form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.MEDICAL))
            medicColl = domain.getMedics(locVo, HcpDisType.MEDICAL, null, null);
        } else if (locVo.getTypeIsNotNull() && !locVo.getType().equals(LocationType.HOSP)) {
          locVo = domain.getLocationLite(locVo);
          if (form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.ANAESTHETIST)
              && MedicGrade.CONS.equals(form.getGlobalContext().Clinical.getSelectedHcpGrade()))
            medicColl =
                domain.getMedics(
                    locVo,
                    HcpDisType.MEDICAL,
                    form.getGlobalContext().Clinical.getSelectedHcp(),
                    MedicGrade.CONS);
          else if (form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.ANAESTHETIST)
              && form.getGlobalContext().Clinical.getSelectedHcpGrade() == null)
            medicColl =
                domain.getMedics(
                    locVo,
                    HcpDisType.MEDICAL,
                    form.getGlobalContext().Clinical.getSelectedHcp(),
                    null);
          else if (form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.MEDICAL))
            medicColl = domain.getMedics(locVo, HcpDisType.MEDICAL, null, null);
        }
      } else if (locSiteVo != null) {
        locVo = domain.getLocationLite(locSiteVo);
        if (form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.ANAESTHETIST)
            && MedicGrade.CONS.equals(form.getGlobalContext().Clinical.getSelectedHcpGrade()))
          medicColl =
              domain.getMedics(
                  locVo,
                  HcpDisType.MEDICAL,
                  form.getGlobalContext().Clinical.getSelectedHcp(),
                  MedicGrade.CONS);
        else if (form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.ANAESTHETIST)
            && form.getGlobalContext().Clinical.getSelectedHcpGrade() == null)
          medicColl =
              domain.getMedics(
                  locVo,
                  HcpDisType.MEDICAL,
                  form.getGlobalContext().Clinical.getSelectedHcp(),
                  null);
        else if (form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.MEDICAL))
          medicColl = domain.getMedics(locVo, HcpDisType.MEDICAL, null, null);
      }

      if (medicColl != null) {
        if (form.getGlobalContext().Clinical.getMedicsSurgicalAuditIsNotNull()) {
          MedicLiteVoCollection tempColl =
              form.getGlobalContext().Clinical.getMedicsSurgicalAudit();
          for (int i = 0; tempColl != null && i < tempColl.size(); i++) {
            if (medicColl != null && medicColl.contains(tempColl.get(i)))
              medicColl.remove(tempColl.get(i));
          }
        }
        medicColl.sort(new MedicComparator(SortOrder.ASCENDING));
        for (int i = 0; i < medicColl.size(); i++) {
          grdListedTestsRow row = form.grdListedTests().getRows().newRow();
          row.setcolSelected(false);

          MedicLiteVo tempVo = medicColl.get(i);
          row.setcolName(
              tempVo != null && tempVo.getMosIsNotNull() && tempVo.getMos().getNameIsNotNull()
                  ? tempVo.getMos().getName().toString()
                  : "");
          row.setValue(tempVo);
        }
      }
    } else if (form.getGlobalContext().Clinical.getSelectedHcpIsNotNull()
        && form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.NURSING)) {
      NurseVoCollection nurseColl = null;
      if (locVo != null) {
        if (locVo.getTypeIsNotNull() && locVo.getType().equals(LocationType.HOSP)) {
          nurseColl = domain.getNurses(locVo, form.getGlobalContext().Clinical.getSelectedHcp());
        } else if (locVo.getTypeIsNotNull() && !locVo.getType().equals(LocationType.HOSP)) {
          locVo = domain.getLocationLite(locVo);
          nurseColl = domain.getNurses(locVo, form.getGlobalContext().Clinical.getSelectedHcp());
        }
      } else if (locSiteVo != null) {
        locVo = domain.getLocationLite(locSiteVo);
        nurseColl = domain.getNurses(locVo, form.getGlobalContext().Clinical.getSelectedHcp());
      }

      if (nurseColl != null) {
        if (form.getGlobalContext().Clinical.getNursessSurgicalAuditIsNotNull()) {
          NurseVoCollection tempnColl = form.getGlobalContext().Clinical.getNursessSurgicalAudit();

          for (int j = 0; tempnColl != null && j < tempnColl.size(); j++) {
            if (nurseColl.contains(tempnColl.get(j))) nurseColl.remove(tempnColl.get(j));
          }
        }
        nurseColl.sort(new NurseComparator(SortOrder.ASCENDING));
        for (int i = 0; i < nurseColl.size(); i++) {
          grdListedTestsRow row = form.grdListedTests().getRows().newRow();
          row.setcolSelected(false);

          NurseVo tempVo = nurseColl.get(i);
          row.setcolName(
              tempVo != null && tempVo.getMosIsNotNull() && tempVo.getMos().getNameIsNotNull()
                  ? tempVo.getMos().getName().toString()
                  : "");
          row.setValue(tempVo);
        }
      }
    }
    // WDEV-15691
    else if (form.getGlobalContext().Clinical.getSelectedHcpIsNotNull()
        && form.getGlobalContext().Clinical.getSelectedHcp().equals(HcpDisType.RADIOGRAPHER)) {
      HcpLiteVoCollection radiographerColl = null; // WDEV-15691
      if (locVo != null) {
        if (locVo.getTypeIsNotNull() && locVo.getType().equals(LocationType.HOSP)) {
          radiographerColl =
              domain.getOtheDisciplineHcp(locVo, form.getGlobalContext().Clinical.getSelectedHcp());
        } else if (locVo.getTypeIsNotNull() && !locVo.getType().equals(LocationType.HOSP)) {
          locVo = domain.getLocationLite(locVo);
          radiographerColl =
              domain.getOtheDisciplineHcp(locVo, form.getGlobalContext().Clinical.getSelectedHcp());
        }
      } else if (locSiteVo != null) {
        locVo = domain.getLocationLite(locSiteVo);
        radiographerColl =
            domain.getOtheDisciplineHcp(locVo, form.getGlobalContext().Clinical.getSelectedHcp());
      }

      if (radiographerColl != null) {
        if (form.getGlobalContext().Clinical.getRadiographerSurgAuditProcDetailsIsNotNull()) {
          HcpLiteVoCollection tempnColl =
              form.getGlobalContext().Clinical.getRadiographerSurgAuditProcDetails();

          for (int j = 0; tempnColl != null && j < tempnColl.size(); j++) {
            if (radiographerColl.contains(tempnColl.get(j)))
              radiographerColl.remove(tempnColl.get(j));
          }
        }

        for (int i = 0; i < radiographerColl.size(); i++) {
          grdListedTestsRow row = form.grdListedTests().getRows().newRow();
          row.setcolSelected(false);

          HcpLiteVo tempVo = radiographerColl.get(i);
          row.setcolName(
              tempVo != null && tempVo.getMosIsNotNull() && tempVo.getMos().getNameIsNotNull()
                  ? tempVo.getMos().getName().toString()
                  : "");
          row.setValue(tempVo);
        }
      }
    }
  }