private PatientProcedureSurgicalOpVo updateProcedureDataFromScreen(PatientProcedureSurgicalOpVo patProc,HcpLiteVoCollection assistants) { if (patProc == null) return null; patProc.setProcDate(form.dteDate().getValue() == null ? null : new PartialDate(form.dteDate().getValue())); patProc.setPeformedBy(form.qmbOpSurgeon().getValue()); patProc.setHCPPresent(assistants); patProc.setProcedureUrgency(null); if (!GroupOperationEnumeration.None.equals(form.GroupOperation().getValue())) { patProc.setProcedureUrgency(GroupOperationEnumeration.rdoEmergency.equals(form.GroupOperation().getValue())?ProcedureUrgency.EMERGENCY:ProcedureUrgency.ELECTIVE); } return patProc; }
private void populateInstanceControlsFromData(PatientProcedureSurgicalOpVo proc) { clearInstanceControls(); if (proc == null) return; form.dteDate().setValue(proc.getProcDateIsNotNull() ? proc.getProcDate().toDate() : null); HcpLiteVo surgeon = proc.getPeformedBy(); if (surgeon !=null) { form.qmbOpSurgeon().newRow(surgeon, surgeon.getMosIsNotNull()?surgeon.getMos().getIMosName():null); form.qmbOpSurgeon().setValue(surgeon); } HcpLiteVoCollection assistants = proc.getHCPPresent(); if (assistants != null) { for (int i =0 ; i<assistants.size() ; i++) { HcpLiteVo assistant = assistants.get(i); if (assistant!=null) { grdAssistantsRow nRow = form.grdAssistants().getRows().newRow(); nRow.getSurgeon().newRow(assistant,assistant.getIMosName()); nRow.getSurgeon().setValue(assistant); } } } // TODO form.chkPrimary().setValue(form.getLocalContext().getCurrentOPNoteIsNotNull() && proc.equals(form.getLocalContext().getCurrentOPNote().getMainProcedure())); if (proc.getProcedureUrgencyIsNotNull()) { form.GroupOperation().setValue(ProcedureUrgency.EMERGENCY.equals(proc.getProcedureUrgency())?GroupOperationEnumeration.rdoEmergency:GroupOperationEnumeration.rdoElective); } populateCmbConsultant(); }