private void initialize() { loadVertebralCombos(); ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); boolean bMedicalAdmissionContactSelected = (currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION)); Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroMotorInpatient)); form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm); form.getLocalContext().setIsClinicalContactType(bMedicalAdmissionContactSelected); displayRecordBrowser(bMedicalInpatientForm.booleanValue()); form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue()); if (writeConditionsApply(bMedicalInpatientForm, bMedicalAdmissionContactSelected)) activateButtons(true); else activateButtons(false); }
private void newParentNode(GaitVo voNewParent) { if (voNewParent == null) return; GaitShortVo voParentShort = new GaitShortVo(); voParentShort.setAuthoringHCP(voNewParent.getAuthoringHCP()); voParentShort.setAuthoringDateTime(voNewParent.getAuthoringDateTime()); voParentShort.setClinicalContact((ClinicalContactShortVo) voNewParent.getClinicalContact()); GenForm.grdGaitRow parentRow = form.grdGait().getRows().newRow(); if(voParentShort.getAuthoringHCPIsNotNull() && voParentShort.getAuthoringDateTimeIsNotNull()) parentRow.setColEnvironment(voParentShort.getAuthoringDateTime().toString()+ " - " + voParentShort.getAuthoringHCP().toString()); parentRow.setValue(voParentShort); parentRow.setBackColor(Color.Beige); form.getLocalContext().setGoldenInstanceSelected(new Boolean(true)); parentRow.setExpanded(true); form.grdGait().setValue(voParentShort); }
private void loadClinicalContactMotorRecords(ClinicalContactShortVo voClinicalContact, NeuroMotorFindingsShortVoCollection voNeuroMotorFindingsColl) { boolean isClinicalContactSelected = checkCurrentClinicalContact(voClinicalContact); Color textColour = null; if (isClinicalContactSelected) textColour = Color.Green; form.recNeuro().newRow(voClinicalContact, "Clinical Contact: " + voClinicalContact.getStartDateTime() + " - " + voClinicalContact.getSeenBy(), textColour); if (isClinicalContactSelected) form.recNeuro().setValue(voClinicalContact); for (int i = 0; i < voNeuroMotorFindingsColl.size(); i++) { NeuroMotorFindingsShortVo voMotorFinding = voNeuroMotorFindingsColl.get(i); form.recNeuro().newRow(voMotorFinding, "\t\t\t\t " + voMotorFinding.getAuthoringDateTime() + " - " + voMotorFinding.getAuthoringCP().getMos().getName(), textColour); } }
private void populateContactInfo(NeuroMotorFindingsVo voNeuroMotorFind) { if (voNeuroMotorFind != null) { form.dtimRecording().setValue(voNeuroMotorFind.getAuthoringDateTime()); form.qmbAuthoring().newRow(voNeuroMotorFind.getAuthoringCP(), voNeuroMotorFind.getAuthoringCP().toString()); form.qmbAuthoring().setValue(voNeuroMotorFind.getAuthoringCP()); return; } if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()) { ClinicalContactShortVo voClinicalContactShort = form.getGlobalContext().Core.getCurrentClinicalContact(); if (voClinicalContactShort != null) { form.dtimRecording().setValue(voClinicalContactShort.getStartDateTime()); form.qmbAuthoring().newRow(voClinicalContactShort.getSeenBy(), voClinicalContactShort.getSeenBy().toString()); form.qmbAuthoring().setValue(voClinicalContactShort.getSeenBy()); } } }
private void initialize() { loadVertebralCombos(); ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); Boolean bMedicalAdmissionContactSelected = new Boolean(currentClinicalContact!=null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION)); Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroInterpInpatient)); form.getLocalContext().setMedicalAdmissionContactSelected(bMedicalAdmissionContactSelected); form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm); displayRecordBrowser(bMedicalInpatientForm.booleanValue()); if(writeConditionsApply(bMedicalInpatientForm, bMedicalAdmissionContactSelected)) activateButtons(true); else activateButtons(false); form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172 }
private void loadClinicalContactInterpretRecords(ClinicalContactShortVo voClinicalContact, NeuroInterpretShortVoCollection collVoNeuroInterpretShort) { boolean isClinicalContactSelected = checkCurrentClinicalContact(voClinicalContact); Color textColour = null; if(isClinicalContactSelected) textColour = Color.Green; form.recbrInterpret().newRow(voClinicalContact, "Clinical Contact: " + voClinicalContact.getStartDateTime() + " - " + voClinicalContact.getSeenBy(), textColour); if(isClinicalContactSelected) form.recbrInterpret().setValue(voClinicalContact); for(int i=0; i<collVoNeuroInterpretShort.size(); i++) { NeuroInterpretShortVo voNeuroInterpretShort = collVoNeuroInterpretShort.get(i); form.recbrInterpret().newRow(voNeuroInterpretShort, "\t\t\t\t " + voNeuroInterpretShort.getAuthoringDateTime() + " - " + voNeuroInterpretShort.getClinicalContact().getSeenBy(), textColour); } }
private void checkForSelectedClinicalContact() { // the selected Clinical Contact that has been selected from Patient Summary may not have a record and therefore // must be added to the record browser boolean clinicalContactFound = false; ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voSelectedClinicalContact != null) { for(int i =0; i< form.recbrInterpret().size(); i++) { ValueObject vo = (ValueObject) form.recbrInterpret().getValues().get(i); if(vo instanceof ClinicalContactShortVo) { ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrInterpret().getValues().get(i); if(voClinicalContact.equals(voSelectedClinicalContact)) clinicalContactFound = true; } } if(!clinicalContactFound) { form.recbrInterpret().newRow(voSelectedClinicalContact, "Clinical Contact: " + voSelectedClinicalContact.getStartDateTime() + " - " + voSelectedClinicalContact.getSeenBy(), Color.Green); form.recbrInterpret().setValue(voSelectedClinicalContact); } } }
private void browseRecord() { clearScreen(); updateBrowseInformation(); if(form.recbrInterpret().getValue() != null) { if(form.recbrInterpret().getValue() instanceof ClinicalContactShortVo) { form.getLocalContext().setAdmisNeuroInterpretVo(domain.getAdmisNeuroInterpret((ClinicalContactShortVo) form.recbrInterpret().getValue(), null)); } else if(form.recbrInterpret().getValue() instanceof NeuroInterpretShortVo) { NeuroInterpretShortVo voNeuroInterpret = (NeuroInterpretShortVo) form.recbrInterpret().getValue(); if(voNeuroInterpret.getClinicalContact() == null) form.getLocalContext().setAdmisNeuroInterpretVo(domain.getAdmisNeuroInterpretByCareContext(voNeuroInterpret.getCareContext(), voNeuroInterpret)); else form.getLocalContext().setAdmisNeuroInterpretVo(domain.getAdmisNeuroInterpret(voNeuroInterpret.getClinicalContact(), voNeuroInterpret)); } else form.getLocalContext().setAdmisNeuroInterpretVo(domain.getAdmisNeuroInterpretByCareContext((CareContextRefVo) form.recbrInterpret().getValue(), null)); populateScreenFromData(); } checkRecordIsEditable(); }
private boolean loadEnvironmentalVisitsOfClinicalContact(EnvironmentalVisitShortVo voEnvirVisit) { ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); //A Clinical Contact can only have one Environmental Visit Record if(voClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voEnvirVisit.getClinicalContact().getID_ClinicalContact())) { //this Clinical Contact has been selected from the patient summary loadCurrentClinicalContact(voEnvirVisit.getClinicalContact(), Color.Green); return true; } else { loadCurrentClinicalContact(voEnvirVisit.getClinicalContact(), null); } return false; }
private void initialize() { ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); boolean bMedicalAdmissionContactSelected = (currentClinicalContact!=null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION)); Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskSpineExamInpatient)); form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm); displayRecordBrowser(bMedicalInpatientForm.booleanValue()); if(writeConditionsApply(bMedicalInpatientForm, bMedicalAdmissionContactSelected)) activateButtons(true); else activateButtons(false); form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172 }
private void isRecordCurrent() { ClinicalContactShortVo voCurrent = null; if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()) voCurrent = form.getGlobalContext().Core.getCurrentClinicalContact(); for(int i = 0 ; i < form.gridGait().getRows().size() ; i++) { GaitReEducationVo voGait = form.gridGait().getRows().get(i).getValue(); if(voCurrent != null && voGait.getClinicalContact() != null) { if(voGait.getClinicalContact().getID_ClinicalContact().equals(voCurrent.getID_ClinicalContact())) { form.getLocalContext().setUpdateCurrentRecord(new Boolean(true)); //set colour of current record + set it expanded GenForm.gridGaitRow currentRow = form.gridGait().getRows().get(i); currentRow.setBackColor(Color.Beige); currentRow.setExpanded(true); form.gridGait().setValue(voGait); } } populateControls(voGait); } }
private void loadClinicalContactReflexRecords(ClinicalContactShortVo voClinicalContact, NeuroSensationFindingsShortVoCollection voNeuroSensationColl) { boolean isClinicalContactSelected = checkCurrentClinicalContact(voClinicalContact); Color textColour = null; if(isClinicalContactSelected) textColour = Color.Green; form.recbrSensation().newRow(voClinicalContact, "Clinical Contact: " + voClinicalContact.getStartDateTime() + " - " + voClinicalContact.getSeenBy(), textColour); if(isClinicalContactSelected) form.recbrSensation().setValue(voClinicalContact); for(int i=0; i<voNeuroSensationColl.size(); i++) { NeuroSensationFindingsShortVo voNeuroSensation = voNeuroSensationColl.get(i); form.recbrSensation().newRow(voNeuroSensation, "\t\t\t\t " + voNeuroSensation.getAuthoringDateTime() + " - " + voNeuroSensation.getAuthoringCP().getMos().getName(), textColour); } }
private void populateContactInfo(NeuroSenastionFindingsVo voNeuroSenastionFindings) { if(voNeuroSenastionFindings != null && voNeuroSenastionFindings.getAuthoringCPIsNotNull()) { //WDEV-15172 AuthoringInformationVo authoringInfo = new AuthoringInformationVo(); authoringInfo.setAuthoringHcp(voNeuroSenastionFindings.getAuthoringCP()); authoringInfo.setAuthoringDateTime(voNeuroSenastionFindings.getAuthoringDateTime()); form.ccAuthoring().setValue(authoringInfo); return; } if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()) { ClinicalContactShortVo voClinicalContactShort = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voClinicalContactShort != null) { if(voClinicalContactShort.getStartDateTimeIsNotNull()) { form.ccAuthoring().initializeComponent(false); //WDEV-15172 } } } }
private boolean loadHomeVisitsOfClinicalContact(HomeVisitShortVo voHomeVisit) { ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); //A Clinical Contact can only have one Environmental Visit Record if(voClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact())) { //this Clinical Contact has been selected from the patient summary loadCurrentClinicalContact(voHomeVisit.getClinicalContact(), Color.Green); return true; } else { loadCurrentClinicalContact(voHomeVisit.getClinicalContact(), null); } return false; }
private void populateContactInfo(NeuroReflexesVo voReflex) { if(voReflex != null) { //WDEV-15172 AuthoringInformationVo authoringInfo = new AuthoringInformationVo(); authoringInfo.setAuthoringHcp(voReflex.getAuthoringCP()); authoringInfo.setAuthoringDateTime(voReflex.getAuthoringDateTime()); form.ccAuthoring().setValue(authoringInfo); return; } if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()) { ClinicalContactShortVo voClinicalContactShort = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voClinicalContactShort != null) { if(voClinicalContactShort.getStartDateTimeIsNotNull()) { form.ccAuthoring().initializeComponent(false); //WDEV-15172 } } } }
private MedicalProbOnAdmisVo assembleMedicalProbOnAdm(PatientProblem domObj) { if(domObj == null) return null; MedicalProbOnAdmisVo medProbVo = new MedicalProbOnAdmisVo(domObj.getId(),domObj.getVersion()); medProbVo.setIsRIE(domObj.getIsRIE()); medProbVo.setCareContext(domObj.getCareContext() != null ? new CareContextRefVo(domObj.getCareContext().getId(), domObj.getCareContext().getVersion()) : null); medProbVo.setClinicalContact(domObj.getClinicalContact() != null ? new ClinicalContactShortVo(domObj.getClinicalContact().getId(), domObj.getClinicalContact().getVersion()) : null); medProbVo.setIsActive(domObj.isIsActive()); medProbVo.setPatientProblem(domObj.getPatientProblem()); medProbVo.setProblemContext(domObj.getProblemContext()); return medProbVo; }
private void setRecordBrowser() { // after an update need to set the record browser to display the updated record if(form.getLocalContext().getUpdatedInstanceIsNotNull()) { if(form.getLocalContext().getUpdatedInstance() instanceof CareContextShortVo) { CareContextShortVo voCareContext = (CareContextShortVo) form.getLocalContext().getUpdatedInstance(); form.recbrPathology().setValue(voCareContext); } else { ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.getLocalContext().getUpdatedInstance(); form.recbrPathology().setValue(voClinicalContact); } } }
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException { clearScreen(); ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voClinicalContact != null) { form.txtAuthoringHcp().setValue(voClinicalContact.getSeenBy().toString()); form.dtimAuthoringDateTime().setValue(voClinicalContact.getStartDateTime()); } form.btnNew().setEnabled(false); form.btnUpdate().setEnabled(false); form.cmbCauseInjury().setValue(null); form.cmbCauseInjury().setEnabled(false); form.cmbMechInjury().setValue(null); form.getLocalContext().setInjuryDetails(null); //wdev-13295 form.setMode(FormMode.EDIT); }
public void initialize() throws FormOpenException { // Initialize dynamic grid initializeDymanicGrid(); // Initialize combo-box initializeCombos(); form.getLocalContext().setSelectedFindings(null); ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); form.getLocalContext().setIsClinicalContactType(currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION)); form.getLocalContext().setIsMedicalInpatientForm(new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.NeurologicalExaminationMotorInpatient))); displayRecordBrowser(form.getLocalContext().getIsMedicalInpatientForm()); // form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue()); }
private void isRecordEditable() { if(form.recbrContact().getValue() instanceof ClinicalContactShortVo) { ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrContact().getValue(); if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull() && voClinicalContact.getID_ClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact())) displayButtonsForRecord(); else displayButtons(false, false); } else { displayButtons(false, false); } }
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException { AdmisSummary summary = null; NeuroMotorFindingsVo neurofinding = null; ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voClinicalContact != null && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION)) { summary = domain.getAdmissionSummaryByClinicalContact(voClinicalContact); neurofinding = domain.getNeuroMotorFinding(voClinicalContact); } else { summary = domain.getAdmissionSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext()); neurofinding = domain.getNeuroMotorFindingByCareContext(form.getGlobalContext().Core.getCurrentCareContext()); } if (summary != null) populateForm(summary,neurofinding); }
private void browseRecord() { //Commented out the following line as part //of the resolution for issue number wdev-694 //updateBrowseInformation(); clearControls(); resetNeedsGrid(); if(form.recbrSOAP().getValue() instanceof ClinicalContactShortVo) { ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrSOAP().getValue(); form.getLocalContext().setSoapNoteVo(domain.getSoapNoteVo(voClinicalContact)); if(form.getLocalContext().getSoapNoteVoIsNotNull()) populateScreenFromData(form.getLocalContext().getSoapNoteVo()); } isRecordEditable(); }
private void browseRecord() { clearControls(); clearGrids(); prePopulateGrids(); updateBrowseInformation(); if(form.recbrHydro().getValue() instanceof ClinicalContactShortVo) { ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrHydro().getValue(); form.getLocalContext().setvoHydroTherapy(domain.getHydroTherapy(voClinicalContact, engine.isRIEMode())); if(form.getLocalContext().getvoHydroTherapyIsNotNull()) populateScreen(form.getLocalContext().getvoHydroTherapy()); } isRecordEditable(); }
private boolean isRecordCurrent() { ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); EnvironmentalVisitVo voEnvironmentalVisit = form.getLocalContext().getvoEnvironmentalVisit(); // check if the record has a clinicalContact and the GC ClinicalContact // is not null, if they are equal then return true. // or if the ClinicalContact is null and the GC Clinical Contact is // null, then the current care context selected, return true. // else return false; if (voEnvironmentalVisit != null) { if ((voEnvironmentalVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null && voCurrentClinicalContact.getID_ClinicalContact().equals(voEnvironmentalVisit.getClinicalContact().getID_ClinicalContact())) || (voEnvironmentalVisit.getClinicalContact() == null && voCurrentClinicalContact == null)) { return true; } } return false; }
private void setCurrentClinicalNote() { if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()) { ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); ClinicalNotesVo clinicalNotesForContact = domain.getClinicalNotesForContact(currentClinicalContact); if (clinicalNotesForContact != null) form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNote(clinicalNotesForContact)); else form.getGlobalContext().Clinical.setCurrentClinicalNote(null); } }
private boolean parentEnded() { //we dont care about any rules if the user is a clinical administrator if(engine.hasRight(AppRight.CAN_ADD_CONTACT_AFTER_ENDDATE_SUPPLIED)) return false; if(ConfigFlag.UI.STOP_CLINICAL_DATACREATION_IFENDDATE_SUPPLIED.getValue()) { //check if the selected item is ended if(form.grdList().getValue() != null) { if (form.grdList().getValue() instanceof EpisodeofCareVo) { if(((EpisodeofCareVo)form.grdList().getValue()).getEndDateIsNotNull()) return true; } else if (form.grdList().getValue() instanceof CareContextVo) { if(((CareContextVo)form.grdList().getValue()).getEndDateTimeIsNotNull() || ((EpisodeofCareVo)form.grdList().getSelectedRow().getParentRow().getValue()).getEndDateIsNotNull()) return true; } else if (form.grdList().getValue() instanceof ClinicalContactShortVo) { if(((CareContextVo)form.grdList().getSelectedRow().getParentRow().getValue()).getEndDateTimeIsNotNull() || ((EpisodeofCareVo)form.grdList().getSelectedRow().getParentRow().getParentRow().getValue()).getEndDateIsNotNull()) return true; } } } return false; }
private void browseRecord() { clearScreen(); prePopulateGrids(); updateBrowseInformation(); if(form.recbrPlinth().getValue() != null && form.recbrPlinth().getValue() instanceof ClinicalContactShortVo) { form.getLocalContext().setPlinthWork(domain.getPlinthWorkByClinicalContact((ClinicalContactRefVo) form.recbrPlinth().getValue())); populateScreen(form.getLocalContext().getPlinthWork()); } isRecordEditable(); }
private void open() { form.setMode(FormMode.VIEW); form.getLocalContext().setvoNeuroInterpret(null); clearScreen(); if(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroInterp)) { ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voClinicalContact != null && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION)) { form.getLocalContext().setvoNeuroMotorExam(domain.getNeuroMotorRecord(form.getGlobalContext().Core.getCurrentClinicalContact())); form.getLocalContext().setvoNeuroSensationExamination(domain.getNeuroSensationExamination(form.getGlobalContext().Core.getCurrentClinicalContact())); form.getLocalContext().setAdmisNeuroInterpretVo(domain.getAdmisNeuroInterpret(form.getGlobalContext().Core.getCurrentClinicalContact(), null)); } else { form.getLocalContext().setvoNeuroMotorExam(domain.getSpinalMedicalAdmissionMotorByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.getLocalContext().setvoNeuroSensationExamination(domain.getSpinalMedicalAdmissionSensationByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); form.getLocalContext().setAdmisNeuroInterpretVo(domain.getSpinalMedicalAdmissionInterpretByCareContext(form.getGlobalContext().Core.getCurrentCareContext())); } populateScreenFromData(); } else { fillRecordBrowser(); } displayFrankelAndAsiaDetails(); }
private void initialize() { prepopulateControls(); loadGrids(); ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); form.getLocalContext().setClinicalContact(currentClinicalContact); if(currentClinicalContact!=null) form.getLocalContext().setCurrentClinicalContactId(currentClinicalContact.getID_ClinicalContact()); form.grdPowechair().getRows().clear(); //wdev-13511 }
public PatientMedicationVoCollection listMedicationOnAdmission(ClinicalContactShortVo clinicalContactShortVo, CareContextRefVo careContextRefVo) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" "); String query = "from PatientMedication t "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); String andStr = " "; if (clinicalContactShortVo != null) { hql.append(andStr + " t.clinicalContact.id = :Id"); markers.add("Id"); values.add(clinicalContactShortVo.getID_ClinicalContact()); andStr = " and "; } if (careContextRefVo != null) { hql.append(andStr + " t.careContext.id = :IdCX"); markers.add("IdCX"); values.add(careContextRefVo.getID_CareContext()); andStr = " and "; } if (markers.size() > 0) query += " where "; query += hql.toString(); return PatientMedicationVoAssembler.createPatientMedicationVoCollectionFromPatientMedication(factory.find(query, markers, values)); }
private boolean checkCurrentClinicalContact(ClinicalContactShortVo voClinicalContact) { // checks if this Clinical Contact is the selected Clinical Contact from Patient Summary ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voSelectedClinicalContact != null) { if(voSelectedClinicalContact.equals(voClinicalContact)) return true; else return false; } return false; }
public ClinicalContactShortVo getClinicalContact(ClinicalContactRefVo clinicalContactRefVo) { if (clinicalContactRefVo == null) return null; DomainFactory factory = getDomainFactory(); ClinicalContact doClinContact = (ClinicalContact)factory.getDomainObject(ClinicalContact.class, clinicalContactRefVo.getID_ClinicalContact()); return ClinicalContactShortVoAssembler.create(doClinContact); }
private boolean isCurrentClinicalRecordSelected() { if(form.recbrPreviousMotorCharts().getValue() instanceof PatientMotorChartShortVo) { PatientMotorChartShortVo voMotorChart = (PatientMotorChartShortVo) form.recbrPreviousMotorCharts().getValue(); return voMotorChart != null && voMotorChart.getClinicalContactIsNotNull() && voMotorChart.getClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact()) && voMotorChart.getID_PatientMotorChartIsNotNull(); } if(form.recbrPreviousMotorCharts().getValue() instanceof ClinicalContactShortVo) { ClinicalContactShortVo voClinContact = (ClinicalContactShortVo)form.recbrPreviousMotorCharts().getValue(); return voClinContact != null && voClinContact.equals(form.getGlobalContext().Core.getCurrentClinicalContact()); } return false; }
private void initialize() { ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); form.getLocalContext().setClinicalContact(currentClinicalContact); if(currentClinicalContact!=null) form.getLocalContext().setCurrentClinicalContactId(currentClinicalContact.getID_ClinicalContact()); }
public MedicalProbOnAdmisVo getPatientProblem(ClinicalContactShortVo voClinContact) { if(voClinContact == null) throw new CodingRuntimeException("No ClinicalContact available"); DomainFactory factory = getDomainFactory(); String hql = " from PatientProblem medicalProbOnAdmis "; StringBuffer condStr = new StringBuffer(); String andStr = " "; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); if(voClinContact != null) { condStr.append(andStr + " medicalProbOnAdmis.clinicalContact.id = :id_ClinicalContact"); markers.add("id_ClinicalContact"); values.add(voClinContact.getID_ClinicalContact()); andStr = " and "; } condStr.append(andStr + " medicalProbOnAdmis.problemContext = :problemContext"); markers.add("problemContext"); values.add("Neuro - Motor"); andStr = " and "; if (andStr.equals(" and ")) hql += " where "; hql += condStr.toString(); MedicalProbOnAdmisVoCollection collMedicalProbOnAdmis = MedicalProbOnAdmisVoAssembler.createMedicalProbOnAdmisVoCollectionFromPatientProblem(factory.find(hql, markers, values)); if(collMedicalProbOnAdmis.size()>0) return collMedicalProbOnAdmis.get(0); return null; }
private void isRecordEditable() { boolean isEditable = false; ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voSelectedClinicalContact != null) { if(form.recbrHydro().getValue() instanceof ClinicalContactShortVo) { ClinicalContactShortVo voContact = (ClinicalContactShortVo) form.recbrHydro().getValue(); if(voContact.getID_ClinicalContact().equals(voSelectedClinicalContact.getID_ClinicalContact())) isEditable = true; } } form.btnNew().setVisible(isEditable); form.btnUpdate().setVisible(isEditable); if(isEditable) { if(form.getLocalContext().getvoHydroTherapyIsNotNull()) { form.btnNew().setEnabled(false); form.btnNew().setVisible(false); form.btnUpdate().setEnabled(true); form.btnUpdate().setVisible(true); } else { form.btnNew().setEnabled(true); form.btnNew().setVisible(true); form.btnUpdate().setEnabled(false); form.btnUpdate().setVisible(false); } } }
private void isRecordOfTypeMedicalAdmission() { ClinicalContactShortVo voCurrentClinical = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voCurrentClinical != null) { if(voCurrentClinical.getContactType().equals(ContactType.SPINALMEDICALADMISSION)) activateButtons(false); } }
private void checkForSelectedClinicalContact() { // the selected Clinical Contact that has been selected from Patient Summary may not have a record and therefore // must be added to the record browser boolean clinicalContactFound = false; ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact(); if(voSelectedClinicalContact != null) { for(int i =0; i< form.recbrSensation().size(); i++) { ValueObject vo = (ValueObject) form.recbrSensation().getValues().get(i); if(vo instanceof ClinicalContactShortVo) { ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrSensation().getValues().get(i); if(voClinicalContact.equals(voSelectedClinicalContact)) clinicalContactFound = true; } } if(!clinicalContactFound) { form.recbrSensation().newRow(voSelectedClinicalContact, "Clinical Contact: " + voSelectedClinicalContact.getStartDateTime() + " - " + voSelectedClinicalContact.getSeenBy(), Color.Green); form.recbrSensation().setValue(voSelectedClinicalContact); } } }
public PatientProcedureVoCollection listClinicalContactProcedures(ClinicalContactShortVo voClinicalContactShort, CareContextShortVo careContext) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" "); String query = "from PatientProcedure t "; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; if (careContext != null) { hql.append(andStr + " t.careContext.id = :ccid"); markers.add("ccid"); values.add(careContext.getID_CareContext()); andStr = " and "; } else if (voClinicalContactShort != null) { hql.append(andStr + " t.clinicalContact.id = :rcc"); markers.add("rcc"); values.add(new Boolean(true)); andStr = " and "; } hql.append(andStr + " t.procedureStatus = :perf"); markers.add("perf"); values.add(getDomLookup(PatientProcedureStatus.PERFORMED)); andStr = " and "; if (markers.size() > 0) query += " where t.class is null and"; query += hql.toString(); List patientProcedureList = factory.find(query, markers, values); return PatientProcedureVoAssembler.createPatientProcedureVoCollectionFromPatientProcedure(patientProcedureList).sort(); }