public static void fillFieldsfromXML(
     org.dom4j.Element el, ims.domain.DomainFactory factory, Clinic obj, java.util.HashMap domMap)
     throws Exception {
   org.dom4j.Element fldEl;
   fldEl = el.element("clinicName");
   if (fldEl != null) {
     obj.setClinicName(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("clinicLocation");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setClinicLocation(
         ims.core.resource.place.domain.objects.Location.getLocationfromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("isActive");
   if (fldEl != null) {
     obj.setIsActive(new Boolean(fldEl.getTextTrim()));
   }
   fldEl = el.element("upperName");
   if (fldEl != null) {
     obj.setUpperName(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("codeMappings");
   if (fldEl != null) {
     fldEl = fldEl.element("list");
     obj.setCodeMappings(
         ims.core.clinical.domain.objects.TaxonomyMap.fromListXMLString(
             fldEl, factory, obj.getCodeMappings(), domMap));
   }
   fldEl = el.element("outpatientDept");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setOutpatientDept(
         ims.core.resource.place.domain.objects.Location.getLocationfromXML(
             fldEl, factory, domMap));
   }
 }
 public static void fillFieldsfromXML(
     org.dom4j.Element el,
     ims.domain.DomainFactory factory,
     LoCallWaitingListDetails obj,
     java.util.HashMap domMap)
     throws Exception {
   org.dom4j.Element fldEl;
   fldEl = el.element("speciality");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setSpeciality(
         ims.core.clinical.domain.objects.Service.getServicefromXML(fldEl, factory, domMap));
   }
   fldEl = el.element("procedure");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setProcedure(
         ims.core.resource.place.domain.objects.Activity.getActivityfromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("procedureText");
   if (fldEl != null) {
     obj.setProcedureText(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("referringHospital");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setReferringHospital(
         ims.core.resource.place.domain.objects.Location.getLocationfromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("referringConsultant");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setReferringConsultant(
         ims.core.resource.people.domain.objects.Medic.getMedicfromXML(fldEl, factory, domMap));
   }
   fldEl = el.element("referringConsultantText");
   if (fldEl != null) {
     obj.setReferringConsultantText(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("category");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setCategory(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("waitingListType");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setWaitingListType(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("waitingListDate");
   if (fldEl != null) {
     obj.setWaitingListDate(
         new java.text.SimpleDateFormat("yyyyMMddHHmmssSSS").parse(fldEl.getTextTrim()));
   }
   fldEl = el.element("waitingListMonthInterval");
   if (fldEl != null) {
     obj.setWaitingListMonthInterval(new Integer(fldEl.getTextTrim()));
   }
   fldEl = el.element("waitingListLengthQualifier");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setWaitingListLengthQualifier(
         ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("faxTo");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setFaxTo(
         ims.core.resource.people.domain.objects.MemberOfStaff.getMemberOfStafffromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("faxDate");
   if (fldEl != null) {
     obj.setFaxDate(
         new java.text.SimpleDateFormat("yyyyMMddHHmmssSSS").parse(fldEl.getTextTrim()));
   }
   fldEl = el.element("liaisonQuery");
   if (fldEl != null) {
     obj.setLiaisonQuery(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("statusHistory");
   if (fldEl != null) {
     fldEl = fldEl.element("set");
     obj.setStatusHistory(
         ims.ntpf.locall.domain.objects.LoCallStatus.fromSetXMLString(
             fldEl, factory, obj.getStatusHistory(), domMap));
   }
   fldEl = el.element("currentStatus");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setCurrentStatus(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("currentStatusReason");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setCurrentStatusReason(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("isLinkedtoCase");
   if (fldEl != null) {
     obj.setIsLinkedtoCase(new Boolean(fldEl.getTextTrim()));
   }
   fldEl = el.element("assocCase");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setAssocCase(
         ims.ntpf.casereferral.domain.objects.CaseReferral.getCaseReferralfromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("assocLocall");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setAssocLocall(
         ims.ntpf.locall.domain.objects.LoCall.getLoCallfromXML(fldEl, factory, domMap));
   }
   fldEl = el.element("hospital");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setHospital(
         ims.core.resource.place.domain.objects.Location.getLocationfromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("mrn");
   if (fldEl != null) {
     obj.setMrn(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("episodeNumber");
   if (fldEl != null) {
     obj.setEpisodeNumber(new String(fldEl.getTextTrim()));
   }
 }
 public static void fillFieldsfromXML(
     org.dom4j.Element el,
     ims.domain.DomainFactory factory,
     OcsOrderSession 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("patient");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setPatient(
         ims.core.patient.domain.objects.Patient.getPatientfromXML(fldEl, factory, domMap));
   }
   fldEl = el.element("investigations");
   if (fldEl != null) {
     fldEl = fldEl.element("set");
     obj.setInvestigations(
         ims.ocrr.orderingresults.domain.objects.OrderInvestigation.fromSetXMLString(
             fldEl, factory, obj.getInvestigations(), domMap));
   }
   fldEl = el.element("orderedBy");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setOrderedBy(
         ims.core.resource.people.domain.objects.MemberOfStaff.getMemberOfStafffromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("responsibleClinician");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setResponsibleClinician(
         ims.core.resource.people.domain.objects.Hcp.getHcpfromXML(fldEl, factory, domMap));
   }
   fldEl = el.element("responsibleGp");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setResponsibleGp(
         ims.core.resource.people.domain.objects.Gp.getGpfromXML(fldEl, factory, domMap));
   }
   fldEl = el.element("patientLocation");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setPatientLocation(
         ims.core.resource.place.domain.objects.Location.getLocationfromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("patientClinic");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setPatientClinic(
         ims.core.resource.place.domain.objects.Clinic.getClinicfromXML(fldEl, factory, domMap));
   }
   fldEl = el.element("hcpAlerts");
   if (fldEl != null) {
     fldEl = fldEl.element("set");
     obj.setHcpAlerts(
         ims.ocrr.orderingresults.domain.objects.OrderHCPAlert.fromSetXMLString(
             fldEl, factory, obj.getHcpAlerts(), domMap));
   }
   fldEl = el.element("clinicalTrial");
   if (fldEl != null) {
     obj.setClinicalTrial(new Boolean(fldEl.getTextTrim()));
   }
   fldEl = el.element("clinicalTrialTxt");
   if (fldEl != null) {
     obj.setClinicalTrialTxt(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("clinicalInfo");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setClinicalInfo(
         ims.ocrr.orderingresults.domain.objects.OcsQASession.getOcsQASessionfromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("additClinNotes");
   if (fldEl != null) {
     obj.setAdditClinNotes(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("patMobility");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setPatMobility(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("orderCategory");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setOrderCategory(ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("reportTo");
   if (fldEl != null) {
     fldEl = fldEl.element("list");
     obj.setReportTo(
         ims.ocrr.orderingresults.domain.objects.OcsReportTo.fromListXMLString(
             fldEl, factory, obj.getReportTo(), domMap));
   }
   fldEl = el.element("specimens");
   if (fldEl != null) {
     fldEl = fldEl.element("set");
     obj.setSpecimens(
         ims.ocrr.orderingresults.domain.objects.OrderSpecimen.fromSetXMLString(
             fldEl, factory, obj.getSpecimens(), domMap));
   }
   fldEl = el.element("wasProcessed");
   if (fldEl != null) {
     obj.setWasProcessed(new Boolean(fldEl.getTextTrim()));
   }
   fldEl = el.element("authorisationOrderStatus");
   if (fldEl != null) {
     fldEl = fldEl.element("lki");
     obj.setAuthorisationOrderStatus(
         ims.domain.lookups.LookupInstance.fromXMLString(fldEl, factory));
   }
   fldEl = el.element("wasDiscarded");
   if (fldEl != null) {
     obj.setWasDiscarded(new Boolean(fldEl.getTextTrim()));
   }
   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("orderingHospital");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setOrderingHospital(
         ims.core.resource.place.domain.objects.LocSite.getLocSitefromXML(fldEl, factory, domMap));
   }
   fldEl = el.element("hasNewOrUpdatedResults");
   if (fldEl != null) {
     obj.setHasNewOrUpdatedResults(new Boolean(fldEl.getTextTrim()));
   }
   fldEl = el.element("bedNumber");
   if (fldEl != null) {
     obj.setBedNumber(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("sendNumber");
   if (fldEl != null) {
     obj.setSendNumber(new Boolean(fldEl.getTextTrim()));
   }
   fldEl = el.element("outpatientDept");
   if (fldEl != null) {
     fldEl = fldEl.element("class");
     obj.setOutpatientDept(
         ims.core.resource.place.domain.objects.Location.getLocationfromXML(
             fldEl, factory, domMap));
   }
   fldEl = el.element("summaryClinicalInformation");
   if (fldEl != null) {
     obj.setSummaryClinicalInformation(new String(fldEl.getTextTrim()));
   }
   fldEl = el.element("bleepExtNumber");
   if (fldEl != null) {
     obj.setBleepExtNumber(new String(fldEl.getTextTrim()));
   }
 }