private void populateScreenFromData(SurgicalAuditOperationDetailVo record) { if( record == null) return; populatePlannedProceduresGrid(record.getPreOpChecks()); if( record.getPreOpChecksTheatreNurseIsNotNull()) { ArrayList<LocationLiteVo> theatre = form.cmbTheatreNameNumber().getValues(); if( theatre != null && record.getPreOpChecksTheatreNurse().getTheatreNameIsNotNull() && !theatre.contains(record.getPreOpChecksTheatreNurse().getTheatreName())) form.cmbTheatreNameNumber().newRow(record.getPreOpChecksTheatreNurse().getTheatreName(),record.getPreOpChecksTheatreNurse().getTheatreName().getName()); form.cmbTheatreNameNumber().setValue(record.getPreOpChecksTheatreNurse().getTheatreName()); form.txtComments().setValue(record.getPreOpChecksTheatreNurse().getComments()); form.ccTheatreNurse().setValue(record.getPreOpChecksTheatreNurse().getAccompanyingTheatreNurse()); //wdev-15749 form.chkLocumAccompanyingTheatreNurse().setValue(record.getPreOpChecksTheatreNurse().getAccompanyingTheatreNurseLocumBool()); //wdev-15749 form.txtAccompanyingTheatreNurse().setValue(record.getPreOpChecksTheatreNurse().getAccompanyingTheatreNurseLocumNurse()); //wdev-15479 form.cmbOperationType().setValue(record.getPreOpChecksTheatreNurse().getOperationType()); //wdev-15720 } }
private void populateRecordBrowser(CareContextShortVo currentCareContext) { form.recbrSurgAudit().clear(); SurgicalAuditOperationDetailVoCollection collSurgAudit = domain.listSurgicalAuditOperationDetailByCareContext(currentCareContext); for (int i = 0; i < collSurgAudit.size(); i++) { SurgicalAuditOperationDetailVo surgAudit = collSurgAudit.get(i); addRowToRecordBrowser(surgAudit); } if (form.getLocalContext().getselectedSurgicalAuditOpDetailIsNotNull()) { form.recbrSurgAudit().setValue(form.getLocalContext().getselectedSurgicalAuditOpDetail()); } form.getLocalContext().setselectedSurgicalAuditOpDetail(form.recbrSurgAudit().getValue()); }
public Boolean isStale(SurgicalAuditOperationDetailVo surgAudit) { if (surgAudit == null || surgAudit.getID_SurgicalAuditOperationDetail() == null) { throw new CodingRuntimeException("Cannot get SurgicalAuditOperationDetailVo on null Id "); } DomainFactory factory = getDomainFactory(); SurgicalAuditOperationDetail domainSurgAudit = (SurgicalAuditOperationDetail) factory.getDomainObject(SurgicalAuditOperationDetail.class, surgAudit.getID_SurgicalAuditOperationDetail()); if(domainSurgAudit==null) { return true; } if (domainSurgAudit.getVersion() > surgAudit.getVersion_SurgicalAuditOperationDetail()) { return true; } return false; }
private void populateScreenFromData(SurgicalAuditOperationDetailVo record) { if( record == null) return; if( record.getActualProcedureIsNotNull() ) populateProceduresGrid(record.getActualProcedure().getPlannedActualProcedures()); else if( record.getPreOpChecksIsNotNull()) populateProceduresGrid(record.getPreOpChecks().getPlannedProcedures()); if( record.getActualProcedureIsNotNull()) { populateSurgicalPackGrid(record.getActualProcedure().getSurgicalPacks()); form.dtimAnaesthetistaStartDate().setValue(record.getActualProcedure().getAnaesthetistsStartTime()); form.dtimAnaesthetistsFinishTime().setValue(record.getActualProcedure().getAnaesthetistsFinishTime()); form.dtimSurgeryStartTime().setValue(record.getActualProcedure().getSurgeryStartTime()); form.dtimSUrgeryFinishTime().setValue(record.getActualProcedure().getSurgeryFinishTime()); form.dtimTimePatientLeavesOpTheatre().setValue(record.getActualProcedure().getTimeLeftTheatre()); ArrayList<LocationLiteVo> sentto = form.cmbPatientSentTo().getValues(); if( sentto != null && record.getActualProcedure().getSentIsNotNull() && !sentto.contains(record.getActualProcedure().getSent())) form.cmbPatientSentTo().newRow(record.getActualProcedure().getSent(), record.getActualProcedure().getSent().getName()); form.cmbPatientSentTo().setValue(record.getActualProcedure().getSent()); } }
@Override protected void onlyrSurgAuditTabChanged(ims.framework.LayerBridge tab) { if (FormMode.VIEW.equals(form.getMode())) { PatientShort patient = form.getGlobalContext().Core.getPatientShort(); CareContextShortVo careContext = form.getGlobalContext().Core.getCurrentCareContext(); SurgicalAuditOperationDetailVo surgicalAudit = form.getLocalContext().getselectedSurgicalAuditOpDetail(); if (tab.equals(form.lyrSurgAudit().tabPreOperationChecks())) { form.lyrSurgAudit().tabPreOperationChecks().ccPreOpChecks().initialize(surgicalAudit); } else if (tab.equals(form.lyrSurgAudit().tabPreOperationChecksTheatreNurse())) { form.lyrSurgAudit().tabPreOperationChecksTheatreNurse().ccPreOpChecksTheatreNurse().initialize(patient, careContext, surgicalAudit); } else if (tab.equals(form.lyrSurgAudit().tabProcedureDetails())) { form.lyrSurgAudit().tabProcedureDetails().ccProcedureDetails().initialize(patient, careContext, surgicalAudit); } else if (tab.equals(form.lyrSurgAudit().tabPlannedActualProcedures())) { form.lyrSurgAudit().tabPlannedActualProcedures().ccPlannedActualProc().initialize(patient, careContext, surgicalAudit); } else if (tab.equals(form.lyrSurgAudit().tabRecovery())) { form.lyrSurgAudit().tabRecovery().ccRecovery().initialize(surgicalAudit); } populateRecordBrowser(form.getGlobalContext().Core.getCurrentCareContext()); updateControlsState(); } }
private void populateScreenFromData() { PatientShort patient = form.getGlobalContext().Core.getPatientShort(); CareContextShortVo careContext = form.getGlobalContext().Core.getCurrentCareContext(); SurgicalAuditOperationDetailVo surgicalAudit = form.getLocalContext().getselectedSurgicalAuditOpDetail(); form.lyrSurgAudit().tabPreOperationChecks().ccPreOpChecks().initialize(surgicalAudit); form.lyrSurgAudit().tabPreOperationChecksTheatreNurse().ccPreOpChecksTheatreNurse().initialize(patient, careContext, surgicalAudit); form.lyrSurgAudit().tabProcedureDetails().ccProcedureDetails().initialize(patient, careContext, surgicalAudit); form.lyrSurgAudit().tabPlannedActualProcedures().ccPlannedActualProc().initialize(patient, careContext, surgicalAudit); form.lyrSurgAudit().tabRecovery().ccRecovery().initialize(surgicalAudit); }
private void addRowToRecordBrowser(SurgicalAuditOperationDetailVo surgAudit) { if (surgAudit == null) { return; } StringBuffer recordBrowserText = new StringBuffer(); recordBrowserText.append(form.getGlobalContext().Core.getCurrentCareContext().getStartDateTime()); //recordBrowserText.append(form.getGlobalContext().Core.getCurrentCareContext().getEndDateTime() != null ? " - " + form.getGlobalContext().Core.getCurrentCareContext().getEndDateTime() : ""); //WDEV-15689 if (surgAudit.getPreOpChecksIsNotNull() && surgAudit.getPreOpChecks().getPlannedProceduresIsNotNull()) { PatientProcedureForSurgicalAuditPreOpChecksVoCollection collProc = surgAudit.getPreOpChecks().getPlannedProcedures(); for (int i=0;i<collProc.size();i++) { if (collProc.get(i).getIsPrimary()) { recordBrowserText.append(" - "+collProc.get(i).getProcedureDescription()); recordBrowserText.append(collProc.get(i).getPeformedByIsNotNull() ? " - " + collProc.get(i).getPeformedBy() : ""); break; } } } recordBrowserText.append(surgAudit.getCurrentStatusIsNotNull() ? " - " + surgAudit.getCurrentStatus().getOperationStatus().toString() : ""); if (Boolean.TRUE.equals(surgAudit.getOperationCancelled())) { form.recbrSurgAudit().newRow(surgAudit, recordBrowserText.toString(), Color.Red); return; } form.recbrSurgAudit().newRow(surgAudit, recordBrowserText.toString()); }
public SurgicalAuditOperationDetailVo getSurgicalAuditOperationDetail(SurgicalAuditOperationDetailRefVo surgicalAuditOpRef) { if (surgicalAuditOpRef == null || surgicalAuditOpRef.getID_SurgicalAuditOperationDetail() == null) { throw new CodingRuntimeException("Cannot get SurgicalAuditOperationDetailVo on null Id "); } DomainFactory factory = getDomainFactory(); SurgicalAuditOperationDetail domainSurgicalAudit = (SurgicalAuditOperationDetail) factory.getDomainObject(SurgicalAuditOperationDetail.class, surgicalAuditOpRef.getID_SurgicalAuditOperationDetail()); return SurgicalAuditOperationDetailVoAssembler.create(domainSurgicalAudit); }
public SurgicalAuditOperationDetailVo saveSurgicalAuditOperationDetail(ims.clinical.vo.SurgicalAuditOperationDetailVo record) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException { if (record == null ) { throw new CodingRuntimeException("Cannot get SurgicalAuditOperationDetailVo on null Id "); } DomainFactory factory = getDomainFactory(); SurgicalAuditOperationDetail domainSurgicalAudit = SurgicalAuditOperationDetailVoAssembler.extractSurgicalAuditOperationDetail(factory, record); factory.save(domainSurgicalAudit); return SurgicalAuditOperationDetailVoAssembler.create(domainSurgicalAudit); }
public SurgicalAuditOperationDetailVo saveAndMarkAsRIE(SurgicalAuditOperationDetailVo surgAuditToSave, SurgicalAuditProcedureDetailsVo surgAuditProcedureDetails, FormName form, Integer patId, Integer careContextId, String comment) throws StaleObjectException { if (surgAuditToSave == null || surgAuditProcedureDetails==null) { throw new CodingRuntimeException("Cannot get SurgicalAuditOperationDetailVo on null Id "); } DomainFactory factory = getDomainFactory(); SurgicalAuditOperationDetail domainSurgicalAudit = SurgicalAuditOperationDetailVoAssembler.extractSurgicalAuditOperationDetail(factory, surgAuditToSave); factory.save(domainSurgicalAudit); factory.markAsRie(SurgicalAuditProcedureDetails.class, surgAuditProcedureDetails.getID_SurgicalAuditProcedureDetails(), form, patId, null, careContextId, comment); return SurgicalAuditOperationDetailVoAssembler.create(domainSurgicalAudit); }
private SurgicalAuditOperationDetailVo populateDataFromScreen(SurgicalAuditOperationDetailVo surgicalAuditOpDetail) { if (surgicalAuditOpDetail == null) return null; SurgicalAuditRecoveryVo surgAuditRecovery = populateDataFromRecoveryTab(surgicalAuditOpDetail.getRecovery()); surgicalAuditOpDetail.setRecovery(surgAuditRecovery); // The current status will be modified only when saving for the first time on a tab. // The records will be added to history also only when saving for the first time if (surgAuditRecovery!=null && surgAuditRecovery.getID_SurgicalAuditRecovery()==null && surgicalAuditOpDetail.getCurrentStatus() != null && !SurgicalAuditOperationDetailStatus.CANCELLED_OPERATIONS.equals(surgicalAuditOpDetail.getCurrentStatus().getOperationStatus()) && (SurgicalAuditOperationDetailStatus.LEFT_HOLDING_BAY.equals(surgicalAuditOpDetail.getCurrentStatus().getOperationStatus()) || SurgicalAuditOperationDetailStatus.ENTERED_OPERATING_THEATRE.equals(surgicalAuditOpDetail.getCurrentStatus().getOperationStatus()) || SurgicalAuditOperationDetailStatus.LEFT_OPERATING_THEATRE.equals(surgicalAuditOpDetail.getCurrentStatus().getOperationStatus()))) { MemberOfStaffLiteVo statusAuthoringUser = null; Object mos = domain.getMosUser(); if (mos instanceof MemberOfStaffLiteVo) statusAuthoringUser = (MemberOfStaffLiteVo) mos; SurgicalAuditOperationDetailStatusVo tempCurrentStatus = populateStatus(ims.clinical.vo.lookups.SurgicalAuditOperationDetailStatus.HAND_OVER_FROM_RECOVERY_NURSE, new DateTime(), statusAuthoringUser); surgicalAuditOpDetail.setCurrentStatus(tempCurrentStatus); SurgicalAuditOperationDetailStatusVoCollection tempStatusHistory = surgicalAuditOpDetail.getStatusHistory(); tempStatusHistory.add(populateStatus(ims.clinical.vo.lookups.SurgicalAuditOperationDetailStatus.PATIENT_ARRIVED_IN_RECOVERY, new DateTime(), statusAuthoringUser)); tempStatusHistory.add(populateStatus(ims.clinical.vo.lookups.SurgicalAuditOperationDetailStatus.TIME_WARD_OR_UNIT_NOTIFIED, new DateTime(), statusAuthoringUser)); tempStatusHistory.add(populateStatus(ims.clinical.vo.lookups.SurgicalAuditOperationDetailStatus.PATIENT_LEFT_RECOVERY, new DateTime(), statusAuthoringUser)); tempStatusHistory.add(tempCurrentStatus); surgicalAuditOpDetail.setStatusHistory(tempStatusHistory); } return surgicalAuditOpDetail; }