Java Code Examples for ims.clinical.vo.lookups.DoseFormIndicatorCollection

The following are top voted examples for showing how to use ims.clinical.vo.lookups.DoseFormIndicatorCollection. 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: EDischargeMedsSthkDialogImpl.java   Source Code and License 6 votes vote down vote up
public DoseFormIndicatorCollection getForms(MedicationRefVo medication)
{
	if (!medication.getID_MedicationIsNotNull())
		throw new DomainRuntimeException("Medication with null as id");
	String hql = "select forms from Medication as med left join med.forms as forms where (med.id = :medId)"; 
	List<?> dos = getDomainFactory().find(hql,"medId",medication.getID_Medication());
	if (dos == null || dos.size() == 0)
		return null;
	MedicationFormLiteVoCollection meds = MedicationFormLiteVoAssembler.createMedicationFormLiteVoCollectionFromMedicationForm(dos);
	DoseFormIndicatorCollection result = new DoseFormIndicatorCollection();
	for (int i = 0 ;i<meds.size() ; i++)
	{
		if (meds.get(i)!=null && meds.get(i).getFormIsNotNull())
			result.add(meds.get(i).getForm());
	}
	return result;
}
 
Example 2
Project: openMAXIMS   File: EDischargeMedsSthkDialogImpl.java   Source Code and License 6 votes vote down vote up
public DoseFormIndicatorCollection getForms(MedicationRefVo medication)
{
	if (!medication.getID_MedicationIsNotNull())
		throw new DomainRuntimeException("Medication with null as id");
	String hql = "select forms from Medication as med left join med.forms as forms where (med.id = :medId)"; 
	List<?> dos = getDomainFactory().find(hql,"medId",medication.getID_Medication());
	if (dos == null || dos.size() == 0)
		return null;
	MedicationFormLiteVoCollection meds = MedicationFormLiteVoAssembler.createMedicationFormLiteVoCollectionFromMedicationForm(dos);
	DoseFormIndicatorCollection result = new DoseFormIndicatorCollection();
	for (int i = 0 ;i<meds.size() ; i++)
	{
		if (meds.get(i)!=null && meds.get(i).getFormIsNotNull())
			result.add(meds.get(i).getForm());
	}
	return result;
}
 
Example 3
Project: openMAXIMS   File: EDischargeMedsSthkDialogImpl.java   Source Code and License 6 votes vote down vote up
public DoseFormIndicatorCollection getForms(MedicationRefVo medication)
{
	if (!medication.getID_MedicationIsNotNull())
		throw new DomainRuntimeException("Medication with null as id");
	String hql = "select forms from Medication as med left join med.forms as forms where (med.id = :medId)"; 
	List<?> dos = getDomainFactory().find(hql,"medId",medication.getID_Medication());
	if (dos == null || dos.size() == 0)
		return null;
	MedicationFormLiteVoCollection meds = MedicationFormLiteVoAssembler.createMedicationFormLiteVoCollectionFromMedicationForm(dos);
	DoseFormIndicatorCollection result = new DoseFormIndicatorCollection();
	for (int i = 0 ;i<meds.size() ; i++)
	{
		if (meds.get(i)!=null && meds.get(i).getFormIsNotNull())
			result.add(meds.get(i).getForm());
	}
	return result;
}
 
Example 4
Project: openmaxims-linux   File: EDischargeMedsSthkDialogImpl.java   Source Code and License 6 votes vote down vote up
public DoseFormIndicatorCollection getForms(MedicationRefVo medication)
{
	if (!medication.getID_MedicationIsNotNull())
		throw new DomainRuntimeException("Medication with null as id");
	String hql = "select forms from Medication as med left join med.forms as forms where (med.id = :medId)"; 
	List<?> dos = getDomainFactory().find(hql,"medId",medication.getID_Medication());
	if (dos == null || dos.size() == 0)
		return null;
	MedicationFormLiteVoCollection meds = MedicationFormLiteVoAssembler.createMedicationFormLiteVoCollectionFromMedicationForm(dos);
	DoseFormIndicatorCollection result = new DoseFormIndicatorCollection();
	for (int i = 0 ;i<meds.size() ; i++)
	{
		if (meds.get(i)!=null && meds.get(i).getFormIsNotNull())
			result.add(meds.get(i).getForm());
	}
	return result;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void rebindFormRows()
{
	DynamicGridRowCollection rows = form.lyrDetails().tabFRU().dyngrdFRU().getRows();
	DoseFormIndicatorCollection mForms = ims.clinical.vo.lookups.LookupHelper.getDoseFormIndicator(this.domain.getLookupService());
	for (int i = 0 ; i < rows.size() ; i++)
	{
		if (rows.get(i).getValue() instanceof MedicationFormVo)
		{
			MedicationFormVo x = (MedicationFormVo) rows.get(i).getValue();
			if (!x.getFormIsNotNull())
				continue;
			mForms.remove(x.getForm());
		}	
	}
	for (int i = 0 ; i < rows.size() ; i++)
	{
		DynamicGridCell cell = rows.get(i).getCells().get(form.lyrDetails().tabFRU().dyngrdFRU().getColumns().getByIdentifier(COL_MAIN));
		Object back = cell.getValue();
		cell.getItems().clear();
		if (back!=null)
			cell.getItems().newItem(back);
		for (int j = 0 ; j < mForms.size() ;j++)
			cell.getItems().newItem(mForms.get(j));
		cell.setValue(back);
	}
	
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateCmbForm(DoseFormIndicatorCollection forms)
{
	form.cmbForm().clear();
	if (forms==null)
		return;
	for (int i = 0 ; i < forms.size() ; i++)
	{
		DoseFormIndicator tForm = forms.get(i);
		if (tForm == null)
			continue;
		form.cmbForm().newRow(tForm, tForm.getIItemText());
	}
	
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void rebindFormRows()
{
	DynamicGridRowCollection rows = form.lyrDetails().tabFRU().dyngrdFRU().getRows();
	DoseFormIndicatorCollection mForms = ims.clinical.vo.lookups.LookupHelper.getDoseFormIndicator(this.domain.getLookupService());
	for (int i = 0 ; i < rows.size() ; i++)
	{
		if (rows.get(i).getValue() instanceof MedicationFormVo)
		{
			MedicationFormVo x = (MedicationFormVo) rows.get(i).getValue();
			if (!x.getFormIsNotNull())
				continue;
			mForms.remove(x.getForm());
		}	
	}
	for (int i = 0 ; i < rows.size() ; i++)
	{
		DynamicGridCell cell = rows.get(i).getCells().get(form.lyrDetails().tabFRU().dyngrdFRU().getColumns().getByIdentifier(COL_MAIN));
		Object back = cell.getValue();
		cell.getItems().clear();
		if (back!=null)
			cell.getItems().newItem(back);
		for (int j = 0 ; j < mForms.size() ;j++)
			cell.getItems().newItem(mForms.get(j));
		cell.setValue(back);
	}
	
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateCmbForm(DoseFormIndicatorCollection forms)
{
	form.cmbForm().clear();
	if (forms==null)
		return;
	for (int i = 0 ; i < forms.size() ; i++)
	{
		DoseFormIndicator tForm = forms.get(i);
		if (tForm == null)
			continue;
		form.cmbForm().newRow(tForm, tForm.getIItemText());
	}
	
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void rebindFormRows()
{
	DynamicGridRowCollection rows = form.lyrDetails().tabFRU().dyngrdFRU().getRows();
	DoseFormIndicatorCollection mForms = ims.clinical.vo.lookups.LookupHelper.getDoseFormIndicator(this.domain.getLookupService());
	for (int i = 0 ; i < rows.size() ; i++)
	{
		if (rows.get(i).getValue() instanceof MedicationFormVo)
		{
			MedicationFormVo x = (MedicationFormVo) rows.get(i).getValue();
			if (!x.getFormIsNotNull())
				continue;
			mForms.remove(x.getForm());
		}	
	}
	for (int i = 0 ; i < rows.size() ; i++)
	{
		DynamicGridCell cell = rows.get(i).getCells().get(form.lyrDetails().tabFRU().dyngrdFRU().getColumns().getByIdentifier(COL_MAIN));
		Object back = cell.getValue();
		cell.getItems().clear();
		if (back!=null)
			cell.getItems().newItem(back);
		for (int j = 0 ; j < mForms.size() ;j++)
			cell.getItems().newItem(mForms.get(j));
		cell.setValue(back);
	}
	
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateCmbForm(DoseFormIndicatorCollection forms)
{
	form.cmbForm().clear();
	if (forms==null)
		return;
	for (int i = 0 ; i < forms.size() ; i++)
	{
		DoseFormIndicator tForm = forms.get(i);
		if (tForm == null)
			continue;
		form.cmbForm().newRow(tForm, tForm.getIItemText());
	}
	
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void rebindFormRows()
{
	DynamicGridRowCollection rows = form.lyrDetails().tabFRU().dyngrdFRU().getRows();
	DoseFormIndicatorCollection mForms = ims.clinical.vo.lookups.LookupHelper.getDoseFormIndicator(this.domain.getLookupService());
	for (int i = 0 ; i < rows.size() ; i++)
	{
		if (rows.get(i).getValue() instanceof MedicationFormVo)
		{
			MedicationFormVo x = (MedicationFormVo) rows.get(i).getValue();
			if (!x.getFormIsNotNull())
				continue;
			mForms.remove(x.getForm());
		}	
	}
	for (int i = 0 ; i < rows.size() ; i++)
	{
		DynamicGridCell cell = rows.get(i).getCells().get(form.lyrDetails().tabFRU().dyngrdFRU().getColumns().getByIdentifier(COL_MAIN));
		Object back = cell.getValue();
		cell.getItems().clear();
		if (back!=null)
			cell.getItems().newItem(back);
		for (int j = 0 ; j < mForms.size() ;j++)
			cell.getItems().newItem(mForms.get(j));
		cell.setValue(back);
	}
	
}
 
Example 12
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateCmbForm(DoseFormIndicatorCollection forms)
{
	form.cmbForm().clear();
	if (forms==null)
		return;
	for (int i = 0 ; i < forms.size() ; i++)
	{
		DoseFormIndicator tForm = forms.get(i);
		if (tForm == null)
			continue;
		form.cmbForm().newRow(tForm, tForm.getIItemText());
	}
	
}