/** * @param voDocumentDetails * @param voPasEvent */ private void populateScreenPatientInfoFromData(CorrespondenceDetailsVo voDocumentDetails, PasEventVo voPasEvent) { // show patient details Patient voPatient = null; PatientShort voPatientShort = null; if (voDocumentDetails != null) voPatient = domain.getPatientLocal(form.getLocalContext().getpasEventVo().getPatient()); else if (voPasEvent != null) voPatientShort = voPasEvent.getPatient(); if (null != voPatient) { populatePatientDetails(voPatient); if (voDocumentDetails.getPasEventIsNotNull()) populateGPDetails(voPasEvent.getReferringGP(), voPasEvent.getReferringGpSurgery()); form.getLocalContext().setPatientGP(voPatient.getGp()); } else if (null != voPatientShort) { populatePatientDetails(voPatientShort); } }
private void enableBatchUpdateMenuItems() { boolean enableDictatedItem = false; boolean enableNoLetterRequiredItem = false; boolean enableSignedItem = false; OutPatientAttendanceVo voOutPatientListVo = null; PasEventVo voPasEvent = null; for(int i=0; i< form.grdOutPatient().getRows().size(); i++){ voOutPatientListVo = form.grdOutPatient().getRows().get(i).getValue(); voPasEvent = voOutPatientListVo.getPasEvent(); if(voPasEvent.getCspDocumentStatusIsNotNull()) if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.LETTERREQUIRED)){ enableNoLetterRequiredItem = true; enableDictatedItem = true; } else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.NOLETTERREQUIRED)) enableDictatedItem = true; else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.PRINTEDNOSIGNATURE)) enableSignedItem = true; } form.getContextMenus().getADTMenuBatchupdateofstatustoDictatedItem().setVisible(enableDictatedItem); form.getContextMenus().getADTMenuBatchupdateofstatustoNoLetterRequiredItem().setVisible(enableNoLetterRequiredItem); form.getContextMenus().getADTMenuBatchupdateofstatustoSignedItem().setVisible(enableSignedItem); }
private void setContextVariablesForSelection() { clearContextVariables(); OutPatientAttendanceVo voOutPatientAttendance = null; PasEventVo voPasEvent = null; if (form.grdOutPatient().getSelectedRowIndex() >= 0 && form.grdOutPatient().getRows().get(form.grdOutPatient().getSelectedRowIndex()).getValue() != null) { voOutPatientAttendance = form.grdOutPatient().getSelectedRow().getValue(); voPasEvent = voOutPatientAttendance.getPasEvent(); form.getGlobalContext().Core.setPatientShort(voPasEvent.getPatient()); form.getGlobalContext().Core.setPasEvent(voPasEvent); form.getLocalContext().setSelectedCorrespondenceInstance(domain.getCorrespondenceDetailsByPasEvent(voPasEvent)); form.getGlobalContext().Correspondence.setCorrespondenceDetails(form.getLocalContext().getSelectedCorrespondenceInstance()); } }
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException { //open the template selection dialog if more than one template PasEventVo voPasEvent = domain.getPasEvent(form.getGlobalContext().Core.getPasEvent()); ReportTemplateVoCollection voCollRepTemplates = domain.listTemplates(new Boolean(true),getConsultantId(voPasEvent),getLocationId(voPasEvent),getSpecialtyId(voPasEvent)); if ((voCollRepTemplates != null) && (voCollRepTemplates.size() > 0)) { GenForm.grdTemplateRow row; for(int i=0;i<voCollRepTemplates.size();i++) { row = form.grdTemplate().getRows().newRow(); row.setValue(voCollRepTemplates.get(i)); row.setcolTemplate(voCollRepTemplates.get(i).getName()); } } form.btnSave().setEnabled(false); }
private PendingEmergencyAdmissionVoCollection listPendingEmergencyAdmissions(DomainFactory factory, PatientShort patVo, PasEventVo pasEvent) { String hql = "from PendingEmergencyAdmission pea " + " where pea.pasEvent.patient.id = :pat " + " and pea.pasEvent.id = :eventId "; ArrayList<String> labels = new ArrayList<String>(); labels.add("pat"); labels.add("eventId"); ArrayList<Object> values = new ArrayList<Object>(); values.add(patVo.getID_Patient()); values.add(pasEvent.getID_PASEvent()); return PendingEmergencyAdmissionVoAssembler.createPendingEmergencyAdmissionVoCollectionFromPendingEmergencyAdmission(getDomainFactory().find(hql.toString(), labels, values)); }
@SuppressWarnings("unchecked") public PendingEmergencyAdmissionVo getPendingEmergencyAdmission( PasEventVo pasEventVo) { DomainFactory factory = getDomainFactory(); PASEvent domEvent = PASEvent.getPASEventFrompasevent_unq1(factory, (Patient)factory.getDomainObject(Patient.class, pasEventVo.getPatient().getID_Patient()), pasEventVo.getPasEventId()); if (domEvent != null) { String hql = " from PendingEmergencyAdmission o where o.pasEvent.id = :pasEvent"; List lst = factory.find(hql, new String[]{"pasEvent"}, new Object[]{domEvent.getId()}); if (lst != null && lst.size() == 1) return PendingEmergencyAdmissionVoAssembler.create((PendingEmergencyAdmission) lst.get(0)); } return null; }
public void fillPasEventFromEVN(EVN evn, PasEventVo pe, DateTime transactionDT) throws HL7Exception { try { if (evn.getRecordedDateTime().getTimeOfAnEvent() != null && evn.getRecordedDateTime().getTimeOfAnEvent().getValue() != null) { pe.setEventDateTime(new DateTime(evn.getRecordedDateTime().getTimeOfAnEvent().getValue())); if(transactionDT != null) transactionDT.setDateTime(pe.getEventDateTime().getDate(), pe.getEventDateTime().getTime()); } } catch (ParseException e) { throw new HL7Exception(e.getMessage(), e); } }
private Integer getSpecialtyId(PasEventVo voPasEvent) { if (voPasEvent != null && voPasEvent.getSpecialtyIsNotNull()) { return (new Integer(voPasEvent.getSpecialty().getId())); } return null; }
private Integer getConsultantId(PasEventVo voPasEvent) { if (voPasEvent != null && voPasEvent.getConsultantIsNotNull()) { return voPasEvent.getConsultant().getID_Hcp(); } return null; }
private Integer getLocationId(PasEventVo voPasEvent) { if (voPasEvent != null && voPasEvent.getLocationIsNotNull()) { return (voPasEvent.getLocation().getID_Location()); } return null; }
protected PasEventVo GetPasEventDetails() { if (form.getGlobalContext().Core.getPasEventIsNotNull()) { return domain.getPasEvent(form.getGlobalContext().Core.getPasEvent()); } return null; }
protected void onBtnEditClick() throws PresentationLogicException { if (form.intRefNo().getValue() != null) { //get and display current document CorrespondenceDetailsVoCollection voColl = domain.getCorrespondenceForPASEventId(Integer.valueOf(form.intRefNo().getValue())); if (voColl != null && voColl.size() > 0 && voColl.get(0) != null) { if (voColl.get(0).getPasEventIsNotNull()) { PasEventVo voPasEvent = domain.getPasEvent(voColl.get(0).getPasEvent()); if (voPasEvent != null) { form.getGlobalContext().Core.setPatientShort(voPasEvent.getPatient()); //pascontact form.getGlobalContext().Core.setPasEvent(voColl.get(0).getPasEvent()); //correspondence detail form.getGlobalContext().Core.setDocumentID(form.intRefNo().getValue()); form.getGlobalContext().Correspondence.setCorrespondenceDetails(voColl.get(0)); //open the discharge letter form form.getGlobalContext().Correspondence.setGenerateFormMode(FormMode.EDIT); engine.open(form.getForms().Correspondence.CorrespondenceDetail); } } } else engine.showMessage("No document found for Contact Number: " + form.intRefNo().getValue()); } else { engine.showMessage("Please Enter a Contact Number!"); } }
/** * @param voDocumentDetails * @param voPasEvent */ private void populateScreenPatientInfoFromData(CorrespondenceDetailsVo voDocumentDetails, PasEventVo voPasEvent) { // show patient details Patient voPatient = null; PatientShort voPatientShort = null; if (voDocumentDetails != null) voPatient = domain.getPatientLocal(form.getLocalContext().getpasEventVo().getPatient()); else if (voPasEvent != null) voPatientShort = voPasEvent.getPatient(); if (null != voPatient) { String sPatientDetails = formatVo(voPatient, "Patient Details"); sPatientDetails += formatVo(voPasEvent, "Pas Event Details"); sPatientDetails += formatVo(voPatient.getGp(), "Patient GP Details"); sPatientDetails += formatVo(voPasEvent.getReferringGP(), "Referral GP Details"); sPatientDetails += formatVo(voPasEvent.getReferringGpSurgery(), "Referral Surgery Details"); form.getLocalContext().setPatientGP(voPatient.getGp()); if (voPatient.getGpSurgeryIsNotNull()) form.getLocalContext().setPatientGPSurgery(voPatient.getGpSurgery()); } }
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException { // Get the PASEventVo // Get the speicalties and consultants associated // show the glossaries based on that. ArrayList iArray = new ArrayList(); ICspTypeSpecifier[] specifierArray = null; if (form.getGlobalContext().Core.getPasEventIsNotNull()) { PasEventVo pasEventVo = domain.getPasEvent(form.getGlobalContext().Core.getPasEvent()); if (pasEventVo != null) { if (pasEventVo.getSpecialtyIsNotNull()) { iArray.add(new SpecifierAdapter(pasEventVo.getSpecialty())); } if (pasEventVo.getConsultantIsNotNull()) { iArray.add(pasEventVo.getConsultant()); } specifierArray = getArray(iArray); if (specifierArray != null) { populateGlossaryList(domain.listDistinctGlossariesForProfileTypes(specifierArray)); } } } }
public PasEventVo savePasEvent(PasEventVo voPasEvent) throws DomainInterfaceException, StaleObjectException { if (!voPasEvent.isValidated()) { throw new DomainRuntimeException("PasEventVo VO not validated."); } DomainFactory factory = getDomainFactory(); PASEvent domPasEvent = PasEventVoAssembler.extractPASEvent(factory,voPasEvent); factory.save(domPasEvent); return PasEventVoAssembler.create(domPasEvent); }
public PasEventVo getPasEvent(DateTime eventDateTime, PatientRefVo voPatienRef, String pasEventId) throws DomainInterfaceException { //ADT impl = (ADT) getDomainImpl(ADTImpl.class); //return impl.getPasEventByUnqIdx(voPatienRef, pasEventId); if (pasEventId == null) throw new CodingRuntimeException("Mandatory Argument: IdPasEvent"); DomainFactory factory = getDomainFactory(); PASEvent pasEvent = (PASEvent) factory.getDomainObject(PASEvent.class,new Integer(pasEventId)); return PasEventVoAssembler.create(pasEvent); }
public PasEventVo getPasEvent(PASEventRefVo voPasEventRef) { if (voPasEventRef == null) throw new CodingRuntimeException("Mandatory Argument - PAS Event Required"); ADT impl = (ADT)getDomainImpl(ADTImpl.class); return impl.getPasEvent(voPasEventRef); }
public PasEventVo getPasEvent(PASEventRefVo pasEventRefVo) { if (pasEventRefVo == null) throw new CodingRuntimeException("Mandatory Argument - PAS Event Required"); ADT impl = (ADT)getDomainImpl(ADTImpl.class); return impl.getPasEvent(pasEventRefVo); }
public PasEventVo getPasEvent(PASEventRefVo pasEventVoRef) { if (pasEventVoRef == null) throw new CodingRuntimeException("Mandatory Argument - PAS Event Required"); ADT impl = (ADT)getDomainImpl(ADTImpl.class); return impl.getPasEvent(pasEventVoRef); }
private void savePasEventDocumentStatus(CorrespondenceDetailsVo voDocDetail) throws StaleObjectException { if (voDocDetail != null && voDocDetail.getCurrentStatusIsNotNull()) { DomainFactory factory = getDomainFactory(); PASEvent domPas = (PASEvent) factory.getDomainObject(PASEvent.class, voDocDetail.getPasEvent().getID_PASEvent()); PasEventVo voPasEvent = PasEventVoAssembler.create(domPas); voPasEvent.setCspDocumentStatus(voDocDetail.getCurrentStatus()); domPas = PasEventVoAssembler.extractPASEvent(factory,voPasEvent); factory.save(domPas); } }