private DiagnosisVo getGenericRowDiagnosis(boolean bAll) { DiagnosisVo voDiagnosis = new DiagnosisVo(); if (bAll) { voDiagnosis.setID_Diagnosis((new Integer(SEARCH_ALL_ITEMS_SELECTED_ID))); voDiagnosis.setDiagnosisName(SEARCH_ALL_ITEM_SELECTED + "Diagnoses"); } else { voDiagnosis.setID_Diagnosis(new Integer(NO_CODE_ITEM_SELECTED_ID)); voDiagnosis.setDiagnosisName(NO_CODE_ITEM_SELECTED); } return voDiagnosis; }
private DiagnosisVo getGenericRowDiagnosis(boolean bAll) { DiagnosisVo voDiagnosis = new DiagnosisVo(); if (form.getLocalContext().getSearchDiagnosesDatabase() != null && bAll) { voDiagnosis.setID_Diagnosis((new Integer(SEARCH_DIAGNOSES_DATABASE_ID))); voDiagnosis.setDiagnosisName(SEARCH_DIAGNOSES_DATABASE); } else if (form.getLocalContext().getSearchDiagnosesDatabase() == null && bAll) { voDiagnosis.setID_Diagnosis((new Integer(SEARCH_ALL_ITEMS_SELECTED_ID))); voDiagnosis.setDiagnosisName(SEARCH_ALL_ITEM_SELECTED + "Diagnoses"); } else { voDiagnosis.setID_Diagnosis(new Integer(NO_CODE_ITEM_SELECTED_ID)); voDiagnosis.setDiagnosisName(NO_CODE_ITEM_SELECTED); } return voDiagnosis; }
public void newInstance() { String searchString = form.txtDiagSearch().getValue(); form.getLocalContext().setDiagnosisDetails(new DiagnosisVo()); form.grdDiagnosis().setValue(null); clearInstanceControls(); form.chkIsActive().setValue(true); form.txtDiagnosisName().setValue(searchString); if (form.grdDiagnosis().getRows().size() > 0) form.txtDiagnosisName().setValue(null); form.txtDiagnosisName().setFocus(); form.setMode(FormMode.EDIT); }
private void addGenericRow(boolean bAll) { CodingItemType lkpCodingType = form.getLocalContext().getCodingLookupType(); if (lkpCodingType.equals(CodingItemType.ALLERGY)) { AllergenVo voAllergen = getGenericRowAllergen(bAll); form.qmbCodingItem().newRow(voAllergen, voAllergen.getAllergenName(), Color.Red); } else if (lkpCodingType.equals(CodingItemType.DIAGNOSIS) || lkpCodingType.equals(CodingItemType.FAMILY_HISTORY)) { DiagnosisVo voDiagnosis = getGenericRowDiagnosis(bAll); form.qmbCodingItem().newRow(voDiagnosis, voDiagnosis.getDiagnosisName(), Color.Red); } else if (lkpCodingType.equals(CodingItemType.PROBLEM)) { ClinicalProblemShortVo voProblem = getGenericRowProblem(bAll); form.qmbCodingItem().newRow(voProblem, voProblem.getPCName(), Color.Red); } else if (lkpCodingType.equals(CodingItemType.PROCEDURE)) { ProcedureLiteVo voProcedure = getGenericRowProcedure(bAll); form.qmbCodingItem().newRow(voProcedure, voProcedure.getProcedureName(), Color.Red); } else if (lkpCodingType.equals(CodingItemType.IMAGING_EVENT)) { CancerImagingEventLiteVo voImagingEvent = getGenericRowImagingEvent(bAll); form.qmbCodingItem().newRow(voImagingEvent, voImagingEvent.getImagingEventName(), Color.Red); } else if (lkpCodingType.getId() == CodingItemType.MEDICATION.getId() && (form.imbSearch().isVisible() || engine.getFormName().getID() == 123215)) //WDEV-13956 { MedicationLiteVo voMedication = getGenericRowMedicationConfig(bAll); form.qmbCodingItem().newRow(voMedication, voMedication.getMedicationName(), Color.Red); } }
public DiagnosisVo saveDiagnosisVo(DiagnosisVo voDiagnosisVo) throws StaleObjectException, UniqueKeyViolationException { if (!voDiagnosisVo.isValidated()) { throw new DomainRuntimeException("This DiagnosisVo has not been validated"); } DomainFactory factory = getDomainFactory(); Diagnosis domDiagnosis = DiagnosisVoAssembler.extractDiagnosis(factory, voDiagnosisVo); domDiagnosis.setKeywords(Keywords.setupKeyWords(domDiagnosis.getKeywords(), domDiagnosis.getDiagnosisName())); try { factory.save(domDiagnosis); } catch(UnqViolationUncheckedException e) { //check which constraint was violated (name/taxononmy map) //name Diagnosis diag = Diagnosis.getDiagnosisFromDiagnosisName(factory, voDiagnosisVo.getDiagnosisName()); if (diag != null && diag.getId() != null && !(diag.getId().equals(voDiagnosisVo.getID_Diagnosis()))) { throw new UniqueKeyViolationException("Diagnosis record called \"" + voDiagnosisVo.getDiagnosisName() + "\" already exists. Duplicates not allowed.", e); } //taxonomy map String dupMessage = Keywords.checkDuplicateTaxonomy(factory, domDiagnosis, voDiagnosisVo.getTaxonomyMap(), "getDiagnosisName"); if(dupMessage != null) throw new UniqueKeyViolationException(dupMessage); throw (e); } return DiagnosisVoAssembler.create(domDiagnosis); }
private void addDiagnosisToDynGrid(PatientDiagnosisShortVo voDiag, String stringICD10, String stringOPCS4, LateralityLRB lateralityLRB, DynamicGridRow newRow, DynamicGridCell cellName, DynamicGridCell cellICD10, DynamicGridCell cellOPCS4, DynamicGridCell cellLaterality) { cellName.setValue(voDiag.getDiagnosisDescription()); cellName.setTooltip(voDiag.getDiagnosisDescription()); if (voDiag.getDiagnosisIsNotNull() && voDiag.getDiagnosis().getID_DiagnosisIsNotNull()) { DiagnosisVo voDiagWithMappings = domain.getDiagnosisWithTaxonomyMappings(voDiag.getDiagnosis()); cellICD10.setValue(stringICD10 == "" ? findICD10(voDiagWithMappings.getCciMappings()) : stringICD10); cellICD10.setTooltip(stringICD10 == "" ? findICD10(voDiagWithMappings.getCciMappings()) : stringICD10); cellOPCS4.setValue(stringOPCS4 == "" ? findOPCS4(voDiagWithMappings.getCciMappings()) : stringOPCS4); cellOPCS4.setTooltip(stringOPCS4 == "" ? findOPCS4(voDiagWithMappings.getCciMappings()) : stringOPCS4); } if (voDiag != null && voDiag.getDiagnosis() == null) { cellICD10.setValue(stringICD10); cellICD10.setTooltip(stringICD10); cellOPCS4.setValue(stringOPCS4); cellOPCS4.setTooltip(stringOPCS4); } cellLaterality.setValue(lateralityLRB!=null ? lateralityLRB.getText() : ""); newRow.setBackColor(Color.Orange); }
private void addDiagnosisToOutpatientCodingGrid(PatientDiagnosisShortVo voDiag, String stringICD10, String stringOPCS4, LateralityLRB lateralityLRB, boolean bSavedRecord) { grdOutpatientCodingRow rowCoding = form.lyrTabs().tabOutpatientCoding().grdOutpatientCoding().getRows().newRow(); rowCoding.setColDiagProcInv(voDiag.getDiagnosisDescription()); rowCoding.setTooltipForColDiagProcInv(voDiag.getDiagnosisDescription()); if (voDiag.getDiagnosisIsNotNull() && voDiag.getDiagnosis().getID_DiagnosisIsNotNull()) { DiagnosisVo voDiagWithMappings = domain.getDiagnosisWithTaxonomyMappings(voDiag.getDiagnosis()); rowCoding.setColDiagVo(voDiag); rowCoding.setColICD10(stringICD10 == "" ? findICD10(voDiagWithMappings.getCciMappings()) : stringICD10); rowCoding.setColOPCS4(stringOPCS4 == "" ? findOPCS4(voDiagWithMappings.getCciMappings()) : stringOPCS4); } if (voDiag != null && voDiag.getDiagnosis() == null) { rowCoding.setColDiagVo(voDiag); rowCoding.setColICD10(stringICD10); rowCoding.setColOPCS4(stringOPCS4); } rowCoding.setColEditICDReadOnly(true); rowCoding.setColEditOPCSReadOnly(true); rowCoding.setColLaterality(bSavedRecord ? lateralityLRB : voDiag.getDiagLaterality()); rowCoding.setBackColor(Color.Orange); rowCoding.setValue(null); form.lyrTabs().tabOutpatientCoding().grdDiag().setValue(null); if (form.getLocalContext().getCurrentRCVo() == null) { form.lyrTabs().tabOutpatientCoding().chkOutpatientActive().setValue(true); form.lyrTabs().tabOutpatientCoding().dtimRecording().setValue(new DateTime()); if (engine.getLoggedInUser() != null && engine.getLoggedInUser().getUserRealName() != null) form.lyrTabs().tabOutpatientCoding().txtRecUser().setValue(engine.getLoggedInUser().getUserRealName().toString()); } }
private void addDiagnosisToCodingGrid(PatientDiagnosisShortVo voDiag, String stringICD10, String stringOPCS4, LateralityLRB lateralityLRB, boolean bSavedRecord) { grdCodingRow rowCoding = form.lyrTabs().tabInpatientCoding().grdCoding().getRows().newRow(); rowCoding.setColDiagProc(voDiag.getDiagnosisDescription()); rowCoding.setTooltipForColDiagProc(voDiag.getDiagnosisDescription()); if (voDiag.getDiagnosisIsNotNull() && voDiag.getDiagnosis().getID_DiagnosisIsNotNull()) { DiagnosisVo voDiagWithMappings = domain.getDiagnosisWithTaxonomyMappings(voDiag.getDiagnosis()); rowCoding.setColDiagVo(voDiag); rowCoding.setColICD10(stringICD10 == "" ? findICD10(voDiagWithMappings.getCciMappings()) : stringICD10); rowCoding.setColOPCS4(stringOPCS4 == "" ? findOPCS4(voDiagWithMappings.getCciMappings()) : stringOPCS4); } if (voDiag != null && voDiag.getDiagnosis() == null) { rowCoding.setColDiagVo(voDiag); rowCoding.setColICD10(stringICD10); rowCoding.setColOPCS4(stringOPCS4); } rowCoding.setColEditICDReadOnly(true); rowCoding.setColEditOPCSReadOnly(true); rowCoding.setColLaterality(bSavedRecord ? lateralityLRB : voDiag.getDiagLaterality()); rowCoding.setBackColor(Color.Orange); rowCoding.setValue(null); form.lyrTabs().tabInpatientCoding().grdDiagnoses().setValue(null); if (form.getLocalContext().getCurrentRCVo() == null) { form.lyrTabs().tabInpatientCoding().chkInpatientActive().setValue(true); form.lyrTabs().tabInpatientCoding().dtimRec().setValue(new DateTime()); if (engine.getLoggedInUser() != null && engine.getLoggedInUser().getUserRealName() != null) form.lyrTabs().tabInpatientCoding().txtMOS().setValue(engine.getLoggedInUser().getUserRealName().toString()); } form.setMode(FormMode.EDIT); }
public DiagnosisVo saveDiagnosisVo(DiagnosisVo diagnosisToSave) throws StaleObjectException, UniqueKeyViolationException { if (!diagnosisToSave.isValidated()) { throw new DomainRuntimeException("This DiagnosisVo has not been validated"); } DomainFactory factory = getDomainFactory(); Diagnosis domDiagnosis = DiagnosisVoAssembler.extractDiagnosis(factory, diagnosisToSave); domDiagnosis.setKeywords(Keywords.setupKeyWords(domDiagnosis.getKeywords(), domDiagnosis.getDiagnosisName())); try { factory.save(domDiagnosis); } catch(UnqViolationUncheckedException e) { //check which constraint was violated (name/taxononmy map) //name Diagnosis diag = Diagnosis.getDiagnosisFromDiagnosisName(factory, diagnosisToSave.getDiagnosisName()); if (diag != null && diag.getId() != null && !(diag.getId().equals(diagnosisToSave.getID_Diagnosis()))) { throw new UniqueKeyViolationException("Diagnosis record called \"" + diagnosisToSave.getDiagnosisName() + "\" already exists. Duplicates not allowed.", e); } //taxonomy map String dupMessage = Keywords.checkDuplicateTaxonomy(factory, domDiagnosis, diagnosisToSave.getTaxonomyMap(), "getDiagnosisName"); if(dupMessage != null) throw new UniqueKeyViolationException(dupMessage); throw (e); } return DiagnosisVoAssembler.create(domDiagnosis); }
/** * Populate the Details panel for a given ICciFull * @param ICciFull * @return void */ private void populateInstanceControls(ICciFull cci) { clearInstanceControls(); if (cci == null) return; form.txtName().setValue(cci.getIGenericItemInfoName()); form.cmbAlgType().setValue(cci.getCciAllergenType()); form.cmbTreatInterventionType().setValue(cci.getCciTreatmentInterventionType()); //WDEV-17125 form.intProcDuration().setValue(cci.getCciProcedureDuration()); form.intTCILag().setValue(cci.getCciTCILagTime()); //WDEV-12918 form.intLOS().setValue(cci.getCciProcedureLOS()); // WDEV-17934 form.cmbSurgeonCat().setValue(cci.getSurgeonCategory()); form.cmbAnaesthetistCat().setValue(cci.getAnaesthetistCategory()); form.cmbHospitalCat().setValue(cci.getHospitalCategory()); form.chkIsActive().setValue(cci.getIGenericItemInfoIsActive() != null? cci.getIGenericItemInfoIsActive().booleanValue() : false); populateTaxonomyMappings(cci.getCciMappings()); populateKeywords(cci.getCciKeywords()); //WDEV-11921 - Start if (cci instanceof MedicationFullVo) { MedicationFullVo med = (MedicationFullVo) cci; form.chkControlledDrug().setValue(med.getIsControlledDrugIsNotNull() && med.getIsControlledDrug()); populateFRU(med.getForms()); form.lyrDetails().tabDefaultValues().cmbFrequency().setValue(med.getFrequencyDefault());// WDEV-13584 form.lyrDetails().tabDefaultValues().intDays().setValue(med.getNoOfDaysSupplyDefault());// WDEV-13584 } //WDEV-11921 - End /*WDEV-11921 //WDEV-11836 - starts here form.chkControlledDrug().setValue(cci.getIIsControlledDrug()); populateUnitsGrid(cci.getUnits()); populateFormsGrid(cci.getForms()); populateRoutesGrid(cci.getRoutes()); //WDEV-11836 - ends here * WDEV-11921 */ // for the moment, hotlists are only available for procedure, problem and diagnosis if ( cci instanceof DiagnosisVo || cci instanceof ProblemConfigVo || cci instanceof ProcedureVo || cci instanceof MedicationFullVo//WDEV-11921 || cci instanceof CancerImagingEventVo || cci instanceof PresentingComplaintVo || cci instanceof TreatmentInterventionVo)//WDEV-17060 populateHotlists(cci.getIGenericItemInfoID()); updateControlsState(); }
private void addDiagnosisToCodingGrid(PatientDiagnosisShortVo voDiag, String stringICD10, String stringOPCS4, LateralityLRB lateralityLRB, boolean bSavedRecord) { grdCodingRow rowCoding = form.grdCoding().getRows().newRow(); rowCoding.setColDiagProc(voDiag.getDiagnosisDescription()); rowCoding.setTooltipForColDiagProc(voDiag.getDiagnosisDescription()); if (voDiag.getDiagnosisIsNotNull() && voDiag.getDiagnosis().getID_DiagnosisIsNotNull()) { DiagnosisVo voDiagWithMappings = domain.getDiagnosisWithTaxonomyMappings(voDiag.getDiagnosis()); rowCoding.setColDiagVo(voDiag); rowCoding.setColICD10(stringICD10 == "" ? findICD10(voDiagWithMappings.getCciMappings()) : stringICD10); rowCoding.setColOPCS4(stringOPCS4 == "" ? findOPCS4(voDiagWithMappings.getCciMappings()) : stringOPCS4); } if (voDiag != null && voDiag.getDiagnosis() == null) { rowCoding.setColDiagVo(voDiag); rowCoding.setColICD10(stringICD10); rowCoding.setColOPCS4(stringOPCS4); } rowCoding.setColEditICDReadOnly(true); rowCoding.setColEditOPCSReadOnly(true); rowCoding.setColLaterality(bSavedRecord ? lateralityLRB : voDiag.getDiagLaterality()); rowCoding.setBackColor(Color.Orange); rowCoding.setValue(null); form.grdDiagnoses().setValue(null); form.setMode(FormMode.EDIT); if (form.getLocalContext().getCurrentRCVo() == null) { form.dtimRec().setValue(new DateTime()); if (engine.getLoggedInUser() != null && engine.getLoggedInUser().getUserRealName() != null) form.txtMOS().setValue(engine.getLoggedInUser().getUserRealName().toString()); } updateContextMenus(); }
public DiagnosisVo getDiagnosisWithTaxonomyMappings(DiagnosisRefVo diagRefVo) { DomainFactory factory = getDomainFactory(); Diagnosis med = (Diagnosis) factory.getDomainObject(Diagnosis.class, diagRefVo.getID_Diagnosis()); return (DiagnosisVoAssembler.create(med)); }
public void removeNoSuitableTermItem(CodingItemType lkpCodingType) { if (lkpCodingType.equals(CodingItemType.ALLERGY)) { AllergenVo voAllergen = new AllergenVo(); voAllergen.setID_Allergen(new Integer(NO_CODE_ITEM_SELECTED_ID)); voAllergen.setAllergenName(NO_CODE_ITEM_SELECTED); form.qmbCodingItem().removeRow(voAllergen); } else if (lkpCodingType.equals(CodingItemType.DIAGNOSIS) || lkpCodingType.equals(CodingItemType.FAMILY_HISTORY)) { DiagnosisVo voDiagnosis = new DiagnosisVo(); voDiagnosis.setID_Diagnosis(new Integer(NO_CODE_ITEM_SELECTED_ID)); voDiagnosis.setDiagnosisName(NO_CODE_ITEM_SELECTED); form.qmbCodingItem().removeRow(voDiagnosis); } else if (lkpCodingType.equals(CodingItemType.PROBLEM)) { ClinicalProblemShortVo voProblemConfig = new ClinicalProblemShortVo(); voProblemConfig.setID_ClinicalProblem(new Integer(NO_CODE_ITEM_SELECTED_ID)); voProblemConfig.setPCName(NO_CODE_ITEM_SELECTED); form.qmbCodingItem().removeRow(voProblemConfig); } else if (lkpCodingType.equals(CodingItemType.PROCEDURE)) { ProcedureLiteVo voProcedure = new ProcedureLiteVo(); voProcedure.setID_Procedure(new Integer(NO_CODE_ITEM_SELECTED_ID)); voProcedure.setProcedureName(NO_CODE_ITEM_SELECTED); form.qmbCodingItem().removeRow(voProcedure); } else if (lkpCodingType.equals(CodingItemType.IMAGING_EVENT)) { CancerImagingEventLiteVo voImagingEvent = new CancerImagingEventLiteVo(); voImagingEvent.setID_CancerImagingEvent(new Integer(NO_CODE_ITEM_SELECTED_ID)); voImagingEvent.setImagingEventName(NO_CODE_ITEM_SELECTED); form.qmbCodingItem().removeRow(voImagingEvent); } else if (lkpCodingType.equals(CodingItemType.MEDICATION)) { MedicationLiteVo voMedicationConfig = new MedicationLiteVo(); voMedicationConfig.setID_Medication(new Integer(NO_CODE_ITEM_SELECTED_ID)); voMedicationConfig.setMedicationName(NO_CODE_ITEM_SELECTED); form.qmbCodingItem().removeRow(voMedicationConfig); } }
public DiagnosisVo getDiagnosisByName(String strDiagnosisName) { DomainFactory factory = getDomainFactory(); Diagnosis domDiagnosis = Diagnosis.getDiagnosisFromDiagnosisName(factory, strDiagnosisName); return DiagnosisVoAssembler.create(domDiagnosis); }
public DiagnosisVo saveDiagnosisVo(DiagnosisVo voDiagnosisVo) throws StaleObjectException, UniqueKeyViolationException { ClinicalCoding ccImpl = (ClinicalCoding) getDomainImpl(ClinicalCodingImpl.class); return ccImpl.saveDiagnosisVo(voDiagnosisVo); }
public DiagnosisVo getDiagnosisVo(DiagnosisRefVo voDiagnosisVo) { DiagnosisList dlImpl = (DiagnosisList) getDomainImpl(DiagnosisListImpl.class); return dlImpl.getDiagnosisVo(voDiagnosisVo); }
public DiagnosisVo saveDiagnosis(DiagnosisVo voDiagnosis) throws StaleObjectException, UniqueKeyViolationException, DomainInterfaceException { CCIAdmin impl = (CCIAdmin)getDomainImpl(CCIAdminImpl.class); return (DiagnosisVo)impl.saveCci(voDiagnosis, CciType.DIAGNOSIS); }