Java Code Examples for ims.core.vo.MemberOfStaffLiteVo

The following are top voted examples for showing how to use ims.core.vo.MemberOfStaffLiteVo. 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 newInstance()
{
	clearFields();
			
	form.setMode(FormMode.EDIT);
	form.btnInactivate().setEnabled(false);
	form.btnUpdate().setEnabled(false);
	form.ctnDetails().customControlCodingItem().setClinicalTermMandatory(true);
	form.ctnDetails().customControlCodingItem().setDescriptionMandatory(true);
	
	PatientMedicationVo voMed = new PatientMedicationVo();
	form.getLocalContext().setRecord(voMed);

	form.ctnDetails().setCollapsed(false);
	
	form.ctnDetails().setcustomControlAuthorEnabled(true);
	setAuthoringInfo();
	
	Object mos = domain.getMosUser();
	if(mos != null){
		form.ctnDetails().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
		form.ctnDetails().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
	}
	form.ctnDetails().dtimRecordingDateTime().setValue(new DateTime());
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private MedicLiteVoCollection listConsultantsByName(String medicName) throws CodingRuntimeException
{
	// Leave throws so that consultants are not cleared when an invalid search is made
	if (medicName == null || medicName.trim().length() < 3)
		throw new CodingRuntimeException("Consultant name search must be at least 3 characters long");
	
	
	// Build filtering VO
	MedicLiteVo filterVo = new MedicLiteVo();
	filterVo.setMos(new MemberOfStaffLiteVo());
	filterVo.getMos().setName(new PersonName());
	filterVo.getName().setSurname(medicName);
	filterVo.getName().setForename(medicName);
	
	// Retrieve the medics (list from domain)
	try
	{
		return domain.listConsultants(filterVo);
	}
	catch (DomainInterfaceException exception)
	{
		throw new CodingRuntimeException(exception.getMessage());
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void fillDocumentWorklistSearchCriteria() 
{
	DocumentWorklistSearchCriteriaVo criteria = new DocumentWorklistSearchCriteriaVo();
	
	criteria.setLocation(form.lyrLetterCreate().tabClinicList().cmbLocation().getValue());
	criteria.setClinic(form.lyrLetterCreate().tabClinicList().qmbClinic().getValue());
	criteria.setAuthor(form.lyrLetterCreate().tabTemplate().ccAuth().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.lyrLetterCreate().tabTemplate().ccAuth().getValue() : null);
	criteria.setResponsible(form.lyrLetterCreate().tabTemplate().ccResponsible().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.lyrLetterCreate().tabTemplate().ccResponsible().getValue() : null);
	criteria.setTypist(form.lyrLetterCreate().tabTemplate().ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.lyrLetterCreate().tabTemplate().ccTypist().getValue() : null);
	criteria.setSpecialty(form.lyrLetterCreate().tabTemplate().cmbSpecialty().getValue());
	//criteria.setDateFrom(form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() != null ? form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() : form.lyrLetterCreate().tabClinicList().dteClinicDate().getValue());		WDEV-12721
	//criteria.setDateTo(form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() != null ? form.lyrLetterCreate().tabTemplate().dteDocDate().getValue() : form.lyrLetterCreate().tabClinicList().dteClinicDate().getValue());			WDEV-12721
	criteria.setDateFrom(form.getLocalContext().getMinDate());	//WDEV-12721
	criteria.setDateTo(form.getLocalContext().getMaxDate());	//WDEV-12721
	
	form.getGlobalContext().Core.setDocumentWorklistSearchCriteria(criteria);
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onBtnNewClick() throws PresentationLogicException
{
	clearScreen();
	form.customControlAuthoringInfo().initializeComponent();

	form.getLocalContext().setSelectedUrinalysis(null);
	form.chkNoSample().setValue(false);

	form.setcustomControlAuthoringInfoEnabled(true);
	Object mos = domain.getMosUser();
	if (mos != null)
	{
		form.cmbRecordingHCP().newRow((MemberOfStaffLiteVo) mos, mos.toString());
		form.cmbRecordingHCP().setValue((MemberOfStaffLiteVo) mos);
	}
	form.dtimRecordingDateTime().setValue(new DateTime());
	form.setMode(FormMode.EDIT);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setRecordActive() 
{
	SupportNetworkFamily voFamily = form.getLocalContext().getSelectedRecord();
	
	voFamily.setInactivatingUser(null);	//WDEV-12384
	voFamily.setInactivatingDateTime(null);	//WDEV-12384
	
	if(voFamily.getIsCurrentlyActiveFamilySupportIsNotNull() && voFamily.getIsCurrentlyActiveFamilySupport().equals(Boolean.TRUE)) //if its true,goes to false (inactivate)
	{
		voFamily.setIsCurrentlyActiveFamilySupport(Boolean.FALSE);	//if its false already,goes to true (reactivate)
		
		Object mos = domain.getMosUser();
		if(mos instanceof MemberOfStaffShortVo)
		{
			voFamily.setInactivatingUser((MemberOfStaffLiteVo) mos);	//WDEV-12384
		}
		
		voFamily.setInactivatingDateTime(new DateTime());	//WDEV-12384
	}
	else if(voFamily.getIsCurrentlyActiveFamilySupportIsNotNull() && voFamily.getIsCurrentlyActiveFamilySupport().equals(Boolean.FALSE)) //if its true,goes to false (inactivate)
		voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);
	else if(voFamily.getIsCurrentlyActiveFamilySupport() == null)
		voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);
	
	form.getLocalContext().setSelectedRecord(voFamily);	
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkNoKnownAllergiesValueChanged() throws PresentationLogicException 
{
	if(form.ctnDetails().chkNoKnownAlerts().getValue())
	{
		clearCurScreen();
		form.ctnDetails().setCollapsed(false);
		enableDetailsControls(false);
		form.ctnDetails().customControlAuthoringInfo().initializeComponent();
		//WDEV-12901 
		Object mos = domain.getMosUser();
		if(mos != null){
			form.ctnDetails().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, ((MemberOfStaffLiteVo)mos).getIMosName());
			form.ctnDetails().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
		}
		form.ctnDetails().dtimRecordingDateTime().setValue(new DateTime());
	}		
	else
	{
		enableDetailsControls(true);
	}
	
}
 
Example 7
Project: AvoinApotti   File: BedInfoDialogImpl.java   Source Code and License 6 votes vote down vote up
private PathwayRTTStatus createNewStausBasedOnThePreviousStatus(PathwayRTTStatus doPreviousCurrentPathwayRttStatus)
{
	if(doPreviousCurrentPathwayRttStatus != null)
	{
   		PathwayRTTStatus rttStatusDO = new PathwayRTTStatus();
   		
   		rttStatusDO.setRTTStatus(doPreviousCurrentPathwayRttStatus.getRTTStatus());
   		
   		Object mos = getMosUser();
   		MemberOfStaff doMos = null;
   		
   		if(mos instanceof MemberOfStaffLiteVo)
   		{
   			doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
   		}
   		
   		rttStatusDO.setStatusBy(doMos);
   		rttStatusDO.setStatusDateTime(new java.util.Date());
   		rttStatusDO.setSetting("I");
   		
   		return rttStatusDO;
	}
	return null;
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceToSave()
{
	TrackingAttendanceStatusVo trackingAttendance = new TrackingAttendanceStatusVo();

	trackingAttendance.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttendance.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttendance.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttendance.setTrackingArea(form.getLocalContext().getTrackingForReferral().getCurrentArea());
	trackingAttendance.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttendance.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttendance.setStatus(ims.emergency.vo.lookups.TrackingStatus.REFERRED_TO_OTHER_SPECIALITY);
	//WDEV-16777
	trackingAttendance.setPrevStatus((form.getLocalContext().getTrackingForReferral()!=null && form.getLocalContext().getTrackingForReferral().getCurrentStatus()!=null  ) ? form.getLocalContext().getTrackingForReferral().getCurrentStatus().getStatus() : null);

	return trackingAttendance;
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	EmergencyAttendanceForPendingArrivalsVo tempRecord = form.getLocalContext().getselectedRecord();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(tempRecord.getEpisode().getEpisodeOfCare());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getGlobalContext().Emergency.getTrackingAreaForSendToAreaVo());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus(null); //WDEV-16777

	return trackingAttStatus;
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private SupportNetworkFamily setRecordActive() 
{
	SupportNetworkFamily voFamily = form.getLocalContext().getSelectedFamilyRecord();
	
	voFamily.setInactivatingUser(null);	
	voFamily.setInactivatingDateTime(null);
	
	if(voFamily.getIsCurrentlyActiveFamilySupportIsNotNull() && voFamily.getIsCurrentlyActiveFamilySupport().equals(Boolean.TRUE)) //if its true,goes to false (inactivate)
	{
		voFamily.setIsCurrentlyActiveFamilySupport(Boolean.FALSE);	//if its false already,goes to true (reactivate)
		
		Object mos = domain.getMosUser();
		if(mos instanceof MemberOfStaffShortVo)
		{
			voFamily.setInactivatingUser((MemberOfStaffLiteVo) mos);
		}
		
		voFamily.setInactivatingDateTime(new DateTime());	
	}
	else if(voFamily.getIsCurrentlyActiveFamilySupportIsNotNull() && voFamily.getIsCurrentlyActiveFamilySupport().equals(Boolean.FALSE)) //if its true,goes to false (inactivate)
		voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);
	else if(voFamily.getIsCurrentlyActiveFamilySupport() == null)
		voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE);
	
	return voFamily;
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getcurrentTracking().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getcurrentTracking()!=null && form.getLocalContext().getcurrentTracking().getCurrentStatus()!=null  ) ? form.getLocalContext().getcurrentTracking().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getcurrentTracking().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	//WDEV-16777
	trackingAttStatus.setPrevStatus((form.getLocalContext().getcurrentTracking()!=null && form.getLocalContext().getcurrentTracking().getCurrentStatus()!=null  ) ? form.getLocalContext().getcurrentTracking().getCurrentStatus().getStatus() : null);

	return trackingAttStatus;
}
 
Example 13
Project: AvoinApotti   File: ClinicListImpl.java   Source Code and License 6 votes vote down vote up
private PathwayRTTStatus createPatientRTTStatus(int nationalCode) //WDEV-18325
{
	PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();
	
	RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);
	
	rttSTatusDO.setRTTStatus(rttStatusPoint);
	
	Object mos = getMosUser();
	MemberOfStaff doMos = null;
	
	if(mos instanceof MemberOfStaffLiteVo)
	{
		doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
	}
	
	rttSTatusDO.setStatusBy(doMos);
	rttSTatusDO.setStatusDateTime(new java.util.Date());
	
	rttSTatusDO.setSetting("O");
	
	return rttSTatusDO;
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private TrackingAttendanceStatusVo populateTrackingAttendanceStatus(TrackingStatus status)
{
	TrackingAttendanceStatusVo trackingAttStatus = new TrackingAttendanceStatusVo();

	trackingAttStatus.setPatient(form.getGlobalContext().Core.getPatientShort());
	trackingAttStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
	trackingAttStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
	trackingAttStatus.setTrackingArea(form.getLocalContext().getTrackingForReferral().getCurrentArea());

	trackingAttStatus.setStatusDatetime(new DateTime());

	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		trackingAttStatus.setCreatedBy((MemberOfStaffLiteVo) mos);
	}

	trackingAttStatus.setStatus(status);
	trackingAttStatus.setPrevStatus((form.getLocalContext().getTrackingForReferral()!=null && form.getLocalContext().getTrackingForReferral().getCurrentStatus()!=null  ) ? form.getLocalContext().getTrackingForReferral().getCurrentStatus().getStatus() : null);
	
	return trackingAttStatus;
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void doRemoveStageFromScope()
{
	try
	{
		MemberOfStaffLiteVo mos = form.getLocalContext().getLoggedInUserIsNotNull() ? form.getLocalContext().getLoggedInUser().getMos() : null;
		domain.removeStageFromScope(form.getLocalContext().getICP(), (PatientICPStageRefVo) form.dyngrdICP().getValue(), mos);
		
		refresh();
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		e.printStackTrace();
		refresh();
	}
}
 
Example 16
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void doRemovePhaseFromScope()
{
	try
	{
		MemberOfStaffLiteVo mos = form.getLocalContext().getLoggedInUserIsNotNull() ? form.getLocalContext().getLoggedInUser().getMos() : null;
		domain.removePhaseFromScope(form.getLocalContext().getICP(), (PatientICPPhaseRefVo) form.dyngrdICP().getValue(), mos);
		
		refresh();
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		e.printStackTrace();
		refresh();
	}
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to set an action to MET status
 */
private void doActionMet()
{
	try
	{
		MemberOfStaffLiteVo mos = form.getLocalContext().getLoggedInUserIsNotNull() ? form.getLocalContext().getLoggedInUser().getMos() : null;

		// Set action status to Action MET
		domain.setActionStatus(form.getGlobalContext().ICP.getPatientICPRecord(), (PatientICPActionRefVo) form.dyngrdICP().getValue(), ICPActionStatus.MET, engine.hasRight(AppRight.CAN_COUNTERSIGN), mos);

		// Refresh screen
		refresh();
	}
	catch (StaleObjectException exception)
	{
		// Display SOE message
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		// Refresh screen
		refresh();
	}
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to set an action to NOT MET status
 */
private void doActionNotMet()
{
	try
	{
		MemberOfStaffLiteVo mos = form.getLocalContext().getLoggedInUserIsNotNull() ? form.getLocalContext().getLoggedInUser().getMos() : null;
		
		// Set action status to Action NOT MET
		PatientICPAction_PresentationVo icpAction = domain.setActionStatus(form.getGlobalContext().ICP.getPatientICPRecord(), (PatientICPActionRefVo) form.dyngrdICP().getValue(), ICPActionStatus.NOT_MET, engine.hasRight(AppRight.CAN_COUNTERSIGN), mos);

		// Display dialog for recording action variance
		form.getGlobalContext().ICP.setActionStatus(icpAction.getCurrentStatus());
		engine.open(form.getForms().ICP.RecordICPActionVariance);
	}
	catch (StaleObjectException exception)
	{
		// Display SOE message
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		// Refresh screen
		refresh();
	}
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkNoKnownAllergiesValueChanged() throws PresentationLogicException 
{
	if(form.ctnDetails().chkNoKnownAllergies().getValue())
	{
		clearDetailsPanel();
		form.ctnDetails().setCollapsed(false);
		form.ctnDetails().setcustomControlCodingItemEnabled(false);
		form.ctnDetails().setcustomControlAuthoringInfoEnabled(true);
		enableAllergyDetailControls(false);
		form.ctnDetails().customControlAuthoringInfo().initializeComponent();
		//WDEV-12901 
		Object mos = domain.getMosUser();
		if(mos != null)
			form.ctnDetails().txtRcordingHCP().setValue(((MemberOfStaffLiteVo)mos).getIMosName());
		form.ctnDetails().dtimRecordingDateTime().setValue(new DateTime());
	}		
	else
	{
		form.ctnDetails().setcustomControlCodingItemEnabled(true);
		form.ctnDetails().setcustomControlAuthoringInfoEnabled(true);
		enableAllergyDetailControls(true);
	}
	
}
 
Example 20
Project: AvoinApotti   File: PatientICPPresentationComponentImpl.java   Source Code and License 6 votes vote down vote up
private PatientICPStage_StatusChangeVo prepareStageToRemoveFromScope(PatientICPStage_StatusChangeVo stage, MemberOfStaffLiteVo mos)
{
	// Create stage status
	PatientICPStageStatusVo stageStatus = new PatientICPStageStatusVo();
	// Populate values to status
	stageStatus.setStatusDate(new DateTime());
	stageStatus.setChangedBy(mos.getIMosName());
	stageStatus.setStatus(ICPStageStatus.NOTINSCOPE);
	
	// Set status to stage
	stage.setCurrentStatus(stageStatus);
	stage.getStatusHistory().add(stageStatus);
	
	// Iterate stage phases
	for (PatientICPPhase_StatusChangeVo phase : stage.getStagePhases())
	{
		// If phase is in SCOPE then remove it
		if (ICPPhaseStatus.INPROGRESS.equals(phase.getCurrentStatus().getStatus()))
		{
			phase = preparePhaseToRemoveFromScope(phase, mos);
		}
	}
	
	return stage;
}
 
Example 21
Project: AvoinApotti   File: PatientICPPresentationComponentImpl.java   Source Code and License 6 votes vote down vote up
private PatientICPPhase_StatusChangeVo preparePhaseToRemoveFromScope(PatientICPPhase_StatusChangeVo phase, MemberOfStaffLiteVo mos)
{
	// Create a new phase status
	PatientICPPhaseStatusVo phaseStatus = new PatientICPPhaseStatusVo();
	// Populate values to status
	phaseStatus.setStatusDate(new DateTime());
	phaseStatus.setChangedBy(mos.getIMosName());
	phaseStatus.setStatus(ICPPhaseStatus.NOTINSCOPE);
	
	// Set status to phase
	phase.setCurrentStatus(phaseStatus);
	phase.getStatusHistory().add(phaseStatus);
	
	// Iterate phase actions
	for (PatientICPAction_StatusChangeVo action : phase.getPhaseActions())
	{
		action = prepareActionToRemoveFromScope(action, mos);
	}
	
	return phase;
}
 
Example 22
Project: AvoinApotti   File: PatientICPPresentationComponentImpl.java   Source Code and License 6 votes vote down vote up
private PatientICPAction_StatusChangeVo prepareActionToRemoveFromScope(PatientICPAction_StatusChangeVo action, MemberOfStaffLiteVo mos)
{
	// If the action is in SCOPE then remove it from scope
	if (ICPActionStatus.OUTSTANDING.equals(action.getCurrentStatus().getStatus()))
	{
		// Create a new action status
		PatientICPActionStatusVo actionStatus = new PatientICPActionStatusVo();
		// Populate values to status
		actionStatus.setStatusDate(new DateTime());
		actionStatus.setChangedBy(mos);
		actionStatus.setStatus(ICPActionStatus.NOTINSCOPE);
		
		// Set status to action
		action.setCurrentStatus(actionStatus);
		action.getStatusHistory().add(actionStatus);
	}
	
	return action;
}
 
Example 23
Project: AvoinApotti   File: ClinicListImpl.java   Source Code and License 6 votes vote down vote up
private PathwayRTTStatus createPatientRTTStatus(int nationalCode) //WDEV-18325
{
	PathwayRTTStatus rttSTatusDO = new PathwayRTTStatus();
	
	RTTStatusPoint rttStatusPoint = getRTTStatusPointFromConfig(nationalCode);
	
	rttSTatusDO.setRTTStatus(rttStatusPoint);
	
	Object mos = getMosUser();
	MemberOfStaff doMos = null;
	
	if(mos instanceof MemberOfStaffLiteVo)
	{
		doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
	}
	
	rttSTatusDO.setStatusBy(doMos);
	rttSTatusDO.setStatusDateTime(new java.util.Date());
	
	rttSTatusDO.setSetting("O");
	
	return rttSTatusDO;
}
 
Example 24
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
public void newInstance() throws ims.framework.exceptions.PresentationLogicException
{
	form.setMode(FormMode.EDIT);
	clearInstanceControls();
	form.getLocalContext().setSelectedRecord(null); //WDEV-15485
	form.grdCalls().setValue(null);
	
	form.cmbService().setValue((form.getLocalContext().getCatsReferral() != null && form.getLocalContext().getCatsReferral().getReferralDetails() != null ) ? form.getLocalContext().getCatsReferral().getReferralDetails().getService() : null);//WDEV-18013
	MemberOfStaffLiteVo voMos = (MemberOfStaffLiteVo) domain.getMosUser();
	if (voMos != null)
	{
		form.cmbCaller().newRow(voMos, voMos.getName().toString());
		form.cmbCaller().setValue(voMos);
	}
	form.dtimDateTime().setValue(new DateTime());
}
 
Example 25
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private CatsReportNoteVo populateDataFromScreen(CatsReportNoteVo note) 
{
	if(note == null)
		note = new CatsReportNoteVo();
	
	note.setID_CatsReportNote(null);
	note.setCatsReferral(form.getGlobalContext().RefMan.getCatsReferral());
	note.setAuthoringInformation(form.ccAuthoring().getValue());
	
	AuthoringInformationVo authoring = new AuthoringInformationVo();
	authoring.setAuthoringDateTime(new DateTime());
	HcpLiteVo hcpVo = new HcpLiteVo();
	hcpVo.setID_Hcp(engine.getLoggedInUser().getHcpId());
	hcpVo.setMos(domain.getMosUser() != null ? (MemberOfStaffLiteVo) domain.getMosUser() : null);
	authoring.setAuthoringHcp(hcpVo);
	note.setRecordingInformation(authoring);
	
	note.setFinalNote(form.richTextCatsReport().getValue());
	
	return note;
}
 
Example 26
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void addReferralStatusHistoryRow(CatsReferralStatusVo catsReferralStatusVo) 
{
	if(catsReferralStatusVo == null)
		return;
	
	grdStatusHistoryRow row = form.grdStatusHistory().getRows().newRow();
	
	row.setColDate(catsReferralStatusVo.getStatusDateTimeIsNotNull() ? catsReferralStatusVo.getStatusDateTime().toString() : "");
	if(catsReferralStatusVo.getAuthoringUserIsNotNull() && catsReferralStatusVo.getAuthoringUser().getID_MemberOfStaffIsNotNull())
	{
		try 
		{
			MemberOfStaffLiteVo authoringUser = domain.getMemberOfStaff(catsReferralStatusVo.getAuthoringUser());
			row.setColUser(authoringUser != null && authoringUser.getNameIsNotNull() ? authoringUser.getName().toString() : "");
		} 
		catch (DomainInterfaceException e) 
		{
			e.printStackTrace();
		}
	}
	row.setColStatus(catsReferralStatusVo.getReferralStatusIsNotNull() ? catsReferralStatusVo.getReferralStatus().getIItemText() : "");
}
 
Example 27
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateForm()
{
	MemberOfStaffLiteVo tempVo = new MemberOfStaffLiteVo();
	PersonName temppers = new PersonName();
	temppers.setForename("Med");
	temppers.setSurname("Med");
	temppers.setUpperForename("Med");
	temppers.setUpperSurname("Med");
	tempVo.setName(temppers);
					
	form.txtExpectedDateOfDischarge().setValue("20/10/2010");
	form.ccDischargingClin().setValue(tempVo);
	form.cmbDischSPecDEp().newRow("Departament","Departament");
	form.cmbDischMethod().newRow("Method","Method");
	form.cmbDischFrom().newRow("Discharged From","Discharged From");
	form.cmbDischDestination().newRow("Destination", "Destination");
	form.ansCertificateofSickness().setValue(YesNo.YES);
	form.ansConfirmationOfHardcopy().setValue(YesNo.NO);
	form.ansLivingAlone().setValue(YesNo.YES);
	form.ansFitToReturnWork().setValue(YesNo.NO);
	form.cmbReturnToWorkAdvice().newRow("Advice1","Advice1");
	form.dtimActualDateTimeOfMedDisch().setValue(new DateTime());
	form.txtDischGrade().setValue("Medic");
}
 
Example 28
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private NursingNotesVo populateDataFromScreen(NursingNotesVo record)
{
	if (record == null)
	{
		record = new NursingNotesVo();
		record.setCatsReferral(form.getGlobalContext().RefMan.getCatsReferral());
	}
	calculateBMI();
	record.setAuthoringUser(form.ccAuthUser().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo)form.ccAuthUser().getValue():null);
	record.setAuthoringDateTime(form.dtimAuthoringDT().getValue());
	record.setVitalSigns(getVitalSigns(record.getVitalSigns()));
	record.setSmokingStatus(form.cmbSmokStatus().getValue());
	record.setAdviceGiven(form.chkAdviceGiven().getValue());
	record.setReferredToSomkingCessation(form.chkReffered().getValue());
	record.setUnitsOfAlcoholConsumedPerWeek(form.intAlcohol().getValue()!=null?form.intAlcohol().getValue().floatValue():null);
	record.setMRSAResult(form.chkNeg().getValue()?MRSAResult.NEGATIVE:(form.chkPos().getValue()?MRSAResult.POSITIVE:null));
	record.setObservationNotes(form.txtObsNotes().getValue());
	record.setAllergies(getAllergiesFromGrid());
	record.setComorbidities(getComorbidities());
	record.setCurrentMedications(getCurrentMedication());

	return record;
}
 
Example 29
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException 
{	
	form.cc1().initialize(MosType.ALL);//	WDEV-13691
	form.cc1().isRequired(true);//	WDEV-13691
	form.cc1().setValue(domain.getMosUser() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) domain.getMosUser() : null);//	WDEV-13691
	form.dtim1().setValue(new DateTime());
}
 
Example 30
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateQmbConsultants()
{
	MedicLiteVo voMedic = new MedicLiteVo();
	MemberOfStaffLiteVo mosLiteVo = (MemberOfStaffLiteVo) domain.getMosUser();
	if (mosLiteVo != null)
	{
		voMedic.setMos(mosLiteVo);
		form.qmbConsultant().newRow(voMedic, voMedic.getName().toString());
		form.qmbConsultant().setValue(voMedic);
	}
}
 
Example 31
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onFormOpen(Object[] args) throws PresentationLogicException {
	form.customControlAuthoringInfo().initializeComponent();
	form.customControlAuthoringInfo().setIsRequiredPropertyToControls(true);//WDEV-13559
	Object mos = domain.getMosUser();
	if(mos != null)
	{
		form.cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
		form.cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
	}
	form.dtimRecordingDateTime().setValue(new DateTime());
	form.lblOriginOfScore().setValue(form.getGlobalContext().Core.getVitalSignsEscalationText());
	form.txtScore().setValue(form.getGlobalContext().Core.getVitalSignsEscalationScore());
}
 
Example 32
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void fillDocumentWorklistSearchCriteria() 
{
	DocumentWorklistSearchCriteriaVo criteria = new DocumentWorklistSearchCriteriaVo();
	
	criteria.setAuthor(form.ccAuthoring().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccAuthoring().getValue() : null);
	criteria.setResponsible(form.ccResponsibleHcp().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccResponsibleHcp().getValue() : null);
	criteria.setTypist(form.ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.ccTypist().getValue() : null);
	criteria.setSpecialty(form.cmbSpecialty().getValue());
	criteria.setDateFrom(form.dteDocumentDate().getValue());
	criteria.setDateTo(form.dteDocumentDate().getValue());
	
	form.getGlobalContext().Core.setDocumentWorklistSearchCriteria(criteria);
}
 
Example 33
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateMenuState()
{
	form.getContextMenus().Core.hideAllRCHTCustomListMenuMenuItems();
	form.getContextMenus().Core.getRCHTCustomListMenuSELECTItem().setVisible(form.grdDetails().getValue() != null);
	form.getContextMenus().Core.getRCHTCustomListMenuSELECTItem().setEnabled(form.grdDetails().getValue() != null);
	form.getContextMenus().Core.getRCHTCustomListMenuREMOVEItem().setVisible(form.grdDetails().getValue() != null && form.cmbCustomLists().getValue() != null && form.cmbCustomLists().getValue().getListOwnerIsNotNull() && form.cmbCustomLists().getValue().getListOwner().equals((MemberOfStaffLiteVo)domain.getMosUser()));
	form.getContextMenus().Core.getRCHTCustomListMenuREMOVEItem().setEnabled(form.grdDetails().getValue() != null && form.cmbCustomLists().getValue() != null && form.cmbCustomLists().getValue().getListOwnerIsNotNull() && form.cmbCustomLists().getValue().getListOwner().equals((MemberOfStaffLiteVo)domain.getMosUser()));
}
 
Example 34
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void initialize()
{
	form.ccAuthoringInfo().initializeComponent();
	form.ccRecordingHcp().initialize(MosType.HCP);

	Object mos = domain.getMosUser();
	if (mos != null && mos instanceof MemberOfStaffLiteVo)
	{
		form.ccRecordingHcp().setValue((MemberOfStaffLiteVo) mos);
	}
	form.dtimRecordingDateTime().setValue(new DateTime());
}
 
Example 35
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
	clearScreen();
			
	SocialHistoryVo socialHistory = domain.getSocialHistoryByPatient(form.getGlobalContext().Core.getPatientShort());
	populateScreenFromData(deleteIdForChildren(socialHistory == null ? null:(SocialHistoryVo)socialHistory.clone()),false);
	if(engine.getFormName().equals(form.getForms().Core.SocialHistory))
	{
		ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
		if(voClinicalContact != null)
		{
			AuthoringInformationVo voAuth = new AuthoringInformationVo();
			voAuth.setAuthoringDateTime(voClinicalContact.getStartDateTime());
			voAuth.setAuthoringHcp(voClinicalContact.getSeenBy());
			form.customControlAuth().setValue(voAuth);
			
			//WDEV-12901 
			Object mos = domain.getMosUser();
			if(mos != null){
				form.cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
				form.cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
			}
			form.dtimRecordingDateTime().setValue(new DateTime());
		}
		else
			setDefaultValues();//wdev-1930
	}
	else
	{
		setDefaultValues();
	}
	
	form.getLocalContext().setvoSocialHistory(null);
	form.setMode(FormMode.EDIT);
	form.customControlAuth().setIsRequiredPropertyToControls(true);
	updateControlsState();
	updateContextMenus();
}
 
Example 36
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void initialize()
{
	form.ccAuthoringInfo().initializeComponent();
	form.ccRecordingHCP().initialize(MosType.HCP);
	
	Object mos = domain.getMosUser();
	if(mos != null && mos instanceof MemberOfStaffLiteVo)
	{
		form.ccRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
	}
	form.dtimRecordingDateTime().setValue(new DateTime());
	
}
 
Example 37
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnTaskCompleteClick() throws ims.framework.exceptions.PresentationLogicException
{
	Object mos = domain.getMosUser();
	if (mos instanceof MemberOfStaffLiteVo)
	{
		form.ccCompleted().setValue((MemberOfStaffLiteVo)mos);
	}
	form.dtimCompleted().setValue(new DateTime());
		
	if (save(PatientClericalTaskStatus.COMPLETED))
	{
		open();
	}
}
 
Example 38
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private SurgicalAuditOperationDetailStatusVo populateStatus(SurgicalAuditOperationDetailStatus status, DateTime dateTime, MemberOfStaffLiteVo statusAuthoringUser)
{
	SurgicalAuditOperationDetailStatusVo statusRecord = new SurgicalAuditOperationDetailStatusVo();
	
	statusRecord.setOperationStatus(status);
	statusRecord.setStatusDateTime(dateTime);
	statusRecord.setAuthoringUser(statusAuthoringUser);
	
	return statusRecord;
}
 
Example 39
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private AppointmentCallAttemptsVoCollection populateDataFromScreen() 
{
	AppointmentCallAttemptsVo voCall = form.getLocalContext().getSelectedRecord();
	if (voCall == null)
		voCall = new AppointmentCallAttemptsVo();
	
	voCall.setAppointmentService(form.cmbService().getValue());
	voCall.setCallDateTime(form.dtimDateTime().getValue());
	voCall.setCaller((MemberOfStaffLiteVo) domain.getMosUser());
	voCall.setCallerComments(form.txtComments().getValue());
	voCall.setReason(form.cmbReason().getValue());

	String[] arrErrors =  voCall.validate();	
	if(arrErrors != null)
	{
		engine.showErrors(arrErrors);
		return null;
	}

	if (form.grdCalls().getValue() != null)
		form.grdCalls().getSelectedRow().setValue(voCall);
	else
		addGridRow(voCall);
	
	AppointmentCallAttemptsVoCollection voColl = new AppointmentCallAttemptsVoCollection();
	
	for ( int  i = 0 ; i < form.grdCalls().getRows().size() ; i ++)
		voColl.add(form.grdCalls().getRows().get(i).getValue());

	return voColl;
}
 
Example 40
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	if (form.txtNotes().getValue() == null)
	{
		engine.showMessage("Note is mandatory", "Error", MessageButtons.OK, MessageIcon.WARNING);
		return;
	}
	
	ReferralNoteVo voNote = new ReferralNoteVo();
	if (form.getGlobalContext().RefMan.getReferralNoteIsNotNull())
	{
		voNote = form.getGlobalContext().RefMan.getReferralNote();
		voNote.setNote(form.txtNotes().getValue());
	}
	else
	{
		MemberOfStaffLiteVo voMos = (MemberOfStaffLiteVo) domain.getMosUser();
		if (voMos != null)
			voNote.setRecordingUser(voMos);
		voNote.setRecordingDateTime(new DateTime());
		
		voNote.setNote(form.txtNotes().getValue());
		voNote.setNoteType(ReferralNoteType.NON_CLINICAL);
	}
	form.getGlobalContext().RefMan.setReferralNote(voNote);
	
	engine.close(DialogResult.OK);
}
 
Example 41
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onBtnSaveClick() throws PresentationLogicException 
{
	if(!validateUIRules())//	WDEV-13691
		return;
	
	TTAStatusVo newStatus = new TTAStatusVo();
	newStatus.setStatusDateTime(form.dtim1().getValue());	//	WDEV-13691				
	newStatus.setAuthoringUser(form.cc1().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.cc1().getValue() : null);//	WDEV-13691
	newStatus.setStatus(TTAStatus.AWAITING_DISPENSING);
	
	form.getGlobalContext().Clinical.seteDischargePharmacyApprovalTTAPharmacySystemDetails(newStatus);
	engine.close(DialogResult.OK);
}
 
Example 42
Project: AvoinApotti   File: DayCaseAdmissionDialogImpl.java   Source Code and License 5 votes vote down vote up
private PathwayRTTStatus createPathwayRTTStatus(CatsReferral domCats)
{
	if(!ConfigFlag.DOM.RTT_STATUS_POINT_FUNCTIONALITY.getValue())
		return null;
	
	if(domCats == null)
		return null;
	
	RTTStatusPoint rttStatusPoint = getRTTStatusPoint(START_OF_FIRST_DEFINITIVE_TREATMENT);
	
	Object mos = getMosUser();
	MemberOfStaff doMos = null;
	
	if(mos instanceof MemberOfStaffLiteVo)
	{
		doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
	}
	
	PathwayRTTStatus pathwayRTTStatus = new PathwayRTTStatus();
	pathwayRTTStatus.setRTTStatus(rttStatusPoint);
	pathwayRTTStatus.setStatusBy(doMos);
	pathwayRTTStatus.setStatusDateTime(new java.util.Date());
	
	if(domCats.getJourney() != null && domCats.getJourney().getCurrentClock() != null)
   	{
		domCats.getJourney().getCurrentClock().setCurrentRTTStatus(pathwayRTTStatus);
   			
   		if(domCats.getJourney().getCurrentClock().getRTTStatusHistory() == null)
   			domCats.getJourney().getCurrentClock().setRTTStatusHistory(new java.util.ArrayList());
   			
   		domCats.getJourney().getCurrentClock().getRTTStatusHistory().add(pathwayRTTStatus);
   	}
	
	return pathwayRTTStatus;
}
 
Example 43
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnNewClick() throws PresentationLogicException
{
	clearScreen();
	
	//WDEV-15996  // Don't allow to create new Vital Signs when "Logged in User is not a Hcp
	if (isLoggedInUser() == false)
	{
		engine.showMessage("Logged in User is not a Hcp");
		return;
	}
	
	
	form.setMode(FormMode.EDIT);
	form.recbrAllRecords().setValue(null);

	form.customControlAuthoringInfo().initializeComponent();
	form.setcustomControlAuthoringInfoEnabled(true);
	
	Object mos = domain.getMosUser();
	if(mos != null){
		form.cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
		form.cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
	}
	form.dtimRecordingDateTime().setValue(new DateTime());

	form.dteTaken().setValue(new Date());
	form.timTaken().setValue(new Time());

	form.dteTaken().setEnabled(true);
	form.timTaken().setEnabled(true);

	form.lyrVSigns().tabSection1().GroupBP().setValue(GenForm.lyrVSignsLayer.tabSection1Container.GroupBPEnumeration.rdoBPSitting);
	onRadioButtonGroupBPValueChanged();

	showBloodGlucoseControls(false, false);
}
 
Example 44
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private SurgicalAuditOperationDetailStatusVo populateStatus(SurgicalAuditOperationDetailStatus status, DateTime dateTime, MemberOfStaffLiteVo statusAuthoringUser)
{
	SurgicalAuditOperationDetailStatusVo statusRecord = new SurgicalAuditOperationDetailStatusVo();

	statusRecord.setOperationStatus(status);
	statusRecord.setStatusDateTime(dateTime);
	statusRecord.setAuthoringUser(statusAuthoringUser);

	return statusRecord;
}
 
Example 45
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private DocumentWorklistSearchCriteriaVo populateSearchCriteriaDataFromScreen()
{
	DocumentWorklistSearchCriteriaVo criteria = new DocumentWorklistSearchCriteriaVo();
	criteria.setResponsible(form.ccResponsible().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccResponsible().getValue() : null);
	criteria.setAuthor(form.ccAuthor().getValue() instanceof HcpLiteVo ? (HcpLiteVo) form.ccAuthor().getValue() : null);
	criteria.setTypist(form.ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.ccTypist().getValue() : null);
	criteria.setLocation(form.cmbLocation().getValue());
	criteria.setClinic(form.qmbClinic().getValue());
	criteria.setDocumentStatus(form.cmbDocStatus().getValue());
	criteria.setDocumentType(form.cmbDocType().getValue());
	criteria.setSpecialty(form.cmbSpecialty().getValue());
	criteria.setDateFrom(form.dteFrom().getValue());
	criteria.setDateTo(form.dteTo().getValue());
	criteria.setExcludeCompleted(form.chkExcludeCompleted().getValue());
	//WDEV-11810 criteria.setHospNo(form.txtHospNo().getValue());
	//WDEV-11810 Start
	criteria.setPatient(form.chkPatOnly().getValue()?form.getGlobalContext().Core.getPatientShort():null);
	
	if (form.txtPatId().getValue()!=null)
	{
		PatientIdListVo patId = new PatientIdListVo();
		patId.setType(form.cmbIdType().getValue());
		patId.setValue(form.txtPatId().getValue());
		criteria.setPatientId(patId);
	}
	//WDEV-11810 End
	return criteria;
}
 
Example 46
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private CustomListVo populateFilter() {
	CustomListVo voFilter = new CustomListVo();
	
	voFilter.setListType(form.lyrCustomListSearch().tabCustomListSearch().cmbListType().getValue());
	voFilter.setListName(form.lyrCustomListSearch().tabCustomListSearch().txtListName().getValue());
	voFilter.setSpecialty(form.lyrCustomListSearch().tabCustomListSearch().cmbSpecialty().getValue());
	voFilter.setDate(form.lyrCustomListSearch().tabCustomListSearch().dteDate().getValue());
	voFilter.setListOwner((MemberOfStaffLiteVo) form.lyrCustomListSearch().tabCustomListSearch().customControlMos().getValue());
	if(form.lyrCustomListSearch().tabCustomListSearch().chkActiveOnly().getValue())
		voFilter.setIsActive(true);
	
	return voFilter;
}
 
Example 47
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private CustomListVo populateCustomListVo(CustomListVo voCustomList) {
	voCustomList.setListType(form.lyrCustomListSearch().tabCustomListDetails().cmbListTypeDetails().getValue());
	voCustomList.setListName(form.lyrCustomListSearch().tabCustomListDetails().txtListNameDetails().getValue());
	voCustomList.setSpecialty(form.lyrCustomListSearch().tabCustomListDetails().cmbSpecialtyDetails().getValue());
	voCustomList.setDate(form.lyrCustomListSearch().tabCustomListDetails().dteDateDetails().getValue());
	voCustomList.setListOwner((MemberOfStaffLiteVo) form.lyrCustomListSearch().tabCustomListDetails().customControlMosDetails().getValue());
	voCustomList.setIsActive(form.lyrCustomListSearch().tabCustomListDetails().chkActiveOnlydetails().getValue());
	
	return voCustomList;
}
 
Example 48
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
public void addNotes(String notes) 
{
	if (notes != null)
	{
		ReferralNoteVo voNote = new ReferralNoteVo();
		MemberOfStaffLiteVo voMos = (MemberOfStaffLiteVo) domain.getMosUser();
		if (voMos != null)
			voNote.setRecordingUser(voMos);
		voNote.setRecordingDateTime(new DateTime());
		//WDEV-8323
		voNote.setNoteType(ReferralNoteType.NON_CLINICAL);	
		voNote.setNote(notes);					
		saveReferralNote(voNote);
	}
}
 
Example 49
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnNewClick() throws PresentationLogicException
{
	clearScreen();
	form.setMode(FormMode.EDIT);
	
	form.cmbAllRecords().setValue(null);

	form.customControlAuthoringInfo().initializeComponent();
	form.setcustomControlAuthoringInfoEnabled(true);

	Object mos = domain.getMosUser();
	if (mos != null)
	{
		form.cmbRecordingHCP().newRow((MemberOfStaffLiteVo) mos, mos.toString());
		form.cmbRecordingHCP().setValue((MemberOfStaffLiteVo) mos);
	}
	form.dtimRecordingDateTime().setValue(new DateTime());

	form.dteTaken().setValue(new Date());
	form.timTaken().setValue(new Time());

	form.dteTaken().setEnabled(true);
	form.timTaken().setEnabled(true);

	form.GroupBP().setValue(GenForm.GroupBPEnumeration.rdoBPSitting);
	onRadioButtonGroupBPValueChanged();

	showBloodGlucoseControls(false, false);
	
}
 
Example 50
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onBtnSaveClick() throws PresentationLogicException 
{
	if(!validateUIRules())//	WDEV-13691
		return;
	
	TTAStatusVo newStatus = new TTAStatusVo();
	newStatus.setStatusDateTime(form.dtim1().getValue());		//	WDEV-13691			
	newStatus.setAuthoringUser(form.cc1().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.cc1().getValue() : null);//	WDEV-13691
	newStatus.setStatus(TTAStatus.AWAITING_FINAL_CHECKS);
	
	form.getGlobalContext().Clinical.seteDischargePharmacyApprovalTTADispense(newStatus);
	engine.close(DialogResult.OK);
}
 
Example 51
Project: AvoinApotti   File: UploadDocumentImpl.java   Source Code and License 5 votes vote down vote up
public MemberOfStaffLiteVo getMoS(MemberOfStaffRefVo refVo) 
{
	if(refVo == null || 
			(refVo != null && refVo.getID_MemberOfStaff() == null))
				throw new DomainRuntimeException("Cannot get MemberOfStaffLiteVo for null MemberOfStaffRefVo");
	
	DomainFactory factory = getDomainFactory();		
	MemberOfStaff doMos = (MemberOfStaff) factory.getDomainObject(MemberOfStaff.class, refVo.getID_MemberOfStaff());
	return MemberOfStaffLiteVoAssembler.create(doMos);		
}
 
Example 52
Project: AvoinApotti   File: DocumentWorklistImpl.java   Source Code and License 5 votes vote down vote up
public MemberOfStaffLiteVo getLockedUser(MemberOfStaffRefVo mos) 
{
	if(mos == null || mos.getID_MemberOfStaff() == null)
		throw new CodingRuntimeException("Can not get Member of Staf on null Id.");
	
	return MemberOfStaffLiteVoAssembler.create((MemberOfStaff) getDomainFactory().getDomainObject(MemberOfStaff.class, mos.getID_MemberOfStaff()));
}
 
Example 53
Project: AvoinApotti   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
private PathwayRTTStatus createPathwayRTTStatus(CatsReferral doCats)
{
	if(doCats == null)
		return null;
	
	RTTStatusPoint rttStatusPoint = getRTTStatusPoint(START_OF_FIRST_DEFINITIVE_TREATMENT);
	Object mos = getMosUser();
	MemberOfStaff doMos = null;
	
	if(mos instanceof MemberOfStaffLiteVo)
	{
		doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
	}
	
	PathwayRTTStatus pathwayRTTStatus = new PathwayRTTStatus();
	pathwayRTTStatus.setRTTStatus(rttStatusPoint);
	pathwayRTTStatus.setStatusBy(doMos);
	pathwayRTTStatus.setStatusDateTime(new java.util.Date());
	
	if(doCats.getJourney() != null && doCats.getJourney().getCurrentClock() != null)
   	{
		doCats.getJourney().getCurrentClock().setCurrentRTTStatus(pathwayRTTStatus);
   			
   		if(doCats.getJourney().getCurrentClock().getRTTStatusHistory() == null)
   			doCats.getJourney().getCurrentClock().setRTTStatusHistory(new java.util.ArrayList());
   			
   		doCats.getJourney().getCurrentClock().getRTTStatusHistory().add(pathwayRTTStatus);
   	}
	
	return pathwayRTTStatus;
}
 
Example 54
Project: AvoinApotti   File: BedAdmissionComponentImpl.java   Source Code and License 5 votes vote down vote up
private PathwayRTTStatus createPathwayRTTStatus(CatsReferral domCats, boolean isDiagnostic) // WDEV-18617
{
	if(!ConfigFlag.DOM.RTT_STATUS_POINT_FUNCTIONALITY.getValue())
		return null;
	
	if(domCats == null)
		return null;
	
	RTTStatusPoint rttStatusPoint =null;
	if (isDiagnostic)
		rttStatusPoint= getRTTStatusPoint(SUBSEQUENT_ACTIVITY);
	else
		rttStatusPoint= getRTTStatusPoint(START_OF_FIRST_DEFINITIVE_TREATMENT);
	
	Object mos = getMosUser();
	MemberOfStaff doMos = null;
	
	if(mos instanceof MemberOfStaffLiteVo)
	{
		doMos = MemberOfStaffLiteVoAssembler.extractMemberOfStaff(getDomainFactory(), (MemberOfStaffLiteVo) mos);
	}
	
	PathwayRTTStatus pathwayRTTStatus = new PathwayRTTStatus();
	pathwayRTTStatus.setRTTStatus(rttStatusPoint);
	pathwayRTTStatus.setStatusBy(doMos);
	pathwayRTTStatus.setStatusDateTime(new java.util.Date());
	
	if(domCats.getJourney() != null && domCats.getJourney().getCurrentClock() != null)
   	{
		domCats.getJourney().getCurrentClock().setCurrentRTTStatus(pathwayRTTStatus);
   			
   		if(domCats.getJourney().getCurrentClock().getRTTStatusHistory() == null)
   			domCats.getJourney().getCurrentClock().setRTTStatusHistory(new java.util.ArrayList());
   			
   		domCats.getJourney().getCurrentClock().getRTTStatusHistory().add(pathwayRTTStatus);
   	}
	
	return pathwayRTTStatus;
}
 
Example 55
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private ElectiveListStatusVo populateElectiveListStatus(WaitingListStatus status)
{
	ElectiveListStatusVo electiveListStatus = new ElectiveListStatusVo();
	
	electiveListStatus.setElectiveListStatus(status); 
	electiveListStatus.setStatusDateTime(new DateTime());
	
	Object mos = domain.getMosUser();
	if (mos !=null && mos instanceof MemberOfStaffLiteVo)
	{
		electiveListStatus.setAuthoringUser((MemberOfStaffLiteVo) mos);
	}
	return electiveListStatus;
}
 
Example 56
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
public void editInstance()
{
	ValueObject rowValue = form.getLocalContext().getSelectedRow();

	if (rowValue != null)
	{
		if (rowValue instanceof AttendanceDetailsVo)
		{
			editAttendance(rowValue);
		}
	}

	// wdev-14420
	if (form.getLocalContext().getSelectedEmergencyEpisodeIsNotNull())
	{
		form.getLocalContext().setTIIG(form.getLocalContext().getSelectedEmergencyEpisode().getTiig());
		form.getLocalContext().setRTA(form.getLocalContext().getSelectedEmergencyEpisode().getRTADetails());

	}

	form.GroupCategory().setEnabled(GroupCategoryEnumeration.rdoFirstVisit, false);
	form.GroupCategory().setEnabled(GroupCategoryEnumeration.rdoScheduledReturn, false);
	form.GroupCategory().setEnabled(GroupCategoryEnumeration.rdoUnscheduledReturn, false);

	// wdev-16070
	if (domain.getMosUser() instanceof MemberOfStaffLiteVo)
	{
		MemberOfStaffLiteVo tempVo = (MemberOfStaffLiteVo) domain.getMosUser();
		if (tempVo != null)
		{
			form.lblLastUpdatedBy1().setValue(tempVo.getNameIsNotNull() ? tempVo.getName().toString() : "");
		}
	}

	form.setMode(FormMode.EDIT);
	form.getLocalContext().setSelectedEvent(EmergencyAttendanceEvent.EDIT);
	form.fireCustomControlValueChanged();
}
 
Example 57
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onFormOpen(Object[] args) throws PresentationLogicException
{
	form.ccRequestedBy().isRequired(true);
	form.getLocalContext().setcurrentTracking(domain.getTracking(form.getGlobalContext().Emergency.getTracking()));
	clearControls();
	
	if (form.getLocalContext().getcurrentTracking().getBedAvailabilityIsNotNull())
	{
		form.getLocalContext().setcurrentBedAvailability(form.getLocalContext().getcurrentTracking().getBedAvailability());
		populateScreenFromData(form.getLocalContext().getcurrentBedAvailability(), form.getLocalContext().getcurrentTracking());

	}
	else
	{
		Object mos = domain.getMosUser();

		if (mos == null)
		{
			engine.showMessage("Current User is not a Member of Staff!");
			return;
		}

		if (mos instanceof MemberOfStaffLiteVo)
		{
			form.ccRequestedBy().setValue((MemberOfStaffLiteVo) mos);
		}

		form.dtimAwaitingBed().setValue(new DateTime());
		form.dtimAvailableBed().setEnabled(false);

	}

	form.btnRemove().setVisible(form.getLocalContext().getcurrentTracking().getBedAvailabilityIsNotNull());
}
 
Example 58
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnOKClick() throws ims.framework.exceptions.PresentationLogicException
{
	if(checkIfanAreaisSelected() == false)
	{
		engine.showMessage("Please select an Area.");
		return;
	}
	if(	form.getLocalContext().getAttendaceDetailsOrOtherIsNotNull() && Boolean.TRUE.equals(form.getLocalContext().getAttendaceDetailsOrOther()))  //wdev-14567
	{
		TrackingLiteVo trackLiteVo = form.getLocalContext().getTracking();
		if(	trackLiteVo != null)
		{
			trackLiteVo.setLastMovementDateTime(new DateTime());
			trackLiteVo.setCurrentArea(gettrackingArea());
		}
		
		TrackingMovementTimesVo trackMovVo = new TrackingMovementTimesVo();
		trackMovVo.setPatient(form.getGlobalContext().Core.getPatientShort());
		trackMovVo.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort());
		trackMovVo.setAttendance(form.getGlobalContext().Core.getCurrentCareContext());
		trackMovVo.setAreaMovedTo(gettrackingArea());
		trackMovVo.setMovedDateTime(new DateTime());
		trackMovVo.setMovedBy((MemberOfStaffLiteVo) domain.getMosUser());
		
		try 
		{
			domain.saveTrackingAndTrackingMovementTimes(trackLiteVo, trackMovVo);
		} 
		catch (StaleObjectException e) 
		{
			engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		}
		
	}
	else
		form.getGlobalContext().Emergency.setTrackingAreaForSendToAreaVo(gettrackingArea());
	
	engine.close(DialogResult.OK);
}
 
Example 59
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
public void newFamilyInstance() throws PresentationLogicException
{
	clearFamilyInstanceControls();
	
	form.lyrSupportServices().tabPageFamily().txtName().setFocus();

	SupportNetworkFamily voFamily = new SupportNetworkFamily();
	
	form.lyrSupportServices().tabPageFamily().customControlAuthFamily().initializeComponent();
	form.lyrSupportServices().tabPageFamily().customControlAuthFamily().setIsRequiredPropertyToControls(true);
	
	voFamily.setIsCurrentlyActiveFamilySupport(Boolean.TRUE); 
	form.getLocalContext().setSelectedFamilyRecord(voFamily);
	
	form.setMode(FormMode.EDIT);
	
	Object mos = domain.getMosUser();
	if(mos != null)
	{
		form.lyrSupportServices().tabPageFamily().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString());
		form.lyrSupportServices().tabPageFamily().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos);
	}
	form.lyrSupportServices().tabPageFamily().dtimRecordingDateTime().setValue(new DateTime());
	
	enableAuthoringHCPCustomControls();

	updateFamilyControlsState();
}
 
Example 60
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void populateFamilyInstanceControls(SupportNetworkFamily value) 
{
	clearFamilyInstanceControls();

	if(value.getFitAndWellIsNotNull())
		form.lyrSupportServices().tabPageFamily().chkFit().setValue(value.getFitAndWell().booleanValue());
	if(value.getPermissionToContactIsNotNull())
		form.lyrSupportServices().tabPageFamily().chkPermission().setValue(value.getPermissionToContact().booleanValue());
	if(value.getAwareClientPositionIsNotNull())
		form.lyrSupportServices().tabPageFamily().chkAware().setValue(value.getAwareClientPosition().booleanValue());
	form.lyrSupportServices().tabPageFamily().txtName().setValue(value.getCarerNameIsNotNull() ? value.getCarerName(): null);
	form.lyrSupportServices().tabPageFamily().txtFamilyAddress().setValue(value.getCarerAddressIsNotNull() ? value.getCarerAddress(): null);
	form.lyrSupportServices().tabPageFamily().txtEmailAddress().setValue(value.getCarerEmailIsNotNull() ? value.getCarerEmail(): null);
	form.lyrSupportServices().tabPageFamily().txtWorkPhone().setValue(value.getCarerWorkPhoneIsNotNull() ? value.getCarerWorkPhone(): null);
	form.lyrSupportServices().tabPageFamily().txtHomePhone().setValue(value.getCarerHomePhoneIsNotNull() ? value.getCarerHomePhone(): null);
	if(value.getIsMainCarerIsNotNull())
		form.lyrSupportServices().tabPageFamily().chkCarer().setValue(value.getIsMainCarer().booleanValue());
	form.lyrSupportServices().tabPageFamily().cmbEmergency().setValue(value.getEmergencyContactOrderIsNotNull() ? value.getEmergencyContactOrder() : null);
	form.lyrSupportServices().tabPageFamily().txtMobilrPhone().setValue(value.getCarerMobilePhoneIsNotNull() ? value.getCarerMobilePhone(): null);
	form.lyrSupportServices().tabPageFamily().cmbRelationship().setValue(value.getCarerRelationshipIsNotNull() ? value.getCarerRelationship() : null);

	form.lyrSupportServices().tabPageFamily().customControlAuthFamily().setValue(value.getAuthoringInfo());			

	if(value.getRecordingInformationIsNotNull())
	{
		MemberOfStaffLiteVo mos = value.getRecordingInformation().getRecordingUser();
		if(mos!=null)
		{
			form.lyrSupportServices().tabPageFamily().cmbRecordingHCP().newRow(mos, mos.toString());
			form.lyrSupportServices().tabPageFamily().cmbRecordingHCP().setValue(mos);	
		}
		form.lyrSupportServices().tabPageFamily().dtimRecordingDateTime().setValue(value.getRecordingInformation().getRecordingDateTime());
	}
}