示例#1
0
 public static void fillFieldsfromXML(
     org.dom4j.Element el,
     ims.domain.DomainFactory factory,
     Mobilisations obj,
     java.util.HashMap domMap)
     throws Exception {
   org.dom4j.Element fldEl;
   fldEl = el.element("clinicalContact");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setClinicalContact(
         ims.core.admin.domain.objects.ClinicalContact.getClinicalContactfromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("authoringCP");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setAuthoringCP(
         ims.core.resource.people.domain.objects.Hcp.getHcpfromXML(fldEl, factory, domMap));
   }
   fldEl = el.element("authoringDateTime");
   if (fldEl != null) {
     obj.setAuthoringDateTime(
         new java.text.SimpleDateFormat("yyyyMMddHHmmssSSS").parse(fldEl.getTextTrim()));
   }
   fldEl = el.element("mobilisationTreatment");
   if (fldEl != null) {
     fldEl = fldEl.element("set");
     obj.setMobilisationTreatment(
         ims.therapies.treatment.domain.objects.MobilisationsTreatment.fromSetXMLString(
             fldEl, factory, obj.getMobilisationTreatment(), domMap));
   }
 }
示例#2
0
  public String toAuditString() {
    StringBuffer auditStr = new StringBuffer();

    auditStr.append("\r\n*clinicalContact* :");
    if (clinicalContact != null) {
      auditStr.append(toShortClassName(clinicalContact));

      auditStr.append(clinicalContact.getId());
    }
    auditStr.append("; ");
    auditStr.append("\r\n*authoringCP* :");
    if (authoringCP != null) {
      auditStr.append(toShortClassName(authoringCP));

      auditStr.append(authoringCP.getId());
    }
    auditStr.append("; ");
    auditStr.append("\r\n*authoringDateTime* :");
    auditStr.append(authoringDateTime);
    auditStr.append("; ");
    auditStr.append("\r\n*mobilisationTreatment* :");
    if (mobilisationTreatment != null) {
      java.util.Iterator it4 = mobilisationTreatment.iterator();
      int i4 = 0;
      while (it4.hasNext()) {
        if (i4 > 0) auditStr.append(",");
        ims.therapies.treatment.domain.objects.MobilisationsTreatment obj =
            (ims.therapies.treatment.domain.objects.MobilisationsTreatment) it4.next();
        if (obj != null) {
          if (i4 == 0) {
            auditStr.append(toShortClassName(obj));
            auditStr.append("[");
          }

          auditStr.append(obj.getId());
        }
        i4++;
      }
      if (i4 > 0) auditStr.append("] " + i4);
    }
    auditStr.append("; ");
    return auditStr.toString();
  }