private PatientFilter getPatientFilterDetails() { PatientFilter voPatFilter = new PatientFilter(); if (form.txtDisplayId().getValue() != null && form.txtDisplayId().getValue().length() > 0) { PatientId pid = new PatientId(); pid.setType(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue())); pid.setValue(form.txtDisplayId().getValue()); voPatFilter.setPersId(pid); } else { voPatFilter.setForename(form.txtName().getValue()); voPatFilter.setSurname(form.txtSurname().getValue()); voPatFilter.setDob(form.pdtDate().getValue()); } return voPatFilter; }
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException { String dsn = ""; String host = ""; String userName = ""; String password = ""; dsn = ConfigFlag.UI.REPORTS_DSN.getValue(); host = ConfigFlag.UI.REPORTS_HOST.getValue(); userName = ConfigFlag.UI.REPORTS_USER.getValue(); password = ConfigFlag.UI.REPORTS_PASS.getValue(); String html = ""; if(form.getGlobalContext().COE.getPatientMovementID() != null){ PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); Integer assessment_id = form.getGlobalContext().COE.getPatientMovementID(); String server = ConfigFlag.UI.REPORT_SERVER.getValue(); html = "<IFRAME src='http://" + server + "/patientmovement.asp?assessmentid=" + assessment_id + "&idtype=" + dispIdType.getId() + "&dsn=" + dsn + "&host=" + host + "&userName=" + userName + "&password=" + password + "' style=\"width:100%; height:100%;\">"; } form.htm1().setHTML(html); }
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException { String dsn = ""; String host = ""; String userName = ""; String password = ""; dsn = ConfigFlag.UI.REPORTS_DSN.getValue(); host = ConfigFlag.UI.REPORTS_HOST.getValue(); userName = ConfigFlag.UI.REPORTS_USER.getValue(); password = ConfigFlag.UI.REPORTS_PASS.getValue(); String html = ""; if(form.getGlobalContext().COE.getTransferNote() != null){ PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); Integer tran_id = form.getGlobalContext().COE.getTransferNote().getID_TransferNote(); String server = ConfigFlag.UI.REPORT_SERVER.getValue(); html = "<IFRAME src='http://" + server + "/EpisodeSummary.asp?transferid=" + tran_id + "&idtype=" + dispIdType.getId() + "&dsn=" + dsn + "&host=" + host + "&userName=" + userName + "&password=" + password + "' style=\"width:100%; height:100%;\">"; } form.htm1().setHTML(html); }
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException { String dsn = ""; String host = ""; String userName = ""; String password = ""; dsn = ConfigFlag.UI.REPORTS_DSN.getValue(); host = ConfigFlag.UI.REPORTS_HOST.getValue(); userName = ConfigFlag.UI.REPORTS_USER.getValue(); password = ConfigFlag.UI.REPORTS_PASS.getValue(); String html = ""; if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()){ PatIdType mnaIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); Integer mNA_id = form.getGlobalContext().COE.getMNARecord().getID_Assessment(); String server = ConfigFlag.UI.REPORT_SERVER.getValue(); html = "<IFRAME src='http://" + server + "/MNA Report.asp?MNAid=" + mNA_id + "&idtype=" + mnaIdType.getId() + "&dsn=" + dsn + "&host=" + host + "&userName=" + userName + "&password=" + password + "' style=\"width:100%; height:100%;\">"; } form.htmRptMNA().setHTML(html); }
private void setRemoveMenuVisibility() { boolean bVisible = form.grdIdentifiers().getSelectedRowIndex() != -1 && form.getMode().equals(FormMode.EDIT); //form.getContextMenus().getGenericGridRemoveItem().setVisible(bVisible); form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(bVisible); if (form.getLocalContext().getPatientIsNotNull() && form.getLocalContext().getPatient().getSourceOfInformationIsNotNull() && form.getLocalContext().getPatient().getSourceOfInformation().equals(RegistrationSourceOfInfo.PDS) && form.grdIdentifiers().getSelectedRow() != null && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN)) form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(false); if (form.grdIdentifiers().getSelectedRow() != null && form.grdIdentifiers().getSelectedRow().getValue().getTypeIsNotNull() && form.grdIdentifiers().getSelectedRow().getValue().getType().equals(PatIdType.NHSN) && ! ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue()) form.getContextMenus().Core.getIdentifierGridRemoveItem().setVisible(false); }
private void populateInpatientsGrid() { form.grdInpatients().getRows().clear(); PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); form.grdInpatients().setColDisplayIdCaption(dispIdType.getText()); if(form.cmbWard().getValue() == null) return; if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO")) fillGridFromHomeLeaveANDInpatRecords(); else fillFromInpatRecords(); }
private void listOrderingHospitals() { LocSiteLiteMappingsVoCollection orderingHospitals = domain.listLocSites(); PatientShort ps = form.getGlobalContext().Core.getPatientShort(); if (ps==null) return; PatientIdCollection ids= ps.getIdentifiers(); if (ids==null) return; for (LocSiteLiteMappingsVo locationLiteMappingsVo : orderingHospitals) { for (PatientId patientId : ids) { if (patientId.getType().equals(PatIdType.PASID)&&patientId.getValue().startsWith(locationLiteMappingsVo.getPathMapping())) { form.cmbOrderingHosp().newRow(locationLiteMappingsVo.getProviderHospital(), locationLiteMappingsVo.getProviderHospital().getName()); continue; } } } }
private void initialise() { form.Tranfers().setValue(GenForm.TranfersEnumeration.rdoPendingTransfers); initializeDynamicGrid(true); loadHospitals(); form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue())); if (form.cmbCurrentHosp().getValue() == null && engine.getCurrentLocation() != null) { // Try and load the logged in location as a ward LocMostVo voLoc = domain.getLocation((LocationRefVo) engine.getCurrentLocation()); if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD)) { form.cmbCurrentHosp().setValue(voLoc.getParentLocation()); form.qmbCurrentWard().newRow(voLoc, voLoc.getName()); form.qmbCurrentWard().setValue(voLoc); } } loadAlerts(); }
private void clearScreen() { form.cmbHospital().setValue(null); form.qmbWard().clear(); form.dteFrom().setValue(null); form.dteTo().setValue(null); form.ccConsultant().clear(); form.cmbSpecialty().setValue(null); form.cmbStatus().setValue(null); form.txtSurname().setValue(null); form.txtForename().setValue(null); form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue())); form.txtIDValue().setValue(null); form.pdtDOB().setValue(null); form.chkExclude().setValue(null); form.chkDelirum().setValue(null); form.chkDementiaConfirmed().setValue(null); form.chkInpatientOnly().setValue(null); form.dyngrdPatients().getRows().clear(); form.imbRefresh().setEnabled(false);//wdev-16983 }
private String getNHS(PatientIdCollection identifiers) { if(identifiers == null) return null; for (int i = 0; i < identifiers.size(); i++) { ims.core.vo.PatientId id = identifiers.get(i); if (id.getType().equals(PatIdType.NHSN)) { return id.getValue(); } } return null; }
private void bindColType(grdIdentifiersRow row, boolean isNew) { row.getcolIdType().clear(); PatIdTypeCollection collTypes = LookupHelper.getPatIdType(domain.getLookupService()); for(int i=0;i<collTypes.size();i++) { if(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue()) { if(isNew) { if(collTypes.get(i).equals(PatIdType.HOSPNUM) || collTypes.get(i).equals(PatIdType.PKEY)) continue; } } row.getcolIdType().newRow(collTypes.get(i), collTypes.get(i).getText()); } }
private void clearResults() { form.dyngrdPatient().getRows().clear(); clearSearchFields(true); form.PatientID().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue())); form.Identifier().setValue(null); //WDEV-18576 form.txtPostCode().setValue(null); form.chkSwap().setValue(Boolean.FALSE); //form.getGlobalContext().Core.setPatientFilter(null); //Clear the selected patient information in the Engine //form.getGlobalContext().Core.clearPatientShort(); //form.getGlobalContext().Core.setPatientToBeDisplayed(null); //engine.setPatientInfo("Please enter Patient ID or Surname and/or Forename"); engine.setPatientInfo(""); //wdev-14281 form.getLocalContext().setPatientFilter(null); form.getLocalContext().setSelectedPatient(null); form.lblTotal().setValue("Total : " + form.dyngrdPatient().getRows().size()); }
private void initialise() { clearControls(); //Load the list of active hospitals in order to fill the current hospital combo. form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue())); loadHospitals(); if (form.cmbCurrentHospital().getValue() == null && engine.getCurrentLocation() != null) { //Try and load the logged in location as a ward LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation()); if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD)) { form.cmbCurrentHospital().setValue(voLoc.getParentLocation()); form.cmbCurrentWard().newRow(voLoc, voLoc.getName()); form.cmbCurrentWard().setValue(voLoc); } } }
private void initialize() { form.getLocalContext().setbTimerOn(false); clearControls(); loadHospitals(); form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue())); if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null) { // Try and load the logged in location as a ward LocMostVo voLoc = domain.getLocation((LocationRefVo) engine.getCurrentLocation()); if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD)) { form.cmbHospital().setValue(voLoc.getParentLocation()); form.qmbWard().newRow(voLoc, voLoc.getName()); form.qmbWard().setValue(voLoc); } } loadAlerts(); setWatchDefaultButtonState(); }
private String getNHSNumber(PatientForDocumentWorklistVo patient) { if (patient == null) return null; if (!patient.getIdentifiersIsNotNull()) return null; for (int i = 0; i < patient.getIdentifiers().size(); i++) { if (PatIdType.NHSN.equals(patient.getIdentifiers().get(i).getType())) { return patient.getIdentifiers().get(i).getValue(); } } return null; }
private boolean checkForDUPIdentifiers() { if(form.getLocalContext().getResultPatient() == null || form.getLocalContext().getResultPatient().getIdentifiers() == null) return false; for(int j=0; j<form.getLocalContext().getResultPatient().getIdentifiers().size(); j++) { PatientId iden = form.getLocalContext().getResultPatient().getIdentifiers().get(j); if(iden == null) continue; if(!iden.getType().equals(PatIdType.NHSN)) continue; if(iden.getIdValue() != null && !iden.getIdValue().equals(formatIdentifierValue(iden.getIdValue()))) return true; } return false; }
@Override protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { form.ccConsultant().initialize(MosType.MEDIC); form.ccConsultant().isRequired(true); //WDEV-12587 bindCmbSourceOfReferralLookup(); form.ccReferringConsultant().initialize(MosType.MEDIC); enableInstanceControls(false); //WDEV-10696 - hide A&E Tabs if(!ConfigFlag.UI.DISPLAY_ANE_BEDMANAGEMENT.getValue()) { form.lyrAdmission().tabEmergency().setVisible(false); form.lyrAdmission().tabEmergency().setHeaderVisible(false); } //WDEV-12968 Default Id Type to config type PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); form.lyrAdmission().tabWaiting().cmbIdType().setValue(dispIdType); }
private PatientFilter getPatientFilterDetails() { PatientFilter voPatFilter = new PatientFilter(); if (form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue() != null && form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue().length() > 0) { PatientId pid = new PatientId(); pid.setType(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue())); pid.setValue(form.lyrCustomListSearch().tabCustomListDetails().txtDisplayId().getValue()); voPatFilter.setPersId(pid); } else { voPatFilter.setForename(form.lyrCustomListSearch().tabCustomListDetails().txtName().getValue()); voPatFilter.setSurname(form.lyrCustomListSearch().tabCustomListDetails().txtSurname().getValue()); voPatFilter.setDob(form.lyrCustomListSearch().tabCustomListDetails().pdtDate().getValue()); } return voPatFilter; }
private void clearScreen() { form.cmbHospital().setValue(null); form.qmbWard().clear(); form.qmbCurrentWard().clear(); form.dtimFrom().setValue(null); form.dtimTo().setValue(null); form.ccConsultant().clear(); form.cmbSpecialty().setValue(null); form.cmbVTEStatus().setValue(null); form.txtSurname().setValue(null); form.txtForename().setValue(null); form.cmbIDType().setValue(PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue())); form.txtIDValue().setValue(null); form.pdtDOB().setValue(null); form.chkOver24Hours().setValue(null); form.grdPatients().getRows().clear(); }
private String getPatientIdValue(InpatientEpisode doInpatientEpisode, PatIdType type) { if(doInpatientEpisode == null) return null; if(doInpatientEpisode.getPasEvent() != null && doInpatientEpisode.getPasEvent().getPatient() != null && doInpatientEpisode.getPasEvent().getPatient().getIdentifiers() != null) { Iterator it = doInpatientEpisode.getPasEvent().getPatient().getIdentifiers().iterator(); while(it.hasNext()) { PatientId patId = (PatientId) it.next(); if(patId.getType().equals( getDomLookup(type))) return patId.getValue(); } } return null; }
protected void open() { populateDemoData(); PatientShort patientShort = form.getGlobalContext().Core.getPatientShort(); form.lyrPain().tabPageACutePainRefDet().txtName().setValue(patientShort.getName().toString()); form.lyrPain().tabPageACutePainRefDet().txtAddress().setValue(patientShort.getAddressIsNotNull() ? patientShort.getAddress().toDisplayString(): null); form.lyrPain().tabPageACutePainRefDet().txtDOB().setValue(patientShort.getDobIsNotNull() ? patientShort.getDob().toString() : null); form.lyrPain().tabPageACutePainRefDet().txtWard().setValue(patientShort.getWardIsNotNull() ? patientShort.getWard().getName() : null); PatientIdCollection identifiers = patientShort.getIdentifiers(); for (int i = 0 ; identifiers!= null && i<identifiers.size() ; i++) { if (PatIdType.NHSN.equals(identifiers.get(i).getType())) { form.lyrPain().tabPageACutePainRefDet().txtNhs().setValue(identifiers.get(i).getValue()); } else if (PatIdType.CHARTNUM.equals(identifiers.get(i).getType())) { form.lyrPain().tabPageACutePainRefDet().txtCr().setValue(identifiers.get(i).getValue()); } } form.setMode(FormMode.VIEW); }
private String getPatientIdValue(AdmissionDetail doAdmissionDetail, PatIdType type) { if(doAdmissionDetail == null) return null; if(doAdmissionDetail.getPasEvent() != null && doAdmissionDetail.getPasEvent().getPatient() != null && doAdmissionDetail.getPasEvent().getPatient().getIdentifiers() != null) { Iterator it = doAdmissionDetail.getPasEvent().getPatient().getIdentifiers().iterator(); while(it.hasNext()) { PatientId patId = (PatientId) it.next(); if(patId.getType().equals( getDomLookup(type))) return patId.getValue(); } } return null; }
private void bindColType(ims.RefMan.forms.daycaseadmissiondialog.GenForm.grdIdentifiersRow row, boolean isNew) { row.getcolIdType().clear(); PatIdTypeCollection collTypes = LookupHelper.getPatIdType(domain.getLookupService()); for(int i=0;i<collTypes.size();i++) { if(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue()) { if(isNew) { if(collTypes.get(i).equals(PatIdType.HOSPNUM) || collTypes.get(i).equals(PatIdType.PKEY)) continue; } } row.getcolIdType().newRow(collTypes.get(i), collTypes.get(i).getText()); } }
private String getMRN(PatientForTriageVo patient) { if (patient==null || patient.getIdentifiers()==null || patient.getIdentifiers().size()==0) return null; for (int i=0;i<patient.getIdentifiers().size();i++) { PatientId tempId = patient.getIdentifiers().get(i); if (PatIdType.HOSPNUM.equals(tempId.getType())) { return tempId.getValue(); } } return null; }
private Object getIdentifier(SpecimenWorkListItemListVo item) { String patIdValue = ""; String patIdentifier = ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue(); PatIdType patIdType = PatIdType.getNegativeInstance(patIdentifier); if (patIdType != null) { PatientIdCollection patIdsColl = null; //WDEV-16232 if (item.getSpecimenIsNotNull() && item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getPatientIsNotNull()) patIdsColl = item.getSpecimen().getOrder().getPatient().getIdentifiers(); else if (item.getDFTOrderInvestigationIsNotNull() && item.getDFTOrderInvestigation().getOrderDetailsIsNotNull() && item.getDFTOrderInvestigation().getOrderDetails().getPatientIsNotNull()) patIdsColl = item.getDFTOrderInvestigation().getOrderDetails().getPatient().getIdentifiers(); for (int i = 0; patIdsColl != null && i < patIdsColl.size(); i++) { if (patIdsColl.get(i).getTypeIsNotNull() && patIdsColl.get(i).getType().equals(patIdType)) { patIdValue = patIdsColl.get(i).getValue(); break; } } } return patIdType.toString() + " " + patIdValue; }
private PatientId getPatientIdFromColl(PatientIdCollection coll, PatIdType idType) { if (coll == null) return null; for (int i = 0; i < coll.size(); i++) { ims.core.vo.PatientId id = coll.get(i); if (id.getType().equals(idType)) { return id; } } return null; }
private void initialize() { //if we have a Session in the context - auto-select it and find the Sch_Session_Appointment_OrderVo record to populate screen if(form.getGlobalContext().Scheduling.getTheatreSessionIsNotNull()) { Sch_Session_Appointment_OrderVo voSessionApptOrder = domain.getSessionApptOrderBySession(form.getGlobalContext().Scheduling.getTheatreSession()); if(voSessionApptOrder == null) { engine.showMessage("No Appts Booked for this Session"); return; } form.getLocalContext().setSessApptOrder(voSessionApptOrder); if(voSessionApptOrder.getSessionIsNotNull() && voSessionApptOrder.getSession().getSessionDateIsNotNull()) { form.dteSession().setValue(voSessionApptOrder.getSession().getSessionDate()); //Search Sessions and select the row searchSessions(); form.grdSessions().setValue(voSessionApptOrder.getSession()); } } PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); form.grdAppts().setColHospitalNoCaption(dispIdType.getText()); }
private Object getIdentifier(SpecimenWorkListItemListVo item) { String patIdValue = ""; String patIdentifier = ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue(); PatIdType patIdType = PatIdType.getNegativeInstance(patIdentifier); if(patIdType != null) { PatientIdCollection patIdsColl = null; if(item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getPatientIsNotNull()) patIdsColl = item.getSpecimen().getOrder().getPatient().getIdentifiers(); for (int i = 0; patIdsColl != null && i < patIdsColl.size(); i++) { if(patIdsColl.get(i).getTypeIsNotNull() && patIdsColl.get(i).getType().equals(patIdType)) { patIdValue = patIdsColl.get(i).getValue(); break; } } } return patIdType.toString() + " " + patIdValue; }
private String getnhsNumber(PatientIdCollection patidcoll) { if( patidcoll == null || patidcoll.size() == 0) return ""; for(int i = 0; i < patidcoll.size();i++) { if( PatIdType.NHSN.equals(patidcoll.get(i).getType())) { //nhsn format xxx xxx xxxx java.lang.StringBuffer nhsn = new java.lang.StringBuffer(""); String str = patidcoll.get(i).getIdValue().replace(" ", ""); if ( str.length() > 6) { nhsn.append(str.substring(0, 3)); nhsn.append(" "); nhsn.append(str.substring(3, 6)); nhsn.append(" "); nhsn.append(str.substring(6)); return nhsn.toString(); } else return patidcoll.get(i).getIdValue(); //return patidcoll.get(i).getIdValue(); } } for(int i = 0; i < patidcoll.size();i++) { if( PatIdType.HOSPNUM.equals(patidcoll.get(i).getType())) return PatIdType.HOSPNUM.getIItemText()+" : " +patidcoll.get(i).getIdValue(); } return ""; }
private void populatePatientDetails(PatientShort voPatientShort) { // Patient Id PatientId idPat = voPatientShort.getPatId(PatIdType.CHARTNUM); if (idPat != null) form.ctnPatientDetails().txtPatientId().setValue(idPat.getValue()); // PPSN if (voPatientShort.getPpsn() != null) form.ctnPatientDetails().txtPPSN().setValue(voPatientShort.getPpsn().getValue()); // Medical Record Number form.ctnPatientDetails().txtMedicalRecNo().setValue(voPatientShort.getHospnum().getValue()); if (voPatientShort.getDobIsNotNull()) form.ctnPatientDetails().txtDOB().setValue(voPatientShort.getDob().toString(DateFormat.STANDARD)); if (voPatientShort.getNameIsNotNull()) { if (voPatientShort.getName().getForenameIsNotNull()) form.ctnPatientDetails().txtForename().setValue(voPatientShort.getName().getForename()); if (voPatientShort.getName().getSurnameIsNotNull()) form.ctnPatientDetails().txtSurname().setValue(voPatientShort.getName().getSurname()); if (voPatientShort.getName().getTitleIsNotNull()) form.ctnPatientDetails().txtTitle().setValue(voPatientShort.getName().getTitle().getText()); } if (voPatientShort.getAddressIsNotNull()) { form.ctnPatientDetails().txtAddress1().setValue(voPatientShort.getAddress().getLine1()); form.ctnPatientDetails().txtAddress2().setValue(voPatientShort.getAddress().getLine2()); form.ctnPatientDetails().txtAddress3().setValue(voPatientShort.getAddress().getLine3()); form.ctnPatientDetails().txtAddress4().setValue(voPatientShort.getAddress().getLine4()); form.ctnPatientDetails().txtAddress5().setValue(voPatientShort.getAddress().getLine5()); } }
private void populateSearchCriteriaScreenFromData(DementiaWorklistSearchCriteriaVo criteria) { clearScreen(); if (criteria == null) return; form.cmbHospital().setValue(criteria.getHospital()); if (criteria.getWardIsNotNull()) { form.qmbWard().newRow(criteria.getWard(), criteria.getWard().getName()); } form.qmbWard().setValue(criteria.getWard()); form.dteFrom().setValue(criteria.getAdmissionDateFromIsNotNull()? criteria.getAdmissionDateFrom().getDate():null); form.dteTo().setValue(criteria.getAdmissionDateToIsNotNull()? criteria.getAdmissionDateTo().getDate():null); form.ccConsultant().setValue(criteria.getConsultant()); form.cmbSpecialty().setValue(criteria.getSpecialty()); form.cmbStatus().setValue(criteria.getDementiaStatus()); form.txtSurname().setValue(criteria.getSurname()); form.txtForename().setValue(criteria.getForename()); form.cmbIDType().setValue(criteria.getPatIdType() != null ? criteria.getPatIdType() : PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue())); form.txtIDValue().setValue(criteria.getPatIdValue()); form.pdtDOB().setValue(criteria.getDOB()); form.chkExclude().setValue(criteria.getExcludeRemoved()); form.chkDelirum().setValue(criteria.getDeliriumConfirmed()); form.chkDementiaConfirmed().setValue(criteria.getDementiaConfirmed()); form.chkInpatientOnly().setValue(criteria.getInpatientOnly()); form.dyngrdPatients().getRows().clear(); }
private void initialize() { prePopulateControls(); PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); form.grdInpatients().setcolHospnumCaption(dispIdType.getText()); }
private void populatePasContactFromDtoOutpatient(PasContactVo voPasContact, OutpatientlistRecord dtoOutpatient) { String extSystem = ConfigFlag.DOM.DEMOGRAPHICS_EXT_SYSTEM.getValue(); LocShortVo voLoc = new LocShortVo(); OrganisationAndLocation locImpl = (OrganisationAndLocation)getDomainImpl(OrganisationAndLocationImpl.class); voLoc = locImpl.getLocationByLocalCode(dtoOutpatient.Cliniccode,LocationType.CLINIC); voPasContact.setLocation(voLoc); HcpAdmin hcpAdmin = (HcpAdmin)getDomainImpl(HcpAdminImpl.class); MedicWithMappingsLiteVo voMedicWithMappingsLite = hcpAdmin.getMedicMedicMappingsByPasCode(dtoOutpatient.Hcpcode); voPasContact.setConsultant(voMedicWithMappingsLite == null ? null : voMedicWithMappingsLite); Specialty specialty = (Specialty)getLookupService().getLocalLookup(Specialty.class, Specialty.TYPE_ID, extSystem, dtoOutpatient.Specialty); voPasContact.setSpecialty(specialty); //Contact Number voPasContact.setContactNumber(dtoOutpatient.Contactno); try { voPasContact.setAppointmentDateTime(new DateTime (dtoOutpatient.Apptdate, "1000")); } catch (ParseException e) { voPasContact.setAppointmentDateTime(null); } PatientShort voPatientShort = new PatientShort(); voPatientShort.setName(dtoOutpatient.Snm, dtoOutpatient.Fnm1, null); voPatientShort.addId(PatIdType.HOSPNUM, dtoOutpatient.Hospnum); voPatientShort.addId(PatIdType.CHARTNUM, dtoOutpatient.Chartnum); if(dtoOutpatient.Dob != null && dtoOutpatient.Dob != "") voPatientShort.setDob(new PartialDate(dtoOutpatient.Dob)); else voPatientShort.setDob(null); if(dtoOutpatient.Dod != null && dtoOutpatient.Dod != "") { try {voPatientShort.setDod(new Date(dtoOutpatient.Dod,DateFormat.ISO)); } catch (ParseException e2) { e2.printStackTrace(); } } if(dtoOutpatient.Dob != null && dtoOutpatient.Dob != "") voPatientShort.calculateAge(); voPatientShort.setWard(voPasContact.getLocation()); voPatientShort.setSex((Sex)getLookupService().getLocalLookup(Sex.class, Sex.TYPE_ID, extSystem, dtoOutpatient.Sex)); voPasContact.setPatient(voPatientShort); voPasContact.setGPCode(dtoOutpatient.Gpcode); if (dtoOutpatient.Documentstatus != "" && Integer.valueOf(dtoOutpatient.Documentstatus).intValue() == DocumentStatus.LETTERREQUIRED.getId()) { voPasContact.setDocumentStatus((DocumentStatus)getLookupService().getLookupInstance(DocumentStatus.class,Integer.valueOf(dtoOutpatient.Documentstatus).intValue())); } else { if (isLetterRequired(voMedicWithMappingsLite, specialty ,null, null) == Boolean.FALSE) voPasContact.setDocumentStatus(DocumentStatus.NOLETTERREQUIRED); else voPasContact.setDocumentStatus(DocumentStatus.LETTERREQUIRED); } }
private void initialise() { form.dteDate().setValue(new Date()); form.getLocalContext().setbDNACalled(false); PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); form.grdResults().setcolHospnumCaption(dispIdType.getText()); loadHospitals(); if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null) { //Try and load the logged in location as a ward LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation()); if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD)) { form.cmbHospital().setValue(voLoc.getParentLocation()); searchForClinics(); } } //WDEV-13354 form.getTimers().gettimerSearch().setInterval(ConfigFlag.UI.CLINICLISTWITHICP_TIMER_INTERVAL.getValue()); form.imbAutoRefresh().setEnabled(false); form.getLocalContext().setWasTimerEnabled(false); }
private void printReport() { if(form.layerControl1().movement().comboAllMovements().getValue() == null) { engine.showMessage("No Movement Record Selected"); return; } String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue(); String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue(); String[] obj = null; obj = domain.getReportAndTemplate(form.getGlobalContext().Core.getReportID(), form.getGlobalContext().Core.getTemplateID()); if(obj == null || obj.length == 0) { engine.showMessage("Failed to retrieve the report and template !"); return; } QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId()); client.addSeed(new SeedValue("PatientMovementHandling_id", form.layerControl1().movement().comboAllMovements().getValue().getID_Assessment(), Integer.class)); client.addSeed(new SeedValue("PATIDTYPE", new Integer(PatIdType.CHARTNUM.getID()), Integer.class)); String resultUrl = ""; try { resultUrl = client.buildReportAsUrl(obj[0], obj[1], urlReportServer, QueryBuilderClient.PDF, "", 1); } catch (QueryBuilderClientException e1) { engine.showMessage("Error creating report: " + e1.getMessage()); return; } engine.openUrl(resultUrl); }
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException { String dsn = ""; String host = ""; String userName = ""; String password = ""; dsn = ConfigFlag.UI.REPORTS_DSN.getValue(); host = ConfigFlag.UI.REPORTS_HOST.getValue(); userName = ConfigFlag.UI.REPORTS_USER.getValue(); password = ConfigFlag.UI.REPORTS_PASS.getValue(); String html = ""; Integer ward_id = null; Integer hospital_id = null; PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); Date startDate = form.getGlobalContext().Core.Reports.getStartDate(); Date endDate = form.getGlobalContext().Core.Reports.getEndDate(); Time startTime = form.getGlobalContext().Core.Reports.getStartTime(); Time endTime = form.getGlobalContext().Core.Reports.getEndTime(); if (form.getGlobalContext().Core.getWard() != null) ward_id = form.getGlobalContext().Core.getWard().getID_Location(); if (form.getGlobalContext().Core.getHospital() !=null) hospital_id = form.getGlobalContext().Core.getHospital().getID_Location(); String server = ConfigFlag.UI.REPORT_SERVER.getValue(); html = "<IFRAME src='http://" + server + "/Hospital Report.asp?wardid=" + ward_id + "&hospitalid=" + hospital_id + "&idtype=" + dispIdType.getId() + "&startdate=" + startDate + "&enddate=" + endDate + "&startTime=" + startTime.toString() + ":00" + "&endTime=" + endTime.toString() + ":00" + "&dsn=" + dsn + "&host=" + host + "&userName=" + userName + "&password=" + password +"' style=\"width:100%; height:100%;\">"; form.htm1().setHTML(html); }
private void initialise() { form.ccHCP().initialize(MosType.HCP); if(Boolean.TRUE.equals(ConfigFlag.UI.DEFAULT_CONSULTANT_AND_WARD_ON_INPATIENT_ICP_FORM.getValue())) //wdev-13775 { if (domain.getHcpUser() != null) form.ccHCP().setValue((IMos)domain.getHcpUser()); } PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); form.grdInpatientsWithICPS().setcolHospnumCaption(dispIdType.getText()); loadHospitals(); if (form.cmbHospital().getValue() == null && engine.getCurrentLocation() != null) { //Try and load the logged in location as a ward LocMostVo voLoc = domain.getLocation((LocationRefVo)engine.getCurrentLocation()); if (voLoc != null && voLoc.getTypeIsNotNull() && voLoc.getType().equals(LocationType.WARD)) { form.cmbHospital().setValue(voLoc.getParentLocation()); loadWards(); } } }
private void printReport() { String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue(); String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue(); String[] obj = null; obj = domain.getReportAndTemplate(form.getGlobalContext().Core.getReportID(), form.getGlobalContext().Core.getTemplateID()); if (obj == null || obj.length == 0) { engine.showMessage("Failed to retrieve the report and template !"); return; } QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId()); client.addSeed(new SeedValue("Discharge_id", form.getLocalContext().getDischargeToUpdate() != null ? form.getLocalContext().getDischargeToUpdate().getID_Discharge() : null, Integer.class)); client.addSeed(new SeedValue("PATIDTYPE", new Integer(PatIdType.CHARTNUM.getID()), Integer.class)); String resultUrl = ""; try { resultUrl = client.buildReportAsUrl(obj[0], obj[1], urlReportServer, QueryBuilderClient.PDF, "", 1); } catch (QueryBuilderClientException e1) { engine.showMessage("Error creating report: " + e1.getMessage()); return; } engine.openUrl(resultUrl); }
private String getPatientIdentifier() { PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue()); if(dispIdType != null) return dispIdType.getText(); return "Hospital No."; }