Java Code Examples for ims.core.vo.Hcp

The following are top voted examples for showing how to use ims.core.vo.Hcp. 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   View source code 6 votes vote down vote up
private RACPCReferralVo populateDataFromScreen()
{		
	RACPCReferralVo voReferral = form.getLocalContext().getCurrentRecord();
	
	voReferral.setDateReferralMade(form.dteReferralMade().getValue());
	voReferral.setDateReferralReceived(form.dteReferralReceived().getValue());
	voReferral.setWaitingTime(form.intWaitingTime().getValue());
	voReferral.setReferralReason(form.cmbReason().getValue());
	voReferral.setDelayReason(form.cmbReasonDelayed().getValue());
	voReferral.setCardiologist((Hcp)form.ccCardiologist().getValue());
	voReferral.setClinicDoctor((Hcp)form.ccClinicDoctor().getValue());
	voReferral.setAppointmentDate(form.dteAppointment().getValue());
	voReferral.setSourceofReferral(form.cmbReferralSource().getValue());
	
	return voReferral;	
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private Hcp getCurrentHcp()
{
	/*if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
	{
		if(form.getGlobalContext().Core.getCurrentClinicalContact().getSeenByIsNotNull())
			return form.getGlobalContext().Core.getCurrentClinicalContact().getSeenBy();
	}
	else
	{
		if(domain.getHcpUser() != null)
			return domain.getHcpUser() instanceof Hcp?(Hcp)domain.getHcpUser():null;
	}*/
	if(domain.getHcpUser() != null)
		return domain.getHcpUser() instanceof Hcp?(Hcp)domain.getHcpUser():null;
	
	return null;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
	//check the logged on user, Only a HCP from the Team that created the problem can resolve a problem
	if(form.cmbStatus().getValue() != null && form.cmbStatus().getValue().equals(PatientConcernStatus.RESOLVED))
	{
		Hcp voHcp = (Hcp) domain.getHcpUser();
		HcpDisType identifiedByTeamType = form.cmbIdByTeam().getValue();
		if(identifiedByTeamType != null)
		{			
			if(voHcp != null && (!voHcp.getHcpType().equals(identifiedByTeamType)))
			{
				form.cmbStatus().setValue(null);
				engine.showMessage("You are not a member of the team that created the concern and therefore cannot resolve it");
				return;
			}
		}
	}
	
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void setAuthoringCP(String value)
{
	form.qmbAuthoringCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listHCPs(filter);
	if(coll != null)
	{
		for (int i = 0; i < coll.size(); i++)
		{
			Hcp med = coll.get(i);
			form.qmbAuthoringCP().newRow(med, med.toString());			
		}
		
		if (coll.size() == 1)
			form.qmbAuthoringCP().setValue(coll.get(0));
		else if (coll.size() > 1)
			form.qmbAuthoringCP().showOpened();
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateAdviceLeafletsDetails(AdviceLeafletsVo vo) 
{
	if(vo != null)
	{
		//form.getLocalContext().setVoAdviceLeaflets(vo);    WDEV-7044
		
		Hcp authoringHCP = vo.getAuthoringHCP();
		if (authoringHCP != null)
		{
			form.qmbRecordingHCP().newRow(authoringHCP, authoringHCP.toString());
			form.qmbRecordingHCP().setValue(authoringHCP);
		}
		form.cmbLeaflet().setValue(vo.getAdviceLeaflet());
		form.txtVersionNo().setValue(vo.getLeafletVersion());
		form.dteGiven().setValue(vo.getDateGiven());
		if (vo.getAuthoringDateTime() != null)
		{
			form.dteRecorded().setValue(vo.getAuthoringDateTime().getDate());
			form.tmeRecorded().setValue(vo.getAuthoringDateTime().getTime());
		}
		form.cmbGivenTo().setValue(vo.getGivenTo());
		form.txtGivenToName().setValue(vo.getGivenToName());
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private boolean checkLoggedOnUser()
{
	if (form.qmbConfirmedBy().getVisible())
	{
		if (form.qmbConfirmedBy().getValue() == null)
		{
			Hcp voHcp = (Hcp) domain.getHcpUser();
			if (voHcp != null)
			{
				if (HcpDisType.NURSING.equals(voHcp.getHcpType()))
				{
					NurseVo voNurse = (NurseVo) voHcp;
					//wdev-4938
					if (voNurse != null && voNurse.getNurseTypeIsNotNull() && voNurse.getNurseType().equals(HcpDisType.STUDENTNURSE))
					{
						engine.showMessage("'Confirmed by' is a mandatory field as you are logged in as a student nurse");
						return true;
					}
				}
			}
		}
	}
	return false;
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onFormOpen() throws ims.framework.exceptions.PresentationLogicException
{
	//Defaulting Authoring HCP and Date
	form.dteDate().setValue(new Date());
	
	form.cmbDiscontinuedByType().setValue(MedciationCommencedDiscontinuedType.MOS);
	defaultHCP();
	form.qmbHCP().setEnabled(true);
	
	if (form.getGlobalContext().Clinical.getDiscontinueMedicationReasonValuesIsNotNull())
	{
		form.dteDate().setValue(form.getGlobalContext().Clinical.getDiscontinueMedicationReasonValues().getStoppedDate());
		Hcp hcp = form.getGlobalContext().Clinical.getDiscontinueMedicationReasonValues().getStoppedHCP();
		if(hcp!=null){
			form.qmbHCP().newRow(hcp, hcp.toString());
			form.qmbHCP().setValue(hcp);
		}
		form.cmbReasonDiscontinued().setValue(form.getGlobalContext().Clinical.getDiscontinueMedicationReasonValues().getStoppedReason());
		form.txtReasonDesc().setValue(form.getGlobalContext().Clinical.getDiscontinueMedicationReasonValues().getStoppedReasonDesc());
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
	form.setMode(FormMode.EDIT);
	form.dtimRecording().setEnabled(true);
	form.qmbHCP().setEnabled(true);
	form.dtimRecording().setValue(new DateTime());
	form.dteAssess().setValue(new Date());
	form.dteReferral().setValue(new Date());
	
	Hcp hcp = (Hcp)domain.getHcpUser();
	if (hcp != null)
	{
		form.qmbHCP().newRow(hcp,hcp.toString());
		form.qmbHCP().setValue(hcp);
	}
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onBtnStartTriageClick() throws PresentationLogicException 
{
	//wdev-15930
	form.getLocalContext().setAllocatedNurse(null);	
	
	if(domain.getHcpUser() instanceof Hcp)
	{
		Hcp temp = (Hcp)domain.getHcpUser();
		if(temp != null)
		{
			HcpDisType hcptype =getParentNodeHcp(temp.getHcpType()); 
			if( hcptype != null && hcptype.equals(HcpDisType.NURSING))
				form.getLocalContext().setAllocatedNurse(new SeenByHCPVo());//wdev-16816
		}
	}
	//---------
	if( saveTracking())
	{
		open();
		//wdev-15930
		if( form.getLocalContext().getAllocatedNurse() == null )
			engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog, new Object[]{Boolean.TRUE});	//wdev-15930	//WDEV-16816
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private MemberOfStaffShortVo populateFilterFromScreen()
{
	MemberOfStaffShortVo voMosFilter = new MemberOfStaffShortVo();
	PersonName name = new PersonName();
	name.setSurname(form.txtSurName().getValue());
	voMosFilter.setName(name);
	voMosFilter.setStaffType(form.cmbStaffType().getValue());
	if (form.cmbHcpDiscipline().getValue() != null)
	{
		Hcp voHcp = new Hcp();
		voHcp.setHcpType(form.cmbHcpDiscipline().getValue());
		voMosFilter.setHcp(voHcp);
	}
	voMosFilter.setIsActive(new Boolean(form.chkActiveOnly().getValue()));
	
	return voMosFilter;
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 * Function used to prepare the screen for adding a new MDT Note record
 */
private void newMDTNoteInstance()
{
	// Clear MDT Note controls
	clearNoteInstanceControls();
	form.grdNotesSummary().setValue(null);
	
	// Clear local context for selected MDT Note
	form.getLocalContext().setCurrentMDTNote(null);
	
	// Set default values
	Hcp hcp = (Hcp) domain.getHcpUser();
	if(hcp != null)
	{
		form.ctnDetails().qmbRecHCP().newRow(hcp, hcp.toString());
		form.ctnDetails().qmbRecHCP().setValue(hcp);
	}

	form.ctnDetails().dtimRecDateTime().setValue(new DateTime());
	
	// Set form to mode of editing MDT Note
	// Set local context for mode editing MDT Note
	form.getLocalContext().setEditMDTNoteMode(Boolean.TRUE);
	form.getLocalContext().setNewNote(Boolean.TRUE);
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateDataFromScreenVoSpecific(Hcp value)
{
	if (value instanceof NurseVo)
	{
		populateDataFromScreenVoSpecific((NurseVo)value);
	}
	else if (value instanceof MedicVo)
	{
		populateDataFromScreenVoSpecific((MedicVo)value);
	}
	else if (value instanceof TherapistVo)
	{
		populateDataFromScreenVoSpecific((TherapistVo)value);
	}
	else 
	{	
		value.setHcpType(form.lyrDetails().tabHcp().cmbHcpType().getValue()!=null?form.lyrDetails().tabHcp().cmbHcpType().getValue():HcpDisType.OTHER);
		
		// WDEV-13888
		value.setIsHCPaResponsibleHCP(form.lyrDetails().tabHcp().chkIsOtherDisciplineResponsibleHCP().getValue());
	}
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private MedicationDose getDoseRowValue(DynamicGridRow row)
{
	if (row == null)
		throw new CodingRuntimeException("Major Logical Error - Can not read a value from null row");
	
	if (row.getValue() == null || !(row.getValue() instanceof MedicationDose))
	{
		row.setValue(new MedicationDose());
	}
	
	MedicationDose dose = (MedicationDose) row.getValue();
	
	DynamicGridCell cell = row.getCells().get(form.dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_DOSENAME));
	dose.setDose(cell.getValue() != null ? cell.getValue().toString() : null);
	
	cell = row.getCells().get(form.dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_ROUTE));
	dose.setAdminRoute(cell.getValue() != null ? (MedicationRoute) (cell.getValue()) : null);
	
	cell = row.getCells().get(form.dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY));
	dose.setDoseStartHcp(cell.getIdentifier()!= null ? (Hcp) (cell.getIdentifier()) : null);
	
	cell = row.getCells().get(form.dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_DATE));
	dose.setDoseStartDate(cell.getValue() != null ? (Date) (cell.getValue()) : null);
	
	return dose;
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	form.ctnEducateToCarers().qmbAuthoringCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname("%" + value + "%");
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listHCPs(filter);
	if(coll != null)
	{
		for (int i = 0; i < coll.size(); i++)
		{
			Hcp med = coll.get(i);
			form.ctnEducateToCarers().qmbAuthoringCP().newRow(med, med.toString());			
		}
		if (coll.size() == 1)
		{
			form.ctnEducateToCarers().qmbAuthoringCP().setValue(coll.get(0));
		}
		else if (coll.size() > 1)
		{
			form.ctnEducateToCarers().qmbAuthoringCP().showOpened();		
		}		
	}
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException 
{
	form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listHcps(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().newRow(med, med.toString());			
	}
	if (coll.size() == 1)
	{
		form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().setValue(coll.get(0));
	}
	else if (coll.size() > 1)
	{
		form.ctnTherapy().lyrThermal().tabHeader().qmbAuthoringCP().showOpened();		
	}		
}
 
Example 16
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	form.qmbAuthoringCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listHCPs(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.qmbAuthoringCP().newRow(med, med.toString());			
	}
	if (coll.size() == 1)
	{
		form.qmbAuthoringCP().setValue(coll.get(0));
	}
	else if (coll.size() > 1)
	{
		form.qmbAuthoringCP().showOpened();		
	}		
}
 
Example 17
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void setDefaultValues()
{
	if(ConfigFlag.UI.RESTRICT_TAXONOMY_ACCESS.getValue())
	{
		form.ctnDetails().customControlCodingItem().setCodingItemType(CodingItemType.ALLERGY);
		form.ctnDetails().customControlCodingItem().setHotlist(new Boolean(false));
		form.ctnDetails().customControlCodingItem().setParentEditing(true);
		form.ctnDetails().customControlCodingItem().search("%");
		form.ctnDetails().customControlCodingItem().clear();
		
		
	}
	Hcp voHcp = (Hcp) domain.getHcpUser();
	if (voHcp != null)
	{
		form.ctnDetails().customControlAuthoringInfo().initializeComponent();
	}
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbAuthoringHCPTextSubmited(String value) throws PresentationLogicException {
	form.ctnDetails().qmbAuthoringHCP().clear();
	Hcp filter = new Hcp();
	PersonName name = new PersonName();
	name.setSurname("%" + value + "%");
	filter.setQueryName(name);
	//filter.setHcpType(HcpDisType.MEDICAL);
	
	HcpCollection voHCPColl = domain.listHcps(filter);
	
	if(voHCPColl != null)
	{
		for (int i = 0; i < voHCPColl.size(); i++)
		{
			form.ctnDetails().qmbAuthoringHCP().newRow(voHCPColl.get(i), voHCPColl.get(i).getName().toString());
		}
		if (voHCPColl.size() == 1)
		{
			form.ctnDetails().qmbAuthoringHCP().setValue(voHCPColl.get(0));
		}
		else if (voHCPColl.size() > 1)
		{
			form.ctnDetails().qmbAuthoringHCP().showOpened();		
		}
	}		
}
 
Example 19
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void editData() 
{
	form.setMode(FormMode.EDIT);

	
	if (form.getLocalContext().getSelectedRecordIsNotNull()
		&& form.getLocalContext().getSelectedRecord().getID_ReadyToLeave() == null)
	{
		Hcp hcpVo = (Hcp)domain.getHcpUser();
		if (hcpVo != null
			&& hcpVo.getHcpTypeIsNotNull()
			&& hcpVo.getHcpType().equals(HcpDisType.NURSING))
			form.ccDischNurseorMidwife().setValue(hcpVo);
		
		form.dtimDischMidf().setValue(new DateTime());
	}
	
	form.getGlobalContext().Clinical.seteDischargeDisableTabs(true);
	form.getLocalContext().setLastEvent(null);
	form.fireCustomControlValueChanged();
}
 
Example 20
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void setAuthoringCP(String value)
{
	form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listMedics(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().newRow(med, med.toString());			
	}
	if (coll.size() == 1)
		form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().setValue(coll.get(0));
	else if (coll.size() > 1)
		form.ctnStand().lyrParent().tabHeader().qmbAuthoringCP().showOpened();	
	
}
 
Example 21
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbRefferalToTextSubmited(String value) throws PresentationLogicException
{
	form.ctnDetails().qmbRefferalTo().clear();
	
	form.ctnDetails().cmbLocation().clear();			//wdev-16565
	HcpCollection coll = domain.listHcps(value);
	//WDEV-2105 - check for null. It shouldn't crash ???
	if(coll != null)
	{
		for (int i = 0; i < coll.size(); i++)
		{
			Hcp med = coll.get(i);
			form.ctnDetails().qmbRefferalTo().newRow(med.getMos(), med.toString());			
		}
		if (coll.size() == 1)
		{
			form.ctnDetails().qmbRefferalTo().setValue(coll.get(0).getMos());
			onQmbRefferalToValueChanged();
		}
		else if (coll.size() > 1)
		{
			form.ctnDetails().qmbRefferalTo().showOpened();		
		}		
	}
}
 
Example 22
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	form.qmbAuthoringHCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);

	HcpCollection coll = domain.listHCPs(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.qmbAuthoringHCP().newRow(med, med.toString());
	}
	if (coll.size() == 1)
		form.qmbAuthoringHCP().setValue(coll.get(0));
	else if (coll.size() > 1)
		form.qmbAuthoringHCP().showOpened();

}
 
Example 23
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException
{
	form.qmbAuthoringCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listMedics(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.qmbAuthoringCP().newRow(med, med.toString());			
	}
	if (coll.size() == 1)
	{
		form.qmbAuthoringCP().setValue(coll.get(0));
	}
	else if (coll.size() > 1)
	{
		form.qmbAuthoringCP().showOpened();		
	}		
	
}
 
Example 24
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void setAuthoringCP(String value)
{
	form.qmbHCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listMedics(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.qmbHCP().newRow(med, med.toString());			
	}
	
	if (coll.size() == 1)
		form.qmbHCP().setValue(coll.get(0));
	else if (coll.size() > 1)
		form.qmbHCP().showOpened();
	
}
 
Example 25
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbAuthoringCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	form.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listHcps(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().newRow(med, med.toString());			
	}
	if (coll.size() == 1)
	{
		form.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().setValue(coll.get(0));
	}
	else if (coll.size() > 1)
	{
		form.ctnDetails().lyrTENS().tabHeader().qmbAuthoringCP().showOpened();		
	}		
}
 
Example 26
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbAuthoringCPTextSubmited(String value) throws PresentationLogicException
{
	form.ctnDetails().qmbAuthoringCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listHCPs(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.ctnDetails().qmbAuthoringCP().newRow(med, med.toString());			
	}
	if (coll.size() == 1)
	{
		form.ctnDetails().qmbAuthoringCP().setValue(coll.get(0));
	}
	else if (coll.size() > 1)
	{
		form.ctnDetails().qmbAuthoringCP().showOpened();		
	}			
}
 
Example 27
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbAuthoringCPWardTextSubmited(String value) 
{
	form.qmbAuthoringCPWard().clear();
	HcpCollection voHcpColl = setAuthoringCP(value);	
	
	for (int i = 0; i < voHcpColl.size(); i++)
	{
		Hcp med = voHcpColl.get(i);
		form.qmbAuthoringCPWard().newRow(med, med.toString());			
	}
	
	if (voHcpColl.size() == 1)
		form.qmbAuthoringCPWard().setValue(voHcpColl.get(0));
	else if (voHcpColl.size() > 1)
		form.qmbAuthoringCPWard().showOpened();
}
 
Example 28
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onQmbAuthoringTextSubmited(String value) throws PresentationLogicException
{
	form.qmbAuthoring().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listHCPs(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.qmbAuthoring().newRow(med, med.toString());			
	}
	
	if (coll.size() == 1)
		form.qmbAuthoring().setValue(coll.get(0));
	else if (coll.size() > 1)
		form.qmbAuthoring().showOpened();	
	
}
 
Example 29
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadTherapistPresentCombo() 
{
	form.cmbTherapistPresent().clear();
	Hcp filter = new Hcp();
	filter.setHcpType(HcpDisType.THERAPY);
	
	HcpCollection collVoHcp = domain.listHcps(filter);
	
	if(collVoHcp != null)
	{
		for (int i = 0; i < collVoHcp.size(); i++)
		{
			form.cmbTherapistPresent().newRow(collVoHcp.get(i), collVoHcp.get(i).getName().toString());
		}
	}
}
 
Example 30
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void setAuthoringCP(String value)
{
	form.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listHCPs(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().newRow(med, med.toString());			
	}
	
	if (coll.size() == 1)
		form.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().setValue(coll.get(0));
	else if (coll.size() > 1)
		form.ctnGait().lyrGait().tabHeader().qmbAuthoringHCP().showOpened();
}
 
Example 31
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void setAuthoringCP(String value)
{
	form.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().clear();
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listHCPs(filter);
	if(coll != null)
	{
		for (int i = 0; i < coll.size(); i++)
		{
			Hcp med = coll.get(i);
			form.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().newRow(med, med.toString());			
		}
		
		if (coll.size() == 1)
			form.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().setValue(coll.get(0));
		else if (coll.size() > 1)
			form.ctnMob().lyrMob().tabHeader().qmbAuthoringCP().showOpened();
	}
}
 
Example 32
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void newInstance()
{
	if(isRACPCComplete())//	WDEV-13662
		return;
	
	// populate Cardiologist and Clinic Doctor
	Object objectHcpUser = domain.getHcpUser();
	
	if (objectHcpUser instanceof Hcp)
	{
		Hcp hcpUser = (Hcp) objectHcpUser;
		
		if(HcpDisType.MEDICAL.equals(hcpUser.getHcpType()))
		{
			form.ccClinicDoctor().setValue(hcpUser);
			form.ccCardiologist().setValue(hcpUser);
		}
	}
	
	CareContextForRACPCReferralVo objRACPCReferralCareContext = domain.getCareContext(form.getGlobalContext().Core.getCurrentCareContext());
	
	if (objRACPCReferralCareContext != null)
		if (objRACPCReferralCareContext.getPasEvent() != null)
			populateFromPASEvent(objRACPCReferralCareContext.getPasEvent());
	
	form.getLocalContext().setCurrentRecord(null);
	form.setMode(FormMode.EDIT);
}
 
Example 33
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void loadHcps()
{
	form.qmbAuthoringCP().clear();

	Hcp voHcp = (Hcp) domain.getHcpUser();
	if(voHcp != null)
	{
		form.qmbAuthoringCP().newRow(voHcp, voHcp.toString());
		form.qmbAuthoringCP().setValue(voHcp);
	}
}
 
Example 34
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void setDefaultValues()
{
	Hcp hcpUser = (Hcp)domain.getHcpUser();
	if(hcpUser != null)
	{
		form.qmbAuthoringCP().newRow(hcpUser, hcpUser.getName().toString());
		form.qmbAuthoringCP().setValue(hcpUser);
	}
	form.dtimAuthoring().setValue(new DateTime());		
}
 
Example 35
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void populateInstanceControlsWithDefaultValues()
{
	form.dteStarted().setValue(new DateTime());
	form.qmbHCP().clear();
	Hcp hcp = (Hcp)domain.getHcpUser();
	if(hcp != null)
	{
		form.qmbHCP().newRow(hcp, getHCPName(hcp));
		form.qmbHCP().setValue(hcp);
	}
	form.setMode(FormMode.EDIT);		
}
 
Example 36
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void setDefaultValues() 
{
	if (domain.getHcpUser() != null)
	{
		form.qmbRecordingHCP().clear();
		form.qmbRecordingHCP().newRow((Hcp) domain.getHcpUser(), domain.getHcpUser().toString());
		form.qmbRecordingHCP().setValue((Hcp) domain.getHcpUser());			
	}
	
	form.dteRecorded().setValue(new DateTime().getDate());
	form.tmeRecorded().setValue(new DateTime().getTime());
}
 
Example 37
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
protected void onQmbResolvedByTextSubmited(String value) throws PresentationLogicException 
{
	form.ctnDetails().qmbResolvedBy().clear();
	Hcp filter = new Hcp();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	filter.setHcpType(HcpDisType.MEDICAL);
	
	HcpCollection voHCPColl = domain.listHCPs(filter);
	
	if(voHCPColl != null)
	{
		for (int i = 0; i < voHCPColl.size(); i++)
		{
			form.ctnDetails().qmbResolvedBy().newRow(voHCPColl.get(i), voHCPColl.get(i).getName().toString());
		}
		if (voHCPColl.size() == 1)
		{
			form.ctnDetails().qmbResolvedBy().setValue(voHCPColl.get(0));
		}
		else if (voHCPColl.size() > 1)
		{
			form.ctnDetails().qmbResolvedBy().showOpened();		
		}
	}
}
 
Example 38
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void checkForDiscipline(ClinicalNotesShortVo voClinNote)
{
	MemberOfStaffShortVo mos = null;
	if (getDisciplineForLoggedInUser(form.getGlobalContext().Clinical.getCurrentClinicalNote()) != null)
		mos = getDisciplineForLoggedInUser(domain.getClinicalNote((ClinicalNotesShortVo)form.dyngrdNotes().getValue()));
	else
		engine.showMessage("No discipline for logged in user");

	Hcp voHcp = (Hcp) domain.getHcpUser();
	
	if (form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull() )
		{
			if (form.getGlobalContext().Clinical.getCurrentClinicalNote().getCurrentStatusIsNotNull() &&
					form.getGlobalContext().Clinical.getCurrentClinicalNote().getDisciplineIsNotNull() &&
						mos != null &&
							mos.getHcpIsNotNull())
					{
						if (!domain.getClinicalNote(voClinNote).getDiscipline().equals(mos.getHcp().getHcpType()))
						{
							form.getContextMenus().getClinicalNotingEDITItem().setVisible(false);
						}
						
						
						if (rulesForValidationContexMenus(voClinNote, voHcp))
						{
							form.getContextMenus().getClinicalNotingEDITItem().setVisible(false);
						}
						
						if (ClinicalNoteType.DISCHARGENOTE.equals(form.getGlobalContext().Clinical.getCurrentClinicalNote().getNoteType()) ||
								ClinicalNoteType.SUMMARYATADMISSION.equals(form.getGlobalContext().Clinical.getCurrentClinicalNote().getNoteType()))
						{
							form.getContextMenus().getClinicalNotingEDITItem().setVisible(false);
						}
					}
		}
}
 
Example 39
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void newParentInstance()
{
	GaitVo voNewParent = new GaitVo(); 	
	voNewParent.setAuthoringHCP((Hcp) domain.getHcpUser());
	voNewParent.setAuthoringDateTime(new DateTime());
	voNewParent.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
	voNewParent.setGaitTreatment(new GaitTreatmentVoCollection());
	populateParentInstanceControls(voNewParent);		
	form.getLocalContext().setSelectedParentInstance(voNewParent);	
}
 
Example 40
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
protected void onQmbConfirmedByTextSubmited(String value) throws PresentationLogicException 
{
	if(value == null)
		return;
	
	form.qmbConfirmedBy().clear();
	
	HcpFilter filter = new HcpFilter();
	PersonName name = new PersonName();
	name.setSurname(value);
	filter.setQueryName(name);
	
	HcpCollection coll = domain.listMedics(filter);
	for (int i = 0; i < coll.size(); i++)
	{
		Hcp med = coll.get(i);
		form.qmbConfirmedBy().newRow(med, med.toString());			
	}
	if (coll.size() == 1)
	{
		form.qmbConfirmedBy().setValue(coll.get(0));
		populateConfirmedData();
	}
	else if (coll.size() > 1)
	{
		form.qmbConfirmedBy().showOpened();		
	}	
}