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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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   Source Code and License 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();		
	}	
}
 
Example 41
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkForNurse() 
{
	Object hcp = domain.getHcpUser();
	
	if(hcp instanceof NurseVo && engine.hasRight(AppRight.CAN_CONFIRM_NURSING_DOCUMENTATION))
	{
		form.qmbConfirmedBy().newRow((Hcp) hcp, ((Hcp) hcp).toString());
		form.qmbConfirmedBy().setValue((Hcp) hcp);
		form.dteConfirmed().setValue(new Date());
		form.timConfirmed().setValue(new Time());
	}
}
 
Example 42
Project: AvoinApotti   File: Logic.java   Source Code and License 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));
		populateConfirmedDetails();
	}
	else if (coll.size() > 1)
	{
		form.qmbConfirmedBy().showOpened();
	}
}
 
Example 43
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * Function used to list HCPs in the query combo-box
 * 
 * @param listHCP -
 *            Represents the list of the HCP to be populated; if it is null
 *            the query will only be cleared
 */
private void populateHcpQueryCombo(HcpCollection listHCP)
{
	// Clear the query combo box
	form.ctnGoals().lyrGoals().Goal().qmbAuthoringHCP().clear();

	// If the HCP list is empty terminate function
	if (listHCP == null || listHCP.size() == 0)
		return;

	// Populate query combo box with HCP values
	for (int i = 0; i < listHCP.size(); i++)
	{
		// Skip null records from collection
		Hcp hcp = listHCP.get(i);

		if (hcp == null)
			continue;

		// Add a row for each HCP
		form.ctnGoals().lyrGoals().Goal().qmbAuthoringHCP().newRow(hcp, hcp.toString());
	}

	if (listHCP.size() == 1)
	{
		form.ctnGoals().lyrGoals().Goal().qmbAuthoringHCP().setValue(listHCP.get(0));
	}
	else if (listHCP.size() > 0)
	{
		form.ctnGoals().lyrGoals().Goal().qmbAuthoringHCP().showOpened();
	}
}
 
Example 44
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean isHcpType(Hcp voHcpResult)
{
	if (voHcpResult == null)
		return false;
	HcpDisType hcpType = form.lyrProServices().tabProfessional().cmbProfessional().getValue();
	HcpDisType hcpSubType = form.lyrProServices().tabProfessional().cmbHcpSubType().getValue();
	// Don't check "Other Discipline"
	if (hcpType != null && isOtherDiscipline(hcpType) == false)
	{
		if (hcpSubType != null && voHcpResult != null && voHcpResult.getID_HcpIsNotNull())
		{
			HcpFilter filter = new HcpFilter();
			filter.setID_Hcp(voHcpResult.getID_Hcp());
			Hcp voHcp = domain.getHcp(filter);
			if (voHcp != null)
			{
				if (voHcp instanceof NurseVo)
				{
					if (hcpSubType.equals(((NurseVo) voHcp).getNurseType()))
						return true;
				}
				if (voHcp instanceof MedicVo)
				{
					if (hcpSubType.equals(((MedicVo) voHcp).getMedicType()))
						return true;
				}
				if (voHcp instanceof TherapistVo)
				{
					if (hcpSubType.equals(((TherapistVo) voHcp).getTherapistType()))
						return true;
				}

				return false;
			}
		}
	}

	return true;
}
 
Example 45
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void initialize() 
{
	form.dtimConfirmed().setValue(new DateTime());
	if (domain.getHcpUser() != null)
	{
		Hcp hcpVo = (Hcp) domain.getHcpUser();
		HcpLiteVo liteVo = domain.getHcpLiteById(hcpVo);
		form.qmbConfirmed().newRow(liteVo, liteVo.getMos().getName().toShortForm());
		form.qmbConfirmed().setValue(liteVo);
	}
}
 
Example 46
Project: AvoinApotti   File: SupportNetworkProfessionalServicesImpl.java   Source Code and License 5 votes vote down vote up
public MemberOfStaffShortVoCollection listMembersOfStaff(MemberOfStaffShortVo filter, HcpDisType subType)
{
	MosAdmin impl = (MosAdmin) getDomainImpl(MosAdminImpl.class);
	MemberOfStaffShortVo voMos = new MemberOfStaffShortVo();
	Hcp voHcp = new Hcp();
	voHcp.setHcpType(subType);
	voMos.setHcp(voHcp);
	return impl.listMembersOfStaff(filter);
}
 
Example 47
Project: AvoinApotti   File: Logic.java   Source Code and License 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);
	}
	DateTime dateTime = new DateTime();
	form.dtimAuthoring().setValue(dateTime);	
	
}
 
Example 48
Project: AvoinApotti   File: SupportServicesImpl.java   Source Code and License 5 votes vote down vote up
public Hcp getHCP(HcpRefVo hcpRefVo)
{
	DomainFactory factory = getDomainFactory();
	ims.core.resource.people.domain.objects.Hcp doHcp = (ims.core.resource.people.domain.objects.Hcp) factory.getDomainObject(ims.core.resource.people.domain.objects.Hcp.class, hcpRefVo.getID_Hcp());

	if (Medic.class.isAssignableFrom(doHcp.getClass()))
		return MedicVoAssembler.create((Medic) doHcp);
	else if (doHcp instanceof Therapist)
		return TherapistVoAssembler.create((Therapist)doHcp);
	else if (doHcp instanceof Nurse)
		return NurseVoAssembler.create((Nurse) doHcp);

	return HcpAssembler.create(doHcp);		
}
 
Example 49
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateFilterFromScreen(MemberOfStaffShortVo filterVo)
{
	PersonName name = new PersonName();
	filterVo.setName(name);
	name.setSurname(form.txtSName().getValue());
	filterVo.setStaffType(form.cmbStaffType().getValue());
	if (form.cmbHcpTypeFilter().getValue() != null)
	{
		filterVo.setHcp(new Hcp());
		filterVo.getHcp().setHcpType(form.cmbHcpTypeFilter().getValue());
	}
	filterVo.setIsActive(new Boolean(form.chkActiveOnly().getValue()));
}
 
Example 50
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnSaveClick() throws PresentationLogicException 
{								
	Hcp voHcp = new Hcp();		
	
	if (form.getLocalContext().getbHcpDisciplineChangedIsNotNull() && form.getLocalContext().getbHcpDisciplineChanged() == Boolean.TRUE)
	{
		deActivateGlobalContextHCP();
		// Swap in newly created Hcp to the global context.
		voHcp = form.getLocalContext().getHcpVo();
	}
	else
	{
		if (form.getGlobalContext().getHcpIsNotNull())
			voHcp = form.getGlobalContext().getHcp();
	}				
	
	if (voHcp instanceof MedicVo)
		populateDataFromScreenVoSpecific((MedicVo) voHcp);
	else if (voHcp instanceof NurseVo)
		populateDataFromScreenVoSpecific((NurseVo) voHcp);
	else if (voHcp instanceof TherapistVo)
		populateDataFromScreenVoSpecific((TherapistVo) voHcp);
	else
		populateDataFromScreenVoSpecific(voHcp);						
	
	
	form.getGlobalContext().setHcp(voHcp);	
	form.getGlobalContext().setMosFullName(getMosName());
	
	engine.close(DialogResult.OK);				
}
 
Example 51
Project: AvoinApotti   File: PresentingProblemsImpl.java   Source Code and License 5 votes vote down vote up
public HcpLiteVoCollection listHCPs(Hcp filter) 
{		
	HcpAdmin impl = (HcpAdmin) getDomainImpl(HcpAdminImpl.class);
	if (filter != null && filter.getQueryNameIsNotNull())
		return impl.listHcpLiteByName(filter.getQueryName().getSurname());
	else
		return null;
}
 
Example 52
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@SuppressWarnings("unchecked")
private void populateHcpValues(HcpCollection hcpCollection)
{
	form.qmbCommencedByHcp().clear();
	
	if (hcpCollection == null || hcpCollection.size() == 0)
		return;
	
	if (hcpCollection.size() == 1 && hcpCollection.get(0) != null)
	{
		form.qmbCommencedByHcp().newRow(hcpCollection.get(0), hcpCollection.get(0).getMosIsNotNull() ? hcpCollection.get(0).toString() : "");
		form.qmbCommencedByHcp().setValue(hcpCollection.get(0));
		
		return;
	}

	
	for (int i = 0; i < hcpCollection.size(); i++)
	{
		Hcp hcp = hcpCollection.get(i);
		
		if (hcp == null)
			continue;
		
		form.qmbCommencedByHcp().getValues().add(hcp);
		
		form.qmbCommencedByHcp().newRow(hcp, hcp.getMosIsNotNull() ? hcp.getMos().toString() : "");
	}

	form.qmbCommencedByHcp().showOpened();
}
 
Example 53
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private Booking_AppointmentShortVo setApptAsSeen(CatsReferralListVo voRef)
{
	Booking_AppointmentShortVo voAppt = domain.getArrivedBookingAppt(voRef);
	if(voAppt != null)
	{
		HcpLiteVo voHCPLite = null;
		if (domain.getHcpUser() != null)
		{
			Hcp hcpVo = (Hcp) domain.getHcpUser();
			voHCPLite = domain.getHcpLiteById(hcpVo);
		}
		
		if (form.getGlobalContext().RefMan.getChosenTime() == null)
			voAppt.setSeenTime(new Time());
		else
			voAppt.setSeenTime(form.getGlobalContext().RefMan.getChosenTime());
		
		voAppt.setSeenBy(voHCPLite);
		voAppt.setApptStatus(Status_Reason.SEEN);
		
		Appointment_StatusVo voStatus = new Appointment_StatusVo(); 
		voStatus.setApptDate(voAppt.getAppointmentDate()); 
		voStatus.setApptTime(voAppt.getApptStartTime());
		voStatus.setStatusChangeDateTime(new DateTime());
		voStatus.setStatus(Status_Reason.SEEN); 
		voAppt.setCurrentStatusRecord(voStatus); 

		if(voAppt.getApptStatusHistory() == null) 
		{
			voAppt.setApptStatusHistory(new Appointment_StatusVoCollection()); 
		}
		
		voAppt.getApptStatusHistory().add(voStatus); 
		
		voAppt.setApptStatus(Status_Reason.SEEN);
		return voAppt;
	}
	return null;
}
 
Example 54
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newParentInstance()
{
	ElectrotherapyPneumaticVo voNewParent = new ElectrotherapyPneumaticVo(); 
	Hcp voHcp = (Hcp) domain.getHcpUser();
	if(voHcp != null)
		voNewParent.setAuthoringCP(voHcp);

	voNewParent.setAuthoringDateTime(new DateTime());
	voNewParent.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
	voNewParent.setPneumaticTreatment(new ElectrotherapyPneumaticTreatmentVoCollection());
	populateParentInstanceControls(voNewParent);		
	clearChildInstanceControls();
	form.getLocalContext().setSelectedParentInstance(voNewParent);	
	form.getLocalContext().setSelectedChildInstance(null);
}
 
Example 55
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void defaultHCP() 
{
	Hcp hcp = (Hcp) domain.getHcpUser();
	if(hcp != null)
	{
		form.ctnDetails().qmbCommencedBy().newRow(hcp, hcp.toString());
		form.ctnDetails().qmbCommencedBy().setValue(hcp);
	}
}
 
Example 56
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onQmbAuthoringHCPTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException
{
	form.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.qmbAuthoringHCP().newRow(voHCPColl.get(i), voHCPColl.get(i).getName().toString());
		}
		if (voHCPColl.size() == 1)
		{
			form.qmbAuthoringHCP().setValue(voHCPColl.get(0));
		}
		else if (voHCPColl.size() > 1)
		{
			form.qmbAuthoringHCP().showOpened();		
		}
	}
}
 
Example 57
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newParentInstance()
{
	ComplementaryTherapyTreatmentVo voNewParent = new ComplementaryTherapyTreatmentVo(); 
	Hcp voHcp = (Hcp) domain.getHcpUser();
	if(voHcp != null)
		voNewParent.setAuthoringCP(voHcp);

	voNewParent.setAuthoringDateTime(new DateTime());
	voNewParent.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
	voNewParent.setComplementaryTherapy(new ComplementaryTherapyDetailsVoCollection());
	populateParentInstanceControls(voNewParent);		
	form.getLocalContext().setSelectedParentInstance(voNewParent);	
	
}
 
Example 58
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean rulesForValidationContexMenus (ClinicalNotesShortVo voNote, Hcp voHcp)
{
	if (voNote.getDisciplineIsNotNull() 
		&& voHcp != null
			&& voHcp.getHcpTypeIsNotNull()
				&& voNote.getDiscipline().equals(voHcp.getHcpType()) 
					&& voNote.getCurrentStatusIsNotNull()
						&& voNote.getCurrentStatus().getStatusIsNotNull()
							&& voNote.getCurrentStatus().getStatus().equals(ClinicalNotesStatus.PREVALIDATION) )
								return true;
	return false;
}
 
Example 59
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newParentInstance() 
{
	RehabilitationVo voNewParent = new RehabilitationVo(); 		
	voNewParent.setAuthoringCP((Hcp) domain.getHcpUser());
	voNewParent.setAuthoringDateTime(new DateTime());
	voNewParent.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
	voNewParent.setRehabActivity(new RehabilitationActivityVoCollection());
	populateParentInstanceControls(voNewParent);
	loadEquipment();
	loadAdaptation();
	loadTechnique();
	form.getLocalContext().setSelectedParentInstance(voNewParent);			
	form.getLocalContext().setParentInstance(voNewParent); //wdev-13599
}
 
Example 60
Project: AvoinApotti   File: Logic.java   Source Code and License 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());	
}