private void SetGlobalContextClinicalComplete() { DischargeReportDetailVo record = domain.getDischargeReportDetailsForCareContext(form.getGlobalContext().Core.getCurrentCareContext()); if(record != null) { if(record.getIsClinicalDetailsComplete() == true) { form.getLocalContext().setisReadOnly(true); form.getGlobalContext().Clinical.seteDischargeClinicalComplete(true); } else { form.getLocalContext().setisReadOnly(false); form.getGlobalContext().Clinical.seteDischargeClinicalComplete(false); } } else { form.getLocalContext().setisReadOnly(false); form.getGlobalContext().Clinical.seteDischargeClinicalComplete(false); } }
public void openFromOnFromOpen() { form.getLocalContext().setisCurrentUserMoS(domain.getHcpLiteUser()!=null); form.btnUndo().setVisible(false);//wdev-8465 DischargeReportDetailVo record = domain.getDischargeReportDetailsForCareContext(form.getGlobalContext().Core.getCurrentCareContext()); if(record != null) { if(record.getIsClinicalDetailsComplete() == true) { form.btnUndo().setVisible(form.getLocalContext().getisCurrentUserMoS()); isComplete = true; } else { form.btnUndo().setVisible(false); } } }
private RTLSummaryVo populateRTLSummary(CareContextShortVo careContext, DischargeReportDetailVo dischargeDetail) { if (careContext == null) return null; RTLSummaryVo rTLSummary = domain.getRTLSummaryForCareContext(form.getGlobalContext().Core.getCurrentCareContext()); if (rTLSummary == null) { rTLSummary = new RTLSummaryVo(); } rTLSummary.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); rTLSummary.setWasPreviewSignedOff(dischargeDetail.getIsClinicalDetailsComplete()); //WDEV-18843 if (form.dyngrdSummary().getRows().size()>1 && form.dyngrdSummary().getRows().get(1).getCells().size()>2) { rTLSummary.setWereComplicationsEntered(Boolean.TRUE.equals(form.dyngrdSummary().getRows().get(1).getCells().get(getCol(COLUMN3)).getValue())); } if (form.dyngrdSummary().getRows().size()>2 && form.dyngrdSummary().getRows().get(2).getCells().size()>2) { rTLSummary.setWereCoMorbiditiesEntered(Boolean.TRUE.equals(form.dyngrdSummary().getRows().get(2).getCells().get(getCol(COLUMN3)).getValue())); } return rTLSummary; }
@Override protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException { String err = getUIErrors(null); if (err != null && err != "") { engine.showMessage(err); return; } DischargeReportDetailVo record = populateDataFromScreen(form.getLocalContext().getEditedRecord()); String[] errors = record.validate(); if (errors != null && errors.length > 0) { engine.showErrors(errors); return; } if ( form.chkClinicalDetails().getValue() == true) { // if (form.getLocalContext().getEditedRecord() == null || !form.getLocalContext().getEditedRecord().getIsClinicalDetailsComplete()) if (form.getLocalContext().getEditedRecord() == null || form.getLocalContext().getEditedRecord().getIsClinicalDetailsComplete()) { if(!manageDialog()) return; } } if (save()) { form.setMode(FormMode.VIEW); open(); updateButtonUndo(); manageReadOnly(); } form.getGlobalContext().Clinical.seteDischargeDisableTabs(false); form.fireCustomControlValueChanged(); }
private void displayPatientDocument(DischargeReportDetailVo dischargeReportDetails) { if (dischargeReportDetails != null && dischargeReportDetails.getDischargeDocumentsIsNotNull() && dischargeReportDetails.getDischargeDocuments().size() > 0) { PatientDocumentVoCollection documents = dischargeReportDetails.getDischargeDocuments().sort(SortOrder.DESCENDING); for (int i = 0; i < documents.size(); i++) { if (documents.get(i).getServerDocumentIsNotNull() && documents.get(i).getCategoryIsNotNull()) { if (documents.get(i).getCategory().equals(DocumentCategory.DISCHARGE_SUMMARY)) { if (documents.get(i).getServerDocumentIsNotNull() && documents.get(i).getServerDocument().getFileNameIsNotNull()) { form.htmPreview().setHTML("<IFRAME id=\"PostFrame\" name=\"PostFrame\" width=\"100%\" height=\"100%\" frameborder=0 src='" + ConfigFlag.GEN.FILE_SERVER_URL.getValue() + documents.get(i).getServerDocument().getFileName() + "'></IFRAME>"); form.getLocalContext().setReportURL("<IFRAME id=\"PostFrame\" name=\"PostFrame\" width=\"100%\" height=\"100%\" frameborder=0 src='" + ConfigFlag.GEN.FILE_SERVER_URL.getValue() + documents.get(i).getServerDocument().getFileName() + "'></IFRAME>"); break; } } } } } else { String url = buildReport(); form.htmPreview().setHTML("<p align='center'>" + url); form.getLocalContext().setReportURL("<p align='center'>" + url); } }
public DischargeReportDetailVo getDischargeReportDetailsForCareContext( CareContextRefVo careContext) { if(careContext == null || careContext.getID_CareContext() == null) throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext"); DomainFactory factory = getDomainFactory(); List domainObjectList = factory.find("select drd from DischargeReportDetail as drd left join drd.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()}); DischargeReportDetailVoCollection reportDetail = DischargeReportDetailVoAssembler.createDischargeReportDetailVoCollectionFromDischargeReportDetail(domainObjectList); return reportDetail != null && reportDetail.size() > 0 ? (reportDetail.get(0) != null ? reportDetail.get(0) : null) : null; }
public DischargeReportDetailVo saveDischargeReportDetails(DischargeReportDetailVo dischargeReportDetail) throws StaleObjectException { if (!dischargeReportDetail.isValidated()) throw new DomainRuntimeException("DischargeReportDetailVo not validated"); DomainFactory factory = getDomainFactory(); DischargeReportDetail dom = DischargeReportDetailVoAssembler.extractDischargeReportDetail(factory, dischargeReportDetail); factory.save(dom); return DischargeReportDetailVoAssembler.create(dom); }
public DischargeReportDetailVo getDischargeReportDetailsForCareContext(CareContextRefVo careContext) { if(careContext == null || careContext.getID_CareContext() == null) throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext"); DomainFactory factory = getDomainFactory(); List<?> domainObjectList = factory.find("select drd from DischargeReportDetail as drd left join drd.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()}); DischargeReportDetailVoCollection reportDetail = DischargeReportDetailVoAssembler.createDischargeReportDetailVoCollectionFromDischargeReportDetail(domainObjectList); return reportDetail != null && reportDetail.size() > 0 ? (reportDetail.get(0) != null ? reportDetail.get(0) : null) : null; }
public DischargeReportDetailVo getDischargeReportDetailsForCareContext(CareContextRefVo careContext) { if(careContext == null || careContext.getID_CareContext() == null) throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext"); DomainFactory factory = getDomainFactory(); List domainObjectList = factory.find("select drd from DischargeReportDetail as drd left join drd.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()}); DischargeReportDetailVoCollection reportDetail = DischargeReportDetailVoAssembler.createDischargeReportDetailVoCollectionFromDischargeReportDetail(domainObjectList); return reportDetail != null && reportDetail.size() > 0 ? (reportDetail.get(0) != null ? reportDetail.get(0) : null) : null; }
public DischargeReportDetailVo saveDischargeReportDetail(DischargeReportDetailVo record, DischargeReadyToLeaveVo voReady) throws StaleObjectException { if (record != null) { if (!record.isValidated()) throw new DomainRuntimeException("PatientDocumentVo not validated"); } DomainFactory factory = getDomainFactory(); if (!record.getID_DischargeReportDetailIsNotNull()) { List<?> dischargeDetails = factory.find("select dd from DischargeReportDetail as dd left join dd.careContext as cc where cc.id = :idCareContext and dd.isRIE is null ", new String[]{"idCareContext"}, new Object[]{record.getCareContext().getID_CareContext()}); if (dischargeDetails != null && dischargeDetails.size()>0) { throw new StaleObjectException(null); } } DischargeReportDetail dom = DischargeReportDetailVoAssembler.extractDischargeReportDetail(factory, record); factory.save(dom); if (voReady != null) { ReadyToLeave domReady = DischargeReadyToLeaveVoAssembler.extractReadyToLeave(factory, voReady); factory.save(domReady); } return DischargeReportDetailVoAssembler.create(dom); }
public DischargeReportDetailVo saveDischargeReportDetail(DischargeReportDetailVo report) throws StaleObjectException { if(report == null) { throw new CodingRuntimeException("DischargeReportDetailVo is null"); } if (!report.isValidated()) { throw new DomainRuntimeException("DischargeReportDetailVo not validated"); } DomainFactory factory = getDomainFactory(); DischargeReportDetail doDischargeReportDetail = DischargeReportDetailVoAssembler.extractDischargeReportDetail(factory, report); factory.save(doDischargeReportDetail); return DischargeReportDetailVoAssembler.create(doDischargeReportDetail); }
public DischargeReportDetailVo saveDischargeReportDetail(DischargeReportDetailVo record, DischargeReadyToLeaveVo voReady, RTLSummaryVo rTLSummaryVo, PatientNoDiagInfoForCCVo patientNoDiagInfo) throws StaleObjectException { if (record != null) { if (!record.isValidated()) throw new DomainRuntimeException("PatientDocumentVo not validated"); } DomainFactory factory = getDomainFactory(); if (!record.getID_DischargeReportDetailIsNotNull()) { List<?> dischargeDetails = factory.find("select dd from DischargeReportDetail as dd left join dd.careContext as cc where cc.id = :idCareContext and dd.isRIE is null ", new String[]{"idCareContext"}, new Object[]{record.getCareContext().getID_CareContext()}); if (dischargeDetails != null && dischargeDetails.size()>0) { throw new StaleObjectException(null); } } DischargeReportDetail dom = DischargeReportDetailVoAssembler.extractDischargeReportDetail(factory, record); RTLSummary doRTLSummary = RTLSummaryVoAssembler.extractRTLSummary(factory, rTLSummaryVo); //WDEV-18622 factory.save(dom); factory.save(doRTLSummary); //WDEV-18622 //WDEV-18627 if (patientNoDiagInfo != null) { PatientNoDiagInfoForCC patientNoDiagInfoDo = PatientNoDiagInfoForCCVoAssembler.extractPatientNoDiagInfoForCC(factory, patientNoDiagInfo); factory.save(patientNoDiagInfoDo); } if (voReady != null) { ReadyToLeave domReady = DischargeReadyToLeaveVoAssembler.extractReadyToLeave(factory, voReady); factory.save(domReady); } return DischargeReportDetailVoAssembler.create(dom); }