private void bindCmbClinicalContact() { form.cmbCContant().clear(); if(form.cmbCContext().getValue() instanceof CareContextForPatientDocumentVo) { ClinicalContactShortVoCollection clinicalContactList = domain.listClinicalContact(form.cmbCContext().getValue()); for(int i=0; clinicalContactList != null && i<clinicalContactList.size(); i++) { ClinicalContactShortVo cc = clinicalContactList.get(i); if(cc != null) { form.cmbCContant().newRow(cc, getTextForClinicaContact(cc)); } } } }
private void populateClinicalContacts(ClinicalContactShortVoCollection voCollclinicalContacts, grdPatientsRow careContextRow) { if (voCollclinicalContacts != null && careContextRow != null) { voCollclinicalContacts.sort(); grdPatientsRow clinicalContactRow = null; for (int i = 0; i < voCollclinicalContacts.size(); i++) { clinicalContactRow = careContextRow.getRows().newRow(); clinicalContactRow.setcolStartDateEndDate(voCollclinicalContacts.get(i).createDisplayString()); clinicalContactRow.setcolSpeciality(voCollclinicalContacts.get(i).getSpecialtyIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSpecialty().getText() : null); clinicalContactRow.setcolContactType(voCollclinicalContacts.get(i).getContactTypeIsNotNull() ? voCollclinicalContacts.get(i).getContactType().getText() : null); clinicalContactRow.setcolRMO(voCollclinicalContacts.get(i).getSeenByIsNotNull() ? INDENT + INDENT + INDENT + voCollclinicalContacts.get(i).getSeenBy().toString() : null); clinicalContactRow.setCollapsedImage(form.getImages().Admin.MemberOfStaff); clinicalContactRow.setExpandedImage(form.getImages().Admin.MemberOfStaff); clinicalContactRow.setValue(voCollclinicalContacts.get(i)); } } }
public ClinicalContactShortVoCollection listClinicalContact(CareContextRefVo careContext) { if(careContext == null || !careContext.getID_CareContextIsNotNull()) { throw new CodingRuntimeException("Supplied Care Context is null or doesn't have an id."); } String hql = "from ClinicalContact as c where c.careContext.id = :cc order by c.startDateTime desc ";//WDEV-12385 List<?> list = getDomainFactory().find(hql, "cc", careContext.getID_CareContext()); if (list == null || list.size() == 0) return null; return ClinicalContactShortVoAssembler.createClinicalContactShortVoCollectionFromClinicalContact(list); }
private void loadClinicalContacts(CareContextShortVo voCareContext) { form.cmbClinicalContact().clear(); if(form.cmbCareContext().getValue() != null) { ClinicalContactShortVoCollection clinicalContacts = domain.listClinicalContacts(voCareContext); for (int i = 0; i < clinicalContacts.size(); i++) { form.cmbClinicalContact().newRow(clinicalContacts.get(i), getClinicalContactDisplayString(clinicalContacts.get(i))); } } }
private void fillRecordBrowser() { Integer currentContactId = form.getLocalContext().getCurrentClinicalContactId(); Color textColour = null; ClinicalContactShortVoCollection collClinicalContactShortVo = domain.listClinicalContactsByCareContext(form.getGlobalContext().Core.getCurrentCareContext()); for(int i=0; i<collClinicalContactShortVo.size(); i++){ ClinicalContactShortVo voClinicalContactShort = collClinicalContactShortVo.get(i); if(voClinicalContactShort.getID_ClinicalContact().equals(currentContactId)) textColour = Color.Green; else textColour = null; form.recbrAssessments().newRow(voClinicalContactShort, "Clinical Contact: " + voClinicalContactShort.getStartDateTime() + " - " + voClinicalContactShort.getSeenBy(), textColour); } }
public ClinicalContactShortVoCollection listClinicalContactsByCareContext(CareContextRefVo refCareContext) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" "); String query = "from ClinicalContact cc "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Integer> values = new ArrayList<Integer>(); String andStr = " "; if (refCareContext != null) { hql.append(andStr + " cc.careContext.id = :id_CareContext"); markers.add("id_CareContext"); values.add(refCareContext.getID_CareContext()); andStr = " and "; } if (markers.size() > 0) query += " where "; query += hql.toString(); List contacts = factory.find(query, markers, values); return ClinicalContactShortVoAssembler.createClinicalContactShortVoCollectionFromClinicalContact(contacts); }
public ClinicalContactShortVoCollection listClinicalContactsByCareContext(CareContextRefVo refCareContext) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" "); String query = "from ClinicalContact cc "; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; if (refCareContext != null) { hql.append(andStr + " cc.careContext.id = :id_CareContext"); markers.add("id_CareContext"); values.add(refCareContext.getID_CareContext()); andStr = " and "; } if (markers.size() > 0) query += " where "; query += hql.toString(); List contacts = factory.find(query, markers, values); return ClinicalContactShortVoAssembler.createClinicalContactShortVoCollectionFromClinicalContact(contacts); }
private CareContextVo copyFromShortCareContext(CareContextWithoutClicalContactsVo careContext) { if (careContext == null) return null; CareContextVo tempVo = new CareContextVo(careContext.getID_CareContext(), careContext.getVersion_CareContext()); tempVo.setID_CareContext(careContext.getID_CareContext()); tempVo.setBedNumber(careContext.getBedNumber()); tempVo.setCareContextHistory(careContext.getCareContextHistory()); tempVo.setContext(careContext.getContext()); tempVo.setCurrentStatus(careContext.getCurrentStatus()); tempVo.setDischargeReason(careContext.getDischargeReason()); tempVo.setEndDateTime(careContext.getEndDateTime()); tempVo.setEpisodeOfCare(careContext.getEpisodeOfCare()); tempVo.setEstimatedDischargeDate(careContext.getEstimatedDischargeDate()); tempVo.setIsRIE(careContext.getIsRIE()); tempVo.setLocationType(careContext.getLocationType()); tempVo.setOrderingHospital(careContext.getOrderingHospital()); tempVo.setPasEvent(careContext.getPasEvent()); tempVo.setResponsibleHCP(careContext.getResponsibleHCP()); tempVo.setStartDateTime(careContext.getStartDateTime()); tempVo.setStatusHistory(careContext.getStatusHistory()); tempVo.setClinicalContacts(new ClinicalContactShortVoCollection()); return tempVo; }
private CareContextVo copyFromShortCareContext(CareContextWithoutClicalContactsVo careContext) { if(careContext == null) return null; CareContextVo tempVo = new CareContextVo(careContext.getID_CareContext(),careContext.getVersion_CareContext()); tempVo.setID_CareContext(careContext.getID_CareContext()); tempVo.setBedNumber(careContext.getBedNumber()); tempVo.setCareContextHistory(careContext.getCareContextHistory()); tempVo.setContext(careContext.getContext()); tempVo.setCurrentStatus(careContext.getCurrentStatus()); tempVo.setDischargeReason(careContext.getDischargeReason()); tempVo.setEndDateTime(careContext.getEndDateTime()); tempVo.setEpisodeOfCare(careContext.getEpisodeOfCare()); tempVo.setEstimatedDischargeDate(careContext.getEstimatedDischargeDate()); tempVo.setIsRIE(careContext.getIsRIE()); tempVo.setLocationType(careContext.getLocationType()); tempVo.setOrderingHospital(careContext.getOrderingHospital()); tempVo.setPasEvent(careContext.getPasEvent()); tempVo.setResponsibleHCP(careContext.getResponsibleHCP()); tempVo.setStartDateTime(careContext.getStartDateTime()); tempVo.setStatusHistory(careContext.getStatusHistory()); tempVo.setClinicalContacts(new ClinicalContactShortVoCollection()); return tempVo; }
private void bindCmbClinicalContact() { form.cmbCContant().clear(); if(form.cmbCContext().getValue() instanceof CareContextForPatientDocumentVo) { ClinicalContactShortVoCollection clinicalContactList = domain.listClinicalContact(form.cmbCContext().getValue()); for(int i=0; clinicalContactList != null && i<clinicalContactList.size(); i++) { ClinicalContactShortVo cc = clinicalContactList.get(i); if(cc != null) { form.cmbCContant().newRow(cc, getTextForClinicaContact(cc)); } } if (clinicalContactList != null && clinicalContactList.size() == 1) { form.cmbCContant().setValue(clinicalContactList.get(0)); selectClinicalContact(); } } }
private void fillRecordBrowser() { Color textColour = null; boolean clinicalContactFound = false; Integer currentContactId = null; loadCareContext(); if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()) currentContactId = form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact(); ClinicalContactShortVoCollection voCareContactList = domain.listRespTreatContacts(form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext()); if (voCareContactList != null && voCareContactList.size() > 0) { for (int i=0;i<voCareContactList.size();i++) { if(voCareContactList.get(i).getID_ClinicalContact().equals(currentContactId)) { textColour = Color.Green; clinicalContactFound = true; } else { textColour = null; } form.recbrContact().newRow(voCareContactList.get(i), "\t\t\t\t\tClinical Contact: " + voCareContactList.get(i).getStartDateTime() + " - " + voCareContactList.get(i).getSeenBy(), textColour); if(textColour != null) form.recbrContact().setValue(voCareContactList.get(i)); } } if(!clinicalContactFound && form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()) { form.recbrContact().newRow(form.getGlobalContext().Core.getCurrentClinicalContact(), "\t\t\t\t\tClinical Contact: " + form.getGlobalContext().Core.getCurrentClinicalContact().getStartDateTime() + " - " + form.getGlobalContext().Core.getCurrentClinicalContact().getSeenBy(), Color.Green); form.recbrContact().setValue(form.getGlobalContext().Core.getCurrentClinicalContact()); } browseRecord(); }
public ClinicalContactShortVoCollection listRespTreatContacts(Integer idCareContext) { if (idCareContext != null) { DomainFactory factory = getDomainFactory(); List RespTrList = factory.find(" from RespiratoryTreatment rt where rt.sOAPClinicalContact.careContext.id = :ccId and rt.isRIE is null order by rt.authoringDateTime", new String[]{"ccId"}, new Object[]{idCareContext}); ClinicalContactShortVoCollection voCareContactList = new ClinicalContactShortVoCollection(); for (int x = 0; x < RespTrList.size(); x++) { RespiratoryTreatment domRespTr = (RespiratoryTreatment) RespTrList.get(x); RespiratoryTreatmentVo voRespTreat = RespiratoryTreatmentVoAssembler.create(domRespTr); //TODO: check that SOAP clinical contact is the correct vo to handle here. voCareContactList.add(voRespTreat.getSOAPClinicalContact()); } return voCareContactList; } return null; }
public ClinicalContactShortVoCollection listClinicalContacts(CareContextRefVo careContext) { DomainFactory factory = getDomainFactory(); CareContext cc = (CareContext) factory.getDomainObject(CareContext.class, careContext.getID_CareContext()); return ClinicalContactShortVoAssembler.createClinicalContactShortVoCollectionFromClinicalContact( cc.getClinicalContacts()).sort(); }
private void fillRecordBrowser() { Integer currentContactId = form.getLocalContext().getCurrentClinicalContactId(); Color textColour = null; ClinicalContactShortVoCollection collClinicalContactShortVo = domain.listClinicalContactsByCareContext(form.getGlobalContext().Core.getCurrentCareContext()); for(int i=0; i<collClinicalContactShortVo.size(); i++){ ClinicalContactShortVo voClinicalContactShort = collClinicalContactShortVo.get(i); if(voClinicalContactShort.getID_ClinicalContact().equals(currentContactId)) textColour = Color.Green; else textColour = null; form.recbrHandTests().newRow(voClinicalContactShort, "Clinical Contact: " + voClinicalContactShort.getStartDateTime() + " - " + voClinicalContactShort.getSeenBy(), textColour); } }