Java Code Examples for ims.core.vo.ClinicalContactShortVo

The following are top voted examples for showing how to use ims.core.vo.ClinicalContactShortVo. 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 initialize()
{
	loadVertebralCombos();

	ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

	boolean bMedicalAdmissionContactSelected = (currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
	Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroMotorInpatient));

	form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm);
	form.getLocalContext().setIsClinicalContactType(bMedicalAdmissionContactSelected);
	
	displayRecordBrowser(bMedicalInpatientForm.booleanValue());
	form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());

	if (writeConditionsApply(bMedicalInpatientForm, bMedicalAdmissionContactSelected))
		activateButtons(true);
	else
		activateButtons(false);

}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void newParentNode(GaitVo voNewParent)
{
	if (voNewParent == null) return;
	
	GaitShortVo voParentShort = new GaitShortVo();
	voParentShort.setAuthoringHCP(voNewParent.getAuthoringHCP());
	voParentShort.setAuthoringDateTime(voNewParent.getAuthoringDateTime());
	voParentShort.setClinicalContact((ClinicalContactShortVo) voNewParent.getClinicalContact());
	
	GenForm.grdGaitRow parentRow = form.grdGait().getRows().newRow();			
	if(voParentShort.getAuthoringHCPIsNotNull() && voParentShort.getAuthoringDateTimeIsNotNull())
		parentRow.setColEnvironment(voParentShort.getAuthoringDateTime().toString()+ " - " + voParentShort.getAuthoringHCP().toString());			
	parentRow.setValue(voParentShort);
	parentRow.setBackColor(Color.Beige);
	form.getLocalContext().setGoldenInstanceSelected(new Boolean(true));
	parentRow.setExpanded(true);
	form.grdGait().setValue(voParentShort);	
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadClinicalContactMotorRecords(ClinicalContactShortVo voClinicalContact, NeuroMotorFindingsShortVoCollection voNeuroMotorFindingsColl)
{
	boolean isClinicalContactSelected = checkCurrentClinicalContact(voClinicalContact);

	Color textColour = null;
	if (isClinicalContactSelected)
		textColour = Color.Green;

	form.recNeuro().newRow(voClinicalContact, "Clinical Contact: " + voClinicalContact.getStartDateTime() + " - " + voClinicalContact.getSeenBy(), textColour);

	if (isClinicalContactSelected)
		form.recNeuro().setValue(voClinicalContact);

	for (int i = 0; i < voNeuroMotorFindingsColl.size(); i++)
	{
		NeuroMotorFindingsShortVo voMotorFinding = voNeuroMotorFindingsColl.get(i);
		form.recNeuro().newRow(voMotorFinding, "\t\t\t\t " + voMotorFinding.getAuthoringDateTime() + " - " + voMotorFinding.getAuthoringCP().getMos().getName(), textColour);
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateContactInfo(NeuroMotorFindingsVo voNeuroMotorFind)
{
	if (voNeuroMotorFind != null)
	{
		form.dtimRecording().setValue(voNeuroMotorFind.getAuthoringDateTime());
		form.qmbAuthoring().newRow(voNeuroMotorFind.getAuthoringCP(), voNeuroMotorFind.getAuthoringCP().toString());
		form.qmbAuthoring().setValue(voNeuroMotorFind.getAuthoringCP());
		return;
	}

	if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
	{
		ClinicalContactShortVo voClinicalContactShort = form.getGlobalContext().Core.getCurrentClinicalContact();

		if (voClinicalContactShort != null)
		{
			form.dtimRecording().setValue(voClinicalContactShort.getStartDateTime());
			form.qmbAuthoring().newRow(voClinicalContactShort.getSeenBy(), voClinicalContactShort.getSeenBy().toString());
			form.qmbAuthoring().setValue(voClinicalContactShort.getSeenBy());
		}
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initialize()
{
	loadVertebralCombos();
	
	ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	
	Boolean bMedicalAdmissionContactSelected = new Boolean(currentClinicalContact!=null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
	Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroInterpInpatient));
	
	form.getLocalContext().setMedicalAdmissionContactSelected(bMedicalAdmissionContactSelected);
	form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm);
	displayRecordBrowser(bMedicalInpatientForm.booleanValue());
	
	if(writeConditionsApply(bMedicalInpatientForm,	bMedicalAdmissionContactSelected))
		activateButtons(true);
	else
		activateButtons(false);
	
	form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadClinicalContactInterpretRecords(ClinicalContactShortVo voClinicalContact, NeuroInterpretShortVoCollection collVoNeuroInterpretShort)
{
	boolean isClinicalContactSelected = checkCurrentClinicalContact(voClinicalContact);
	
	Color textColour = null;
	if(isClinicalContactSelected)
		textColour = Color.Green;
	
	form.recbrInterpret().newRow(voClinicalContact, "Clinical Contact: " + voClinicalContact.getStartDateTime() + " - " + voClinicalContact.getSeenBy(), textColour);
	
	if(isClinicalContactSelected)
		form.recbrInterpret().setValue(voClinicalContact);
	
	for(int i=0; i<collVoNeuroInterpretShort.size(); i++)
	{
		NeuroInterpretShortVo voNeuroInterpretShort = collVoNeuroInterpretShort.get(i);
		form.recbrInterpret().newRow(voNeuroInterpretShort, "\t\t\t\t " + voNeuroInterpretShort.getAuthoringDateTime() + " - " + voNeuroInterpretShort.getClinicalContact().getSeenBy(), textColour);
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void checkForSelectedClinicalContact()
{
	// the selected Clinical Contact that has been selected from Patient Summary may not have a record and therefore 
	// must be added to the record browser
	boolean clinicalContactFound = false;
	ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	
	if(voSelectedClinicalContact != null)
	{
		for(int i =0; i< form.recbrInterpret().size(); i++)
		{
			ValueObject vo = (ValueObject) form.recbrInterpret().getValues().get(i);
			if(vo instanceof ClinicalContactShortVo)
			{
				ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrInterpret().getValues().get(i);
				if(voClinicalContact.equals(voSelectedClinicalContact))
					clinicalContactFound = true;
			}
		}
		if(!clinicalContactFound)
		{
			form.recbrInterpret().newRow(voSelectedClinicalContact, "Clinical Contact: " + voSelectedClinicalContact.getStartDateTime() + " - " + voSelectedClinicalContact.getSeenBy(), Color.Green);
			form.recbrInterpret().setValue(voSelectedClinicalContact);
		}
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void browseRecord()
{
	clearScreen();
	updateBrowseInformation();
		
	if(form.recbrInterpret().getValue() != null)
	{			
		if(form.recbrInterpret().getValue() instanceof ClinicalContactShortVo)
		{
			form.getLocalContext().setAdmisNeuroInterpretVo(domain.getAdmisNeuroInterpret((ClinicalContactShortVo) form.recbrInterpret().getValue(), null));
		}
		else if(form.recbrInterpret().getValue() instanceof NeuroInterpretShortVo)
		{
			NeuroInterpretShortVo voNeuroInterpret = (NeuroInterpretShortVo) form.recbrInterpret().getValue();
			if(voNeuroInterpret.getClinicalContact() == null)
				form.getLocalContext().setAdmisNeuroInterpretVo(domain.getAdmisNeuroInterpretByCareContext(voNeuroInterpret.getCareContext(), voNeuroInterpret));
			else
				form.getLocalContext().setAdmisNeuroInterpretVo(domain.getAdmisNeuroInterpret(voNeuroInterpret.getClinicalContact(), voNeuroInterpret));
		}
		else
			form.getLocalContext().setAdmisNeuroInterpretVo(domain.getAdmisNeuroInterpretByCareContext((CareContextRefVo) form.recbrInterpret().getValue(), null));

		populateScreenFromData();
	}
	checkRecordIsEditable();
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean loadEnvironmentalVisitsOfClinicalContact(EnvironmentalVisitShortVo voEnvirVisit)
{
	ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	//A Clinical Contact can only have one Environmental Visit Record
	if(voClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voEnvirVisit.getClinicalContact().getID_ClinicalContact()))
	{
		//this Clinical Contact has been selected from the patient summary
		loadCurrentClinicalContact(voEnvirVisit.getClinicalContact(), Color.Green);
		return true;
	}
	else
	{
		loadCurrentClinicalContact(voEnvirVisit.getClinicalContact(), null);
	}

	return false;
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void initialize()
{
	ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	
	boolean bMedicalAdmissionContactSelected = (currentClinicalContact!=null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
	Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskSpineExamInpatient));
	
	form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm);
	displayRecordBrowser(bMedicalInpatientForm.booleanValue());
	
	if(writeConditionsApply(bMedicalInpatientForm,	bMedicalAdmissionContactSelected))
		activateButtons(true);
	else
		activateButtons(false);		
	
	form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void isRecordCurrent()
{
	ClinicalContactShortVo voCurrent = null;
	if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
		voCurrent = form.getGlobalContext().Core.getCurrentClinicalContact();
	
	for(int i = 0 ; i < form.gridGait().getRows().size() ; i++)
	{
		GaitReEducationVo voGait = form.gridGait().getRows().get(i).getValue();
		if(voCurrent != null && voGait.getClinicalContact() != null)
		{
			if(voGait.getClinicalContact().getID_ClinicalContact().equals(voCurrent.getID_ClinicalContact()))
			{
				form.getLocalContext().setUpdateCurrentRecord(new Boolean(true));
				//set colour of current record + set it expanded
				GenForm.gridGaitRow currentRow = form.gridGait().getRows().get(i);
				currentRow.setBackColor(Color.Beige);
				currentRow.setExpanded(true);
				form.gridGait().setValue(voGait);
			}
		}
		populateControls(voGait);
	}
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void loadClinicalContactReflexRecords(ClinicalContactShortVo voClinicalContact, NeuroSensationFindingsShortVoCollection voNeuroSensationColl)
{
	boolean isClinicalContactSelected = checkCurrentClinicalContact(voClinicalContact);
	
	Color textColour = null;
	if(isClinicalContactSelected)
		textColour = Color.Green;
	
	form.recbrSensation().newRow(voClinicalContact, "Clinical Contact: " + voClinicalContact.getStartDateTime() + " - " + voClinicalContact.getSeenBy(), textColour);
	
	if(isClinicalContactSelected)
		form.recbrSensation().setValue(voClinicalContact);
	
	for(int i=0; i<voNeuroSensationColl.size(); i++)
	{
		NeuroSensationFindingsShortVo voNeuroSensation = voNeuroSensationColl.get(i);
		form.recbrSensation().newRow(voNeuroSensation, "\t\t\t\t " + voNeuroSensation.getAuthoringDateTime() + " - " + voNeuroSensation.getAuthoringCP().getMos().getName(), textColour);
	}
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateContactInfo(NeuroSenastionFindingsVo voNeuroSenastionFindings) 
{
	if(voNeuroSenastionFindings != null && voNeuroSenastionFindings.getAuthoringCPIsNotNull())
	{
		//WDEV-15172
		AuthoringInformationVo authoringInfo = new AuthoringInformationVo(); 
		authoringInfo.setAuthoringHcp(voNeuroSenastionFindings.getAuthoringCP());
		authoringInfo.setAuthoringDateTime(voNeuroSenastionFindings.getAuthoringDateTime());
		form.ccAuthoring().setValue(authoringInfo);
		
		return;
	}
	
	if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
	{
		ClinicalContactShortVo voClinicalContactShort = form.getGlobalContext().Core.getCurrentClinicalContact();
		
		if(voClinicalContactShort != null)
		{
			if(voClinicalContactShort.getStartDateTimeIsNotNull())
			{
				form.ccAuthoring().initializeComponent(false); //WDEV-15172 
			}
		}
	}
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean loadHomeVisitsOfClinicalContact(HomeVisitShortVo voHomeVisit)
{
	ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	//A Clinical Contact can only have one Environmental Visit Record
	if(voClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voHomeVisit.getClinicalContact().getID_ClinicalContact()))
	{
		//this Clinical Contact has been selected from the patient summary
		loadCurrentClinicalContact(voHomeVisit.getClinicalContact(), Color.Green);
		return true;
	}
	else
	{
		loadCurrentClinicalContact(voHomeVisit.getClinicalContact(), null);
	}

	return false;
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateContactInfo(NeuroReflexesVo voReflex) 
{
	if(voReflex != null)
	{
		//WDEV-15172
		AuthoringInformationVo authoringInfo = new AuthoringInformationVo(); 
		authoringInfo.setAuthoringHcp(voReflex.getAuthoringCP());
		authoringInfo.setAuthoringDateTime(voReflex.getAuthoringDateTime());
		form.ccAuthoring().setValue(authoringInfo);
		return;
	}
	
	if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
	{
		ClinicalContactShortVo voClinicalContactShort = form.getGlobalContext().Core.getCurrentClinicalContact();
		
		if(voClinicalContactShort != null)
		{
			if(voClinicalContactShort.getStartDateTimeIsNotNull())
			{
				form.ccAuthoring().initializeComponent(false); //WDEV-15172 
			}
		}
	}
}
 
Example 16
Project: AvoinApotti   File: InjuryDetailsImpl.java   Source Code and License 6 votes vote down vote up
private MedicalProbOnAdmisVo assembleMedicalProbOnAdm(PatientProblem domObj)
{
	if(domObj == null)
		return null;
	MedicalProbOnAdmisVo medProbVo = new MedicalProbOnAdmisVo(domObj.getId(),domObj.getVersion());
	medProbVo.setIsRIE(domObj.getIsRIE());
	medProbVo.setCareContext(domObj.getCareContext() != null ? new CareContextRefVo(domObj.getCareContext().getId(), domObj.getCareContext().getVersion()) : null);
	medProbVo.setClinicalContact(domObj.getClinicalContact() != null ? new ClinicalContactShortVo(domObj.getClinicalContact().getId(), domObj.getClinicalContact().getVersion()) : null);
	medProbVo.setIsActive(domObj.isIsActive());
	medProbVo.setPatientProblem(domObj.getPatientProblem());
	medProbVo.setProblemContext(domObj.getProblemContext());
	
	return medProbVo;
	
	
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void setRecordBrowser()
{
	// after an update need to set the record browser to display the updated record
	if(form.getLocalContext().getUpdatedInstanceIsNotNull())
	{
		if(form.getLocalContext().getUpdatedInstance() instanceof CareContextShortVo)
		{
			CareContextShortVo voCareContext = (CareContextShortVo) form.getLocalContext().getUpdatedInstance();
			form.recbrPathology().setValue(voCareContext);
		}
		else
		{
			ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.getLocalContext().getUpdatedInstance();
			form.recbrPathology().setValue(voClinicalContact);
		}
	}
}
 
Example 18
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException
{
	clearScreen();
	
	ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	if(voClinicalContact != null)
	{
		form.txtAuthoringHcp().setValue(voClinicalContact.getSeenBy().toString());
		form.dtimAuthoringDateTime().setValue(voClinicalContact.getStartDateTime());
	}
	
	form.btnNew().setEnabled(false);
	form.btnUpdate().setEnabled(false);
	
	form.cmbCauseInjury().setValue(null);
	form.cmbCauseInjury().setEnabled(false);
	form.cmbMechInjury().setValue(null);
	form.getLocalContext().setInjuryDetails(null); //wdev-13295
	
	form.setMode(FormMode.EDIT);
}
 
Example 19
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
public void initialize() throws FormOpenException
{
	// Initialize dynamic grid
	initializeDymanicGrid();

	// Initialize combo-box
	initializeCombos();

	form.getLocalContext().setSelectedFindings(null);

	ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

	form.getLocalContext().setIsClinicalContactType(currentClinicalContact != null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
	form.getLocalContext().setIsMedicalInpatientForm(new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.NeurologicalExaminationMotorInpatient)));

	displayRecordBrowser(form.getLocalContext().getIsMedicalInpatientForm());
	// form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void isRecordEditable()
{
	if(form.recbrContact().getValue() instanceof ClinicalContactShortVo)
	{
		ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrContact().getValue();
		if(form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull() && voClinicalContact.getID_ClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact()))
			displayButtonsForRecord();
		else
			displayButtons(false, false);
	}
	else
	{
		displayButtons(false, false);
	}
	
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{		
	AdmisSummary summary = null;
	NeuroMotorFindingsVo neurofinding = null;
	ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	
	if(voClinicalContact != null  && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
	{
					
		summary = domain.getAdmissionSummaryByClinicalContact(voClinicalContact);
		neurofinding = domain.getNeuroMotorFinding(voClinicalContact);
		
	}
	else
	{
		summary = domain.getAdmissionSummaryByCareContext(form.getGlobalContext().Core.getCurrentCareContext());
		neurofinding = domain.getNeuroMotorFindingByCareContext(form.getGlobalContext().Core.getCurrentCareContext());
	}
	
	
	
	if (summary != null)
		populateForm(summary,neurofinding);
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void browseRecord()
{
	//Commented out the following line as part
	//of the resolution for issue number wdev-694
	//updateBrowseInformation();
	clearControls();
	resetNeedsGrid();
	
	if(form.recbrSOAP().getValue() instanceof ClinicalContactShortVo)
	{
		ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrSOAP().getValue();
		form.getLocalContext().setSoapNoteVo(domain.getSoapNoteVo(voClinicalContact));
		if(form.getLocalContext().getSoapNoteVoIsNotNull())
			populateScreenFromData(form.getLocalContext().getSoapNoteVo());
	}
	isRecordEditable();
}
 
Example 23
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void browseRecord()
{
	clearControls();
	clearGrids();
	
	prePopulateGrids();
	updateBrowseInformation();
	
	if(form.recbrHydro().getValue() instanceof ClinicalContactShortVo)
	{
		ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrHydro().getValue();
		form.getLocalContext().setvoHydroTherapy(domain.getHydroTherapy(voClinicalContact, engine.isRIEMode()));
		if(form.getLocalContext().getvoHydroTherapyIsNotNull())
			populateScreen(form.getLocalContext().getvoHydroTherapy());
	}
	isRecordEditable();
}
 
Example 24
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isRecordCurrent()
{
	ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	EnvironmentalVisitVo voEnvironmentalVisit = form.getLocalContext().getvoEnvironmentalVisit();

	// check if the record has a clinicalContact and the GC ClinicalContact
	// is not null, if they are equal then return true.
	// or if the ClinicalContact is null and the GC Clinical Contact is
	// null, then the current care context selected, return true.
	// else return false;
	if (voEnvironmentalVisit != null)
	{
		if ((voEnvironmentalVisit.getClinicalContactIsNotNull() && voCurrentClinicalContact != null && voCurrentClinicalContact.getID_ClinicalContact().equals(voEnvironmentalVisit.getClinicalContact().getID_ClinicalContact())) || (voEnvironmentalVisit.getClinicalContact() == null && voCurrentClinicalContact == null))
		{
			return true;
		}
	}
	return false;
}
 
Example 25
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setCurrentClinicalNote()
{
	if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
	{
		ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
		ClinicalNotesVo clinicalNotesForContact = domain.getClinicalNotesForContact(currentClinicalContact);
		
		if (clinicalNotesForContact != null)
			form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNote(clinicalNotesForContact));
		else
			form.getGlobalContext().Clinical.setCurrentClinicalNote(null);
	}
}
 
Example 26
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean parentEnded()
{
	//we dont care about any rules if the user is a clinical administrator 
	if(engine.hasRight(AppRight.CAN_ADD_CONTACT_AFTER_ENDDATE_SUPPLIED))
		return false;
	
	if(ConfigFlag.UI.STOP_CLINICAL_DATACREATION_IFENDDATE_SUPPLIED.getValue())
	{
		//check if the selected item is ended
		if(form.grdList().getValue() != null)
		{
			if (form.grdList().getValue() instanceof EpisodeofCareVo)
			{
				if(((EpisodeofCareVo)form.grdList().getValue()).getEndDateIsNotNull())
					return true;
			}

			else if (form.grdList().getValue() instanceof CareContextVo)
			{
				if(((CareContextVo)form.grdList().getValue()).getEndDateTimeIsNotNull() || ((EpisodeofCareVo)form.grdList().getSelectedRow().getParentRow().getValue()).getEndDateIsNotNull())
					return true;
			}
			else if (form.grdList().getValue() instanceof ClinicalContactShortVo)
			{
				if(((CareContextVo)form.grdList().getSelectedRow().getParentRow().getValue()).getEndDateTimeIsNotNull() || ((EpisodeofCareVo)form.grdList().getSelectedRow().getParentRow().getParentRow().getValue()).getEndDateIsNotNull())
					return true;
			}
		}		
	}
	
	return false;
}
 
Example 27
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void browseRecord()
{
	clearScreen();
	prePopulateGrids();
	updateBrowseInformation();
	
	if(form.recbrPlinth().getValue() != null && form.recbrPlinth().getValue() instanceof ClinicalContactShortVo)
	{
		form.getLocalContext().setPlinthWork(domain.getPlinthWorkByClinicalContact((ClinicalContactRefVo) form.recbrPlinth().getValue()));
		populateScreen(form.getLocalContext().getPlinthWork());
	}
	isRecordEditable();
}
 
Example 28
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void open() 
{
	form.setMode(FormMode.VIEW);
	form.getLocalContext().setvoNeuroInterpret(null);

	clearScreen();
	
	if(engine.getFormName().equals(form.getForms().SpinalInjuries.MedNeuroInterp))
	{
		ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
		
		if(voClinicalContact != null && voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
		{
			form.getLocalContext().setvoNeuroMotorExam(domain.getNeuroMotorRecord(form.getGlobalContext().Core.getCurrentClinicalContact()));	
			form.getLocalContext().setvoNeuroSensationExamination(domain.getNeuroSensationExamination(form.getGlobalContext().Core.getCurrentClinicalContact()));
			form.getLocalContext().setAdmisNeuroInterpretVo(domain.getAdmisNeuroInterpret(form.getGlobalContext().Core.getCurrentClinicalContact(), null));
		}
		else
		{
			form.getLocalContext().setvoNeuroMotorExam(domain.getSpinalMedicalAdmissionMotorByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));	
			form.getLocalContext().setvoNeuroSensationExamination(domain.getSpinalMedicalAdmissionSensationByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));
			form.getLocalContext().setAdmisNeuroInterpretVo(domain.getSpinalMedicalAdmissionInterpretByCareContext(form.getGlobalContext().Core.getCurrentCareContext()));
		}
		populateScreenFromData();
	}
	else
	{
		fillRecordBrowser();
	}
	displayFrankelAndAsiaDetails();
}
 
Example 29
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void initialize() {
	prepopulateControls();
	loadGrids();
	
	ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	form.getLocalContext().setClinicalContact(currentClinicalContact);
	if(currentClinicalContact!=null)
		form.getLocalContext().setCurrentClinicalContactId(currentClinicalContact.getID_ClinicalContact());
	
	form.grdPowechair().getRows().clear(); //wdev-13511
	
}
 
Example 30
Project: AvoinApotti   File: MedicationOnAdmissionImpl.java   Source Code and License 5 votes vote down vote up
public PatientMedicationVoCollection listMedicationOnAdmission(ClinicalContactShortVo clinicalContactShortVo, CareContextRefVo careContextRefVo)
{
	DomainFactory factory = getDomainFactory();
	StringBuffer hql = new StringBuffer(" ");
	String query = "from PatientMedication t ";
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();
	String andStr = " ";

	if (clinicalContactShortVo != null)
	{
		hql.append(andStr + " t.clinicalContact.id = :Id");
		markers.add("Id");
		values.add(clinicalContactShortVo.getID_ClinicalContact());
		andStr = " and ";
	}
	if (careContextRefVo != null)
	{
		hql.append(andStr + " t.careContext.id = :IdCX");
		markers.add("IdCX");
		values.add(careContextRefVo.getID_CareContext());
		andStr = " and ";
	}

	if (markers.size() > 0)
		query += " where ";
	query += hql.toString();

	return PatientMedicationVoAssembler.createPatientMedicationVoCollectionFromPatientMedication(factory.find(query, markers, values));
}
 
Example 31
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean checkCurrentClinicalContact(ClinicalContactShortVo voClinicalContact)
{
	// checks if this Clinical Contact is the selected Clinical Contact from Patient Summary
	ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	if(voSelectedClinicalContact != null)
	{
		if(voSelectedClinicalContact.equals(voClinicalContact))
			return true;
		else
			return false;
	}
	return false;
}
 
Example 32
Project: AvoinApotti   File: DemoPatientReferralListImpl.java   Source Code and License 5 votes vote down vote up
public ClinicalContactShortVo getClinicalContact(ClinicalContactRefVo clinicalContactRefVo) 
{
	if (clinicalContactRefVo == null)
		return null;
	
	DomainFactory factory = getDomainFactory();
	ClinicalContact doClinContact = (ClinicalContact)factory.getDomainObject(ClinicalContact.class, clinicalContactRefVo.getID_ClinicalContact()); 
	return ClinicalContactShortVoAssembler.create(doClinContact);
}
 
Example 33
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean isCurrentClinicalRecordSelected()
{
	if(form.recbrPreviousMotorCharts().getValue() instanceof PatientMotorChartShortVo)
	{
		PatientMotorChartShortVo voMotorChart = (PatientMotorChartShortVo) form.recbrPreviousMotorCharts().getValue();
		return voMotorChart != null && voMotorChart.getClinicalContactIsNotNull() && voMotorChart.getClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact()) && voMotorChart.getID_PatientMotorChartIsNotNull();
	}
	if(form.recbrPreviousMotorCharts().getValue() instanceof ClinicalContactShortVo)
	{
		ClinicalContactShortVo voClinContact = (ClinicalContactShortVo)form.recbrPreviousMotorCharts().getValue();
		return voClinContact != null && voClinContact.equals(form.getGlobalContext().Core.getCurrentClinicalContact());
	}
	return false;
}
 
Example 34
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void initialize() {
	ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	form.getLocalContext().setClinicalContact(currentClinicalContact);
	if(currentClinicalContact!=null)
		form.getLocalContext().setCurrentClinicalContactId(currentClinicalContact.getID_ClinicalContact());
	
	
}
 
Example 35
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean checkCurrentClinicalContact(ClinicalContactShortVo voClinicalContact)
{
	// checks if this Clinical Contact is the selected Clinical Contact from Patient Summary
	ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	if(voSelectedClinicalContact != null)
	{
		if(voSelectedClinicalContact.equals(voClinicalContact))
			return true;
		else
			return false;
	}
	return false;
}
 
Example 36
Project: AvoinApotti   File: MedNeuroMotorImpl.java   Source Code and License 5 votes vote down vote up
public MedicalProbOnAdmisVo getPatientProblem(ClinicalContactShortVo voClinContact) 
{
	if(voClinContact == null)
		throw new CodingRuntimeException("No ClinicalContact available");
	
	DomainFactory factory = getDomainFactory();

	
	String hql = " from PatientProblem medicalProbOnAdmis "; 
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";

	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();

	if(voClinContact != null)
	{
		condStr.append(andStr + " medicalProbOnAdmis.clinicalContact.id = :id_ClinicalContact"); 
		markers.add("id_ClinicalContact");
		values.add(voClinContact.getID_ClinicalContact());
		andStr = " and ";
	}	
	
	condStr.append(andStr + " medicalProbOnAdmis.problemContext = :problemContext"); 
	markers.add("problemContext");
	values.add("Neuro - Motor");
	andStr = " and ";
	
	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	MedicalProbOnAdmisVoCollection collMedicalProbOnAdmis = MedicalProbOnAdmisVoAssembler.createMedicalProbOnAdmisVoCollectionFromPatientProblem(factory.find(hql, markers, values));
	if(collMedicalProbOnAdmis.size()>0)
		return collMedicalProbOnAdmis.get(0);
	
	
	return null;

}
 
Example 37
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void isRecordEditable()
{
	boolean isEditable = false;
	ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	
	if(voSelectedClinicalContact != null)
	{
		if(form.recbrHydro().getValue() instanceof ClinicalContactShortVo)
		{
			ClinicalContactShortVo voContact = (ClinicalContactShortVo) form.recbrHydro().getValue();
			if(voContact.getID_ClinicalContact().equals(voSelectedClinicalContact.getID_ClinicalContact()))
				isEditable = true;
		}
	}
	
	form.btnNew().setVisible(isEditable);
	form.btnUpdate().setVisible(isEditable);
	
	if(isEditable)
	{
		if(form.getLocalContext().getvoHydroTherapyIsNotNull())
		{
			form.btnNew().setEnabled(false);
			form.btnNew().setVisible(false);
			form.btnUpdate().setEnabled(true);
			form.btnUpdate().setVisible(true);
		}
		else
		{
			form.btnNew().setEnabled(true);
			form.btnNew().setVisible(true);
			form.btnUpdate().setEnabled(false);
			form.btnUpdate().setVisible(false);
		}
	}
	

}
 
Example 38
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void isRecordOfTypeMedicalAdmission()
{
	ClinicalContactShortVo voCurrentClinical = form.getGlobalContext().Core.getCurrentClinicalContact();
	if(voCurrentClinical != null)
	{
		if(voCurrentClinical.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
			activateButtons(false);
	}
}
 
Example 39
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkForSelectedClinicalContact()
{
	// the selected Clinical Contact that has been selected from Patient Summary may not have a record and therefore 
	// must be added to the record browser
	boolean clinicalContactFound = false;
	ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	
	if(voSelectedClinicalContact != null)
	{
		for(int i =0; i< form.recbrSensation().size(); i++)
		{
			ValueObject vo = (ValueObject) form.recbrSensation().getValues().get(i);
			if(vo instanceof ClinicalContactShortVo)
			{
				ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrSensation().getValues().get(i);
				if(voClinicalContact.equals(voSelectedClinicalContact))
					clinicalContactFound = true;
			}
		}
		
		if(!clinicalContactFound)
		{
			form.recbrSensation().newRow(voSelectedClinicalContact, "Clinical Contact: " + voSelectedClinicalContact.getStartDateTime() + " - " + voSelectedClinicalContact.getSeenBy(), Color.Green);
			form.recbrSensation().setValue(voSelectedClinicalContact);
		}
	}
}
 
Example 40
Project: AvoinApotti   File: PatientProceduresImpl.java   Source Code and License 5 votes vote down vote up
public PatientProcedureVoCollection listClinicalContactProcedures(ClinicalContactShortVo voClinicalContactShort, CareContextShortVo careContext)
{
	DomainFactory factory = getDomainFactory();
	StringBuffer hql = new StringBuffer(" ");
	String query = "from PatientProcedure t ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	String andStr = " ";

	if (careContext != null)
	{
		hql.append(andStr + " t.careContext.id = :ccid");
		markers.add("ccid");
		values.add(careContext.getID_CareContext());
		andStr = " and ";
	}
	else if (voClinicalContactShort != null)
	{
		hql.append(andStr + " t.clinicalContact.id = :rcc");
		markers.add("rcc");
		values.add(new Boolean(true));
		andStr = " and ";

	}

	hql.append(andStr + " t.procedureStatus = :perf");
	markers.add("perf");
	values.add(getDomLookup(PatientProcedureStatus.PERFORMED));
	andStr = " and ";

	if (markers.size() > 0)
		query += " where t.class is null  and";
	query += hql.toString();

	List patientProcedureList = factory.find(query, markers, values);
	return PatientProcedureVoAssembler.createPatientProcedureVoCollectionFromPatientProcedure(patientProcedureList).sort();

}
 
Example 41
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void viewClinicalNotes()
{
	if (form.dyngrdList().getSelectedRow() != null && form.dyngrdList().getSelectedRow().getValue() != null && form.getGlobalContext().Core.getClinicalNotesShortIsNotNull() && form.getGlobalContext().Clinical.getCurrentClinicalNoteIsNotNull())
	{
		if (form.dyngrdList().getValue() instanceof ClinicalContactShortVo)
		{
			selectClinicalNoteInGlobalContext();
			form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.VIEW);
			form.getGlobalContext().Core.setClinicalNotingMode(null);

			if (form.getGlobalContext().Core.getClinicalNotesShort().getSourceOfNoteIsNotNull() && form.getGlobalContext().Core.getClinicalNotesShort().getSourceOfNote().equals(SourceOfNote.THERAPYSOAPNOTE))
				engine.open(form.getForms().Therapies.SOAPNoteDialog);

			else if (form.getGlobalContext().Core.getClinicalNotesShort().getIsDerivedNoteIsNotNull() && form.getGlobalContext().Core.getClinicalNotesShort().getIsDerivedNote().booleanValue())
			{
				if (form.getGlobalContext().Core.getClinicalNotesShort().getSourceOfNoteIsNotNull() && form.getGlobalContext().Core.getClinicalNotesShort().getSourceOfNote().equals(SourceOfNote.CLINICALNOTEDRAWINGIP))
					engine.open(form.getForms().Clinical.ClinicalNoteDrawingDialog);

				if (form.getGlobalContext().Core.getClinicalNotesShort().getSourceOfNoteIsNotNull() && form.getGlobalContext().Core.getClinicalNotesShort().getSourceOfNote().equals(SourceOfNote.CLINICALNOTEDRAWINGOP))
					engine.open(form.getForms().Clinical.ClinicalNoteDrawingDialog);

			}
			else
			{
				form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.VIEW);
				engine.open(form.getForms().Clinical.ClinicalNotesDialog);
			}
		}
	}
}
 
Example 42
Project: AvoinApotti   File: MedSystemreviewImpl.java   Source Code and License 5 votes vote down vote up
public MedicalProbOnAdmisVoCollection getPatientProblemByClinicalContact(ClinicalContactShortVo voClinicalContactShort) 
{
	DomainFactory factory = getDomainFactory();
	
	AdmisSysRevewVo voAdmisReview = new AdmisSysRevewVo();
	
	String hql = " from PatientProblem medicalProbOnAdmis "; 
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";

	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	
	if(voClinicalContactShort.getCareContextIsNotNull())
	{
		condStr.append(andStr + " medicalProbOnAdmis.careContext.id = :id_CareContext"); 
		markers.add("id_CareContext");
		values.add(voClinicalContactShort.getCareContext().getID_CareContext());
		andStr = " and ";
	}	

	condStr.append(andStr + " medicalProbOnAdmis.problemContext = :problemContext"); 
	markers.add("problemContext");
	values.add("System Review");
	andStr = " and ";
	
	if (andStr.equals(" and "))
		hql += " where ";

	hql += condStr.toString();
	MedicalProbOnAdmisVoCollection collMedicalProbOnAdmis = MedicalProbOnAdmisVoAssembler.createMedicalProbOnAdmisVoCollectionFromPatientProblem(factory.find(hql, markers, values));
	return collMedicalProbOnAdmis;

}
 
Example 43
Project: AvoinApotti   File: CarePlanDetailsImpl.java   Source Code and License 5 votes vote down vote up
public CancerCarePlanVo getCancerCarePlanByClinicalContact(ClinicalContactShortVo voClinicalContactShort, CancerCarePlanShortVo voCancerCarePlan) 
{
	DomainFactory factory = getDomainFactory();
	StringBuffer hql = new StringBuffer(" ");
	String query = "from CancerCarePlan ccp ";
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();
	String andStr = " ";
	
	if (voClinicalContactShort != null)
	{
		hql.append(andStr + " ccp.clinicalContact.id = :id_ClinicalContact");
		markers.add("id_ClinicalContact");
		values.add(voClinicalContactShort.getID_ClinicalContact());			
		andStr = " and ";
	}
	if (voCancerCarePlan != null)
	{
		hql.append(andStr + " ccp.id = :id_CancerCarePlan");
		markers.add("id_CancerCarePlan");
		values.add(voCancerCarePlan.getID_CancerCarePlan());			
		andStr = " and ";
	}

	
	if (markers.size() > 0) query += " where ";
	query += hql.toString();
	
	CancerCarePlanVo voCarePlan = new CancerCarePlanVo();
	List carePlans = factory.find(query, markers, values);	
	CancerCarePlanVoCollection collCancerCarePlanVo = CancerCarePlanVoAssembler.createCancerCarePlanVoCollectionFromCancerCarePlan(carePlans).sort(SortOrder.DESCENDING);
	if(collCancerCarePlanVo != null && collCancerCarePlanVo.size() > 0)
	{
		voCarePlan = collCancerCarePlanVo.get(0);
		return voCarePlan;
	}
	return null;
}
 
Example 44
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkForSelectedClinicalContact()
{
	// the selected Clinical Contact that has been selected from Patient Summary may not have a record and therefore 
	// must be added to the record browser
	boolean clinicalContactFound = false;
	ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	
	if(voSelectedClinicalContact != null)
	{
		for(int i =0; i< form.recbrReflexes().size(); i++)
		{
			ValueObject vo = (ValueObject) form.recbrReflexes().getValues().get(i);
			if(vo instanceof ClinicalContactShortVo)
			{
				ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrReflexes().getValues().get(i);
				if(voClinicalContact.equals(voSelectedClinicalContact))
					clinicalContactFound = true;
			}
		}
		
		if(!clinicalContactFound)
		{
			form.recbrReflexes().newRow(voSelectedClinicalContact, "Clinical Contact: " + voSelectedClinicalContact.getStartDateTime() + " - " + voSelectedClinicalContact.getSeenBy(), Color.Green);
			form.recbrReflexes().setValue(voSelectedClinicalContact);
		}
	}
}
 
Example 45
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void sortNeuroReflexes(NeuroReflexesShortVoCollection voNeuroReflexesColl)
{
	if(voNeuroReflexesColl != null)
	{
		int x = 0;
		for(x = 0; x < voNeuroReflexesColl.size(); x++)
		{
			NeuroReflexesShortVoCollection voNeuroReflexesCollForClinicalContact = new NeuroReflexesShortVoCollection();
			if(voNeuroReflexesColl.get(x).getClinicalContact() != null)
			{
				ClinicalContactShortVo voClinicalContact = voNeuroReflexesColl.get(x).getClinicalContact();
				
				for(int i =0; i<voNeuroReflexesColl.size(); i++)
				{
					if(voNeuroReflexesColl.get(i).getClinicalContact() != null)
					{
						if(voNeuroReflexesColl.get(i).getClinicalContact().getID_ClinicalContact().equals(voClinicalContact.getID_ClinicalContact()))
						{
							voNeuroReflexesCollForClinicalContact.add(voNeuroReflexesColl.get(i));
							x = i;
						}
					}
				}
				loadClinicalContactReflexRecords(voClinicalContact, voNeuroReflexesCollForClinicalContact);
			}
		}
	}
}
 
Example 46
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean checkCurrentClinicalContact(ClinicalContactShortVo voClinicalContact)
{
	// checks if this Clinical Contact is the selected Clinical Contact from Patient Summary
	ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	if(voSelectedClinicalContact != null)
	{
		if(voSelectedClinicalContact.equals(voClinicalContact))
			return true;
		else
			return false;
	}
	return false;
}
 
Example 47
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void browseRecord()
{
	clearScreen();
	clearGrids();
	loadLookupsIntoGrids();
	
	updateBrowseInformation();
	
	if(form.recbrReflexes().getValue() != null)
	{			
		if(form.recbrReflexes().getValue() instanceof ClinicalContactShortVo)
		{
			form.getLocalContext().setReflexRecord(domain.getNeuroReflexRecord((ClinicalContactShortVo) form.recbrReflexes().getValue(), null));
		}
		else if(form.recbrReflexes().getValue() instanceof NeuroReflexesShortVo)
		{
			NeuroReflexesShortVo voReflexes = (NeuroReflexesShortVo) form.recbrReflexes().getValue();
			
			if(voReflexes.getClinicalContact() == null)
				form.getLocalContext().setReflexRecord(domain.getNeuroReflexByCareContext(voReflexes.getCareContext(), voReflexes));
			else
				form.getLocalContext().setReflexRecord(domain.getNeuroReflexRecord(voReflexes.getClinicalContact(), voReflexes));
		}
		else
		{
			form.getLocalContext().setReflexRecord(domain.getNeuroReflexByCareContext((CareContextLiteVo) form.recbrReflexes().getValue(), null));
		}
		populateScreenFromData();
	}
	checkRecordIsEditable();

}
 
Example 48
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void isRecordOfTypeMedicalAdmission()
{
	ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	if(voClinicalContact != null)
	{
		if(voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
			activateButtons(false);
	}
}
 
Example 49
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void initialize()
{
	loadCombos();
	
	ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	
	Boolean bMedicalAdmissionContactSelected = new Boolean(currentClinicalContact!=null && currentClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION));
	Boolean bMedicalInpatientForm = new Boolean(engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskSpinePathInpatient));
	
	form.getLocalContext().setIsMedicalInpatientForm(bMedicalInpatientForm);
	form.getLocalContext().setIsMedicalAdmissionSelected(bMedicalAdmissionContactSelected);
	displayRecordBrowser(bMedicalInpatientForm.booleanValue());
	form.chkProblem().setVisible(!form.getLocalContext().getIsMedicalInpatientForm().booleanValue());
	
	if(writeConditionsApply(bMedicalInpatientForm,	bMedicalAdmissionContactSelected)){
		form.getLocalContext().setWriteConditionsApply(Boolean.TRUE);
		activateButtons(true);
	}
	else{
		form.getLocalContext().setWriteConditionsApply(Boolean.FALSE);
		activateButtons(false);
	}
	
	form.chkActiveOnly().setValue(true);
	
	form.ccAuthoring().setIsRequiredPropertyToControls(true); //WDEV-15172
}
 
Example 50
Project: AvoinApotti   File: Patient_SummaryImpl.java   Source Code and License 5 votes vote down vote up
public ClinicalContactShortVo saveClinicalContact(ClinicalContactShortVo clinicalContact) throws StaleObjectException
{
	if (clinicalContact == null || !clinicalContact.isValidated())
		throw new CodingRuntimeException("ClinicalContact is null or has not been validated");
	DomainFactory factory = getDomainFactory();

	ClinicalContact doClinicalContact = ClinicalContactShortVoAssembler.extractClinicalContact(factory, clinicalContact);

	// WDEV-10231 - add any new status record to history
	if (doClinicalContact != null && doClinicalContact.getCurrentStatus().getId() == null)
		doClinicalContact.getStatusHistory().add(doClinicalContact.getCurrentStatus());

	factory.save(doClinicalContact);
	return ClinicalContactShortVoAssembler.create(doClinicalContact);
}
 
Example 51
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void displayContactAssessment(HandTestVo voHandTest, ClinicalContactShortVo voClinicalContactShort) {
	Integer currentContactId = form.getLocalContext().getCurrentClinicalContactId();
	
	clearFields();
	
	if(voHandTest!=null){
		populateScreenFromData(voHandTest);
		
		if(voClinicalContactShort.getID_ClinicalContact().equals(currentContactId))
			form.btnUpdate().setVisible(true);
		else
			form.btnUpdate().setVisible(false);
		
		form.btnNew().setVisible(false);
		
	}
	else{
		
		form.getLocalContext().setHandVo(null);
					
		if(voClinicalContactShort.getID_ClinicalContact().equals(currentContactId))
			form.btnNew().setVisible(true);
		else
			form.btnNew().setVisible(false);
		
		form.btnUpdate().setVisible(false);
	}
	
}
 
Example 52
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void browseRecord()
{
	clearForm(true);
	
	form.btnUpdate().setVisible(false);
	form.ccAuthoring().setValue(null); //WDEV-15172
	
	updateBrowseInformation();
	
	if(form.recbrPathology().getValue() != null)
	{			
		if(form.recbrPathology().getValue() instanceof ClinicalContactShortVo)
		{
			if(form.chkActiveOnly().getValue())
				form.getLocalContext().setSpinePathologyFindingColl(domain.getMskSpinePath((ClinicalContactShortVo) form.recbrPathology().getValue(), Boolean.TRUE));
			else
				form.getLocalContext().setSpinePathologyFindingColl(domain.getMskSpinePath((ClinicalContactShortVo) form.recbrPathology().getValue(), null));
		}
		else
		{
			if(form.chkActiveOnly().getValue())
				form.getLocalContext().setSpinePathologyFindingColl(domain.getByCareContext((CareContextLiteVo) form.recbrPathology().getValue(), Boolean.TRUE));
			else
				form.getLocalContext().setSpinePathologyFindingColl(domain.getByCareContext((CareContextLiteVo) form.recbrPathology().getValue(), null));
		}
		populateScreenFromData();
	}
	checkRecordIsEditable();
}
 
Example 53
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkRecordIsEditable()
{
	if(form.recbrPathology().getValue() != null)
	{
		if(form.recbrPathology().getValue() instanceof CareContextShortVo)
		{
			CareContextShortVo voCurrentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
			CareContextShortVo voSelectedCareContext = (CareContextShortVo) form.recbrPathology().getValue();
			if(voSelectedCareContext.getID_CareContext().equals(voCurrentCareContext.getID_CareContext()) && form.getGlobalContext().Core.getCurrentClinicalContact() == null)
				activateButtons(true);
			else
				activateButtons(false);
			
		}
		else
		{
			ClinicalContactShortVo voCurrentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
			ClinicalContactShortVo voSelectedClinicalContact = (ClinicalContactShortVo) form.recbrPathology().getValue();
			if(voCurrentClinicalContact != null)
			{
				if(voSelectedClinicalContact.getID_ClinicalContact().equals(voCurrentClinicalContact.getID_ClinicalContact()))
					activateButtons(true);
				else
					activateButtons(false);
			}
			else
				activateButtons(false);
		}
	}
	isRecordOfTypeMedicalAdmission();
}
 
Example 54
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setCurrentClinicalNote()
{
	if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
	{
		ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
		ClinicalNotesVo clinicalNotesForContact = domain.getClinicalNotesForContact(currentClinicalContact);
		if (clinicalNotesForContact != null)
			form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNote(clinicalNotesForContact));
		else
			form.getGlobalContext().Clinical.setCurrentClinicalNote(null);
	}
}
 
Example 55
Project: AvoinApotti   File: PatientSummaryImpl.java   Source Code and License 5 votes vote down vote up
public ClinicalContactShortVo saveClinicalContact(ClinicalContactShortVo clinicalContact) throws StaleObjectException  {
	if (clinicalContact == null  || !clinicalContact.isValidated())
		throw new CodingRuntimeException("ClinicalContact is null or has not been validated");
	DomainFactory factory=getDomainFactory();
	
	ClinicalContact doClinicalContact = ClinicalContactShortVoAssembler.extractClinicalContact(factory, clinicalContact);
	
	//WDEV-10231 - add any new status record to history
	if(doClinicalContact != null && doClinicalContact.getCurrentStatus().getId() == null)	
		doClinicalContact.getStatusHistory().add(doClinicalContact.getCurrentStatus());
	
	factory.save(doClinicalContact);
	return ClinicalContactShortVoAssembler.create(doClinicalContact);
}
 
Example 56
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void checkForSelectedClinicalContact()
{
	// the selected Clinical Contact that has been selected from Patient Summary may not have a record and therefore
	// must be added to the record browser
	boolean clinicalContactFound = false;
	ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();

	if (voSelectedClinicalContact != null)
	{
		for (int i = 0; i < form.recbrJointBone().size(); i++)
		{
			ValueObject vo = (ValueObject) form.recbrJointBone().getValues().get(i);
			if (vo instanceof ClinicalContactShortVo)
			{
				ClinicalContactShortVo voClinicalContact = (ClinicalContactShortVo) form.recbrJointBone().getValues().get(i);
				if (voClinicalContact.equals(voSelectedClinicalContact))
					clinicalContactFound = true;
			}
		}

		if (!clinicalContactFound)
		{
			form.recbrJointBone().newRow(voSelectedClinicalContact, "\t\t\t\tClinical Contact: " + voSelectedClinicalContact.getStartDateTime() + " - " + voSelectedClinicalContact.getSeenBy(), Color.Green);
			form.recbrJointBone().setValue(voSelectedClinicalContact);
		}
	}
}
 
Example 57
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void fillRecordBrowser(BalanceActivitiesVoCollection voBalanceActivitiesColl)
{
	form.recbrBalance().clear();
	boolean selectedClinicalContactFound = false;
	CareContextShortVo voSelectedCareContext = form.getGlobalContext().Core.getCurrentCareContext();
	ClinicalContactShortVo voSelectedClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
	
	form.recbrBalance().newRow(voSelectedCareContext, voSelectedCareContext.getRecordBrowserText());
	
	if(voBalanceActivitiesColl != null)
	{
		for(int i=0; i<voBalanceActivitiesColl.size(); i++)
		{
			ClinicalContactShortVo voClinicalContact = voBalanceActivitiesColl.get(i).getClinicalContact();
			if(voSelectedClinicalContact != null && voClinicalContact.getID_ClinicalContact().equals(voSelectedClinicalContact.getID_ClinicalContact()))
			{
				selectedClinicalContactFound = true;
				form.recbrBalance().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime().toString() + " - " + voClinicalContact.getSeenBy().toString(), Color.Green);
				form.recbrBalance().setValue(voClinicalContact);
			}
			else
			{
				form.recbrBalance().newRow(voClinicalContact, "\t\t\t\tClinical Contact: " + voClinicalContact.getStartDateTime().toString() + " - " + voClinicalContact.getSeenBy().toString());
			}
		}
	}
	
	if(!selectedClinicalContactFound && voSelectedClinicalContact != null)
	{
		form.recbrBalance().newRow(voSelectedClinicalContact, "\t\t\t\tClinical Contact: " + voSelectedClinicalContact.getStartDateTime().toString() + " - " + voSelectedClinicalContact.getSeenBy().toString(), Color.Green);
		form.recbrBalance().setValue(voSelectedClinicalContact);
	}
	browseRecord();
	
	
}
 
Example 58
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void setCurrentClinicalNote()
{
	if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull())
	{
		ClinicalContactShortVo currentClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
		ClinicalNotesVo clinicalNotesForContact = domain.getClinicalNotesForContact(currentClinicalContact);
		if (clinicalNotesForContact != null)
			form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNote(clinicalNotesForContact));
		else
			form.getGlobalContext().Clinical.setCurrentClinicalNote(null);
	}
}
 
Example 59
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void enableGrid()
{
	if (engine.getFormName().equals(form.getForms().SpinalInjuries.MedMskJointsBones))
	{
		ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
		if (voClinicalContact == null || !voClinicalContact.getContactType().equals(ContactType.SPINALMEDICALADMISSION))
			form.grdIndex().setReadOnly(true);
		else
			form.grdIndex().setReadOnly(false);
	}

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

	updateBrowseInformation();
	if (form.recbrJointBone().getValue() != null)
	{
		if (form.recbrJointBone().getValue() instanceof ClinicalContactShortVo)
		{
			form.getLocalContext().setSelectedRecord(domain.getBoneJointsRecords((ClinicalContactShortVo) form.recbrJointBone().getValue(), null));
		}
		else if (form.recbrJointBone().getValue() instanceof MskBoneJointShortVo)
		{
			MskBoneJointShortVo voBoneJoint = (MskBoneJointShortVo) form.recbrJointBone().getValue();

			if (voBoneJoint.getClinicalContact() == null)
				form.getLocalContext().setSelectedRecord(domain.getBoneJointByCareContext(voBoneJoint.getCareContext(), voBoneJoint));
			else
				form.getLocalContext().setSelectedRecord(domain.getBoneJointsRecords(voBoneJoint.getClinicalContact(), voBoneJoint));
		}
		else
		{
			form.getLocalContext().setSelectedRecord(domain.getBoneJointByCareContext((CareContextLiteVo) form.recbrJointBone().getValue(), null));

			CareContextShortVo voCareContext = (CareContextShortVo) form.recbrJointBone().getValue();
			ClinicalContactShortVo voClinicalContact = form.getGlobalContext().Core.getCurrentClinicalContact();
			if (voClinicalContact == null && voCareContext.getID_CareContext().equals(form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext()))
				prepareForCareContext(true);
			else
				prepareForCareContext(false);

		}
		populateControls(form.getLocalContext().getSelectedRecord());
	}
	checkRecordIsEditable();

}