private void populateProcedures(PatientProcedureShortVoCollection voCollProcedure) { form.ctnSummary().grdProcedure().getRows().clear(); if (voCollProcedure != null) { for (int i = 0; i < voCollProcedure.size(); i++) { PatientProcedureShortVo voPatientProcedureShort = voCollProcedure.get(i); if (voPatientProcedureShort.getProcedureStatusIsNotNull()) { if ((voPatientProcedureShort.getProcedureStatus().equals(PatientProcedureStatus.PLANNED) && (voPatientProcedureShort.getProcedureOutcome() == null || voPatientProcedureShort.getProcedureOutcome().equals(PatientProcedureOutcome.CANCELLED)) || (voPatientProcedureShort.getProcedureStatus().equals(PatientProcedureStatus.PERFORMED)))) { GenForm.ctnSummaryContainer.grdProcedureRow pRow = form.ctnSummary().grdProcedure().getRows().newRow(); pRow.setColImage(getProcedureLateralityImg(voPatientProcedureShort.getProcLaterality(), voPatientProcedureShort.getProcedureStatus())); pRow.setColText(getProcedureText(voPatientProcedureShort)); pRow.setTooltipForColText(voPatientProcedureShort.createTooltipForPatientSummary()); pRow.setColDatePerformed(getDate(voPatientProcedureShort)); if (voPatientProcedureShort.getSysInfoIsNotNull() && voPatientProcedureShort.getSysInfo().getLastupdateUser() != null) pRow.setcolHasAudit(form.getImages().Core.EditDisabled); pRow.setTooltip(voPatientProcedureShort.getDiAssociationsTooltip()); pRow.setColStatus(getStatus(voPatientProcedureShort)); pRow.setValue(voPatientProcedureShort); } } } } }
private void populateProcedures(PatientProcedureShortVoCollection voCollProcedure) { form.ctnSummary().grdProcedure().getRows().clear(); if (voCollProcedure != null) { for (int i = 0; i < voCollProcedure.size(); i++) { PatientProcedureShortVo voPatientProcedureShort = voCollProcedure.get(i); if(voPatientProcedureShort.getProcedureStatusIsNotNull()) { if((voPatientProcedureShort.getProcedureStatus().equals(PatientProcedureStatus.PLANNED) && (voPatientProcedureShort.getProcedureOutcome() == null || voPatientProcedureShort.getProcedureOutcome().equals(PatientProcedureOutcome.CANCELLED)) || (voPatientProcedureShort.getProcedureStatus().equals(PatientProcedureStatus.PERFORMED)))) { GenForm.ctnSummaryContainer.grdProcedureRow pRow = form.ctnSummary().grdProcedure().getRows().newRow(); pRow.setColImage(getProcedureLateralityImg(voPatientProcedureShort.getProcLaterality(), voPatientProcedureShort.getProcedureStatus())); pRow.setColText(getProcedureText(voPatientProcedureShort)); pRow.setTooltipForColText(voPatientProcedureShort.createTooltipForPatientSummary()); pRow.setColDatePerformed(getDate(voPatientProcedureShort)); if (voPatientProcedureShort.getSysInfoIsNotNull() && voPatientProcedureShort.getSysInfo().getLastupdateUser() != null) pRow.setcolHasAudit(form.getImages().Core.EditDisabled); pRow.setTooltip(voPatientProcedureShort.getDiAssociationsTooltip()); pRow.setColStatus(getStatus(voPatientProcedureShort)); pRow.setValue(voPatientProcedureShort); } } } } }
private void performInstance() { // TODO // - update the outcome of the originating procedure to 'performed' // - create a new procedure setting the status to performed // and copying the coding item, description, laterality, site, exclude, attributes, // default in recording/authoring user and date time. PatientProcedureVo voPatProc = form.getLocalContext().getPatientProcedureVo(); PatientProcedureVo voNewPatProc = new PatientProcedureVo(); if (voPatProc != null) { voPatProc.setProcedureOutcome(PatientProcedureOutcome.PERFORMED); form.getLocalContext().setPatientProcedureVo(voPatProc); /* * String[] uiErrors = null; String[] errors = voPatProc.validate(uiErrors); if (errors != null) { engine.showErrors(errors); return; } * * try { voPatProc = domain.savePlannedProcedure(voPatProc, form.getGlobalContext().Core.getPatientShort()); } catch (StaleObjectException e) { engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); open(); form.getLocalContext().setPatientProcedureVo(domain.getProcedure(voPatProc)); return; } catch (UniqueKeyViolationException e) { engine.showMessage(e.getMessage()); open(); form.getLocalContext().setPatientProcedureVo(domain.getProcedure(voPatProc)); return; } */ open(); form.dyngrdProcedure().setValue(null); PatientProcedureRefVo voRefPlannedProc = new PatientProcedureRefVo(); voRefPlannedProc.setID_PatientProcedure(voPatProc.getID_PatientProcedure()); voNewPatProc.setPlannedProc(voRefPlannedProc); voNewPatProc.setProcedure(voPatProc.getProcedure()); voNewPatProc.setProcedureDescription(voPatProc.getProcedureDescription()); voNewPatProc.setProcLaterality(voPatProc.getProcLaterality()); voNewPatProc.setSiteText(voPatProc.getSiteText()); voNewPatProc.setExcludeFromOthers(voPatProc.getExcludeFromOthers()); // voNewPatProc.getAuthoringInformation().setAuthoringDateTime(new DateTime()); AuthoringInformationVo voAuthoring = new AuthoringInformationVo(); voAuthoring.setAuthoringDateTime(new DateTime()); voAuthoring.setAuthoringHcp((HcpLiteVo) domain.getHcpLiteUser()); voNewPatProc.setAuthoringInformation(voAuthoring); voNewPatProc.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); voNewPatProc.setProcedureStatus(PatientProcedureStatus.PERFORMED); clearInstanceControls(); populateScreenFromData(voNewPatProc); form.ctnDetails().dtimUser().setValue(new DateTime()); Object hcpLite = domain.getHcpLiteUser(); form.ctnDetails().txtRecordingHCP().setValue(hcpLite != null ? (((HcpLiteVo) hcpLite).getName() != null ? ((HcpLiteVo) hcpLite).getName().toString() : null) : null); form.ctnDetails().customControlAuthoringInfo().initializeComponent(); form.ctnDetails().GroupStatus().setValue(GenForm.ctnDetailsContainer.GroupStatusEnumeration.rdoPerformed); form.ctnDetails().grpProcedureType().setValue(GenForm.ctnDetailsContainer.grpProcedureTypeEnumeration.rdoSpecialty); setInitialCustomControlCodingSettings(); form.getLocalContext().setPatientProcedureVo(voNewPatProc);// new PatientProcedureVo()); form.setMode(FormMode.EDIT); enableAuthoringControls(Boolean.FALSE); hideOrDisplayUrgencyAndPerformedControls(); form.ctnDetails().customControlCodingItem().setParentEditing(Boolean.TRUE, Boolean.TRUE); form.ctnDetails().GroupStatus().setEnabled(GenForm.ctnDetailsContainer.GroupStatusEnumeration.rdoPlanned, false); form.ctnDetails().GroupStatus().setEnabled(GenForm.ctnDetailsContainer.GroupStatusEnumeration.rdoPerformed, false); } }