Java Code Examples for ims.coe.vo.lookups.DischargeDestination

The following are top voted examples for showing how to use ims.coe.vo.lookups.DischargeDestination. 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: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void methodOfDischargeValueChanged() 
{
	MethodOfDischarge methodOfDischargeForPatientDeceased = (MethodOfDischarge) domain.getLookupService().getLocalLookup(MethodOfDischarge.class, MethodOfDischarge.TYPE_ID, "PAS", PATIENTDIED);
	MethodOfDischarge methodOfDischargeForStillBirth = (MethodOfDischarge) domain.getLookupService().getLocalLookup(MethodOfDischarge.class, MethodOfDischarge.TYPE_ID, "PAS", STILLBIRTH);
	if (ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS") && ((methodOfDischargeForPatientDeceased != null && methodOfDischargeForPatientDeceased.equals(form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue())) || (methodOfDischargeForStillBirth != null && methodOfDischargeForStillBirth.equals(form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue()))))
	{
		form.lyrDetail().tabDischarge().cmbDischargeDestination().setValue(DischargeDestination.MORTUARY);
		if (form.getGlobalContext().Core.getPatientShort() != null && form.getGlobalContext().Core.getPatientShort().getDodIsNotNull())
		{
			form.lyrDetail().tabDischarge().dteDod().setValue(form.getGlobalContext().Core.getPatientShort().getDod());
			form.lyrDetail().tabDischarge().timTod().setValue(form.getGlobalContext().Core.getPatientShort().getTimeOfDeath());
		}
	}
	else if (form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue() == null || !form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue().equals(methodOfDischargeForStillBirth))
	{
		if (DischargeDestination.MORTUARY.equals(form.lyrDetail().tabDischarge().cmbDischargeDestination().getValue()))
		{
			form.lyrDetail().tabDischarge().cmbDischargeDestination().setValue(null);
		}
	}
}
 
Example 2
Project: openMAXIMS   File: MedicodeCodeExportImportHelper.java   Source Code and License 6 votes vote down vote up
private String getMappingForDischargeDestinationLookup(DischargeDestination dischargeDestination)
{
	String strListLocalCodes = "";
	if(dischargeDestination == null)
		return strListLocalCodes;
	LookupMappingVoCollection vocol = getMappings(dischargeDestination.getID());
	if(vocol != null && vocol.size() > 0)
	{
		for(int i=0; i<vocol.size(); i++)
		{
			LookupMappingVo voSpec = vocol.get(i);
			//WDEV-23780
			if(voSpec != null && voSpec.getExtSystem() != null && voSpec.getExtSystem().equals(ims.core.vo.lookups.TaxonomyType.CDS.toString()))
			//WDEV-23780
			{
				strListLocalCodes += voSpec.getExtCode();
				return strListLocalCodes;
			}
			
		}
			
	}
	return strListLocalCodes;
	
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setDeceasedPatientInfoOnDischarge()
{
	MethodOfDischarge methodofDischargeForPatientDeceased = (MethodOfDischarge) domain.getLookupService().getLocalLookup(MethodOfDischarge.class, MethodOfDischarge.TYPE_ID, "PAS", PATIENTDIED);
	form.lyrDetail().tabDischarge().cmbMethodDischarge().setValue(methodofDischargeForPatientDeceased);
	form.lyrDetail().tabDischarge().cmbDischargeDestination().setValue(DischargeDestination.MORTUARY);
	
	form.lyrDetail().tabDischarge().dteDod().setValue(form.getGlobalContext().Core.getPatientShort().getDod());
	form.lyrDetail().tabDischarge().timTod().setValue(form.getGlobalContext().Core.getPatientShort().getTimeOfDeath());
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateInfantInstanceControls()
{
	enableInfantControls(true);
		
	InpatientEpisodeLiteVo voInpatEpis = form.lyrDetail().tabInfants().grdInfants().getValue();
	
	// Current Hospital Label
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue("");
	if (voInpatEpis != null && voInpatEpis.getPasEventIsNotNull())
	{
		LocationLiteVo voHosp = domain.getParentLocation(voInpatEpis.getPasEvent().getLocation());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue(voHosp != null ? voHosp.getName() : "");
	}

	// Current Ward Label
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentWard().setValue(voInpatEpis.getPasEventIsNotNull() && voInpatEpis.getPasEvent().getLocationIsNotNull() ? voInpatEpis.getPasEvent().getLocation().getName() : "");
	
	//try to get existing PendingTransfer if it exists populate screen 
	form.getLocalContext().setPendingInfantTransfer(domain.getPendingTransferForInpatient(voInpatEpis));
	
	// discharge
	clearInfantDischargeControls();

	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantMethodDischarge().setValue(MethodOfDischarge.MEDICALLY_APPROVED);
	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantDischargeDest().setValue(DischargeDestination.HOME);
	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(new DateTime());

	// transfer
	clearInfantTransferControls();
	loadInfantTransferHospital();
	
	
	// Consultant
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().initialize(MosType.MEDIC);

	// any existing pendingtransfer
	PendingTransfersLiteVo voTransfer = form.getLocalContext().getPendingInfantTransfer();
	if (voTransfer != null)
	{
		if (voTransfer.getDestinationWardIsNotNull())
		{
			form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantHospital().setValue(domain.getParentLocation(voTransfer.getDestinationWard()));
			cmbInfantHospitalValueChanged(true);
			form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWard().setValue(voTransfer.getDestinationWard());
		}
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(voTransfer.getWardType());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(voTransfer.getTransferRequestDateTime());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().setValue(voTransfer.getConsultant());
		
		listSpecialtiesForConsultant(form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().getValue(), INFANT_CONSULTANT, voTransfer.getSpecialty(), null);
		
		//if conspc call did not find specialty (conspc mapping was removed) add it as a value anyway
		if(voTransfer.getSpecialtyIsNotNull())
		{
			if(!form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().getValues().contains(voTransfer.getSpecialty()))
				form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().newRow(voTransfer.getSpecialty(), voTransfer.getSpecialty().getText());
		}
	
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().setValue(voTransfer.getSpecialty());
	}
	else
	{
		//WDEV-8466
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(new DateTime());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(WardType.MAIN);
	}
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateInfantInstanceControls()
{
	enableInfantControls(true);
		
	InpatientEpisodeLiteVo voInpatEpis = form.lyrDetail().tabInfants().grdInfants().getValue();
	
	// Current Hospital Label
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue("");
	if (voInpatEpis != null && voInpatEpis.getPasEventIsNotNull())
	{
		LocationLiteVo voHosp = domain.getParentLocation(voInpatEpis.getPasEvent().getLocation());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue(voHosp != null ? voHosp.getName() : "");
	}

	// Current Ward Label
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentWard().setValue(voInpatEpis != null && voInpatEpis.getPasEventIsNotNull() && voInpatEpis.getPasEvent().getLocationIsNotNull() ? voInpatEpis.getPasEvent().getLocation().getName() : "");
	
	//try to get existing PendingTransfer if it exists populate screen 
	form.getLocalContext().setPendingInfantTransfer(domain.getPendingTransferForInpatient(voInpatEpis));
	
	// discharge
	clearInfantDischargeControls();

	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantMethodDischarge().setValue(MethodOfDischarge.MEDICALLY_APPROVED);
	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantDischargeDest().setValue(DischargeDestination.HOME);
	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(new DateTime());

	// transfer
	clearInfantTransferControls();
	loadInfantTransferHospital();
	
	
	// Consultant
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().initialize(MosType.MEDIC);

	// any existing pendingtransfer
	PendingTransfersLiteVo voTransfer = form.getLocalContext().getPendingInfantTransfer();
	if (voTransfer != null)
	{
		if (voTransfer.getDestinationWardIsNotNull())
		{
			form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantHospital().setValue(domain.getParentLocation(voTransfer.getDestinationWard()));
			cmbInfantHospitalValueChanged(true);
			form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWard().setValue(voTransfer.getDestinationWard());
		}
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(voTransfer.getWardType());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(voTransfer.getTransferRequestDateTime());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().setValue(voTransfer.getConsultant());
		
		listSpecialtiesForConsultant(form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().getValue(), INFANT_CONSULTANT, voTransfer.getSpecialty(), null);
		
		//if conspc call did not find specialty (conspc mapping was removed) add it as a value anyway
		if(voTransfer.getSpecialtyIsNotNull())
		{
			if(!form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().getValues().contains(voTransfer.getSpecialty()))
				form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().newRow(voTransfer.getSpecialty(), voTransfer.getSpecialty().getText());
		}
	
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().setValue(voTransfer.getSpecialty());
		
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().txtInfantTransfComment().setValue(voTransfer.getTransferComment());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantTransferReason().setValue(voTransfer.getTransferReason());
	}
	else
	{
		//WDEV-8466
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(new DateTime());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(WardType.MAIN);
	}
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateInfantInstanceControls()
{
	enableInfantControls(true);
		
	InpatientEpisodeLiteVo voInpatEpis = form.lyrDetail().tabInfants().grdInfants().getValue();
	
	// Current Hospital Label
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue("");
	if (voInpatEpis != null && voInpatEpis.getPasEventIsNotNull())
	{
		LocationLiteVo voHosp = domain.getParentLocation(voInpatEpis.getPasEvent().getLocation());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue(voHosp != null ? voHosp.getName() : "");
	}

	// Current Ward Label
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentWard().setValue(voInpatEpis.getPasEventIsNotNull() && voInpatEpis.getPasEvent().getLocationIsNotNull() ? voInpatEpis.getPasEvent().getLocation().getName() : "");
	
	//try to get existing PendingTransfer if it exists populate screen 
	form.getLocalContext().setPendingInfantTransfer(domain.getPendingTransferForInpatient(voInpatEpis));
	
	// discharge
	clearInfantDischargeControls();

	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantMethodDischarge().setValue(MethodOfDischarge.MEDICALLY_APPROVED);
	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantDischargeDest().setValue(DischargeDestination.HOME);
	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(new DateTime());

	// transfer
	clearInfantTransferControls();
	loadInfantTransferHospital();
	
	
	// Consultant
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().initialize(MosType.MEDIC);

	// any existing pendingtransfer
	PendingTransfersLiteVo voTransfer = form.getLocalContext().getPendingInfantTransfer();
	if (voTransfer != null)
	{
		if (voTransfer.getDestinationWardIsNotNull())
		{
			form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantHospital().setValue(domain.getParentLocation(voTransfer.getDestinationWard()));
			cmbInfantHospitalValueChanged(true);
			form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWard().setValue(voTransfer.getDestinationWard());
		}
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(voTransfer.getWardType());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(voTransfer.getTransferRequestDateTime());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().setValue(voTransfer.getConsultant());
		
		listSpecialtiesForConsultant(form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().getValue(), INFANT_CONSULTANT, voTransfer.getSpecialty(), null);
		
		//if conspc call did not find specialty (conspc mapping was removed) add it as a value anyway
		if(voTransfer.getSpecialtyIsNotNull())
		{
			if(!form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().getValues().contains(voTransfer.getSpecialty()))
				form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().newRow(voTransfer.getSpecialty(), voTransfer.getSpecialty().getText());
		}
	
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().setValue(voTransfer.getSpecialty());
	}
	else
	{
		//WDEV-8466
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(new DateTime());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(WardType.MAIN);
	}
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateInfantInstanceControls()
{
	enableInfantControls(true);
		
	InpatientEpisodeLiteVo voInpatEpis = form.lyrDetail().tabInfants().grdInfants().getValue();
	
	// Current Hospital Label
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue("");
	if (voInpatEpis != null && voInpatEpis.getPasEventIsNotNull())
	{
		LocationLiteVo voHosp = domain.getParentLocation(voInpatEpis.getPasEvent().getLocation());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue(voHosp != null ? voHosp.getName() : "");
	}

	// Current Ward Label
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentWard().setValue(voInpatEpis.getPasEventIsNotNull() && voInpatEpis.getPasEvent().getLocationIsNotNull() ? voInpatEpis.getPasEvent().getLocation().getName() : "");
	
	//try to get existing PendingTransfer if it exists populate screen 
	form.getLocalContext().setPendingInfantTransfer(domain.getPendingTransferForInpatient(voInpatEpis));
	
	// discharge
	clearInfantDischargeControls();

	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantMethodDischarge().setValue(MethodOfDischarge.MEDICALLY_APPROVED);
	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantDischargeDest().setValue(DischargeDestination.HOME);
	form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(new DateTime());

	// transfer
	clearInfantTransferControls();
	loadInfantTransferHospital();
	
	
	// Consultant
	form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().initialize(MosType.MEDIC);

	// any existing pendingtransfer
	PendingTransfersLiteVo voTransfer = form.getLocalContext().getPendingInfantTransfer();
	if (voTransfer != null)
	{
		if (voTransfer.getDestinationWardIsNotNull())
		{
			form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantHospital().setValue(domain.getParentLocation(voTransfer.getDestinationWard()));
			cmbInfantHospitalValueChanged(true);
			form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWard().setValue(voTransfer.getDestinationWard());
		}
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(voTransfer.getWardType());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(voTransfer.getTransferRequestDateTime());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().setValue(voTransfer.getConsultant());
		
		listSpecialtiesForConsultant(form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().getValue(), INFANT_CONSULTANT, voTransfer.getSpecialty(), null);
		
		//if conspc call did not find specialty (conspc mapping was removed) add it as a value anyway
		if(voTransfer.getSpecialtyIsNotNull())
		{
			if(!form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().getValues().contains(voTransfer.getSpecialty()))
				form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().newRow(voTransfer.getSpecialty(), voTransfer.getSpecialty().getText());
		}
	
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().setValue(voTransfer.getSpecialty());
	}
	else
	{
		//WDEV-8466
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(new DateTime());
		form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(WardType.MAIN);
	}
}