Esempio n. 1
0
 public static void fillFieldsfromXML(
     org.dom4j.Element el, ims.domain.DomainFactory factory, Summary obj, java.util.HashMap domMap)
     throws Exception {
   org.dom4j.Element fldEl;
   fldEl = el.element("careContext");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setCareContext(
         ims.core.admin.domain.objects.CareContext.getCareContextfromXML(fldEl, factory, domMap));
   }
   fldEl = el.element("dischargeLetterStatus");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setDischargeLetterStatus(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("admissionDateTime");
   if (fldEl != null) {
     obj.setAdmissionDateTime(
         new java.text.SimpleDateFormat("yyyyMMddHHmmssSSS").parse(fldEl.getTextTrim()));
   }
   fldEl = el.element("tTAStatus");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setTTAStatus(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("hasHadAnyProceduresPerformed");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setHasHadAnyProceduresPerformed(
         ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("additonalClinicalInfo");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setAdditonalClinicalInfo(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("dischargeSupplementaryLetterStatus");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setDischargeSupplementaryLetterStatus(
         ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("summaryDetails");
   if (fldEl != null) {
     fldEl = fldEl.element("list");
     obj.setSummaryDetails(
         ims.edischarge.domain.objects.SummaryDetail.fromListXMLString(
             fldEl, factory, obj.getSummaryDetails(), domMap));
   }
   fldEl = el.element("dischargeDocuments");
   if (fldEl != null) {
     fldEl = fldEl.element("set");
     obj.setDischargeDocuments(
         ims.core.documents.domain.objects.PatientDocument.fromSetXMLString(
             fldEl, factory, obj.getDischargeDocuments(), domMap));
   }
   fldEl = el.element("dischargeDetails");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setDischargeDetails(
         ims.edischarge.domain.objects.DischargeDetails.getDischargeDetailsfromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("wasPatientDischargedThenUndone");
   if (fldEl != null) {
     obj.setWasPatientDischargedThenUndone(new Boolean(fldEl.getTextTrim()));
   }
 }
Esempio n. 2
0
  public String toAuditString() {
    StringBuffer auditStr = new StringBuffer();

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

      auditStr.append(careContext.getId());
    }
    auditStr.append("; ");
    auditStr.append("\r\n*dischargeLetterStatus* :");
    if (dischargeLetterStatus != null) auditStr.append(dischargeLetterStatus.getText());
    auditStr.append("; ");
    auditStr.append("\r\n*admissionDateTime* :");
    auditStr.append(admissionDateTime);
    auditStr.append("; ");
    auditStr.append("\r\n*tTAStatus* :");
    if (tTAStatus != null) auditStr.append(tTAStatus.getText());
    auditStr.append("; ");
    auditStr.append("\r\n*hasHadAnyProceduresPerformed* :");
    if (hasHadAnyProceduresPerformed != null)
      auditStr.append(hasHadAnyProceduresPerformed.getText());
    auditStr.append("; ");
    auditStr.append("\r\n*additonalClinicalInfo* :");
    if (additonalClinicalInfo != null) auditStr.append(additonalClinicalInfo.getText());
    auditStr.append("; ");
    auditStr.append("\r\n*dischargeSupplementaryLetterStatus* :");
    if (dischargeSupplementaryLetterStatus != null)
      auditStr.append(dischargeSupplementaryLetterStatus.getText());
    auditStr.append("; ");
    auditStr.append("\r\n*summaryDetails* :");
    if (summaryDetails != null) {
      int i8 = 0;
      for (i8 = 0; i8 < summaryDetails.size(); i8++) {
        if (i8 > 0) auditStr.append(",");
        ims.edischarge.domain.objects.SummaryDetail obj =
            (ims.edischarge.domain.objects.SummaryDetail) summaryDetails.get(i8);
        if (obj != null) {
          if (i8 == 0) {
            auditStr.append(toShortClassName(obj));
            auditStr.append("[");
          }
          auditStr.append(obj.getId());
        }
      }
      if (i8 > 0) auditStr.append("] " + i8);
    }
    auditStr.append("; ");
    auditStr.append("\r\n*dischargeDocuments* :");
    if (dischargeDocuments != null) {
      java.util.Iterator it9 = dischargeDocuments.iterator();
      int i9 = 0;
      while (it9.hasNext()) {
        if (i9 > 0) auditStr.append(",");
        ims.core.documents.domain.objects.PatientDocument obj =
            (ims.core.documents.domain.objects.PatientDocument) it9.next();
        if (obj != null) {
          if (i9 == 0) {
            auditStr.append(toShortClassName(obj));
            auditStr.append("[");
          }

          auditStr.append(obj.getId());
        }
        i9++;
      }
      if (i9 > 0) auditStr.append("] " + i9);
    }
    auditStr.append("; ");
    auditStr.append("\r\n*dischargeDetails* :");
    if (dischargeDetails != null) {
      auditStr.append(toShortClassName(dischargeDetails));

      auditStr.append(dischargeDetails.getId());
    }
    auditStr.append("; ");
    auditStr.append("\r\n*wasPatientDischargedThenUndone* :");
    auditStr.append(wasPatientDischargedThenUndone);
    auditStr.append("; ");
    return auditStr.toString();
  }