Java Code Examples for ims.core.vo.LocShortVo

The following are top voted examples for showing how to use ims.core.vo.LocShortVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void addRowRecord(PropertyChecklistShortVo record)
{	
	if(record == null)
		return;
	
	GenForm.grdListRow row = form.grdList().getRows().newRow(record.equals
			(form.getLocalContext().getEditedRecord()));
	
	row.setColType(record.getMovementType().getText()) ;
	LocShortVo recordWard = record.getWardIsNotNull() ? record.getWard() : null;
	row.setColWard(recordWard.getName());
	row.setColDate(record.getAuthoringDateTime().toString());
	HcpLiteVo recordHCP = record.getAuthoringHCPIsNotNull() ? record.getAuthoringHCP() : null;
	row.setColAuthoring(recordHCP.getMos().getName().toString());

	row.setValue(record);
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.ctnServiceDetail().cmbLocation().getValue();
	form.ctnServiceDetail().txtAddressService().setValue(null);
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.ctnServiceDetail().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.ctnServiceDetail().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if(voLocService.getContact().getNameIsNotNull())
				form.ctnServiceDetail().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.ctnServiceDetail().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.ctnServiceDetail().cmbLocation().clear();
	//clearServicesReadOnlyDetails();

	if (form.ctnServiceDetail().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.lyrProServices().tabServices().cmbLocation().clear();
	clearServicesReadOnlyDetails();

	if (form.lyrProServices().tabServices().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.lyrProServices().tabServices().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.lyrProServices().tabServices().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.lyrProServices().tabServices().cmbLocation().getValue();
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.lyrProServices().tabServices().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.lyrProServices().tabServices().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if (voLocService.getContact().getNameIsNotNull())
				form.lyrProServices().tabServices().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.lyrProServices().tabServices().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
	else
		form.lyrProServices().tabServices().txtAddressService().setValue(null);

}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
	LocationServiceMidVoCollection voLocationServices;
	voLocationServices = domain.listLocationServiceLite(voLocation);
	TreeNode childServiceNode = null;
	clearServiceNodes(node);
	for (int i = 0; i < voLocationServices.size(); i++)
	{
		if (voLocationServices.get(i).getServiceIsNotNull())
		{
			childServiceNode = node.getNodes().add(voLocationServices.get(i), (voLocationServices.get(i).getService().getServiceNameIsNotNull() ? voLocationServices.get(i).getService().getServiceName() : ""));
			childServiceNode.setTooltip(formatLocationServicevoTooltip(voLocationServices.get(i)));
			childServiceNode.setExpandedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setCollapsedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setSelectedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.sortChildrenByText();
			childServiceNode.setExpanded(false);
		}
	}

	node.setExpanded(true);

	form.lyr1().Details().chkHTMLActiveOnly().setValue(true);
	form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node));

}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private StringBuilder getFormattedNodeDetails(TreeNode node, StringBuilder out)
{
	if (node.getValue() instanceof LocShortVo)
	{
		LocShortVo vo = (LocShortVo) node.getValue();
		out = formatLocationDetails(out, vo);
		if (node.isExpanded())
		{
			TreeNodeCollection treeNodeColl = node.getNodes();
			for (int i = 0; i < treeNodeColl.size(); i++)
			{
				out = getFormattedNodeDetails(treeNodeColl.get(i), out);
			}
		}
	}
	else if (node.getValue() instanceof LocationServiceVo)
	{
		out = formatServiceDetails(out, (LocationServiceVo) node.getValue());
	}
	return out;
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private StringBuilder formatLocationDetails(StringBuilder out, LocShortVo vo)
{
	// Location
	out.append(makeTextile("<CENTER>*Location/" + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(true) + " Detail*</CENTER>", "SlateBlue", "tahoma", "14"));
	out.append(makeNewLine(1));
	out.append(makeTextile("*Location: *", "DarkRed", "tahoma", "12"));
	out.append(makeTextile((vo.getNameIsNotNull() ? vo.getName() : ""), "black", "tahoma", "12"));
	out.append(makeNewLine(1));

	if (vo.getAddressIsNotNull())
	{
		out.append(makeNewLine(1));
		out.append(makeTextile("*Address: *", "DarkRed", "tahoma", "12"));
		out.append(makeTextile((vo.getAddressIsNotNull() ? vo.getAddress().toDisplayStringForMultiLineTextBox() : ""), "black", "tahoma", "12"));
		out.append(makeNewLine(1));
	}
	return out;
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setRowAsPrimaryLocation(DynamicGridRow selectedRow)
{
	if (selectedRow == null )
		return;		
	
	if (selectedRow.getValue() instanceof OrganisationVo)
		return;			
			
	clearPrimaryLocations(form.dyngrdOrganisationLocation().getRows());	
	
	if (selectedRow.getValue() instanceof HcpLocationVo || selectedRow.getValue() instanceof LocShortVo)
	{
		selectedRow.setTextColor(Color.Red);	
		selectedRow.setChecked(true);	
	}		
	form.getContextMenus().getMosLocationSetPrimaryLocationItem().setVisible(false);
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadTheatreCombo(LocationRefVo appointmentLocation)
{
	form.lyr1().tabCareRecord().cmbTheatre().clear();
	LocShortVoCollection collLocShortVo = domain.listTheatres(appointmentLocation);
	if (collLocShortVo != null)
	{
		for (LocShortVo item : collLocShortVo)
		{
			form.lyr1().tabCareRecord().cmbTheatre().newRow(item, item.getName());

			if (engine.getCurrentLocation() != null)
			{
				if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
					form.lyr1().tabCareRecord().cmbTheatre().setValue(item);
			}
		}
	}
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadTheatreCombo()
{
	form.lyrMain().tabCareRecord().cmbTheatre().clear();
	LocShortVoCollection collLocShortVo = domain.listTheatres();
	if (collLocShortVo != null)
	{
		for (LocShortVo item : collLocShortVo)
		{
			form.lyrMain().tabCareRecord().cmbTheatre().newRow(item, item.getName());

			if (engine.getCurrentLocation() != null)
			{
				if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
					form.lyrMain().tabCareRecord().cmbTheatre().setValue(item);
			}
		}
	}
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onCmbLocationValueChanged() throws PresentationLogicException {
	LocShortVo voLoc = form.ctnDetails().cmbLocation().getValue();
	if (voLoc != null)
	{
		if(voLoc.getAddressIsNotNull()){
			form.ctnDetails().txtAddress().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());
			if(voLoc.getAddress().getPhoneIsNotNull())
				form.ctnDetails().txtWorkPhone().setValue(voLoc.getAddress().getPhone());
		}
	}
	else{
		form.ctnDetails().txtAddress().setValue(null);
		form.ctnDetails().txtWorkPhone().setValue(null);
	}
	
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void addRowRecord(PropertyChecklistShortVo record)
{	
	if(record == null)
		return;
	
	GenForm.grdListRow row = form.grdList().getRows().newRow(record.equals
			(form.getLocalContext().getEditedRecord()));
	
	row.setColType(record.getMovementType().getText()) ;
	LocShortVo recordWard = record.getWardIsNotNull() ? record.getWard() : null;
	row.setColWard(recordWard.getName());
	row.setColDate(record.getAuthoringDateTime().toString());
	HcpLiteVo recordHCP = record.getAuthoringHCPIsNotNull() ? record.getAuthoringHCP() : null;
	row.setColAuthoring(recordHCP.getMos().getName().toString());

	row.setValue(record);
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.ctnServiceDetail().cmbLocation().getValue();
	form.ctnServiceDetail().txtAddressService().setValue(null);
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.ctnServiceDetail().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.ctnServiceDetail().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if(voLocService.getContact().getNameIsNotNull())
				form.ctnServiceDetail().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.ctnServiceDetail().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.ctnServiceDetail().cmbLocation().clear();
	//clearServicesReadOnlyDetails();

	if (form.ctnServiceDetail().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.lyrProServices().tabServices().cmbLocation().getValue();
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.lyrProServices().tabServices().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.lyrProServices().tabServices().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if (voLocService.getContact().getNameIsNotNull())
				form.lyrProServices().tabServices().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.lyrProServices().tabServices().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
	else
		form.lyrProServices().tabServices().txtAddressService().setValue(null);

}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateCaseNoteFolderLocationByHospital(String value, LocationLiteVo hospital)
{
	form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().clear();
	LocShortVoCollection tempColl = null;
	
	tempColl = domain.getCaseNoteFolderLocationByParent(hospital, value, null);
	
	if( tempColl == null)
		return;
	
	for (LocShortVo loc : tempColl)
	{
		form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().newRow(loc, loc.getName());
	}
	
	if (tempColl.size() == 1)
	{
		form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().setValue(tempColl.get(0));
		setCaseNoteFolderLocation(form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().getValue(), false); //WDEV-20798
		//updateWardSelection();
	}
	else
	{
		form.lyrDetails().tabGeneralDetails().qmbCaseNoteLocation().showOpened();
	}
}
 
Example 18
Project: openMAXIMS   File: MoveSessionToLocationDialogImpl.java   Source Code and License 6 votes vote down vote up
public void moveSessionToLocation(SessionShortVo session, LocShortVo location) throws ims.domain.exceptions.StaleObjectException
{
	if (session == null)
		throw new CodingRuntimeException("session cannot be null in method moveSessionToDate");

	Sch_Session doSession = SessionShortVoAssembler.extractSch_Session(getDomainFactory(), session);
	Location doLocation = LocShortVoAssembler.extractLocation(getDomainFactory(), location);
	
	Boolean sessionRequiresCaseNoteLocation = doSession.isCaseNoteFolderNotRequired() == null || Boolean.FALSE.equals(doSession.isCaseNoteFolderNotRequired());
	
	if (doLocation != null)
	{
		doSession.setSchLocation(doLocation);
		doSession.setLocationMovedDateTime(new java.util.Date());
		
		if (sessionRequiresCaseNoteLocation)
			doSession.setCaseNoteFolderLocation(Boolean.TRUE.equals(doLocation.isCaseNoteFolderLocation()) ? doLocation : null); 			
	}	
	
	getDomainFactory().save(doSession);
}
 
Example 19
Project: openMAXIMS   File: TheatreGroupImpl.java   Source Code and License 6 votes vote down vote up
public LocShortVoCollection listTheatreLocations(ims.core.resource.place.vo.LocationRefVo locRef, String searchText, TheatreGroupRefVo theatreGroupToBeExcludedRef)
{
	OrganisationAndLocation impl = (OrganisationAndLocation)getDomainImpl(OrganisationAndLocationImpl.class);
	LocShortVoCollection collTheatreLoc = impl.getLocationByParent(locRef,searchText,LocationType.THEATRE);
	LocShortVoCollection collTheatreAlreadyUsed = getAlreadyUsedTheatreLocations(locRef, theatreGroupToBeExcludedRef);
	
	for (int i=0;collTheatreAlreadyUsed!=null && i<collTheatreAlreadyUsed.size(); i++)
	{
		LocShortVo theatreLocUsed = collTheatreAlreadyUsed.get(i);
		
		for (int j=0; collTheatreLoc!=null && j<collTheatreLoc.size();j++)
		{
			LocShortVo theatreLoc = collTheatreLoc.get(j);
			if (theatreLoc.equals(theatreLocUsed))
			{
				collTheatreLoc.remove(theatreLoc);
				break;
			}
		}
	}
	
	return collTheatreLoc;
}
 
Example 20
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
	LocationServiceMidVoCollection voLocationServices;
	voLocationServices = domain.listLocationServiceLite(voLocation);
	TreeNode childServiceNode = null;
	clearServiceNodes(node);
	for (int i = 0; i < voLocationServices.size(); i++)
	{
		if (voLocationServices.get(i).getServiceIsNotNull())
		{
			childServiceNode = node.getNodes().add(voLocationServices.get(i), (voLocationServices.get(i).getService().getServiceNameIsNotNull() ? voLocationServices.get(i).getService().getServiceName() : ""));
			childServiceNode.setTooltip(formatLocationServicevoTooltip(voLocationServices.get(i)));
			childServiceNode.setExpandedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setCollapsedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setSelectedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.sortChildrenByText();
			childServiceNode.setExpanded(false);
		}
	}

	node.setExpanded(true);

	form.lyr1().Details().chkHTMLActiveOnly().setValue(true);
	form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node));

}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private StringBuilder getFormattedNodeDetails(TreeNode node, StringBuilder out)
{
	if (node.getValue() instanceof LocShortVo)
	{
		LocShortVo vo = (LocShortVo) node.getValue();
		out = formatLocationDetails(out, vo);
		if (node.isExpanded())
		{
			TreeNodeCollection treeNodeColl = node.getNodes();
			for (int i = 0; i < treeNodeColl.size(); i++)
			{
				out = getFormattedNodeDetails(treeNodeColl.get(i), out);
			}
		}
	}
	else if (node.getValue() instanceof LocationServiceVo)
	{
		out = formatServiceDetails(out, (LocationServiceVo) node.getValue());
	}
	return out;
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private StringBuilder formatLocationDetails(StringBuilder out, LocShortVo vo)
{
	// Location
	out.append(makeTextile("<CENTER>*Location/" + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(true) + " Detail*</CENTER>", "SlateBlue", "tahoma", "14"));
	out.append(makeNewLine(1));
	out.append(makeTextile("*Location: *", "DarkRed", "tahoma", "12"));
	out.append(makeTextile((vo.getNameIsNotNull() ? vo.getName() : ""), "black", "tahoma", "12"));
	out.append(makeNewLine(1));

	if (vo.getAddressIsNotNull())
	{
		out.append(makeNewLine(1));
		out.append(makeTextile("*Address: *", "DarkRed", "tahoma", "12"));
		out.append(makeTextile((vo.getAddressIsNotNull() ? vo.getAddress().toDisplayStringForMultiLineTextBox() : ""), "black", "tahoma", "12"));
		out.append(makeNewLine(1));
	}
	return out;
}
 
Example 23
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private StringBuilder getFormattedNodeDetails(TreeNode node, StringBuilder out)
{
	if (node.getValue() instanceof LocShortVo)
	{
		LocShortVo vo = (LocShortVo) node.getValue();
		out = formatLocationDetails(out, vo);
		if (node.isExpanded())
		{
			TreeNodeCollection treeNodeColl = node.getNodes();
			for (int i = 0; i < treeNodeColl.size(); i++)
			{
				out = getFormattedNodeDetails(treeNodeColl.get(i), out);
			}
		}
	}
	else if (node.getValue() instanceof LocationServiceVo)
	{
		out = formatServiceDetails(out, (LocationServiceVo) node.getValue());
	}
	return out;
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.lyrProServices().tabServices().cmbLocation().clear();
	clearServicesReadOnlyDetails();

	if (form.lyrProServices().tabServices().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.lyrProServices().tabServices().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.lyrProServices().tabServices().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadTheatreCombo(LocationRefVo appointmentLocation)
{
	form.lyr1().tabCareRecord().cmbTheatre().clear();
	LocShortVoCollection collLocShortVo = domain.listTheatres(appointmentLocation);
	if (collLocShortVo != null)
	{
		for (LocShortVo item : collLocShortVo)
		{
			form.lyr1().tabCareRecord().cmbTheatre().newRow(item, item.getName());

			if (engine.getCurrentLocation() != null)
			{
				if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
					form.lyr1().tabCareRecord().cmbTheatre().setValue(item);
			}
		}
	}
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onCmbLocationValueChanged() throws PresentationLogicException {
	LocShortVo voLoc = form.ctnDetails().cmbLocation().getValue();
	if (voLoc != null)
	{
		if(voLoc.getAddressIsNotNull()){
			form.ctnDetails().txtAddress().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());
			if(voLoc.getAddress().getPhoneIsNotNull())
				form.ctnDetails().txtWorkPhone().setValue(voLoc.getAddress().getPhone());
		}
	}
	else{
		form.ctnDetails().txtAddress().setValue(null);
		form.ctnDetails().txtWorkPhone().setValue(null);
	}
	
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void addRowRecord(PropertyChecklistShortVo record)
{	
	if(record == null)
		return;
	
	GenForm.grdListRow row = form.grdList().getRows().newRow(record.equals
			(form.getLocalContext().getEditedRecord()));
	
	row.setColType(record.getMovementType().getText()) ;
	LocShortVo recordWard = record.getWardIsNotNull() ? record.getWard() : null;
	row.setColWard(recordWard.getName());
	row.setColDate(record.getAuthoringDateTime().toString());
	HcpLiteVo recordHCP = record.getAuthoringHCPIsNotNull() ? record.getAuthoringHCP() : null;
	row.setColAuthoring(recordHCP.getMos().getName().toString());

	row.setValue(record);
}
 
Example 28
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setRowAsPrimaryLocation(DynamicGridRow selectedRow)
{
	if (selectedRow == null )
		return;		
	
	if (selectedRow.getValue() instanceof OrganisationVo)
		return;			
			
	clearPrimaryLocations(form.dyngrdOrganisationLocation().getRows());	
	
	if (selectedRow.getValue() instanceof HcpLocationVo || selectedRow.getValue() instanceof LocShortVo)
	{
		selectedRow.setTextColor(Color.Red);	
		selectedRow.setChecked(true);	
	}		
	form.getContextMenus().getMosLocationSetPrimaryLocationItem().setVisible(false);
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.ctnServiceDetail().cmbLocation().getValue();
	form.ctnServiceDetail().txtAddressService().setValue(null);
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.ctnServiceDetail().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.ctnServiceDetail().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if(voLocService.getContact().getNameIsNotNull())
				form.ctnServiceDetail().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.ctnServiceDetail().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.ctnServiceDetail().cmbLocation().clear();
	//clearServicesReadOnlyDetails();

	if (form.ctnServiceDetail().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.lyrProServices().tabServices().cmbLocation().clear();
	clearServicesReadOnlyDetails();

	if (form.lyrProServices().tabServices().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.lyrProServices().tabServices().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.lyrProServices().tabServices().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 32
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.lyrProServices().tabServices().cmbLocation().getValue();
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.lyrProServices().tabServices().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.lyrProServices().tabServices().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if (voLocService.getContact().getNameIsNotNull())
				form.lyrProServices().tabServices().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.lyrProServices().tabServices().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
	else
		form.lyrProServices().tabServices().txtAddressService().setValue(null);

}
 
Example 33
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void addRowRecord(PropertyChecklistShortVo record)
{	
	if(record == null)
		return;
	
	GenForm.grdListRow row = form.grdList().getRows().newRow(record.equals
			(form.getLocalContext().getEditedRecord()));
	
	row.setColType(record.getMovementType().getText()) ;
	LocShortVo recordWard = record.getWardIsNotNull() ? record.getWard() : null;
	row.setColWard(recordWard.getName());
	row.setColDate(record.getAuthoringDateTime().toString());
	HcpLiteVo recordHCP = record.getAuthoringHCPIsNotNull() ? record.getAuthoringHCP() : null;
	row.setColAuthoring(recordHCP.getMos().getName().toString());

	row.setValue(record);
}
 
Example 34
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbServiceValueChanged()
{
	form.ctnServiceDetail().cmbLocation().clear();
	//clearServicesReadOnlyDetails();

	if (form.ctnServiceDetail().cmbService().getValue() == null)
		return;

	LocShortVoCollection voCollLoc = domain.listLocations(form.ctnServiceDetail().cmbService().getValue());
	LocShortVo voLoc = null;

	if (voCollLoc == null)
		return;

	for (int i = 0; i < voCollLoc.size(); i++)
	{
		voLoc = voCollLoc.get(i);

		form.ctnServiceDetail().cmbLocation().newRow(voLoc, voLoc.getName());
	}

}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
	LocationServiceMidVoCollection voLocationServices;
	voLocationServices = domain.listLocationServiceLite(voLocation);
	TreeNode childServiceNode = null;
	clearServiceNodes(node);
	for (int i = 0; i < voLocationServices.size(); i++)
	{
		if (voLocationServices.get(i).getServiceIsNotNull())
		{
			childServiceNode = node.getNodes().add(voLocationServices.get(i), (voLocationServices.get(i).getService().getServiceNameIsNotNull() ? voLocationServices.get(i).getService().getServiceName() : ""));
			childServiceNode.setTooltip(formatLocationServicevoTooltip(voLocationServices.get(i)));
			childServiceNode.setExpandedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setCollapsedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setSelectedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.sortChildrenByText();
			childServiceNode.setExpanded(false);
		}
	}

	node.setExpanded(true);

	form.lyr1().Details().chkHTMLActiveOnly().setValue(true);
	form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node));

}
 
Example 36
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onCmbLocationValueChanged() throws PresentationLogicException {
	LocShortVo voLoc = form.ctnDetails().cmbLocation().getValue();
	if (voLoc != null)
	{
		if(voLoc.getAddressIsNotNull()){
			form.ctnDetails().txtAddress().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());
			if(voLoc.getAddress().getPhoneIsNotNull())
				form.ctnDetails().txtWorkPhone().setValue(voLoc.getAddress().getPhone());
		}
	}
	else{
		form.ctnDetails().txtAddress().setValue(null);
		form.ctnDetails().txtWorkPhone().setValue(null);
	}
	
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private StringBuilder formatLocationDetails(StringBuilder out, LocShortVo vo)
{
	// Location
	out.append(makeTextile("<CENTER>*Location/" + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(true) + " Detail*</CENTER>", "SlateBlue", "tahoma", "14"));
	out.append(makeNewLine(1));
	out.append(makeTextile("*Location: *", "DarkRed", "tahoma", "12"));
	out.append(makeTextile((vo.getNameIsNotNull() ? vo.getName() : ""), "black", "tahoma", "12"));
	out.append(makeNewLine(1));

	if (vo.getAddressIsNotNull())
	{
		out.append(makeNewLine(1));
		out.append(makeTextile("*Address: *", "DarkRed", "tahoma", "12"));
		out.append(makeTextile((vo.getAddressIsNotNull() ? vo.getAddress().toDisplayStringForMultiLineTextBox() : ""), "black", "tahoma", "12"));
		out.append(makeNewLine(1));
	}
	return out;
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setRowAsPrimaryLocation(DynamicGridRow selectedRow)
{
	if (selectedRow == null )
		return;		
	
	if (selectedRow.getValue() instanceof OrganisationVo)
		return;			
			
	clearPrimaryLocations(form.dyngrdOrganisationLocation().getRows());	
	
	if (selectedRow.getValue() instanceof HcpLocationVo || selectedRow.getValue() instanceof LocShortVo)
	{
		selectedRow.setTextColor(Color.Red);	
		selectedRow.setChecked(true);	
	}		
	form.getContextMenus().getMosLocationSetPrimaryLocationItem().setVisible(false);
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadTheatreCombo(LocationRefVo appointmentLocation)
{
	form.lyr1().tabCareRecord().cmbTheatre().clear();
	LocShortVoCollection collLocShortVo = domain.listTheatres(appointmentLocation);
	if (collLocShortVo != null)
	{
		for (LocShortVo item : collLocShortVo)
		{
			form.lyr1().tabCareRecord().cmbTheatre().newRow(item, item.getName());

			if (engine.getCurrentLocation() != null)
			{
				if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
					form.lyr1().tabCareRecord().cmbTheatre().setValue(item);
			}
		}
	}
}
 
Example 40
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadTheatreCombo()
{
	form.lyrMain().tabCareRecord().cmbTheatre().clear();
	LocShortVoCollection collLocShortVo = domain.listTheatres();
	if (collLocShortVo != null)
	{
		for (LocShortVo item : collLocShortVo)
		{
			form.lyrMain().tabCareRecord().cmbTheatre().newRow(item, item.getName());

			if (engine.getCurrentLocation() != null)
			{
				if (engine.getCurrentLocation().getID() == item.getID_Location().intValue())
					form.lyrMain().tabCareRecord().cmbTheatre().setValue(item);
			}
		}
	}
}
 
Example 41
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onCmbLocationValueChanged() throws PresentationLogicException {
	LocShortVo voLoc = form.ctnDetails().cmbLocation().getValue();
	if (voLoc != null)
	{
		if(voLoc.getAddressIsNotNull()){
			form.ctnDetails().txtAddress().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());
			if(voLoc.getAddress().getPhoneIsNotNull())
				form.ctnDetails().txtWorkPhone().setValue(voLoc.getAddress().getPhone());
		}
	}
	else{
		form.ctnDetails().txtAddress().setValue(null);
		form.ctnDetails().txtWorkPhone().setValue(null);
	}
	
}
 
Example 42
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void cmbLocationValueChanged()
{
	LocShortVo voLoc = form.ctnServiceDetail().cmbLocation().getValue();
	form.ctnServiceDetail().txtAddressService().setValue(null);
	if (voLoc != null)
	{
		if (voLoc.getAddressIsNotNull())
			form.ctnServiceDetail().txtAddressService().setValue(voLoc.getAddress().toDisplayStringForMultiLineTextBox());

		LocationServiceVo voLocService = domain.getLocationService(voLoc, form.ctnServiceDetail().cmbService().getValue());

		if (voLocService == null)
			return;

		form.getLocalContext().setlocationService(voLocService);
		if (voLocService.getContact() != null)
		{
			if(voLocService.getContact().getNameIsNotNull())
				form.ctnServiceDetail().txtContactPerson().setValue(voLocService.getContact().getName().toString());
			form.ctnServiceDetail().txtPhoneNoService().setValue(voLocService.getContact().getContactNumber());
		}
	}
}
 
Example 43
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
	LocationServiceMidVoCollection voLocationServices;
	voLocationServices = domain.listLocationServiceLite(voLocation);
	TreeNode childServiceNode = null;
	clearServiceNodes(node);
	for (int i = 0; i < voLocationServices.size(); i++)
	{
		if (voLocationServices.get(i).getServiceIsNotNull())
		{
			childServiceNode = node.getNodes().add(voLocationServices.get(i), (voLocationServices.get(i).getService().getServiceNameIsNotNull() ? voLocationServices.get(i).getService().getServiceName() : ""));
			childServiceNode.setTooltip(formatLocationServicevoTooltip(voLocationServices.get(i)));
			childServiceNode.setExpandedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setCollapsedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.setSelectedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service);
			childServiceNode.sortChildrenByText();
			childServiceNode.setExpanded(false);
		}
	}

	node.setExpanded(true);

	form.lyr1().Details().chkHTMLActiveOnly().setValue(true);
	form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node));

}
 
Example 44
Project: AvoinApotti   File: PatientListsImpl.java   Source Code and License 5 votes vote down vote up
private void populatePasContactFromDtoOutpatient(PasContactVo voPasContact, OutpatientlistRecord dtoOutpatient)
{
	String extSystem = ConfigFlag.DOM.DEMOGRAPHICS_EXT_SYSTEM.getValue();			
	LocShortVo voLoc = new LocShortVo();		
	OrganisationAndLocation locImpl = (OrganisationAndLocation)getDomainImpl(OrganisationAndLocationImpl.class);
	
	voLoc = locImpl.getLocationByLocalCode(dtoOutpatient.Cliniccode,LocationType.CLINIC);
	voPasContact.setLocation(voLoc);
					
	HcpAdmin hcpAdmin = (HcpAdmin)getDomainImpl(HcpAdminImpl.class);
	
	MedicWithMappingsLiteVo voMedicWithMappingsLite = hcpAdmin.getMedicMedicMappingsByPasCode(dtoOutpatient.Hcpcode);
	voPasContact.setConsultant(voMedicWithMappingsLite == null ? null : voMedicWithMappingsLite);
			

	Specialty specialty = (Specialty)getLookupService().getLocalLookup(Specialty.class, Specialty.TYPE_ID, extSystem, dtoOutpatient.Specialty);			
	
	voPasContact.setSpecialty(specialty);			
	
	//Contact Number
	voPasContact.setContactNumber(dtoOutpatient.Contactno);
	try {
		voPasContact.setAppointmentDateTime(new DateTime (dtoOutpatient.Apptdate, "1000"));
	} catch (ParseException e) {
		voPasContact.setAppointmentDateTime(null);
	}
					
	PatientShort voPatientShort = new PatientShort();
	voPatientShort.setName(dtoOutpatient.Snm, dtoOutpatient.Fnm1, null);	

	voPatientShort.addId(PatIdType.HOSPNUM, dtoOutpatient.Hospnum);						
	voPatientShort.addId(PatIdType.CHARTNUM, dtoOutpatient.Chartnum);						

	if(dtoOutpatient.Dob != null && dtoOutpatient.Dob != "")
		voPatientShort.setDob(new PartialDate(dtoOutpatient.Dob));	
	else
		voPatientShort.setDob(null);
	
	if(dtoOutpatient.Dod != null && dtoOutpatient.Dod != "")
	{
		try {voPatientShort.setDod(new Date(dtoOutpatient.Dod,DateFormat.ISO));
		} catch (ParseException e2) {
			e2.printStackTrace();
		}
	}
	
	if(dtoOutpatient.Dob != null && dtoOutpatient.Dob != "")
		voPatientShort.calculateAge();
	
	voPatientShort.setWard(voPasContact.getLocation());		
	voPatientShort.setSex((Sex)getLookupService().getLocalLookup(Sex.class, Sex.TYPE_ID, extSystem, dtoOutpatient.Sex));
	voPasContact.setPatient(voPatientShort);			
	voPasContact.setGPCode(dtoOutpatient.Gpcode);

	if (dtoOutpatient.Documentstatus != ""  && Integer.valueOf(dtoOutpatient.Documentstatus).intValue() == DocumentStatus.LETTERREQUIRED.getId())
	{ 
		voPasContact.setDocumentStatus((DocumentStatus)getLookupService().getLookupInstance(DocumentStatus.class,Integer.valueOf(dtoOutpatient.Documentstatus).intValue()));
	}
	else				
	{
		if (isLetterRequired(voMedicWithMappingsLite, specialty ,null, null) == Boolean.FALSE)
			voPasContact.setDocumentStatus(DocumentStatus.NOLETTERREQUIRED);
		else
			voPasContact.setDocumentStatus(DocumentStatus.LETTERREQUIRED);
	}		
}
 
Example 45
Project: AvoinApotti   File: CarePlanReviewImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVoCollection listCareContexts(LocShortVo wardVo)
{
	DomainFactory factory = getDomainFactory();
	
	CareContextShortVoCollection  voCareContextColl = new CareContextShortVoCollection();
	List contacts = null;
	String hql;
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Integer> values = new ArrayList<Integer>();

	hql = " from CareContext cc "; 
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";	
	// WDEV-4491
	condStr.append(andStr + " cc.episodeOfCare.careSpell.patient.ward.id = :wardId and cc.endDateTime is null ");
	markers.add("wardId");
	values.add(wardVo.getID_Location());

	hql += " where " + condStr.toString();	
		
	contacts = factory.find(hql, markers, values);	
	
	for (int x = 0; x < contacts.size(); x++)
	{
		CareContext domCareContext = (CareContext) contacts.get(x);	
		CareContextShortVo voCareContext = CareContextShortVoAssembler.create(domCareContext);		
		voCareContextColl.add(voCareContext);
	}

	return voCareContextColl.sort();
}
 
Example 46
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{
	if (form.getGlobalContext().COE.getSupportNetworkMos() == null)
		return;
	
	LocShortVoCollection voColl = domain.listLocationsForMemberOfStaff(form.getGlobalContext().COE.getSupportNetworkMos());
	LocShortVo voItem = null;
	if(voColl != null)
	{
		for(int i=0;i<voColl.size();i++)
		{
			voItem = voColl.get(i);
			if(voItem != null)
			{
				GenForm.grdLocationsRow row = form.grdLocations().getRows().newRow();

				row.setLocation(voItem.getName());
				if(voItem.getAddress() != null)
				{
					String strAddress = voItem.getAddress().toDisplayString();
					row.setAddress(strAddress);
					row.setPhone(voItem.getAddress().getPhone());
				}
				row.setValue(voItem);
			}
		}
	}	
}
 
Example 47
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onBtnOKClick() throws ims.framework.exceptions.PresentationLogicException
{
	LocShortVo voItem = form.grdLocations().getValue();
	if(voItem != null)
	{
		form.getGlobalContext().COE.setSupportNetworkSelectedLocation(voItem);
		engine.close(DialogResult.OK);
	}	
	else
	{
		engine.showMessage("No item selected");
	}
}
 
Example 48
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setProfessionAddress(LocShortVo voLoc)
{
	form.lyrProServices().tabProfessional().txtAddressPro().setValue("");
	form.lyrProServices().tabProfessional().txtWorkPh().setValue("");

	if (voLoc == null)
		return;

	if (voLoc.getAddressIsNotNull())
	{
		String strAddress = voLoc.getAddress().toDisplayStringForMultiLineTextBox();
		form.lyrProServices().tabProfessional().txtAddressPro().setValue(strAddress);
		form.lyrProServices().tabProfessional().txtWorkPh().setValue(voLoc.getAddress().getPhone());
	}
}
 
Example 49
Project: AvoinApotti   File: SupportNetworkProfessionalServicesImpl.java   Source Code and License 5 votes vote down vote up
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service)
{
	if (locShort == null || service == null)
		throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

	DomainFactory factory = getDomainFactory();

	List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
	LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

	if (voCollLocServices != null && voCollLocServices.size() > 0)
		return voCollLocServices.get(0);

	return null;
}
 
Example 50
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setProfessionAddress(LocShortVo voLoc)
{
	form.lyrSupportServices().tabPageProf().txtAddressPro().setValue("");
	form.lyrSupportServices().tabPageProf().txtWorkPh().setValue("");

	if (voLoc == null)
		return;

	if (voLoc.getAddressIsNotNull())
	{
		String strAddress = voLoc.getAddress().toDisplayStringForMultiLineTextBox();
		form.lyrSupportServices().tabPageProf().txtAddressPro().setValue(strAddress);
		form.lyrSupportServices().tabPageProf().txtWorkPh().setValue(voLoc.getAddress().getPhone());
	}
}
 
Example 51
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateProfessionalInstance() 
{
	form.setMode(FormMode.EDIT);
	form.lyrSupportServices().tabPageProf().btnInactivateProfessional().setVisible(false);

	form.getContextMenus().Emergency.hideAllSupportNetworkProfessionalMenuItems();

	if (form.getLocalContext().getSelectedSupportNetworkProfessional().getSuppliedProfessionalIsNotNull())
	{
		form.lyrSupportServices().tabPageProf().txtHcpName().setEnabled(true);
		form.lyrSupportServices().tabPageProf().txtLocation().setEnabled(true);
		form.lyrSupportServices().tabPageProf().txtAddressPro().setEnabled(true);
		form.lyrSupportServices().tabPageProf().txtWorkPh().setEnabled(true);
		form.lyrSupportServices().tabPageProf().txtEmailPro().setEnabled(true);
		form.lyrSupportServices().tabPageProf().txtMobilePhPro().setEnabled(true);
	}
	else
	{
		form.lyrSupportServices().tabPageProf().qmbHcpName().setEnabled(true);
		form.lyrSupportServices().tabPageProf().qmbHcpName().setVisible(true);

		LocShortVo voLoc = form.lyrSupportServices().tabPageProf().cmbLocationHcp().getValue();
		loadLocationsForMos(true);
		form.lyrSupportServices().tabPageProf().cmbLocationHcp().setEnabled(true);
		if (voLoc != null)
			form.lyrSupportServices().tabPageProf().cmbLocationHcp().setValue(voLoc);
	}
}
 
Example 52
Project: AvoinApotti   File: SupportServicesImpl.java   Source Code and License 5 votes vote down vote up
public LocationServiceVo getLocationService(LocShortVo locShort, ServiceRefVo service) 
{
	if (locShort == null || service == null)
		throw new DomainRuntimeException("Failed to get LocationService record, location and/or service not supplied");

	DomainFactory factory = getDomainFactory();

	List lstLocService = factory.find("from LocationService locService where locService.location.id = :locationId and locService.service.id = :serviceId", new String[]{"locationId", "serviceId"}, new Object[]{locShort.getID_Location(), service.getID_Service()});
	LocationServiceVoCollection voCollLocServices = LocationServiceVoAssembler.createLocationServiceVoCollectionFromLocationService(lstLocService);

	if (voCollLocServices != null && voCollLocServices.size() > 0)
		return voCollLocServices.get(0);

	return null;
}
 
Example 53
Project: AvoinApotti   File: A21VoMapper.java   Source Code and License 5 votes vote down vote up
protected Message processPatientLeave(Message msg, ProviderSystemVo providerSystem) throws HL7Exception
{
	try
	{
		
		PatientShort patVo = (PatientShort)getPrimaryIdFromPid(msg, providerSystem);
		
		if (patVo != null)
		{
			patVo = getDemog().getPatient(patVo);
			
			if (patVo == null)
				return HL7Utils.buildRejAck(msg.get("MSH"), "This patient has not been registered within the system", HL7Errors.APP_INT_ERROR, toConfigItemArray(providerSystem.getConfigItems()));

			String eventCode = HL7Utils.getEventCode(msg);
			if (eventCode.equals("A21") || eventCode.equals("A53"))  // A21 set's patient on leave, A53 cancels the cancelled Patient Leave i.e. sets them on leave again
				adt.recordInpatientLeave(patVo);
			else if (eventCode.equals("A22") || eventCode.equals("A52"))  // Cancel Patient's Leave
			{
				PV1 pv1 = (PV1) msg.get("PV1");
				LocShortVo loc = null;
				loc = orgLoc.getLocationByTaxonomyType(pv1.getAssignedPatientLocation().getPointOfCare().getValue(), TaxonomyType.PAS);
				patVo.setWard(loc);
				adt.cancelInpatientLeave(patVo);  // A22
			}
		}
	}
	catch (StaleObjectException ex)
	{
		return HL7Utils.buildRejAck( msg.get("MSH"), "StaleObjectException occured recording Inpatient Leave - " + ex.getMessage(), HL7Errors.APP_INT_ERROR, toConfigItemArray(providerSystem.getConfigItems()));
	}

	Message ack = HL7Utils.buildPosAck( msg.get("MSH"), toConfigItemArray(providerSystem.getConfigItems()));
	return ack;
}
 
Example 54
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setLocation()
{
	LocShortVo voLocShort = form.getGlobalContext().Admin.getProfileLocation();

	Sch_ProfileGenericVo voProfile = form.getLocalContext().getCurrentProfile();
	voProfile.setSchLocation(voLocShort);
	form.getLocalContext().setCurrentProfile(voProfile);

	form.lyrDetails().tabGeneralDetails().txtLocation().setValue(voLocShort.getName());
}
 
Example 55
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setLocation()
{
	LocShortVo voLocShort = form.getGlobalContext().Admin.getProfileLocation();

	SessionVo voSession = form.getLocalContext().getSession();
	voSession.setSchLocation(voLocShort);
	form.getLocalContext().setSession(voSession);

	form.lyrSessEdit().tabGeneral().txtLocation().setValue(voLocShort.getName());
}
 
Example 56
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void removeService()
{
	if (form.getLocalContext().getSelectedRecordLocationServiceIsNotNull())
	{
		if ((form.treHeader().getSelectedNode().getValue() != null) && (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceVo))
		{
			LocationServiceVo voLocSer = (LocationServiceVo) form.treHeader().getSelectedNode().getValue();
			try
			{
				try
				{
					domain.removeLocationService(voLocSer);
					if (form.treHeader().getSelectedNode().getParent() != null)
					{
						try
						{
							onTreHeaderTreeViewSelectionChanged(form.treHeader().getSelectedNode().getParent());
						}
						catch (PresentationLogicException pe)
						{
							engine.showMessage(pe.getMessage());
						}
					}
				}
				catch (ForeignKeyViolationException fe)
				{
					if (form.getLocalContext().getSelectedRecordLocationService().getServiceIsNotNull())
						engine.showMessage("Cannot remove " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue() + " : " + (form.getLocalContext().getSelectedRecordLocationService().getService().getServiceNameIsNotNull() ? form.getLocalContext().getSelectedRecordLocationService().getService().getServiceName() : "") + ". It is already referenced.");
					else
						engine.showMessage("Cannot remove this" + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue() + " as it is already referenced.");
				}
			}
			catch (StaleObjectException se)
			{
				engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
				populateLocationServices(form.treHeader().getSelectedNode().getParent(), (LocShortVo) form.treHeader().getSelectedNode().getParent().getValue());
			}
		}
	}
}
 
Example 57
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * @param node
 */
private void treeViewSelectionChanged(ims.framework.controls.TreeNode node)
{
	clearInstanceControls();
	if (node == null)
		return;

	Object value = node.getValue();
	if (value instanceof LocSvcProviderSysVo)
	{
		LocSvcProviderSysVo voLocSvcProviderSys = (LocSvcProviderSysVo) value;
		populateScreenFromData(voLocSvcProviderSys.getProviderSystem());
		populateServiceProviders(node.getParent(), (LocationServiceVo) node.getParent().getValue());
		form.getLocalContext().setSelectedRecord((LocSvcProviderSysVo) value);
	}

	if (value instanceof LocShortVo)
	{
		populateLocationServices(node, (LocShortVo) node.getValue());
		if (value instanceof LocSiteVo)
		{
			LocSiteVo voLocSite = (LocSiteVo) node.getValue();
			populateLocations(voLocSite.getLocations(), node);
			node.setExpanded(true);
		}
	}

	if (value instanceof LocationServiceVo)
	{
		populateServiceProviders(node, (LocationServiceVo) node.getValue());
		form.getLocalContext().setSelectedRecord(null);
	}

	updateControlsState();
}
 
Example 58
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateLocationServices(TreeNode node, LocShortVo voLocation)
{
	LocationServiceVoCollection voLocationServices = domain.listLocationService(voLocation);
	TreeNode childServiceNode = null;
	String service = "";
	String HtmlOut = "";
	node.getNodes().clear();
	for (int i = 0; i < voLocationServices.size(); i++)
	{
		if (voLocationServices.get(i).getServiceIsNotNull() && voLocationServices.get(i).getService().getServiceNameIsNotNull())
		{
			childServiceNode = node.getNodes().add(voLocationServices.get(i), voLocationServices.get(i).getService().getServiceName());
			service = formatServiceVo(voLocationServices.get(i));
			HtmlOut += service;
			childServiceNode.setTooltip(service);
			childServiceNode.setExpandedImage(form.getImages().Admin.Service);
			childServiceNode.setCollapsedImage(form.getImages().Admin.Service);
			childServiceNode.setSelectedImage(form.getImages().Admin.Service);
		}
	}

	node.setExpanded(true);

	String out = "";
	if (voLocation.getNameIsNotNull() && voLocationServices.size() > 0)
	{
		out = makeTextile("<CENTER>*" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(true) + ": " + voLocation.getName() + "*</CENTER>", "SlateBlue", "tahoma", "14");
		out += HtmlOut;
		form.htmProviderView().setHTML(new TextileString(out).toString());
	}
	else
		form.htmProviderView().setHTML("");

}
 
Example 59
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateWardCombo()
{
	form.cmbWard().clear();

	if (form.getGlobalContext().Core.getHospitalLocIsNotNull())
	{
		LocShortVo location = form.getGlobalContext().Core.getHospitalLoc();
		
		//WDEV-18007
		if (!LocationType.HOSP.equals(form.getGlobalContext().Core.getHospitalLoc().getType()))
		{
			location = domain.getCurrentHospital(location);
		}
		
		LocShortMappingsVoCollection voLocShortMapColl = domain.listActiveWardsForHospital(location);
		
		if (voLocShortMapColl != null)
		{
			for (int i = 0; i < voLocShortMapColl.size(); i++)
			{
				LocShortMappingsVo voLocShortMap = voLocShortMapColl.get(i);
				form.cmbWard().newRow(voLocShortMap, voLocShortMap.getName());
			}
		}
	}

}
 
Example 60
Project: AvoinApotti   File: TheatreAdmissionImpl.java   Source Code and License 5 votes vote down vote up
public LocShortVo getCurrentHospital(ILocation currentLocation)
{
	if(currentLocation == null)
		return null;
	
	DomainFactory factory = getDomainFactory();
	
	Location currentHospital = getHospital((Location) factory.getDomainObject(Location.class, currentLocation.getID()));
	
	if(currentHospital instanceof Location)
		return LocShortVoAssembler.create((Location) currentHospital);
	
	return null;
}