public String toAuditString() { StringBuffer auditStr = new StringBuffer(); auditStr.append("\r\n*gp* :"); if (gp != null) { auditStr.append(toShortClassName(gp)); auditStr.append(gp.getId()); } auditStr.append("; "); auditStr.append("\r\n*practice* :"); if (practice != null) { auditStr.append(toShortClassName(practice)); auditStr.append(practice.getId()); } auditStr.append("; "); auditStr.append("\r\n*isPrimaryPractice* :"); auditStr.append(isPrimaryPractice); auditStr.append("; "); auditStr.append("\r\n*gpCode* :"); auditStr.append(gpCode); auditStr.append("; "); return auditStr.toString(); }
/** * Create the ValueObject from the ims.core.resource.people.domain.objects.Gp object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param domainObject */ public static ims.core.vo.GPNTPFVo create( DomainObjectMap map, ims.core.resource.people.domain.objects.Gp domainObject) { if (null == domainObject) { return null; } // check if the domainObject already has a valueObject created for it ims.core.vo.GPNTPFVo valueObject = (ims.core.vo.GPNTPFVo) map.getValueObject(domainObject, ims.core.vo.GPNTPFVo.class); if (null == valueObject) { valueObject = new ims.core.vo.GPNTPFVo(domainObject.getId(), domainObject.getVersion()); map.addValueObject(domainObject, valueObject); valueObject = insert(map, valueObject, domainObject); } return valueObject; }
public String toAuditString() { StringBuffer auditStr = new StringBuffer(); auditStr.append("\r\n*lkp_provisiontype* :"); if (lkp_provisiontype != null) auditStr.append(lkp_provisiontype.getText()); auditStr.append("; "); auditStr.append("\r\n*primaryCareIdentifier* :"); auditStr.append(primaryCareIdentifier); auditStr.append("; "); auditStr.append("\r\n*objectidentifier* :"); auditStr.append(objectidentifier); auditStr.append("; "); auditStr.append("\r\n*beffdate* :"); auditStr.append(beffdate); auditStr.append("; "); auditStr.append("\r\n*beffdatecnf* :"); auditStr.append(beffdatecnf); auditStr.append("; "); auditStr.append("\r\n*betdate* :"); auditStr.append(betdate); auditStr.append("; "); auditStr.append("\r\n*betdatecnf* :"); auditStr.append(betdatecnf); auditStr.append("; "); auditStr.append("\r\n*gp* :"); if (gp != null) { auditStr.append(toShortClassName(gp)); auditStr.append(gp.getId()); } auditStr.append("; "); auditStr.append("\r\n*practice* :"); if (practice != null) { auditStr.append(toShortClassName(practice)); auditStr.append(practice.getId()); } auditStr.append("; "); return auditStr.toString(); }
/** * Update the ValueObject with the Domain Object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.core.resource.people.domain.objects.Gp */ public static ims.core.vo.GPNTPFVo insert( DomainObjectMap map, ims.core.vo.GPNTPFVo valueObject, ims.core.resource.people.domain.objects.Gp domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_Gp(domainObject.getId()); valueObject.setIsRIE(domainObject.getIsRIE()); // If this is a recordedInError record, and the domainObject // value isIncludeRecord has not been set, then we return null and // not the value object if (valueObject.getIsRIE() != null && valueObject.getIsRIE().booleanValue() == true && !domainObject.isIncludeRecord()) return null; // If this is not a recordedInError record, and the domainObject // value isIncludeRecord has been set, then we return null and // not the value object if ((valueObject.getIsRIE() == null || valueObject.getIsRIE().booleanValue() == false) && domainObject.isIncludeRecord()) return null; // name valueObject.setName(ims.core.vo.domain.PersonNameAssembler.create(map, domainObject.getName())); // practices valueObject.setPractices( ims.core.vo.domain.GPToPracticeNTPFVoAssembler .createGPToPracticeNTPFVoCollectionFromGpToPractice(map, domainObject.getPractices())); // CodeMappings valueObject.setCodeMappings( ims.core.vo.domain.TaxonomyMapAssembler.createTaxonomyMapCollectionFromTaxonomyMap( map, domainObject.getCodeMappings())); return valueObject; }
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*patient* :"); if (patient != null) { auditStr.append(toShortClassName(patient)); auditStr.append(patient.getId()); } auditStr.append("; "); auditStr.append("\r\n*investigations* :"); if (investigations != null) { java.util.Iterator it3 = investigations.iterator(); int i3 = 0; while (it3.hasNext()) { if (i3 > 0) auditStr.append(","); ims.ocrr.orderingresults.domain.objects.OrderInvestigation obj = (ims.ocrr.orderingresults.domain.objects.OrderInvestigation) it3.next(); if (obj != null) { if (i3 == 0) { auditStr.append(toShortClassName(obj)); auditStr.append("["); } auditStr.append(obj.getId()); } i3++; } if (i3 > 0) auditStr.append("] " + i3); } auditStr.append("; "); auditStr.append("\r\n*orderedBy* :"); if (orderedBy != null) { auditStr.append(toShortClassName(orderedBy)); auditStr.append(orderedBy.getId()); } auditStr.append("; "); auditStr.append("\r\n*responsibleClinician* :"); if (responsibleClinician != null) { auditStr.append(toShortClassName(responsibleClinician)); auditStr.append(responsibleClinician.getId()); } auditStr.append("; "); auditStr.append("\r\n*responsibleGp* :"); if (responsibleGp != null) { auditStr.append(toShortClassName(responsibleGp)); auditStr.append(responsibleGp.getId()); } auditStr.append("; "); auditStr.append("\r\n*patientLocation* :"); if (patientLocation != null) { auditStr.append(toShortClassName(patientLocation)); auditStr.append(patientLocation.getId()); } auditStr.append("; "); auditStr.append("\r\n*patientClinic* :"); if (patientClinic != null) { auditStr.append(toShortClassName(patientClinic)); auditStr.append(patientClinic.getId()); } auditStr.append("; "); auditStr.append("\r\n*hcpAlerts* :"); if (hcpAlerts != null) { java.util.Iterator it9 = hcpAlerts.iterator(); int i9 = 0; while (it9.hasNext()) { if (i9 > 0) auditStr.append(","); ims.ocrr.orderingresults.domain.objects.OrderHCPAlert obj = (ims.ocrr.orderingresults.domain.objects.OrderHCPAlert) 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*clinicalTrial* :"); auditStr.append(clinicalTrial); auditStr.append("; "); auditStr.append("\r\n*clinicalTrialTxt* :"); auditStr.append(clinicalTrialTxt); auditStr.append("; "); auditStr.append("\r\n*clinicalInfo* :"); if (clinicalInfo != null) { auditStr.append(toShortClassName(clinicalInfo)); auditStr.append(clinicalInfo.getId()); } auditStr.append("; "); auditStr.append("\r\n*additClinNotes* :"); auditStr.append(additClinNotes); auditStr.append("; "); auditStr.append("\r\n*patMobility* :"); if (patMobility != null) auditStr.append(patMobility.getText()); auditStr.append("; "); auditStr.append("\r\n*orderCategory* :"); if (orderCategory != null) auditStr.append(orderCategory.getText()); auditStr.append("; "); auditStr.append("\r\n*reportTo* :"); if (reportTo != null) { int i16 = 0; for (i16 = 0; i16 < reportTo.size(); i16++) { if (i16 > 0) auditStr.append(","); ims.ocrr.orderingresults.domain.objects.OcsReportTo obj = (ims.ocrr.orderingresults.domain.objects.OcsReportTo) reportTo.get(i16); if (obj != null) { if (i16 == 0) { auditStr.append(toShortClassName(obj)); auditStr.append("["); } auditStr.append(obj.toString()); } } if (i16 > 0) auditStr.append("] " + i16); } auditStr.append("; "); auditStr.append("\r\n*specimens* :"); if (specimens != null) { java.util.Iterator it17 = specimens.iterator(); int i17 = 0; while (it17.hasNext()) { if (i17 > 0) auditStr.append(","); ims.ocrr.orderingresults.domain.objects.OrderSpecimen obj = (ims.ocrr.orderingresults.domain.objects.OrderSpecimen) it17.next(); if (obj != null) { if (i17 == 0) { auditStr.append(toShortClassName(obj)); auditStr.append("["); } auditStr.append(obj.getId()); } i17++; } if (i17 > 0) auditStr.append("] " + i17); } auditStr.append("; "); auditStr.append("\r\n*wasProcessed* :"); auditStr.append(wasProcessed); auditStr.append("; "); auditStr.append("\r\n*authorisationOrderStatus* :"); if (authorisationOrderStatus != null) auditStr.append(authorisationOrderStatus.getText()); auditStr.append("; "); auditStr.append("\r\n*wasDiscarded* :"); auditStr.append(wasDiscarded); auditStr.append("; "); auditStr.append("\r\n*careContext* :"); if (careContext != null) { auditStr.append(toShortClassName(careContext)); auditStr.append(careContext.getId()); } auditStr.append("; "); auditStr.append("\r\n*orderingHospital* :"); if (orderingHospital != null) { auditStr.append(toShortClassName(orderingHospital)); auditStr.append(orderingHospital.getId()); } auditStr.append("; "); auditStr.append("\r\n*hasNewOrUpdatedResults* :"); auditStr.append(hasNewOrUpdatedResults); auditStr.append("; "); auditStr.append("\r\n*bedNumber* :"); auditStr.append(bedNumber); auditStr.append("; "); auditStr.append("\r\n*sendNumber* :"); auditStr.append(sendNumber); auditStr.append("; "); auditStr.append("\r\n*outpatientDept* :"); if (outpatientDept != null) { auditStr.append(toShortClassName(outpatientDept)); auditStr.append(outpatientDept.getId()); } auditStr.append("; "); auditStr.append("\r\n*summaryClinicalInformation* :"); auditStr.append(summaryClinicalInformation); auditStr.append("; "); auditStr.append("\r\n*bleepExtNumber* :"); auditStr.append(bleepExtNumber); auditStr.append("; "); return auditStr.toString(); }