Java Code Examples for ims.emergency.vo.TrackingForClinicianWorklistAndTriageVo

The following are top voted examples for showing how to use ims.emergency.vo.TrackingForClinicianWorklistAndTriageVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDynGrid(TrackingForClinicianWorklistAndTriageVoCollection trackingPatiens)
{
	deletePatientImages();
	form.dyngrdWhiteBoard().getRows().clear();
	
	if( trackingPatiens == null || trackingPatiens.size() < 1)
		return;
	
	//trackingPatiens.sort(new TrackingComparator());
	for(int i = 0; i < trackingPatiens.size();i++)
	{
		TrackingForClinicianWorklistAndTriageVo tempVo = trackingPatiens.get(i);
		if( tempVo != null)
		{
			addRowToDyngrd(tempVo);
			
		}
		
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingForClinicianWorklistAndTriageVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initializePatientTriageLayer(PatientForTriageVo patient, EpisodeOfCareRefVo episode, CareContextRefVo careContext, ClinicalProblemRefVo problem, PatientICPRefVo icp) 
{
	form.lyrPatientTriage().tabNotes().ccMedicNotes().initialize(patient, episode, careContext, problem);
	
	//WDEV-15996
	if (ConfigFlag.UI.DISPLAY_EXTENDED_OBS_DATA_SET.getValue()==false)
	{
		form.lyrPatientTriage().tabObs().ccVitalSigns().initialize();
	}
	else
	{
		initializeObsLayerTabs();
	}
	
	TrackingForClinicianWorklistAndTriageVo trackVo = domain.getTrackingForClinicianWorklistAndTriageVo(form.getLocalContext().getSelectedWaitingPatient());  //wdev-17819
	form.lyrPatientTriage().tabPatientMeds().ccPatientMeds().initialize(patient, careContext, episode,trackVo);	//wdev-17819
	form.lyrPatientTriage().tabRelevantPMH().ccRelevantPMH().initialize(careContext, patient, episode);
	form.lyrPatientTriage().tabSysReview().ccSystemReview().initialize(careContext, episode, patient, problem);
	form.lyrPatientTriage().tabPathway().ccICP().setValue(icp);
	form.lyrPatientTriage().tabSupport().ccSupportService().initialize(careContext, episode, patient);
	form.lyrPatientTriage().tabDischargeDetails().ccDischarge().setValue(careContext, problem);
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void startClinicianAssessment(TrackingForClinicianWorklistAndTriageVo tracking)
{
	if (tracking == null)
		return;
	
	HcpLiteVo hcpUser = (HcpLiteVo) domain.getHcpLiteUser();
	
	if (hcpUser == null || !HcpDisType.MEDICAL.equals(hcpUser.getHcpType()))
	{
		//engine.open(form.getForms().Emergency.AllocatedMedicDialog);
		return;
	}
	else
	{
		// Attempt to save created AllocatedMedic to tracking
		if (saveSeenByHcp(tracking, new MedicRefVo(hcpUser.getID_Hcp(), hcpUser.getVersion_Hcp())))//WDEV-16816
		{
			// Refresh screen
			open();
		}
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onBtnStartTriageClick() throws PresentationLogicException
{
	//wdev-17286
	TrackingForClinicianWorklistAndTriageVo TrackingForClinician  = domain.getTrackingForTriage(form.getLocalContext().getSelectedWaitingPatient());
	if(TrackingForClinician != null && TrackingForClinician.getTriageDetailsIsNotNull())
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		open();
	}
	else
	{
		startTriage();
		onBtnStartTriageProblemCall();   //wdev-17230
	}
	
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	initializeTimer();//WDEV-17337
	form.btnClose().setImage(form.getImages().Emergency.CORECTNOTE16);
	if (args != null && args.length == 2 && args[0] != null && args[1] != null && args[0] instanceof Integer && args[1] instanceof TrackingForClinicianWorklistAndTriageVo )
	{
		form.ccNewTriagecc().initialization((Integer)args[0], (TrackingForClinicianWorklistAndTriageVo)args[1],null);
					
	}
	else if (args != null && args.length == 1 && args[0] != null && args[0] instanceof Integer)
	{
		
		form.ccNewTriagecc().initialization((Integer)args[0], null,null);
		
	}
	else 
	{
		
		throw new FormOpenException("Error: The Dialog is not opened properly");
		
	}
	
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initializePatientTriageLayer(PatientForTriageVo patient, EpisodeOfCareRefVo episode, CareContextRefVo careContext, PatientICPRefVo icp) 
{
	form.lyrPatientTriage().tabNotes().ccNotes().initialize(patient, episode, careContext, form.qmbPresentingProblem().getValue());
	
	//WDEV-15996
	if (ConfigFlag.UI.DISPLAY_EXTENDED_OBS_DATA_SET.getValue()==false)
	{
		form.lyrPatientTriage().tabObs().ccVitalSigns().initialize();
	}
	else
	{
		initializeObsLayerTabs();
	}
	
	TrackingForClinicianWorklistAndTriageVo trackVo = domain.getTrckinGForClonicianWorklosAndTriage(form.getLocalContext().getSelectedTriagePatient());  //wdev-17819
	form.lyrPatientTriage().tabPatientMeds().ccPatientMeds().initialize(patient, careContext, episode,trackVo);	//wdev-17819
	form.lyrPatientTriage().tabRelevantPMH().ccRelevantPMH().initialize(careContext, patient, episode);
	form.lyrPatientTriage().tabSupport().ccSupp().initialize(careContext, episode, patient);
	form.lyrPatientTriage().tabTriagePathway().ccICP().setValue(icp);
	form.lyrPatientTriage().tabDischarge().ccDischarge().setValue(careContext, form.qmbPresentingProblem().getValue());
	
	
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
public void initialize(PatientRefVo patientRef, CareContextRefVo careContextRefVo, EpisodeOfCareRefVo episodeOfCareRef, TrackingForClinicianWorklistAndTriageVo tracking)  //wdev-17819
{
	form.getLocalContext().setPatientRef(patientRef);
	form.getLocalContext().setEpisodeOfCareRef(episodeOfCareRef);
	form.getLocalContext().setCareContextRef(careContextRefVo);
	form.getLocalContext().setTrackingForClinicianWorklistAndTriage(tracking);	//wdev-17819

	form.getLocalContext().setselectedCareContext(careContextRefVo);
	try
	{
		open();
	}
	catch (PresentationLogicException e)
	{
		e.printStackTrace();
	}
}
 
Example 9
Project: AvoinApotti   File: EDAssessmentComponentImpl.java   Source Code and License 6 votes vote down vote up
public ims.emergency.vo.TrackingForClinicianWorklistAndTriageVo saveMedicStartTime(ims.emergency.vo.TrackingForClinicianWorklistAndTriageVo tracking) throws ims.domain.exceptions.StaleObjectException
{
	if(tracking == null)
		throw new CodingRuntimeException("Cannot save a null Tracking record.");
	
	if(!tracking.isValidated())
		throw new CodingRuntimeException("Tracking record is not validated.");
	
	DomainFactory factory = getDomainFactory();
	Tracking doTracking = TrackingForClinicianWorklistAndTriageVoAssembler.extractTracking(factory, tracking);
	if( doTracking != null )
	{
		doTracking.getTriageDetails().setMedicInterventionStartDateTime(tracking.getTriageDetails().getMedicInterventionStartDateTime().getJavaDate());
		factory.save(doTracking);
	}
	
	
	
	return TrackingForClinicianWorklistAndTriageVoAssembler.create(doTracking);
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initializePatientTriageLayer(PatientForTriageVo patient, EpisodeOfCareRefVo episode, CareContextRefVo careContext, ClinicalProblemRefVo problem, PatientICPRefVo icp) 
{
	form.lyrPatientTriage().tabNotes().ccMedicNotes().initialize(patient, episode, careContext, problem);
	TrackingForClinicianWorklistAndTriageVo trackVo = domain.getTrackingForClinicianWorklistAndTriageVo(form.getLocalContext().getSelectedWaitingPatient());  //wdev-17819
	//WDEV-15996
	if (ConfigFlag.UI.DISPLAY_EXTENDED_OBS_DATA_SET.getValue()==false)
	{
		form.lyrPatientTriage().tabObs().ccVitalSigns().initialize(trackVo.getTriageDetails()); //WDEV-20426
	}
	else
	{
		initializeObsLayerTabs();
	}
	
	
	form.lyrPatientTriage().tabPatientMeds().ccPatientMeds().initialize(patient, careContext, episode,trackVo);	//wdev-17819
	form.lyrPatientTriage().tabRelevantPMH().ccRelevantPMH().initialize(careContext, patient, episode);
	form.lyrPatientTriage().tabSysReview().ccSystemReview().initialize(careContext, episode, patient, problem);
	form.lyrPatientTriage().tabPathway().ccICP().setValue(icp);
	form.lyrPatientTriage().tabSupport().ccSupportService().initialize(careContext, episode, patient);
	form.lyrPatientTriage().tabDischargeDetails().ccDischarge().setValue(careContext, problem);
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onBtnStartTriageClick() throws PresentationLogicException
{
	//wdev-17286
	TrackingForClinicianWorklistAndTriageVo TrackingForClinician  = domain.getTrackingForTriage(form.getLocalContext().getSelectedWaitingPatient());
	if(TrackingForClinician != null && TrackingForClinician.getTriageDetailsIsNotNull())
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		open();
	}
	else
	{
		startTriage();
		onBtnStartTriageProblemCall();   //wdev-17230
	}
	
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initializePatientTriageLayer(PatientForTriageVo patient, EpisodeOfCareRefVo episode, CareContextRefVo careContext, PatientICPRefVo icp) 
{
	form.lyrPatientTriage().tabNotes().ccNotes().initialize(patient, episode, careContext, form.qmbPresentingProblem().getValue());
	
	TrackingForClinicianWorklistAndTriageVo trackVo = domain.getTrckinGForClonicianWorklosAndTriage(form.getLocalContext().getSelectedTriagePatient());  //wdev-17819
	
	//WDEV-15996
	if (ConfigFlag.UI.DISPLAY_EXTENDED_OBS_DATA_SET.getValue()==false)
	{
		form.lyrPatientTriage().tabObs().ccVitalSigns().initialize(trackVo.getTriageDetails()); //WDEV-20426
	}
	else
	{
		initializeObsLayerTabs();
	}
	
	
	form.lyrPatientTriage().tabPatientMeds().ccPatientMeds().initialize(patient, careContext, episode,trackVo);	//wdev-17819
	form.lyrPatientTriage().tabRelevantPMH().ccRelevantPMH().initialize(careContext, patient, episode);
	form.lyrPatientTriage().tabSupport().ccSupp().initialize(careContext, episode, patient);
	form.lyrPatientTriage().tabTriagePathway().ccICP().setValue(icp);
	form.lyrPatientTriage().tabDischarge().ccDischarge().setValue(careContext, form.qmbPresentingProblem().getValue());
	
	
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
public void initialize(PatientRefVo patientRef, CareContextRefVo careContextRefVo, EpisodeOfCareRefVo episodeOfCareRef, TrackingForClinicianWorklistAndTriageVo tracking)  //wdev-17819
{
	form.getLocalContext().setPatientRef(patientRef);
	form.getLocalContext().setEpisodeOfCareRef(episodeOfCareRef);
	form.getLocalContext().setCareContextRef(careContextRefVo);
	form.getLocalContext().setTrackingForClinicianWorklistAndTriage(tracking);	//wdev-17819

	form.getLocalContext().setselectedCareContext(careContextRefVo);
	try
	{
		open();
	}
	catch (PresentationLogicException e)
	{
		e.printStackTrace();
	}
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDynGrid(TrackingForClinicianWorklistAndTriageVoCollection trackingPatiens)
{
	deletePatientImages();
	form.dyngrdWhiteBoard().getRows().clear();
	
	if( trackingPatiens == null || trackingPatiens.size() < 1)
		return;
	
	//trackingPatiens.sort(new TrackingComparator());
	for(int i = 0; i < trackingPatiens.size();i++)
	{
		TrackingForClinicianWorklistAndTriageVo tempVo = trackingPatiens.get(i);
		if( tempVo != null)
		{
			addRowToDyngrd(tempVo);
			
		}
		
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingForClinicianWorklistAndTriageVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initializePatientTriageLayer(PatientForTriageVo patient, EpisodeOfCareRefVo episode, CareContextRefVo careContext, PatientICPRefVo icp) 
{
	form.lyrPatientTriage().tabNotes().ccNotes().initialize(patient, episode, careContext, form.qmbPresentingProblem().getValue());
	
	//WDEV-15996
	if (ConfigFlag.UI.DISPLAY_EXTENDED_OBS_DATA_SET.getValue()==false)
	{
		form.lyrPatientTriage().tabObs().ccVitalSigns().initialize();
	}
	else
	{
		initializeObsLayerTabs();
	}
	
	TrackingForClinicianWorklistAndTriageVo trackVo = domain.getTrckinGForClonicianWorklosAndTriage(form.getLocalContext().getSelectedTriagePatient());  //wdev-17819
	form.lyrPatientTriage().tabPatientMeds().ccPatientMeds().initialize(patient, careContext, episode,trackVo);	//wdev-17819
	form.lyrPatientTriage().tabRelevantPMH().ccRelevantPMH().initialize(careContext, patient, episode);
	form.lyrPatientTriage().tabSupport().ccSupp().initialize(careContext, episode, patient);
	form.lyrPatientTriage().tabTriagePathway().ccICP().setValue(icp);
	form.lyrPatientTriage().tabDischarge().ccDischarge().setValue(careContext, form.qmbPresentingProblem().getValue());
	
	
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initializePatientTriageLayer(PatientForTriageVo patient, EpisodeOfCareRefVo episode, CareContextRefVo careContext, ClinicalProblemRefVo problem, PatientICPRefVo icp) 
{
	form.lyrPatientTriage().tabNotes().ccMedicNotes().initialize(patient, episode, careContext, problem);
	
	//WDEV-15996
	if (ConfigFlag.UI.DISPLAY_EXTENDED_OBS_DATA_SET.getValue()==false)
	{
		form.lyrPatientTriage().tabObs().ccVitalSigns().initialize();
	}
	else
	{
		initializeObsLayerTabs();
	}
	
	TrackingForClinicianWorklistAndTriageVo trackVo = domain.getTrackingForClinicianWorklistAndTriageVo(form.getLocalContext().getSelectedWaitingPatient());  //wdev-17819
	form.lyrPatientTriage().tabPatientMeds().ccPatientMeds().initialize(patient, careContext, episode,trackVo);	//wdev-17819
	form.lyrPatientTriage().tabRelevantPMH().ccRelevantPMH().initialize(careContext, patient, episode);
	form.lyrPatientTriage().tabSysReview().ccSystemReview().initialize(careContext, episode, patient, problem);
	form.lyrPatientTriage().tabPathway().ccICP().setValue(icp);
	form.lyrPatientTriage().tabSupport().ccSupportService().initialize(careContext, episode, patient);
	form.lyrPatientTriage().tabDischargeDetails().ccDischarge().setValue(careContext, problem);
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void startClinicianAssessment(TrackingForClinicianWorklistAndTriageVo tracking)
{
	if (tracking == null)
		return;
	
	HcpLiteVo hcpUser = (HcpLiteVo) domain.getHcpLiteUser();
	
	if (hcpUser == null || !HcpDisType.MEDICAL.equals(hcpUser.getHcpType()))
	{
		//engine.open(form.getForms().Emergency.AllocatedMedicDialog);
		return;
	}
	else
	{
		// Attempt to save created AllocatedMedic to tracking
		if (saveSeenByHcp(tracking, new MedicRefVo(hcpUser.getID_Hcp(), hcpUser.getVersion_Hcp())))//WDEV-16816
		{
			// Refresh screen
			open();
		}
	}
}
 
Example 19
Project: openmaxims-linux   File: EDAssessmentComponentImpl.java   Source Code and License 6 votes vote down vote up
public ims.emergency.vo.TrackingForClinicianWorklistAndTriageVo saveMedicStartTime(ims.emergency.vo.TrackingForClinicianWorklistAndTriageVo tracking) throws ims.domain.exceptions.StaleObjectException
{
	if(tracking == null)
		throw new CodingRuntimeException("Cannot save a null Tracking record.");
	
	if(!tracking.isValidated())
		throw new CodingRuntimeException("Tracking record is not validated.");
	
	DomainFactory factory = getDomainFactory();
	Tracking doTracking = TrackingForClinicianWorklistAndTriageVoAssembler.extractTracking(factory, tracking);
	if( doTracking != null )
	{
		doTracking.getTriageDetails().setMedicInterventionStartDateTime(tracking.getTriageDetails().getMedicInterventionStartDateTime().getJavaDate());
		factory.save(doTracking);
	}
	
	
	
	return TrackingForClinicianWorklistAndTriageVoAssembler.create(doTracking);
}
 
Example 20
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	initializeTimer();//WDEV-17337
	form.btnClose().setImage(form.getImages().Emergency.CORECTNOTE16);
	if (args != null && args.length == 2 && args[0] != null && args[1] != null && args[0] instanceof Integer && args[1] instanceof TrackingForClinicianWorklistAndTriageVo )
	{
		form.ccNewTriagecc().initialization((Integer)args[0], (TrackingForClinicianWorklistAndTriageVo)args[1],null);
					
	}
	else if (args != null && args.length == 1 && args[0] != null && args[0] instanceof Integer)
	{
		
		form.ccNewTriagecc().initialization((Integer)args[0], null,null);
		
	}
	else 
	{
		
		throw new FormOpenException("Error: The Dialog is not opened properly");
		
	}
	
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initializePatientTriageLayer(PatientForTriageVo patient, EpisodeOfCareRefVo episode, CareContextRefVo careContext, PatientICPRefVo icp) 
{
	form.lyrPatientTriage().tabNotes().ccNotes().initialize(patient, episode, careContext, form.qmbPresentingProblem().getValue());
	
	//WDEV-15996
	if (ConfigFlag.UI.DISPLAY_EXTENDED_OBS_DATA_SET.getValue()==false)
	{
		form.lyrPatientTriage().tabObs().ccVitalSigns().initialize();
	}
	else
	{
		initializeObsLayerTabs();
	}
	
	TrackingForClinicianWorklistAndTriageVo trackVo = domain.getTrckinGForClonicianWorklosAndTriage(form.getLocalContext().getSelectedTriagePatient());  //wdev-17819
	form.lyrPatientTriage().tabPatientMeds().ccPatientMeds().initialize(patient, careContext, episode,trackVo);	//wdev-17819
	form.lyrPatientTriage().tabRelevantPMH().ccRelevantPMH().initialize(careContext, patient, episode);
	form.lyrPatientTriage().tabSupport().ccSupp().initialize(careContext, episode, patient);
	form.lyrPatientTriage().tabTriagePathway().ccICP().setValue(icp);
	form.lyrPatientTriage().tabDischarge().ccDischarge().setValue(careContext, form.qmbPresentingProblem().getValue());
	
	
}
 
Example 22
Project: openMAXIMS   File: EDAssessmentComponentImpl.java   Source Code and License 6 votes vote down vote up
public ims.emergency.vo.TrackingForClinicianWorklistAndTriageVo saveMedicStartTime(ims.emergency.vo.TrackingForClinicianWorklistAndTriageVo tracking) throws ims.domain.exceptions.StaleObjectException
{
	if(tracking == null)
		throw new CodingRuntimeException("Cannot save a null Tracking record.");
	
	if(!tracking.isValidated())
		throw new CodingRuntimeException("Tracking record is not validated.");
	
	DomainFactory factory = getDomainFactory();
	Tracking doTracking = TrackingForClinicianWorklistAndTriageVoAssembler.extractTracking(factory, tracking);
	if( doTracking != null )
	{
		doTracking.getTriageDetails().setMedicInterventionStartDateTime(tracking.getTriageDetails().getMedicInterventionStartDateTime().getJavaDate());
		factory.save(doTracking);
	}
	
	
	
	return TrackingForClinicianWorklistAndTriageVoAssembler.create(doTracking);
}
 
Example 23
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	initializeTimer();//WDEV-17337
	form.btnClose().setImage(form.getImages().Emergency.CORECTNOTE16);
	if (args != null && args.length == 2 && args[0] != null && args[1] != null && args[0] instanceof Integer && args[1] instanceof TrackingForClinicianWorklistAndTriageVo )
	{
		form.ccNewTriagecc().initialization((Integer)args[0], (TrackingForClinicianWorklistAndTriageVo)args[1],null);
					
	}
	else if (args != null && args.length == 1 && args[0] != null && args[0] instanceof Integer)
	{
		
		form.ccNewTriagecc().initialization((Integer)args[0], null,null);
		
	}
	else 
	{
		
		throw new FormOpenException("Error: The Dialog is not opened properly");
		
	}
	
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onBtnStartTriageClick() throws PresentationLogicException
{
	//wdev-17286
	TrackingForClinicianWorklistAndTriageVo TrackingForClinician  = domain.getTrackingForTriage(form.getLocalContext().getSelectedWaitingPatient());
	if(TrackingForClinician != null && TrackingForClinician.getTriageDetailsIsNotNull())
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		open();
	}
	else
	{
		startTriage();
		onBtnStartTriageProblemCall();   //wdev-17230
	}
	
}
 
Example 25
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDynGrid(TrackingForClinicianWorklistAndTriageVoCollection trackingPatiens)
{
	deletePatientImages();
	form.dyngrdWhiteBoard().getRows().clear();
	
	if( trackingPatiens == null || trackingPatiens.size() < 1)
		return;
	
	//trackingPatiens.sort(new TrackingComparator());
	for(int i = 0; i < trackingPatiens.size();i++)
	{
		TrackingForClinicianWorklistAndTriageVo tempVo = trackingPatiens.get(i);
		if( tempVo != null)
		{
			addRowToDyngrd(tempVo);
			
		}
		
	}
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private AppImageVo getPatientImage(TrackingForClinicianWorklistAndTriageVo tracking) throws IOException
{
	if (tracking == null || tracking.getPatient() == null)
		return null;
	
	String sessionID = engine.getSessionId();
	
	AppDBImageVo dbImageVo =  tracking.getPatient().getPhoto();
	
	//Existing Patient with no image
	if (dbImageVo == null)
	{
		// NoPatientImage	
		AppImageVo imageVo = new AppImageVo();
		imageVo.setImagePath(form.getImages().Core.NoPatientImage.getImagePath());
		
		return imageVo;
	}
	
	String encodedImage = dbImageVo.getImageData();
	String type = dbImageVo.getImageType().getText();	  		  		  	
 	
	return decodeFromBase64(encodedImage, sessionID, type);
}
 
Example 27
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initializePatientTriageLayer(PatientForTriageVo patient, EpisodeOfCareRefVo episode, CareContextRefVo careContext, ClinicalProblemRefVo problem, PatientICPRefVo icp) 
{
	form.lyrPatientTriage().tabNotes().ccMedicNotes().initialize(patient, episode, careContext, problem);
	
	//WDEV-15996
	if (ConfigFlag.UI.DISPLAY_EXTENDED_OBS_DATA_SET.getValue()==false)
	{
		form.lyrPatientTriage().tabObs().ccVitalSigns().initialize();
	}
	else
	{
		initializeObsLayerTabs();
	}
	
	TrackingForClinicianWorklistAndTriageVo trackVo = domain.getTrackingForClinicianWorklistAndTriageVo(form.getLocalContext().getSelectedWaitingPatient());  //wdev-17819
	form.lyrPatientTriage().tabPatientMeds().ccPatientMeds().initialize(patient, careContext, episode,trackVo);	//wdev-17819
	form.lyrPatientTriage().tabRelevantPMH().ccRelevantPMH().initialize(careContext, patient, episode);
	form.lyrPatientTriage().tabSysReview().ccSystemReview().initialize(careContext, episode, patient, problem);
	form.lyrPatientTriage().tabPathway().ccICP().setValue(icp);
	form.lyrPatientTriage().tabSupport().ccSupportService().initialize(careContext, episode, patient);
	form.lyrPatientTriage().tabDischargeDetails().ccDischarge().setValue(careContext, problem);
}
 
Example 28
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void startClinicianAssessment(TrackingForClinicianWorklistAndTriageVo tracking)
{
	if (tracking == null)
		return;
	
	HcpLiteVo hcpUser = (HcpLiteVo) domain.getHcpLiteUser();
	
	if (hcpUser == null || !HcpDisType.MEDICAL.equals(hcpUser.getHcpType()))
	{
		//engine.open(form.getForms().Emergency.AllocatedMedicDialog);
		return;
	}
	else
	{
		// Attempt to save created AllocatedMedic to tracking
		if (saveSeenByHcp(tracking, new MedicRefVo(hcpUser.getID_Hcp(), hcpUser.getVersion_Hcp())))//WDEV-16816
		{
			// Refresh screen
			open();
		}
	}
}
 
Example 29
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private Image getImageForUrgency(TrackingForClinicianWorklistAndTriageVo tracking) 
{
	if(tracking == null || tracking.getAttendance() == null || tracking.getAttendance().getUrgencyLevel() == null)
		return  null;
	
	Image urgency = null;
	
	urgency = tracking.getAttendance().getUrgencyLevel().getImage();
	
	return urgency;
}
 
Example 30
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onDyngrdWhiteBoardCellButtonClicked(DynamicGridCell cell)
{
	System.out.println("Cell Button Clicked");
	form.dyngrdWhiteBoard().setValue(cell.getRow().getValue());
	setGlobalContexts((TrackingForClinicianWorklistAndTriageVo)form.dyngrdWhiteBoard().getValue());
	engine.open(form.getForms().Emergency.AttendanceClinicalNoteDialog, new Object[] {AttendanceClinicalNoteType.NURSE, null,null});
}
 
Example 31
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onDyngrdWhiteBoardRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
	System.out.println("Row Selection");
	setGlobalContexts((TrackingForClinicianWorklistAndTriageVo)form.dyngrdWhiteBoard().getValue());
	engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog, new Object[] {form.cmbArea().getValue(),form.cmbStatus().getValue()});
}
 
Example 32
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void openEDAssessmentDialog()
{
	TrackingForClinicianWorklistAndTriageVo tempVo = (TrackingForClinicianWorklistAndTriageVo)form.dyngrdWhiteBoard().getValue();

	if( tempVo != null )
	{
		if( tempVo.getTriageDetailsIsNotNull() )
			engine.open(form.getForms().Emergency.EDAssessmentDialog, new Object[] {DISPLAY_CLINICIANASSESSMNRWORKLIST,tempVo},"Clinician Assessment Worklist");
		else
			engine.open(form.getForms().Emergency.EDAssessmentDialog, new Object[] {DISPLAY_TRIAGE_FROM_TRACKING,tempVo},"Triage");
			
	}
}
 
Example 33
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onDyngrdWhiteBoardCellValueChanged(DynamicGridCell cell)
{
	System.out.println("Cell value changed");
	form.dyngrdWhiteBoard().setValue(cell.getRow().getValue());
	setGlobalContexts((TrackingForClinicianWorklistAndTriageVo)form.dyngrdWhiteBoard().getValue());
	
	if (getColumn(COLUMN_OBS_REQUIRED).equals(cell.getColumn()))
	{
		engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog, new Object[] {ims.emergency.vo.enums.EDWhiteBoardEvent.OBS_REQ_COL_VALUE_CHANGED,cell.getValue()});
	}
	else if (getColumn(COLUMN_MEDS_GIVEN).equals(cell.getColumn()))
	{
		engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog, new Object[] {ims.emergency.vo.enums.EDWhiteBoardEvent.MEDS_GIVEN_COL_VALUE_CHANGED,cell.getValue()});
	}
	else if (getColumn(COLUMN_ECG).equals(cell.getColumn()))
	{
		engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog, new Object[] {ims.emergency.vo.enums.EDWhiteBoardEvent.ECG_COL_VALUE_CHANGED,cell.getValue()});
	}
	else if (getColumn(COLUMN_NPO).equals(cell.getColumn()))
	{
		engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog, new Object[] {ims.emergency.vo.enums.EDWhiteBoardEvent.NPO_COL_VALUE_CHANGED,cell.getValue()});
	}
	else if (getColumn(COLUMN_ISOLATION).equals(cell.getColumn()))
	{
		engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog, new Object[] {ims.emergency.vo.enums.EDWhiteBoardEvent.ISOLATION_COL_VALUE_CHANGED,cell.getValue()});
	}
	else if (getColumn(COLUMN_COMMENT).equals(cell.getColumn()))
	{
		engine.open(form.getForms().Emergency.EDWhiteBoardDialog, new Object[] {AttendanceClinicalNoteType.NURSE, null,null});
	}
}
 
Example 34
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setGlobalContexts(TrackingForClinicianWorklistAndTriageVo tracking)
{
	if (tracking==null)
		return;
	
	form.getGlobalContext().Core.setPatientShort(domain.getPatientShort(tracking.getPatient()));
	form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContextShort(tracking.getAttendance().getCareContext()));
	form.getGlobalContext().Emergency.setTracking(tracking);
	
	updateControlsState();
	
}
 
Example 35
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onBtnAssessmentDetailsClick() throws PresentationLogicException
{
	TrackingForClinicianWorklistAndTriageVo tempVo = domain.getTrackingForClinicianWorklistAndTriageVo(form.grdResults().getValue());
	
	if (tempVo != null && tempVo.getTriageDetails() != null)
	{
		engine.open(form.getForms().Emergency.EDAssessmentDialog, new Object[] {DISPLAY_CLINICIANASSESSMNRWORKLIST,tempVo},"Clinician Assessment Worklist");
	}
	else
	{
		engine.open(form.getForms().Emergency.EDAssessmentDialog, new Object[] {DISPLAY_TRIAGE_FROM_TRACKING,tempVo},"Triage");	//wdev-17436
	}
}
 
Example 36
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean saveSeenByHcp(TrackingForClinicianWorklistAndTriageVo tracking, MedicRefVo medic)
{
	try
	{
		// Create the SeenByHcp record to be associated with tracking
		SeenByHCPVo seenByHcp = new SeenByHCPVo();
		seenByHcp.setPatient(tracking.getPatient());
		seenByHcp.setEpisode(tracking.getEpisode().getEpisodeOfCare());
		seenByHcp.setAttendance(tracking.getAttendance().getCareContext());
		seenByHcp.setTrackingArea(tracking.getCurrentArea());

		seenByHcp.setAllocatedDateTime(new DateTime());			
		seenByHcp.setAllocatedMedic((MedicVo)domain.getHcpUser());		
		seenByHcp.setSeenDateTime(new DateTime());
		
		// Validate SeenByHcp record
		String[] errors = seenByHcp.validate();

		if (errors != null && errors.length > 0)
		{
			engine.showErrors(errors);
			return false;
		}

		form.getLocalContext().setSelectedWaitingPatient(domain.saveTrackingSeenByHcp(tracking, seenByHcp));

		return true;
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		open();
		return false;
	}
}
 
Example 37
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void saveTrackingWithWaitingToBeSeenStatus() 
{
	if(form.getLocalContext().getSelectedWaitingPatient() == null)
		return;
	
	form.getLocalContext().setSelectedWaitingPatient(domain.getTrackingForTriage(form.getLocalContext().getSelectedWaitingPatient()));
	TrackingForClinicianWorklistAndTriageVo tracking = populateTrackingWithWaitingToBeSeenStatus((TrackingForClinicianWorklistAndTriageVo) form.getLocalContext().getSelectedWaitingPatient().clone());
	
	if(tracking == null)
		return;
	
	String[] errors = tracking.validate();
	if(errors != null && errors.length > 0)
	{
		engine.showErrors(errors);
		return;
	}
	
	try 
	{	
		TrackingForClinicianWorklistAndTriageVo tempTracking = (TrackingForClinicianWorklistAndTriageVo) form.getLocalContext().getSelectedWaitingPatient().clone();//WDEV-17428
		
		form.getLocalContext().setSelectedWaitingPatient(domain.saveTracking(tracking,null,null));	//wdev-15930,wdev-17825
		
		//WDEV-17428
		if (tempTracking.getTriageDetailsIsNotNull() && tempTracking.getTriageDetails().getTriageCompletionTime()==null && tracking.getTriageDetails().getTriageCompletionTime()!=null) //wdev-17937
		{
			form.getLocalContext().setFinishedTriage(true);
		}
	} 
	catch (StaleObjectException e) 
	{
		e.printStackTrace();
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}
}
 
Example 38
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private TrackingForClinicianWorklistAndTriageVo populateTrackingWithWaitingToBeSeenStatus(TrackingForClinicianWorklistAndTriageVo tracking) 
{
	if(tracking == null)
		return null;
	
	if( tracking.getTriageDetailsIsNotNull())  //wdev-17937
		tracking.setCurrentStatus(createTrackingStatus(TrackingStatus.WAITING_TO_BE_SEEN_BY_A_MEDIC));
	//wdev-16751
	if( tracking.getTriageDetailsIsNotNull() && !tracking.getTriageDetails().getTriageCompletionTimeIsNotNull() )
		tracking.getTriageDetails().setTriageCompletionTime(new DateTime());
	//--------
	
	return tracking;
}
 
Example 39
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean saveTracking( PatientMedsVo patmedVo) 
{
	if(form.getLocalContext().getSelectedWaitingPatient() == null)
		return false;
	
	TrackingForClinicianWorklistAndTriageVo tracking = populateTrackingWithTriage((TrackingForClinicianWorklistAndTriageVo) form.getLocalContext().getSelectedWaitingPatient().clone());
	
	if(tracking == null)
		return false;
	
	//wdev-15930
	SeenByHCPVo allocNurseVo = populateAllocatedNurse();	//wdev-15930 //WDEV-16816
	form.getLocalContext().setAllocatedNurse(allocNurseVo) ;//WDEV-16816
			
	String[] errors = tracking.validate();	
	if(errors != null && errors.length > 0)
	{
		engine.showErrors(errors);
		return false;
	}
	
	try 
	{
		form.getLocalContext().setSelectedWaitingPatient(domain.saveTracking(tracking,form.getLocalContext().getAllocatedNurse(),patmedVo)); //wdev-15930 //WDEV-16816,wdev-17825
	} 
	catch (StaleObjectException e) 
	{
		e.printStackTrace();
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		//open();
	}
	
	return true;
}
 
Example 40
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private TrackingForClinicianWorklistAndTriageVo populateTrackingWithTriage(TrackingForClinicianWorklistAndTriageVo tracking) 
{
	if(tracking == null)
		return null;
	
	if(tracking.getTriageDetails() == null)
	{
		tracking.setTriageDetails(createNewTriage(tracking.getCurrentArea()));
	}
	
	return tracking;
}