Java Code Examples for ims.correspondence.vo.SpecialtyAccessVoCollection

The following are top voted examples for showing how to use ims.correspondence.vo.SpecialtyAccessVoCollection. 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
/**
 * @param voCollSpecialtyAccess
 * @author dhickey Populates the Specialty Access combos on both in and out patient lists
 */
private void populateSpecialtyCombos(SpecialtyAccessVoCollection voCollSpecialtyAccess)
{
	form.getLocalContext().setvoCollSpecialtyAccess(voCollSpecialtyAccess);
	if (voCollSpecialtyAccess != null)
	{
		for (int i = 0; i < voCollSpecialtyAccess.size(); i++)
		{
			if (voCollSpecialtyAccess.get(i) != null && voCollSpecialtyAccess.get(i).getAccessRightIsNotNull())
			{
				if (voCollSpecialtyAccess.get(i).getAccessRight().equals(Access.READWRITE))
				{
					form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Black);
					form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Black);
				}
				else
				{
					form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Blue);
					form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Blue);
				}
			}
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private SpecialtyAccessVoCollection loadSpecialtyAccess()
{
	form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().clear();

	Integer id = engine.getLoggedInUser().getHcpId();

	if (id == null)
	{
		engine.showMessage("You are not associated to Member of Staff, and therfore no User profile exists for you.");
		return null;
	}

	SpecialtyAccessVoCollection voSpecColl = domain.listSpecialtyAccessForUser(id);

	if (voSpecColl != null)
	{
		for (int i = 0; i < voSpecColl.size(); i++)
		{
			form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voSpecColl.get(i), voSpecColl.get(i).getSpecialty().getText());
		}
	}

	return voSpecColl;

}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void overlaySpecialtyAccess(SpecialtyAccessVoCollection voCollSpecialtyAccess) 
{
	for (int i = 0; voCollSpecialtyAccess != null && i < voCollSpecialtyAccess.size();i++) 
	{
		for (int j = 0; j < form.grdSpecialty().getRows().size(); j++) 
		{				
			if (form.grdSpecialty().getRows().get(j).getValue() instanceof Specialty)
			{
				Specialty lkpSpecialty = (Specialty) form.grdSpecialty().getRows().get(j).getValue();
				if (voCollSpecialtyAccess.get(i).getSpecialty().getId() == lkpSpecialty.getId())
				{					
					form.grdSpecialty().getRows().get(j).setValue(voCollSpecialtyAccess.get(i));												
					form.grdSpecialty().getRows().get(j).setcolAccess(voCollSpecialtyAccess.get(i).getAccessRight());
					break;												
				}
			}
		}
	}

	
}
 
Example 4
Project: AvoinApotti   File: PatientListsImpl.java   Source Code and License 6 votes vote down vote up
public SpecialtyAccessVoCollection listSpecialtyAccessForUser(Integer userId) 
{
	if (userId == null)
		throw new CodingRuntimeException("Mandatory Argument - Application User Id");

	DomainFactory factory = getDomainFactory();
	String hql = "select s1_1 from UserAccess as u1_1 join u1_1.specialtyAccess as s1_1 left join u1_1.appUser.mos as m1_1 where m1_1.hcp.id = :consId";
	StringBuffer condStr = new StringBuffer();
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	 
	markers.add("consId");
	values.add(userId);
		
	hql += condStr.toString();
	List specAccess = factory.find(hql, markers, values);
		
	
	if (specAccess != null)
		return SpecialtyAccessVoAssembler.createSpecialtyAccessVoCollectionFromSpecialtyAccess(specAccess);
	else
		return null;

}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * @param voCollSpecialtyAccess
 * @author dhickey Populates the Specialty Access combos on both in and out patient lists
 */
private void populateSpecialtyCombos(SpecialtyAccessVoCollection voCollSpecialtyAccess)
{
	form.getLocalContext().setvoCollSpecialtyAccess(voCollSpecialtyAccess);
	if (voCollSpecialtyAccess != null)
	{
		for (int i = 0; i < voCollSpecialtyAccess.size(); i++)
		{
			if (voCollSpecialtyAccess.get(i) != null && voCollSpecialtyAccess.get(i).getAccessRightIsNotNull())
			{
				if (voCollSpecialtyAccess.get(i).getAccessRight().equals(Access.READWRITE))
				{
					form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Black);
					form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Black);
				}
				else
				{
					form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Blue);
					form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Blue);
				}
			}
		}
	}
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private SpecialtyAccessVoCollection loadSpecialtyAccess()
{
	form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().clear();

	Integer id = engine.getLoggedInUser().getHcpId();

	if (id == null)
	{
		engine.showMessage("You are not associated to Member of Staff, and therfore no User profile exists for you.");
		return null;
	}

	SpecialtyAccessVoCollection voSpecColl = domain.listSpecialtyAccessForUser(id);

	if (voSpecColl != null)
	{
		for (int i = 0; i < voSpecColl.size(); i++)
		{
			form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voSpecColl.get(i), voSpecColl.get(i).getSpecialty().getText());
		}
	}

	return voSpecColl;

}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void overlaySpecialtyAccess(SpecialtyAccessVoCollection voCollSpecialtyAccess) 
{
	for (int i = 0; voCollSpecialtyAccess != null && i < voCollSpecialtyAccess.size();i++) 
	{
		for (int j = 0; j < form.grdSpecialty().getRows().size(); j++) 
		{				
			if (form.grdSpecialty().getRows().get(j).getValue() instanceof Specialty)
			{
				Specialty lkpSpecialty = (Specialty) form.grdSpecialty().getRows().get(j).getValue();
				if (voCollSpecialtyAccess.get(i).getSpecialty().getId() == lkpSpecialty.getId())
				{					
					form.grdSpecialty().getRows().get(j).setValue(voCollSpecialtyAccess.get(i));												
					form.grdSpecialty().getRows().get(j).setcolAccess(voCollSpecialtyAccess.get(i).getAccessRight());
					break;												
				}
			}
		}
	}

	
}
 
Example 8
Project: openMAXIMS   File: PatientListsImpl.java   Source Code and License 6 votes vote down vote up
public SpecialtyAccessVoCollection listSpecialtyAccessForUser(Integer userId) 
{
	if (userId == null)
		throw new CodingRuntimeException("Mandatory Argument - Application User Id");

	DomainFactory factory = getDomainFactory();
	String hql = "select s1_1 from UserAccess as u1_1 join u1_1.specialtyAccess as s1_1 left join u1_1.appUser.mos as m1_1 where m1_1.hcp.id = :consId";
	StringBuffer condStr = new StringBuffer();
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	 
	markers.add("consId");
	values.add(userId);
		
	hql += condStr.toString();
	List specAccess = factory.find(hql, markers, values);
		
	
	if (specAccess != null)
		return SpecialtyAccessVoAssembler.createSpecialtyAccessVoCollectionFromSpecialtyAccess(specAccess);
	else
		return null;

}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * @param voCollSpecialtyAccess
 * @author dhickey Populates the Specialty Access combos on both in and out patient lists
 */
private void populateSpecialtyCombos(SpecialtyAccessVoCollection voCollSpecialtyAccess)
{
	form.getLocalContext().setvoCollSpecialtyAccess(voCollSpecialtyAccess);
	if (voCollSpecialtyAccess != null)
	{
		for (int i = 0; i < voCollSpecialtyAccess.size(); i++)
		{
			if (voCollSpecialtyAccess.get(i) != null && voCollSpecialtyAccess.get(i).getAccessRightIsNotNull())
			{
				if (voCollSpecialtyAccess.get(i).getAccessRight().equals(Access.READWRITE))
				{
					form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Black);
					form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Black);
				}
				else
				{
					form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Blue);
					form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Blue);
				}
			}
		}
	}
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private SpecialtyAccessVoCollection loadSpecialtyAccess()
{
	form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().clear();

	Integer id = engine.getLoggedInUser().getHcpId();

	if (id == null)
	{
		engine.showMessage("You are not associated to Member of Staff, and therfore no User profile exists for you.");
		return null;
	}

	SpecialtyAccessVoCollection voSpecColl = domain.listSpecialtyAccessForUser(id);

	if (voSpecColl != null)
	{
		for (int i = 0; i < voSpecColl.size(); i++)
		{
			form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voSpecColl.get(i), voSpecColl.get(i).getSpecialty().getText());
		}
	}

	return voSpecColl;

}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void overlaySpecialtyAccess(SpecialtyAccessVoCollection voCollSpecialtyAccess) 
{
	for (int i = 0; voCollSpecialtyAccess != null && i < voCollSpecialtyAccess.size();i++) 
	{
		for (int j = 0; j < form.grdSpecialty().getRows().size(); j++) 
		{				
			if (form.grdSpecialty().getRows().get(j).getValue() instanceof Specialty)
			{
				Specialty lkpSpecialty = (Specialty) form.grdSpecialty().getRows().get(j).getValue();
				if (voCollSpecialtyAccess.get(i).getSpecialty().getId() == lkpSpecialty.getId())
				{					
					form.grdSpecialty().getRows().get(j).setValue(voCollSpecialtyAccess.get(i));												
					form.grdSpecialty().getRows().get(j).setcolAccess(voCollSpecialtyAccess.get(i).getAccessRight());
					break;												
				}
			}
		}
	}

	
}
 
Example 12
Project: openMAXIMS   File: PatientListsImpl.java   Source Code and License 6 votes vote down vote up
public SpecialtyAccessVoCollection listSpecialtyAccessForUser(Integer userId) 
{
	if (userId == null)
		throw new CodingRuntimeException("Mandatory Argument - Application User Id");

	DomainFactory factory = getDomainFactory();
	String hql = "select s1_1 from UserAccess as u1_1 join u1_1.specialtyAccess as s1_1 left join u1_1.appUser.mos as m1_1 where m1_1.hcp.id = :consId";
	StringBuffer condStr = new StringBuffer();
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	 
	markers.add("consId");
	values.add(userId);
		
	hql += condStr.toString();
	List specAccess = factory.find(hql, markers, values);
		
	
	if (specAccess != null)
		return SpecialtyAccessVoAssembler.createSpecialtyAccessVoCollectionFromSpecialtyAccess(specAccess);
	else
		return null;

}
 
Example 13
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
/**
 * @param voCollSpecialtyAccess
 * @author dhickey Populates the Specialty Access combos on both in and out patient lists
 */
private void populateSpecialtyCombos(SpecialtyAccessVoCollection voCollSpecialtyAccess)
{
	form.getLocalContext().setvoCollSpecialtyAccess(voCollSpecialtyAccess);
	if (voCollSpecialtyAccess != null)
	{
		for (int i = 0; i < voCollSpecialtyAccess.size(); i++)
		{
			if (voCollSpecialtyAccess.get(i) != null && voCollSpecialtyAccess.get(i).getAccessRightIsNotNull())
			{
				if (voCollSpecialtyAccess.get(i).getAccessRight().equals(Access.READWRITE))
				{
					form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Black);
					form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Black);
				}
				else
				{
					form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Blue);
					form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().newRow(voCollSpecialtyAccess.get(i), voCollSpecialtyAccess.get(i).getSpecialty().getText(), Color.Blue);
				}
			}
		}
	}
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private SpecialtyAccessVoCollection loadSpecialtyAccess()
{
	form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().clear();

	Integer id = engine.getLoggedInUser().getHcpId();

	if (id == null)
	{
		engine.showMessage("You are not associated to Member of Staff, and therfore no User profile exists for you.");
		return null;
	}

	SpecialtyAccessVoCollection voSpecColl = domain.listSpecialtyAccessForUser(id);

	if (voSpecColl != null)
	{
		for (int i = 0; i < voSpecColl.size(); i++)
		{
			form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().newRow(voSpecColl.get(i), voSpecColl.get(i).getSpecialty().getText());
		}
	}

	return voSpecColl;

}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void overlaySpecialtyAccess(SpecialtyAccessVoCollection voCollSpecialtyAccess) 
{
	for (int i = 0; voCollSpecialtyAccess != null && i < voCollSpecialtyAccess.size();i++) 
	{
		for (int j = 0; j < form.grdSpecialty().getRows().size(); j++) 
		{				
			if (form.grdSpecialty().getRows().get(j).getValue() instanceof Specialty)
			{
				Specialty lkpSpecialty = (Specialty) form.grdSpecialty().getRows().get(j).getValue();
				if (voCollSpecialtyAccess.get(i).getSpecialty().getId() == lkpSpecialty.getId())
				{					
					form.grdSpecialty().getRows().get(j).setValue(voCollSpecialtyAccess.get(i));												
					form.grdSpecialty().getRows().get(j).setcolAccess(voCollSpecialtyAccess.get(i).getAccessRight());
					break;												
				}
			}
		}
	}

	
}
 
Example 16
Project: openmaxims-linux   File: PatientListsImpl.java   Source Code and License 6 votes vote down vote up
public SpecialtyAccessVoCollection listSpecialtyAccessForUser(Integer userId) 
{
	if (userId == null)
		throw new CodingRuntimeException("Mandatory Argument - Application User Id");

	DomainFactory factory = getDomainFactory();
	String hql = "select s1_1 from UserAccess as u1_1 join u1_1.specialtyAccess as s1_1 left join u1_1.appUser.mos as m1_1 where m1_1.hcp.id = :consId";
	StringBuffer condStr = new StringBuffer();
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	 
	markers.add("consId");
	values.add(userId);
		
	hql += condStr.toString();
	List specAccess = factory.find(hql, markers, values);
		
	
	if (specAccess != null)
		return SpecialtyAccessVoAssembler.createSpecialtyAccessVoCollectionFromSpecialtyAccess(specAccess);
	else
		return null;

}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateSpecilatyAccess(DynamicGridRow parentRow, SpecialtyAccessVoCollection specialtyAccess)
{
	if (parentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add Specialty correspondences rows to null parent row");
	
	if (specialtyAccess == null)
		return;
	
	for (int i = 0; i < specialtyAccess.size(); i++)
	{
		newSpecialtyCorrespondenceGridRow(parentRow, specialtyAccess.get(i));
	}
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addSpecialtyToUserAccess(SpecialtyAccessVoCollection specialties, DynamicGridRowCollection rows)
{
	// NOTE: DO NOT make specialties = new SpecialtyAccessVoCollection() in this function
	// specialties MUST ALWAYS reference the clinics in the UserAccessVo

	if (rows == null)
		return;
	
	if (specialties == null)
			throw new CodingRuntimeException("Logical Error - Inserting values into null SPECIALTY collection");
	
	
	// Add the records from the grid
	for (int i = 0; i < rows.size(); i++)
	{
		DynamicGridRow row = rows.get(i);
		
		if (row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof SpecialtyAccessVo))
			throw new CodingRuntimeException("Major Logical Error");
		
		updateSpecialtyAccessRowValue(row);
		
		SpecialtyAccessVo specialtyAccess = (SpecialtyAccessVo) row.getValue();
		
		if (specialtyAccess.getSpecialty() != null || specialtyAccess.getAccessRight() != null)
		{
			specialties.add((SpecialtyAccessVo) row.getValue());
		}
	}
}
 
Example 19
Project: AvoinApotti   File: PatientListsImpl.java   Source Code and License 5 votes vote down vote up
private StringBuffer buildSpecialtyMessage(SpecialtyAccessVoCollection voCollSpecialtyAccess, String strAnd) throws DomainInterfaceException   
{
	StringBuffer strSpecialtyCodes = new StringBuffer();
	StringBuffer strSpecialtyMessage = new StringBuffer();
	String strSpecialtyClause = null;		
	if (voCollSpecialtyAccess != null && voCollSpecialtyAccess.size() > 0)
	{
		String extSystem = ConfigFlag.DOM.DEMOGRAPHICS_EXT_SYSTEM.getValue();
		for (int i=0; i < voCollSpecialtyAccess.size(); i++) 
		{			
			strSpecialtyClause = getLookupService().getRemoteLookup(voCollSpecialtyAccess.get(i).getSpecialty().getId(), extSystem);
			if (strSpecialtyClause != null)
			{
				if (i != 0) strSpecialtyCodes.append(",");					
				
				strSpecialtyCodes.append("'" + strSpecialtyClause + "'");
			}				
		}
	}	

	
	/**
	 * The user has chosen a single Specialty to filter on but that Specialty has no 
	 * associated PAS code.
	 */
	if (voCollSpecialtyAccess != null)
	{
		if (strSpecialtyClause == null && voCollSpecialtyAccess.size() == 1)
		{
			String sErr = new String();
			sErr = "Specialty '" + voCollSpecialtyAccess.get(0).getSpecialty().getText() + "' has no associated PAS Code";
			throw new DomainInterfaceException(sErr);
		}
	}
	
	if (strSpecialtyCodes != null && strSpecialtyCodes.length() > 0)
		strSpecialtyMessage.append(strAnd+ "$SPECIALTY$ in ( " + strSpecialtyCodes + ")");
		
	return strSpecialtyMessage;
}
 
Example 20
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateSpecilatyAccess(DynamicGridRow parentRow, SpecialtyAccessVoCollection specialtyAccess)
{
	if (parentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add Specialty correspondences rows to null parent row");
	
	if (specialtyAccess == null)
		return;
	
	for (int i = 0; i < specialtyAccess.size(); i++)
	{
		newSpecialtyCorrespondenceGridRow(parentRow, specialtyAccess.get(i));
	}
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addSpecialtyToUserAccess(SpecialtyAccessVoCollection specialties, DynamicGridRowCollection rows)
{
	// NOTE: DO NOT make specialties = new SpecialtyAccessVoCollection() in this function
	// specialties MUST ALWAYS reference the clinics in the UserAccessVo

	if (rows == null)
		return;
	
	if (specialties == null)
			throw new CodingRuntimeException("Logical Error - Inserting values into null SPECIALTY collection");
	
	
	// Add the records from the grid
	for (int i = 0; i < rows.size(); i++)
	{
		DynamicGridRow row = rows.get(i);
		
		if (row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof SpecialtyAccessVo))
			throw new CodingRuntimeException("Major Logical Error");
		
		updateSpecialtyAccessRowValue(row);
		
		SpecialtyAccessVo specialtyAccess = (SpecialtyAccessVo) row.getValue();
		
		if (specialtyAccess.getSpecialty() != null || specialtyAccess.getAccessRight() != null)
		{
			specialties.add((SpecialtyAccessVo) row.getValue());
		}
	}
}
 
Example 22
Project: openMAXIMS   File: PatientListsImpl.java   Source Code and License 5 votes vote down vote up
private StringBuffer buildSpecialtyMessage(SpecialtyAccessVoCollection voCollSpecialtyAccess, String strAnd) throws DomainInterfaceException   
{
	StringBuffer strSpecialtyCodes = new StringBuffer();
	StringBuffer strSpecialtyMessage = new StringBuffer();
	String strSpecialtyClause = null;		
	if (voCollSpecialtyAccess != null && voCollSpecialtyAccess.size() > 0)
	{
		String extSystem = ConfigFlag.DOM.DEMOGRAPHICS_EXT_SYSTEM.getValue();
		for (int i=0; i < voCollSpecialtyAccess.size(); i++) 
		{			
			strSpecialtyClause = getLookupService().getRemoteLookup(voCollSpecialtyAccess.get(i).getSpecialty().getId(), extSystem);
			if (strSpecialtyClause != null)
			{
				if (i != 0) strSpecialtyCodes.append(",");					
				
				strSpecialtyCodes.append("'" + strSpecialtyClause + "'");
			}				
		}
	}	

	
	/**
	 * The user has chosen a single Specialty to filter on but that Specialty has no 
	 * associated PAS code.
	 */
	if (voCollSpecialtyAccess != null)
	{
		if (strSpecialtyClause == null && voCollSpecialtyAccess.size() == 1)
		{
			String sErr = new String();
			sErr = "Specialty '" + voCollSpecialtyAccess.get(0).getSpecialty().getText() + "' has no associated PAS Code";
			throw new DomainInterfaceException(sErr);
		}
	}
	
	if (strSpecialtyCodes != null && strSpecialtyCodes.length() > 0)
		strSpecialtyMessage.append(strAnd+ "$SPECIALTY$ in ( " + strSpecialtyCodes + ")");
		
	return strSpecialtyMessage;
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateSpecilatyAccess(DynamicGridRow parentRow, SpecialtyAccessVoCollection specialtyAccess)
{
	if (parentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add Specialty correspondences rows to null parent row");
	
	if (specialtyAccess == null)
		return;
	
	for (int i = 0; i < specialtyAccess.size(); i++)
	{
		newSpecialtyCorrespondenceGridRow(parentRow, specialtyAccess.get(i));
	}
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addSpecialtyToUserAccess(SpecialtyAccessVoCollection specialties, DynamicGridRowCollection rows)
{
	// NOTE: DO NOT make specialties = new SpecialtyAccessVoCollection() in this function
	// specialties MUST ALWAYS reference the clinics in the UserAccessVo

	if (rows == null)
		return;
	
	if (specialties == null)
			throw new CodingRuntimeException("Logical Error - Inserting values into null SPECIALTY collection");
	
	
	// Add the records from the grid
	for (int i = 0; i < rows.size(); i++)
	{
		DynamicGridRow row = rows.get(i);
		
		if (row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof SpecialtyAccessVo))
			throw new CodingRuntimeException("Major Logical Error");
		
		updateSpecialtyAccessRowValue(row);
		
		SpecialtyAccessVo specialtyAccess = (SpecialtyAccessVo) row.getValue();
		
		if (specialtyAccess.getSpecialty() != null || specialtyAccess.getAccessRight() != null)
		{
			specialties.add((SpecialtyAccessVo) row.getValue());
		}
	}
}
 
Example 25
Project: openMAXIMS   File: PatientListsImpl.java   Source Code and License 5 votes vote down vote up
private StringBuffer buildSpecialtyMessage(SpecialtyAccessVoCollection voCollSpecialtyAccess, String strAnd) throws DomainInterfaceException   
{
	StringBuffer strSpecialtyCodes = new StringBuffer();
	StringBuffer strSpecialtyMessage = new StringBuffer();
	String strSpecialtyClause = null;		
	if (voCollSpecialtyAccess != null && voCollSpecialtyAccess.size() > 0)
	{
		String extSystem = ConfigFlag.DOM.DEMOGRAPHICS_EXT_SYSTEM.getValue();
		for (int i=0; i < voCollSpecialtyAccess.size(); i++) 
		{			
			strSpecialtyClause = getLookupService().getRemoteLookup(voCollSpecialtyAccess.get(i).getSpecialty().getId(), extSystem);
			if (strSpecialtyClause != null)
			{
				if (i != 0) strSpecialtyCodes.append(",");					
				
				strSpecialtyCodes.append("'" + strSpecialtyClause + "'");
			}				
		}
	}	

	
	/**
	 * The user has chosen a single Specialty to filter on but that Specialty has no 
	 * associated PAS code.
	 */
	if (voCollSpecialtyAccess != null)
	{
		if (strSpecialtyClause == null && voCollSpecialtyAccess.size() == 1)
		{
			String sErr = new String();
			sErr = "Specialty '" + voCollSpecialtyAccess.get(0).getSpecialty().getText() + "' has no associated PAS Code";
			throw new DomainInterfaceException(sErr);
		}
	}
	
	if (strSpecialtyCodes != null && strSpecialtyCodes.length() > 0)
		strSpecialtyMessage.append(strAnd+ "$SPECIALTY$ in ( " + strSpecialtyCodes + ")");
		
	return strSpecialtyMessage;
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateSpecilatyAccess(DynamicGridRow parentRow, SpecialtyAccessVoCollection specialtyAccess)
{
	if (parentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add Specialty correspondences rows to null parent row");
	
	if (specialtyAccess == null)
		return;
	
	for (int i = 0; i < specialtyAccess.size(); i++)
	{
		newSpecialtyCorrespondenceGridRow(parentRow, specialtyAccess.get(i));
	}
}
 
Example 27
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addSpecialtyToUserAccess(SpecialtyAccessVoCollection specialties, DynamicGridRowCollection rows)
{
	// NOTE: DO NOT make specialties = new SpecialtyAccessVoCollection() in this function
	// specialties MUST ALWAYS reference the clinics in the UserAccessVo

	if (rows == null)
		return;
	
	if (specialties == null)
			throw new CodingRuntimeException("Logical Error - Inserting values into null SPECIALTY collection");
	
	
	// Add the records from the grid
	for (int i = 0; i < rows.size(); i++)
	{
		DynamicGridRow row = rows.get(i);
		
		if (row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof SpecialtyAccessVo))
			throw new CodingRuntimeException("Major Logical Error");
		
		updateSpecialtyAccessRowValue(row);
		
		SpecialtyAccessVo specialtyAccess = (SpecialtyAccessVo) row.getValue();
		
		if (specialtyAccess.getSpecialty() != null || specialtyAccess.getAccessRight() != null)
		{
			specialties.add((SpecialtyAccessVo) row.getValue());
		}
	}
}
 
Example 28
Project: openmaxims-linux   File: PatientListsImpl.java   Source Code and License 5 votes vote down vote up
private StringBuffer buildSpecialtyMessage(SpecialtyAccessVoCollection voCollSpecialtyAccess, String strAnd) throws DomainInterfaceException   
{
	StringBuffer strSpecialtyCodes = new StringBuffer();
	StringBuffer strSpecialtyMessage = new StringBuffer();
	String strSpecialtyClause = null;		
	if (voCollSpecialtyAccess != null && voCollSpecialtyAccess.size() > 0)
	{
		String extSystem = ConfigFlag.DOM.DEMOGRAPHICS_EXT_SYSTEM.getValue();
		for (int i=0; i < voCollSpecialtyAccess.size(); i++) 
		{			
			strSpecialtyClause = getLookupService().getRemoteLookup(voCollSpecialtyAccess.get(i).getSpecialty().getId(), extSystem);
			if (strSpecialtyClause != null)
			{
				if (i != 0) strSpecialtyCodes.append(",");					
				
				strSpecialtyCodes.append("'" + strSpecialtyClause + "'");
			}				
		}
	}	

	
	/**
	 * The user has chosen a single Specialty to filter on but that Specialty has no 
	 * associated PAS code.
	 */
	if (voCollSpecialtyAccess != null)
	{
		if (strSpecialtyClause == null && voCollSpecialtyAccess.size() == 1)
		{
			String sErr = new String();
			sErr = "Specialty '" + voCollSpecialtyAccess.get(0).getSpecialty().getText() + "' has no associated PAS Code";
			throw new DomainInterfaceException(sErr);
		}
	}
	
	if (strSpecialtyCodes != null && strSpecialtyCodes.length() > 0)
		strSpecialtyMessage.append(strAnd+ "$SPECIALTY$ in ( " + strSpecialtyCodes + ")");
		
	return strSpecialtyMessage;
}
 
Example 29
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientListsFilterVo populateIPSearchCriteria()
{
	PatientListsFilterVo voSearchCriteria = new PatientListsFilterVo();
	voSearchCriteria.setInPatientSearch(new Boolean(true));

	if (ConfigFlag.UI.USE_PAS_CONTACT_FOR_CORRESPONDENCE.getValue())
	{
		if (form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue() == null)
		{
			engine.showMessage("'Discharge Date On/From' is a mandatory field");
			form.lyrPatientLists().tabInpatientList().dteIPDischDate().setFocus();
			return null;
		}
	}

	if (form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue() != null)
	{
		if (form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue().isLessThan(form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue()))
		{
			engine.showMessage("'Discharge Date To' must be later than the 'Discharge Date On/From'");
			form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().setFocus();
			return null;
		}
	}

	voSearchCriteria.setDate(form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue());
	voSearchCriteria.setDateEnd(form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue());

	if (form.lyrPatientLists().tabInpatientList().qmbIPConsultant().getValue() != null)
	{
		voSearchCriteria.setConsultants(new ConsultantAccessFullVoCollection());
		voSearchCriteria.getConsultants().add(form.lyrPatientLists().tabInpatientList().qmbIPConsultant().getValue());
	}
	else
	{
		if (form.getLocalContext().getvoCollConsultantAccess() == null)
		{
			// load all consultant access for first time in session
			form.getLocalContext().setvoCollConsultantAccess(loadConsultantQcmb("",false));
		}
		voSearchCriteria.setConsultants(form.getLocalContext().getvoCollConsultantAccess());
	}

	if (form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().getValue() != null)
	{
		voSearchCriteria.setSpecialties(new SpecialtyAccessVoCollection());
		voSearchCriteria.getSpecialties().add(form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().getValue());
	}
	else
		voSearchCriteria.setSpecialties(form.getLocalContext().getvoCollSpecialtyAccess());

	if (form.lyrPatientLists().tabInpatientList().cmbWard().getValue() != null)
		voSearchCriteria.setWard(form.lyrPatientLists().tabInpatientList().cmbWard().getValue());

	if (form.lyrPatientLists().tabInpatientList().cmbIPDocStatus().getValue() != null)
		voSearchCriteria.setDocumentStatus(form.lyrPatientLists().tabInpatientList().cmbIPDocStatus().getValue());

	form.getGlobalContext().Correspondence.setPatientListSearchCriteria(voSearchCriteria);
	return voSearchCriteria;
}
 
Example 30
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientListsFilterVo populateOPSearchCriteria()
{
	PatientListsFilterVo voSearchCriteria = new PatientListsFilterVo();

	voSearchCriteria.setInPatientSearch(new Boolean(false));
	if (form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue() == null)
	{
		engine.showMessage("'Clinic Date On/From' is a mandatory field");
		form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().setFocus();
		return null;
	}

	if (form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().getValue() != null)
	{
		if (form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().getValue().isLessThan(form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue()))
		{
			engine.showMessage("'Clinic Date To' must be later than the 'Clinic Date On/From'");
			form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().setFocus();
			return null;
		}
	}

	voSearchCriteria.setDate(form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPConsultant().getValue() != null)
	{
		voSearchCriteria.setConsultants(new ConsultantAccessFullVoCollection());
		voSearchCriteria.getConsultants().add(form.lyrPatientLists().tabOutpatientList().cmbOPConsultant().getValue());
	}
	else
		voSearchCriteria.setConsultants(form.getLocalContext().getvoCollConsultantAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().getValue() != null)
	{
		voSearchCriteria.setSpecialties(new SpecialtyAccessVoCollection());
		voSearchCriteria.getSpecialties().add(form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().getValue());
	}
	else
		voSearchCriteria.setSpecialties(form.getLocalContext().getvoCollSpecialtyAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPClinic().getValue() != null)
	{
		voSearchCriteria.setClinics(new ClinicAccessFullVoCollection());
		voSearchCriteria.getClinics().add(form.lyrPatientLists().tabOutpatientList().cmbOPClinic().getValue());
	}
	else
		voSearchCriteria.setClinics(form.getLocalContext().getvoCollClinicAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPDocumentStatus() != null)
		voSearchCriteria.setDocumentStatus(form.lyrPatientLists().tabOutpatientList().cmbOPDocumentStatus().getValue());

	return voSearchCriteria;
}
 
Example 31
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateCombos(UserAccessVo voUserAccess) {
	
	ClinicAccessVoCollection  collClinicAccessVo = voUserAccess.getClinicAccess();
	
	if (collClinicAccessVo != null)
	{
		for (int i = 0; i < collClinicAccessVo.size(); i++)
		{
			form.cmbClinic().newRow(collClinicAccessVo.get(i).getClinic(), collClinicAccessVo.get(i).getClinic().getClinicName());
		}
		if (collClinicAccessVo.size() == 1)
		{
			form.cmbClinic().setValue(collClinicAccessVo.get(0).getClinic());
			form.cmbClinic().getValue();
		}
		else if (collClinicAccessVo.size() > 1)
			form.cmbClinic().showOpened();
			
	
	}
	
	ConsultantAccessVoCollection  collConsultantAccessVo = voUserAccess.getConsultantAccess();
	MedicLiteVo med = null;
	
	if (collConsultantAccessVo != null)
	{
		for (int i = 0; i < collConsultantAccessVo.size(); i++)
		{
			med = collConsultantAccessVo.get(i).getConsultant();
			form.cmbConsultant().newRow(med, med.toString());			
		}
	}
	if (collConsultantAccessVo != null &&
			collConsultantAccessVo.size() == 1)
					form.cmbConsultant().setValue(collConsultantAccessVo.get(0).getConsultant());
	else if (collConsultantAccessVo != null &&
			collConsultantAccessVo.size() > 1)
					form.cmbConsultant().showOpened();
	
	Integer id = engine.getLoggedInUser().getHcpId();
	if (med != null && id != null &&id.equals(med.getID_Hcp()))
		form.cmbConsultant().setValue(med);
	
	form.cmbSpecialty().clear();
	
	SpecialtyAccessVoCollection  collSpecialtyAccessVo = voUserAccess.getSpecialtyAccess();
	
	if (collSpecialtyAccessVo != null)
	{
		for (int i = 0; i < collSpecialtyAccessVo.size(); i++)
		{
			form.cmbSpecialty().newRow(collSpecialtyAccessVo.get(i).getSpecialty(), collSpecialtyAccessVo.get(i).getSpecialty().getText());
		}
		if (collSpecialtyAccessVo.size() == 1)
			form.cmbSpecialty().setValue(collSpecialtyAccessVo.get(0).getSpecialty());
		else if (collSpecialtyAccessVo.size() > 1)
			form.cmbSpecialty().showOpened();
	}		
}
 
Example 32
Project: AvoinApotti   File: DocumentDetailsInitialiser.java   Source Code and License 4 votes vote down vote up
public DocumentDetailsInitialiser(ConsultantAccessFullVoCollection voCollConsultantAccess, ClinicAccessFullVoCollection voCollLocationAccess,SpecialtyAccessVoCollection voCollSpecialtyAccess)
{
	m_ConsultantAccessCollection = voCollConsultantAccess;
	m_SpecialtyAccessCollection = voCollSpecialtyAccess;
	m_LocationAccessCollection = voCollLocationAccess;		
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientListsFilterVo populateIPSearchCriteria()
{
	PatientListsFilterVo voSearchCriteria = new PatientListsFilterVo();
	voSearchCriteria.setInPatientSearch(new Boolean(true));

	if (ConfigFlag.UI.USE_PAS_CONTACT_FOR_CORRESPONDENCE.getValue())
	{
		if (form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue() == null)
		{
			engine.showMessage("'Discharge Date On/From' is a mandatory field");
			form.lyrPatientLists().tabInpatientList().dteIPDischDate().setFocus();
			return null;
		}
	}

	if (form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue() != null)
	{
		if (form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue().isLessThan(form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue()))
		{
			engine.showMessage("'Discharge Date To' must be later than the 'Discharge Date On/From'");
			form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().setFocus();
			return null;
		}
	}

	voSearchCriteria.setDate(form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue());
	voSearchCriteria.setDateEnd(form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue());

	if (form.lyrPatientLists().tabInpatientList().qmbIPConsultant().getValue() != null)
	{
		voSearchCriteria.setConsultants(new ConsultantAccessFullVoCollection());
		voSearchCriteria.getConsultants().add(form.lyrPatientLists().tabInpatientList().qmbIPConsultant().getValue());
	}
	else
	{
		if (form.getLocalContext().getvoCollConsultantAccess() == null)
		{
			// load all consultant access for first time in session
			form.getLocalContext().setvoCollConsultantAccess(loadConsultantQcmb("",false));
		}
		voSearchCriteria.setConsultants(form.getLocalContext().getvoCollConsultantAccess());
	}

	if (form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().getValue() != null)
	{
		voSearchCriteria.setSpecialties(new SpecialtyAccessVoCollection());
		voSearchCriteria.getSpecialties().add(form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().getValue());
	}
	else
		voSearchCriteria.setSpecialties(form.getLocalContext().getvoCollSpecialtyAccess());

	if (form.lyrPatientLists().tabInpatientList().cmbWard().getValue() != null)
		voSearchCriteria.setWard(form.lyrPatientLists().tabInpatientList().cmbWard().getValue());

	if (form.lyrPatientLists().tabInpatientList().cmbIPDocStatus().getValue() != null)
		voSearchCriteria.setDocumentStatus(form.lyrPatientLists().tabInpatientList().cmbIPDocStatus().getValue());

	form.getGlobalContext().Correspondence.setPatientListSearchCriteria(voSearchCriteria);
	return voSearchCriteria;
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientListsFilterVo populateOPSearchCriteria()
{
	PatientListsFilterVo voSearchCriteria = new PatientListsFilterVo();

	voSearchCriteria.setInPatientSearch(new Boolean(false));
	if (form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue() == null)
	{
		engine.showMessage("'Clinic Date On/From' is a mandatory field");
		form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().setFocus();
		return null;
	}

	if (form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().getValue() != null)
	{
		if (form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().getValue().isLessThan(form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue()))
		{
			engine.showMessage("'Clinic Date To' must be later than the 'Clinic Date On/From'");
			form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().setFocus();
			return null;
		}
	}

	voSearchCriteria.setDate(form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPConsultant().getValue() != null)
	{
		voSearchCriteria.setConsultants(new ConsultantAccessFullVoCollection());
		voSearchCriteria.getConsultants().add(form.lyrPatientLists().tabOutpatientList().cmbOPConsultant().getValue());
	}
	else
		voSearchCriteria.setConsultants(form.getLocalContext().getvoCollConsultantAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().getValue() != null)
	{
		voSearchCriteria.setSpecialties(new SpecialtyAccessVoCollection());
		voSearchCriteria.getSpecialties().add(form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().getValue());
	}
	else
		voSearchCriteria.setSpecialties(form.getLocalContext().getvoCollSpecialtyAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPClinic().getValue() != null)
	{
		voSearchCriteria.setClinics(new ClinicAccessFullVoCollection());
		voSearchCriteria.getClinics().add(form.lyrPatientLists().tabOutpatientList().cmbOPClinic().getValue());
	}
	else
		voSearchCriteria.setClinics(form.getLocalContext().getvoCollClinicAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPDocumentStatus() != null)
		voSearchCriteria.setDocumentStatus(form.lyrPatientLists().tabOutpatientList().cmbOPDocumentStatus().getValue());

	return voSearchCriteria;
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateCombos(UserAccessVo voUserAccess) {
	
	ClinicAccessVoCollection  collClinicAccessVo = voUserAccess.getClinicAccess();
	
	if (collClinicAccessVo != null)
	{
		for (int i = 0; i < collClinicAccessVo.size(); i++)
		{
			form.cmbClinic().newRow(collClinicAccessVo.get(i).getClinic(), collClinicAccessVo.get(i).getClinic().getClinicName());
		}
		if (collClinicAccessVo.size() == 1)
		{
			form.cmbClinic().setValue(collClinicAccessVo.get(0).getClinic());
			form.cmbClinic().getValue();
		}
		else if (collClinicAccessVo.size() > 1)
			form.cmbClinic().showOpened();
			
	
	}
	
	ConsultantAccessVoCollection  collConsultantAccessVo = voUserAccess.getConsultantAccess();
	MedicLiteVo med = null;
	
	if (collConsultantAccessVo != null)
	{
		for (int i = 0; i < collConsultantAccessVo.size(); i++)
		{
			med = collConsultantAccessVo.get(i).getConsultant();
			form.cmbConsultant().newRow(med, med.toString());			
		}
	}
	if (collConsultantAccessVo != null &&
			collConsultantAccessVo.size() == 1)
					form.cmbConsultant().setValue(collConsultantAccessVo.get(0).getConsultant());
	else if (collConsultantAccessVo != null &&
			collConsultantAccessVo.size() > 1)
					form.cmbConsultant().showOpened();
	
	Integer id = engine.getLoggedInUser().getHcpId();
	if (med != null && id != null &&id.equals(med.getID_Hcp()))
		form.cmbConsultant().setValue(med);
	
	form.cmbSpecialty().clear();
	
	SpecialtyAccessVoCollection  collSpecialtyAccessVo = voUserAccess.getSpecialtyAccess();
	
	if (collSpecialtyAccessVo != null)
	{
		for (int i = 0; i < collSpecialtyAccessVo.size(); i++)
		{
			form.cmbSpecialty().newRow(collSpecialtyAccessVo.get(i).getSpecialty(), collSpecialtyAccessVo.get(i).getSpecialty().getText());
		}
		if (collSpecialtyAccessVo.size() == 1)
			form.cmbSpecialty().setValue(collSpecialtyAccessVo.get(0).getSpecialty());
		else if (collSpecialtyAccessVo.size() > 1)
			form.cmbSpecialty().showOpened();
	}		
}
 
Example 36
Project: openMAXIMS   File: DocumentDetailsInitialiser.java   Source Code and License 4 votes vote down vote up
public DocumentDetailsInitialiser(ConsultantAccessFullVoCollection voCollConsultantAccess, ClinicAccessFullVoCollection voCollLocationAccess,SpecialtyAccessVoCollection voCollSpecialtyAccess)
{
	m_ConsultantAccessCollection = voCollConsultantAccess;
	m_SpecialtyAccessCollection = voCollSpecialtyAccess;
	m_LocationAccessCollection = voCollLocationAccess;		
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientListsFilterVo populateIPSearchCriteria()
{
	PatientListsFilterVo voSearchCriteria = new PatientListsFilterVo();
	voSearchCriteria.setInPatientSearch(new Boolean(true));

	if (ConfigFlag.UI.USE_PAS_CONTACT_FOR_CORRESPONDENCE.getValue())
	{
		if (form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue() == null)
		{
			engine.showMessage("'Discharge Date On/From' is a mandatory field");
			form.lyrPatientLists().tabInpatientList().dteIPDischDate().setFocus();
			return null;
		}
	}

	if (form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue() != null)
	{
		if (form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue().isLessThan(form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue()))
		{
			engine.showMessage("'Discharge Date To' must be later than the 'Discharge Date On/From'");
			form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().setFocus();
			return null;
		}
	}

	voSearchCriteria.setDate(form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue());
	voSearchCriteria.setDateEnd(form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue());

	if (form.lyrPatientLists().tabInpatientList().qmbIPConsultant().getValue() != null)
	{
		voSearchCriteria.setConsultants(new ConsultantAccessFullVoCollection());
		voSearchCriteria.getConsultants().add(form.lyrPatientLists().tabInpatientList().qmbIPConsultant().getValue());
	}
	else
	{
		if (form.getLocalContext().getvoCollConsultantAccess() == null)
		{
			// load all consultant access for first time in session
			form.getLocalContext().setvoCollConsultantAccess(loadConsultantQcmb("",false));
		}
		voSearchCriteria.setConsultants(form.getLocalContext().getvoCollConsultantAccess());
	}

	if (form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().getValue() != null)
	{
		voSearchCriteria.setSpecialties(new SpecialtyAccessVoCollection());
		voSearchCriteria.getSpecialties().add(form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().getValue());
	}
	else
		voSearchCriteria.setSpecialties(form.getLocalContext().getvoCollSpecialtyAccess());

	if (form.lyrPatientLists().tabInpatientList().cmbWard().getValue() != null)
		voSearchCriteria.setWard(form.lyrPatientLists().tabInpatientList().cmbWard().getValue());

	if (form.lyrPatientLists().tabInpatientList().cmbIPDocStatus().getValue() != null)
		voSearchCriteria.setDocumentStatus(form.lyrPatientLists().tabInpatientList().cmbIPDocStatus().getValue());

	form.getGlobalContext().Correspondence.setPatientListSearchCriteria(voSearchCriteria);
	return voSearchCriteria;
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientListsFilterVo populateOPSearchCriteria()
{
	PatientListsFilterVo voSearchCriteria = new PatientListsFilterVo();

	voSearchCriteria.setInPatientSearch(new Boolean(false));
	if (form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue() == null)
	{
		engine.showMessage("'Clinic Date On/From' is a mandatory field");
		form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().setFocus();
		return null;
	}

	if (form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().getValue() != null)
	{
		if (form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().getValue().isLessThan(form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue()))
		{
			engine.showMessage("'Clinic Date To' must be later than the 'Clinic Date On/From'");
			form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().setFocus();
			return null;
		}
	}

	voSearchCriteria.setDate(form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPConsultant().getValue() != null)
	{
		voSearchCriteria.setConsultants(new ConsultantAccessFullVoCollection());
		voSearchCriteria.getConsultants().add(form.lyrPatientLists().tabOutpatientList().cmbOPConsultant().getValue());
	}
	else
		voSearchCriteria.setConsultants(form.getLocalContext().getvoCollConsultantAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().getValue() != null)
	{
		voSearchCriteria.setSpecialties(new SpecialtyAccessVoCollection());
		voSearchCriteria.getSpecialties().add(form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().getValue());
	}
	else
		voSearchCriteria.setSpecialties(form.getLocalContext().getvoCollSpecialtyAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPClinic().getValue() != null)
	{
		voSearchCriteria.setClinics(new ClinicAccessFullVoCollection());
		voSearchCriteria.getClinics().add(form.lyrPatientLists().tabOutpatientList().cmbOPClinic().getValue());
	}
	else
		voSearchCriteria.setClinics(form.getLocalContext().getvoCollClinicAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPDocumentStatus() != null)
		voSearchCriteria.setDocumentStatus(form.lyrPatientLists().tabOutpatientList().cmbOPDocumentStatus().getValue());

	return voSearchCriteria;
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateCombos(UserAccessVo voUserAccess) {
	
	ClinicAccessVoCollection  collClinicAccessVo = voUserAccess.getClinicAccess();
	
	if (collClinicAccessVo != null)
	{
		for (int i = 0; i < collClinicAccessVo.size(); i++)
		{
			form.cmbClinic().newRow(collClinicAccessVo.get(i).getClinic(), collClinicAccessVo.get(i).getClinic().getClinicName());
		}
		if (collClinicAccessVo.size() == 1)
		{
			form.cmbClinic().setValue(collClinicAccessVo.get(0).getClinic());
			form.cmbClinic().getValue();
		}
		else if (collClinicAccessVo.size() > 1)
			form.cmbClinic().showOpened();
			
	
	}
	
	ConsultantAccessVoCollection  collConsultantAccessVo = voUserAccess.getConsultantAccess();
	MedicLiteVo med = null;
	
	if (collConsultantAccessVo != null)
	{
		for (int i = 0; i < collConsultantAccessVo.size(); i++)
		{
			med = collConsultantAccessVo.get(i).getConsultant();
			form.cmbConsultant().newRow(med, med.toString());			
		}
	}
	if (collConsultantAccessVo != null &&
			collConsultantAccessVo.size() == 1)
					form.cmbConsultant().setValue(collConsultantAccessVo.get(0).getConsultant());
	else if (collConsultantAccessVo != null &&
			collConsultantAccessVo.size() > 1)
					form.cmbConsultant().showOpened();
	
	Integer id = engine.getLoggedInUser().getHcpId();
	if (med != null && id != null &&id.equals(med.getID_Hcp()))
		form.cmbConsultant().setValue(med);
	
	form.cmbSpecialty().clear();
	
	SpecialtyAccessVoCollection  collSpecialtyAccessVo = voUserAccess.getSpecialtyAccess();
	
	if (collSpecialtyAccessVo != null)
	{
		for (int i = 0; i < collSpecialtyAccessVo.size(); i++)
		{
			form.cmbSpecialty().newRow(collSpecialtyAccessVo.get(i).getSpecialty(), collSpecialtyAccessVo.get(i).getSpecialty().getText());
		}
		if (collSpecialtyAccessVo.size() == 1)
			form.cmbSpecialty().setValue(collSpecialtyAccessVo.get(0).getSpecialty());
		else if (collSpecialtyAccessVo.size() > 1)
			form.cmbSpecialty().showOpened();
	}		
}
 
Example 40
Project: openMAXIMS   File: DocumentDetailsInitialiser.java   Source Code and License 4 votes vote down vote up
public DocumentDetailsInitialiser(ConsultantAccessFullVoCollection voCollConsultantAccess, ClinicAccessFullVoCollection voCollLocationAccess,SpecialtyAccessVoCollection voCollSpecialtyAccess)
{
	m_ConsultantAccessCollection = voCollConsultantAccess;
	m_SpecialtyAccessCollection = voCollSpecialtyAccess;
	m_LocationAccessCollection = voCollLocationAccess;		
}
 
Example 41
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientListsFilterVo populateIPSearchCriteria()
{
	PatientListsFilterVo voSearchCriteria = new PatientListsFilterVo();
	voSearchCriteria.setInPatientSearch(new Boolean(true));

	if (ConfigFlag.UI.USE_PAS_CONTACT_FOR_CORRESPONDENCE.getValue())
	{
		if (form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue() == null)
		{
			engine.showMessage("'Discharge Date On/From' is a mandatory field");
			form.lyrPatientLists().tabInpatientList().dteIPDischDate().setFocus();
			return null;
		}
	}

	if (form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue() != null)
	{
		if (form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue().isLessThan(form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue()))
		{
			engine.showMessage("'Discharge Date To' must be later than the 'Discharge Date On/From'");
			form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().setFocus();
			return null;
		}
	}

	voSearchCriteria.setDate(form.lyrPatientLists().tabInpatientList().dteIPDischDate().getValue());
	voSearchCriteria.setDateEnd(form.lyrPatientLists().tabInpatientList().dteIPDischEndDate().getValue());

	if (form.lyrPatientLists().tabInpatientList().qmbIPConsultant().getValue() != null)
	{
		voSearchCriteria.setConsultants(new ConsultantAccessFullVoCollection());
		voSearchCriteria.getConsultants().add(form.lyrPatientLists().tabInpatientList().qmbIPConsultant().getValue());
	}
	else
	{
		if (form.getLocalContext().getvoCollConsultantAccess() == null)
		{
			// load all consultant access for first time in session
			form.getLocalContext().setvoCollConsultantAccess(loadConsultantQcmb("",false));
		}
		voSearchCriteria.setConsultants(form.getLocalContext().getvoCollConsultantAccess());
	}

	if (form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().getValue() != null)
	{
		voSearchCriteria.setSpecialties(new SpecialtyAccessVoCollection());
		voSearchCriteria.getSpecialties().add(form.lyrPatientLists().tabInpatientList().cmbIPSpecialty().getValue());
	}
	else
		voSearchCriteria.setSpecialties(form.getLocalContext().getvoCollSpecialtyAccess());

	if (form.lyrPatientLists().tabInpatientList().cmbWard().getValue() != null)
		voSearchCriteria.setWard(form.lyrPatientLists().tabInpatientList().cmbWard().getValue());

	if (form.lyrPatientLists().tabInpatientList().cmbIPDocStatus().getValue() != null)
		voSearchCriteria.setDocumentStatus(form.lyrPatientLists().tabInpatientList().cmbIPDocStatus().getValue());

	form.getGlobalContext().Correspondence.setPatientListSearchCriteria(voSearchCriteria);
	return voSearchCriteria;
}
 
Example 42
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private PatientListsFilterVo populateOPSearchCriteria()
{
	PatientListsFilterVo voSearchCriteria = new PatientListsFilterVo();

	voSearchCriteria.setInPatientSearch(new Boolean(false));
	if (form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue() == null)
	{
		engine.showMessage("'Clinic Date On/From' is a mandatory field");
		form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().setFocus();
		return null;
	}

	if (form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().getValue() != null)
	{
		if (form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().getValue().isLessThan(form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue()))
		{
			engine.showMessage("'Clinic Date To' must be later than the 'Clinic Date On/From'");
			form.lyrPatientLists().tabOutpatientList().dteOPClinicEndDate().setFocus();
			return null;
		}
	}

	voSearchCriteria.setDate(form.lyrPatientLists().tabOutpatientList().dteOPClinicDate().getValue());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPConsultant().getValue() != null)
	{
		voSearchCriteria.setConsultants(new ConsultantAccessFullVoCollection());
		voSearchCriteria.getConsultants().add(form.lyrPatientLists().tabOutpatientList().cmbOPConsultant().getValue());
	}
	else
		voSearchCriteria.setConsultants(form.getLocalContext().getvoCollConsultantAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().getValue() != null)
	{
		voSearchCriteria.setSpecialties(new SpecialtyAccessVoCollection());
		voSearchCriteria.getSpecialties().add(form.lyrPatientLists().tabOutpatientList().cmbOPSpecialty().getValue());
	}
	else
		voSearchCriteria.setSpecialties(form.getLocalContext().getvoCollSpecialtyAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPClinic().getValue() != null)
	{
		voSearchCriteria.setClinics(new ClinicAccessFullVoCollection());
		voSearchCriteria.getClinics().add(form.lyrPatientLists().tabOutpatientList().cmbOPClinic().getValue());
	}
	else
		voSearchCriteria.setClinics(form.getLocalContext().getvoCollClinicAccess());

	if (form.lyrPatientLists().tabOutpatientList().cmbOPDocumentStatus() != null)
		voSearchCriteria.setDocumentStatus(form.lyrPatientLists().tabOutpatientList().cmbOPDocumentStatus().getValue());

	return voSearchCriteria;
}
 
Example 43
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateCombos(UserAccessVo voUserAccess) {
	
	ClinicAccessVoCollection  collClinicAccessVo = voUserAccess.getClinicAccess();
	
	if (collClinicAccessVo != null)
	{
		for (int i = 0; i < collClinicAccessVo.size(); i++)
		{
			form.cmbClinic().newRow(collClinicAccessVo.get(i).getClinic(), collClinicAccessVo.get(i).getClinic().getClinicName());
		}
		if (collClinicAccessVo.size() == 1)
		{
			form.cmbClinic().setValue(collClinicAccessVo.get(0).getClinic());
			form.cmbClinic().getValue();
		}
		else if (collClinicAccessVo.size() > 1)
			form.cmbClinic().showOpened();
			
	
	}
	
	ConsultantAccessVoCollection  collConsultantAccessVo = voUserAccess.getConsultantAccess();
	MedicLiteVo med = null;
	
	if (collConsultantAccessVo != null)
	{
		for (int i = 0; i < collConsultantAccessVo.size(); i++)
		{
			med = collConsultantAccessVo.get(i).getConsultant();
			form.cmbConsultant().newRow(med, med.toString());			
		}
	}
	if (collConsultantAccessVo != null &&
			collConsultantAccessVo.size() == 1)
					form.cmbConsultant().setValue(collConsultantAccessVo.get(0).getConsultant());
	else if (collConsultantAccessVo != null &&
			collConsultantAccessVo.size() > 1)
					form.cmbConsultant().showOpened();
	
	Integer id = engine.getLoggedInUser().getHcpId();
	if (med != null && id != null &&id.equals(med.getID_Hcp()))
		form.cmbConsultant().setValue(med);
	
	form.cmbSpecialty().clear();
	
	SpecialtyAccessVoCollection  collSpecialtyAccessVo = voUserAccess.getSpecialtyAccess();
	
	if (collSpecialtyAccessVo != null)
	{
		for (int i = 0; i < collSpecialtyAccessVo.size(); i++)
		{
			form.cmbSpecialty().newRow(collSpecialtyAccessVo.get(i).getSpecialty(), collSpecialtyAccessVo.get(i).getSpecialty().getText());
		}
		if (collSpecialtyAccessVo.size() == 1)
			form.cmbSpecialty().setValue(collSpecialtyAccessVo.get(0).getSpecialty());
		else if (collSpecialtyAccessVo.size() > 1)
			form.cmbSpecialty().showOpened();
	}		
}
 
Example 44
Project: openmaxims-linux   File: DocumentDetailsInitialiser.java   Source Code and License 4 votes vote down vote up
public DocumentDetailsInitialiser(ConsultantAccessFullVoCollection voCollConsultantAccess, ClinicAccessFullVoCollection voCollLocationAccess,SpecialtyAccessVoCollection voCollSpecialtyAccess)
{
	m_ConsultantAccessCollection = voCollConsultantAccess;
	m_SpecialtyAccessCollection = voCollSpecialtyAccess;
	m_LocationAccessCollection = voCollLocationAccess;		
}