private void showOrderedInvestigations(PatientRefVo patient, CareContextRefVo careContext, EmergencyAttendanceInvestigationCodingVo investigationSequenceVo) { String orderInvestigationIDSAlreadyAdded = populateOrderedInvestigationsGrid(investigationSequenceVo); /*OrderInvestigationForAttendenceNotesCcVoCollection orderInvestigations = domain.listOrderInvestigations(patient, careContext, orderInvestigationIDSAlreadyAdded); if(createAndSaveInvestigationsAttendenceDetail(orderInvestigations)) { populateOrderedInvestigationsGrid(investigationSequenceVo); } if(form.grdInvestigations().getRows().size() > 0 && (form.chkNoKnownInvestigations().getValue() || form.chkNoneInvestigations().getValue()))//workaround when OrderInvestigations are created outside Emergency module { saveAttendDiagInvTreatStatus(false, false, null, null, null, null); refresh(); return; } */ }
public EmergencyAttendanceInvestigationCodingVo saveInvestigationSequence(EmergencyAttendanceInvestigationCodingVo investigationSequence) throws StaleObjectException { if(investigationSequence == null) throw new CodingRuntimeException("Cannot save a null EmergencyAttendanceInvestigationCodingVo."); if(!investigationSequence.isValidated()) throw new CodingRuntimeException("EmergencyAttendanceInvestigationCodingVo is not validated."); DomainFactory factory = getDomainFactory(); EmergencyAttendanceInvestigationCoding doInv = EmergencyAttendanceInvestigationCodingVoAssembler.extractEmergencyAttendanceInvestigationCoding(factory, investigationSequence); factory.save(doInv); return EmergencyAttendanceInvestigationCodingVoAssembler.create(doInv); }
public EmergencyAttendanceInvestigationCodingVo getInvestigationSequence(CareContextRefVo emergencyAttendance) { if(emergencyAttendance == null || emergencyAttendance.getID_CareContext() == null) return null; DomainFactory factory = getDomainFactory(); String query = "select eaic from EmergencyAttendanceInvestigationCoding as eaic left join eaic.careContext as cc where cc.id = :ccID"; List<?> list = factory.find(query, new String[] {"ccID"}, new Object[] {emergencyAttendance.getID_CareContext()}); if(list != null && list.size() > 0) return EmergencyAttendanceInvestigationCodingVoAssembler.create((EmergencyAttendanceInvestigationCoding)list.get(0)); return null; }
private void listAndPopulateInvestigationsGrid(PatientRefVo patient, CareContextRefVo careContext) { form.lblNoKnownInvestigation().setTooltip(getInvestigationsNotRecordedDetails(form.getLocalContext().getAttendDiagInvTreatStatus())); form.chkNoKnownInvestigations().setValue(form.getLocalContext().getAttendDiagInvTreatStatus() != null ? form.getLocalContext().getAttendDiagInvTreatStatus().getInvestigationNotRecorded() : null); form.chkNoneInvestigations().setValue(form.getLocalContext().getAttendDiagInvTreatStatus() != null ? form.getLocalContext().getAttendDiagInvTreatStatus().getNoInvestigations() : null); if(Boolean.TRUE.equals(form.getLocalContext().getAddedDuringCoding())) { EmergencyAttendanceInvestigationCodingVo investigationSequenceVo = domain.getInvestigationSequence(form.getLocalContext().getCareContext()); if (investigationSequenceVo != null && investigationSequenceVo.getInvestigationSequenceCodingItemsIsNotNull()) { form.getLocalContext().setEmergencyInvestigationSequence(investigationSequenceVo); showOrderedInvestigations(patient, careContext, investigationSequenceVo); return; } } String orderInvestigationIDSAlreadyAdded = populateInvestigationsGrid(); OrderInvestigationForAttendenceNotesCcVoCollection orderInvestigations = domain.listOrderInvestigations(patient, careContext, orderInvestigationIDSAlreadyAdded); if(createAndSaveInvestigationsAttendenceDetail(orderInvestigations)) { refresh(); } if(form.grdInvestigations().getRows().size() > 0 && (form.chkNoKnownInvestigations().getValue() || form.chkNoneInvestigations().getValue()))//workaround when OrderInvestigations are created outside Emergency module { saveAttendDiagInvTreatStatus(false, false, null, null, null, null); refresh(); return; } }
public EmergencyAttendanceInvestigationCodingVo getInvestigationSequence(EmergencyAttendanceRefVo emergencyAttendance) { return null; }