Java Code Examples for ims.assessment.instantiation.vo.PatientAssessmentRefVo

The following are top voted examples for showing how to use ims.assessment.instantiation.vo.PatientAssessmentRefVo. 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: DynamicAssessmentsImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to do a preemptive check before attempting to print document
 */
public Boolean isSaved(PatientAssessmentRefVo patientAssessment)
{
	if (patientAssessment == null || !patientAssessment.getID_PatientAssessmentIsNotNull())
		throw new DomainRuntimeException("Can not check invalid record");
	
	String query = "select ass.isAssessmentDocumentSaved from PatientAssessment as ass where ass.id = " + patientAssessment.getID_PatientAssessment().toString();
	
	List result = getDomainFactory().find(query);
	
	if (result.iterator().hasNext())
	{
		if (Boolean.TRUE.equals((Boolean) result.iterator().next()))
			return true;
	}

	return false;
}
 
Example 2
Project: AvoinApotti   File: PatientSpecialtyAssessmentsImpl.java   Source Code and License 6 votes vote down vote up
public PatientAssessmentVo getLatestVersionAssessment(PatientAssessmentRefVo assessment, CatsReferralRefVo referral)
{
	if (assessment == null || referral == null)
		return null;
	
	StringBuilder query = new StringBuilder();
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	query.append("SELECT assessment FROM PatientAssessment AS assessment ");
	query.append(" WHERE assessment.id = :ASSESS_ID AND assessment.isRIE is null");
	
	paramNames.add("ASSESS_ID");
	paramValues.add(assessment.getID_PatientAssessment());
	
	query.append(" AND assessment.id = (");
		query.append(" SELECT MAX(assess.id) FROM ConsultationAssessments AS ca LEFT JOIN ca.patientAssessment AS assess LEFT JOIN ca.catsReferral AS cats ");
		query.append(" WHERE cats.id = :CATS_ID AND ca.isRIE is null");
	query.append(")");
	
	paramNames.add("CATS_ID");
	paramValues.add(referral.getID_CatsReferral());
	
	return PatientAssessmentVoAssembler.create((PatientAssessment) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
 
Example 3
Project: AvoinApotti   File: SurgicalOPNotesDiagramCCImpl.java   Source Code and License 6 votes vote down vote up
public Boolean isSaved(PatientAssessmentRefVo patientAssessment) 
{
	if (patientAssessment == null || !patientAssessment.getID_PatientAssessmentIsNotNull())
		throw new DomainRuntimeException("Can not check invalid record");
	
	String query = "select ass.isAssessmentDocumentSaved from PatientAssessment as ass where ass.id = " + patientAssessment.getID_PatientAssessment().toString();
	
	List<?> result = getDomainFactory().find(query);
	
	if (result.iterator().hasNext())
	{
		if (Boolean.TRUE.equals((Boolean) result.iterator().next()))
			return true;
	}

	return false;
}
 
Example 4
Project: openMAXIMS   File: DynamicAssessmentsImpl.java   Source Code and License 6 votes vote down vote up
public ims.assessment.vo.Patient_AssessmentVo getPatientAssessment(PatientAssessmentRefVo patientAssessment)
{
	if(patientAssessment == null || patientAssessment.getID_PatientAssessment() == null)
		throw new CodingRuntimeException("Invalid patient assessment");
	
	//return Patient_AssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(patientAssessment));	
	PatientAssessment doPatientAssessment = (PatientAssessment) getDomainFactory().getDomainObject(PatientAssessment.class, patientAssessment.getID_PatientAssessment());
	
	Patient_AssessmentVo patAssessment = assemblePatientAssessment(doPatientAssessment);
	
	//WDEV-21640
	if (patAssessment == null || patAssessment.getAssessmentData() == null || patAssessment.getAssessmentData().getGraphic() == null || patAssessment.getAssessmentData().getGraphic().getImages() == null)
		return patAssessment;
	
	//WDEV-21150 Trap situation where image file is missing
	for (int x=0; x < patAssessment.getAssessmentData().getGraphic().getImages().size(); x++)
	{
		if (patAssessment.getAssessmentData().getGraphic().getImages().get(x).getImage() != null
				&& patAssessment.getAssessmentData().getGraphic().getImages().get(x).getImage().getImageInfo() == null)
		{
			throw new CodingRuntimeException("Graphical Assessment image " + patAssessment.getAssessmentData().getGraphic().getImages().get(x).getImage().getImagePath() + " not found. Contact the system administrator");
		}			
	} //WDEV-21150
	
	return patAssessment;
}
 
Example 5
Project: openMAXIMS   File: DynamicAssessmentsImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to do a preemptive check before attempting to print document
 */
public Boolean isSaved(PatientAssessmentRefVo patientAssessment)
{
	if (patientAssessment == null || !patientAssessment.getID_PatientAssessmentIsNotNull())
		throw new DomainRuntimeException("Can not check invalid record");
	
	String query = "select ass.isAssessmentDocumentSaved from PatientAssessment as ass where ass.id = " + patientAssessment.getID_PatientAssessment().toString();
	
	List<?> result = getDomainFactory().find(query);
	
	if (result.iterator().hasNext())
	{
		if (Boolean.TRUE.equals((Boolean) result.iterator().next()))
			return true;
	}

	return false;
}
 
Example 6
Project: openMAXIMS   File: PatientSpecialtyAssessmentsImpl.java   Source Code and License 6 votes vote down vote up
public PatientAssessmentVo getLatestVersionAssessment(PatientAssessmentRefVo assessment, CatsReferralRefVo referral)
{
	if (assessment == null || referral == null)
		return null;
	
	StringBuilder query = new StringBuilder();
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	query.append("SELECT assessment FROM PatientAssessment AS assessment ");
	query.append(" WHERE assessment.id = :ASSESS_ID AND assessment.isRIE is null");
	
	paramNames.add("ASSESS_ID");
	paramValues.add(assessment.getID_PatientAssessment());
	
	query.append(" AND assessment.id = (");
		query.append(" SELECT MAX(assess.id) FROM ConsultationAssessments AS ca LEFT JOIN ca.patientAssessment AS assess LEFT JOIN ca.catsReferral AS cats ");
		query.append(" WHERE cats.id = :CATS_ID AND ca.isRIE is null");
	query.append(")");
	
	paramNames.add("CATS_ID");
	paramValues.add(referral.getID_CatsReferral());
	
	return PatientAssessmentVoAssembler.create((PatientAssessment) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
 
Example 7
Project: openMAXIMS   File: SurgicalOPNotesDiagramCCImpl.java   Source Code and License 6 votes vote down vote up
public Boolean isSaved(PatientAssessmentRefVo patientAssessment) 
{
	if (patientAssessment == null || !patientAssessment.getID_PatientAssessmentIsNotNull())
		throw new DomainRuntimeException("Can not check invalid record");
	
	String query = "select ass.isAssessmentDocumentSaved from PatientAssessment as ass where ass.id = " + patientAssessment.getID_PatientAssessment().toString();
	
	List<?> result = getDomainFactory().find(query);
	
	if (result.iterator().hasNext())
	{
		if (Boolean.TRUE.equals((Boolean) result.iterator().next()))
			return true;
	}

	return false;
}
 
Example 8
Project: openMAXIMS   File: DynamicAssessmentsImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to do a preemptive check before attempting to print document
 */
public Boolean isSaved(PatientAssessmentRefVo patientAssessment)
{
	if (patientAssessment == null || !patientAssessment.getID_PatientAssessmentIsNotNull())
		throw new DomainRuntimeException("Can not check invalid record");
	
	String query = "select ass.isAssessmentDocumentSaved from PatientAssessment as ass where ass.id = " + patientAssessment.getID_PatientAssessment().toString();
	
	List result = getDomainFactory().find(query);
	
	if (result.iterator().hasNext())
	{
		if (Boolean.TRUE.equals((Boolean) result.iterator().next()))
			return true;
	}

	return false;
}
 
Example 9
Project: openMAXIMS   File: PatientSpecialtyAssessmentsImpl.java   Source Code and License 6 votes vote down vote up
public PatientAssessmentVo getLatestVersionAssessment(PatientAssessmentRefVo assessment, CatsReferralRefVo referral)
{
	if (assessment == null || referral == null)
		return null;
	
	StringBuilder query = new StringBuilder();
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	query.append("SELECT assessment FROM PatientAssessment AS assessment ");
	query.append(" WHERE assessment.id = :ASSESS_ID AND assessment.isRIE is null");
	
	paramNames.add("ASSESS_ID");
	paramValues.add(assessment.getID_PatientAssessment());
	
	query.append(" AND assessment.id = (");
		query.append(" SELECT MAX(assess.id) FROM ConsultationAssessments AS ca LEFT JOIN ca.patientAssessment AS assess LEFT JOIN ca.catsReferral AS cats ");
		query.append(" WHERE cats.id = :CATS_ID AND ca.isRIE is null");
	query.append(")");
	
	paramNames.add("CATS_ID");
	paramValues.add(referral.getID_CatsReferral());
	
	return PatientAssessmentVoAssembler.create((PatientAssessment) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
 
Example 10
Project: openMAXIMS   File: SurgicalOPNotesDiagramCCImpl.java   Source Code and License 6 votes vote down vote up
public Boolean isSaved(PatientAssessmentRefVo patientAssessment) 
{
	if (patientAssessment == null || !patientAssessment.getID_PatientAssessmentIsNotNull())
		throw new DomainRuntimeException("Can not check invalid record");
	
	String query = "select ass.isAssessmentDocumentSaved from PatientAssessment as ass where ass.id = " + patientAssessment.getID_PatientAssessment().toString();
	
	List<?> result = getDomainFactory().find(query);
	
	if (result.iterator().hasNext())
	{
		if (Boolean.TRUE.equals((Boolean) result.iterator().next()))
			return true;
	}

	return false;
}
 
Example 11
Project: openmaxims-linux   File: DynamicAssessmentsImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Function used to do a preemptive check before attempting to print document
 */
public Boolean isSaved(PatientAssessmentRefVo patientAssessment)
{
	if (patientAssessment == null || !patientAssessment.getID_PatientAssessmentIsNotNull())
		throw new DomainRuntimeException("Can not check invalid record");
	
	String query = "select ass.isAssessmentDocumentSaved from PatientAssessment as ass where ass.id = " + patientAssessment.getID_PatientAssessment().toString();
	
	List result = getDomainFactory().find(query);
	
	if (result.iterator().hasNext())
	{
		if (Boolean.TRUE.equals((Boolean) result.iterator().next()))
			return true;
	}

	return false;
}
 
Example 12
Project: openmaxims-linux   File: SurgicalOPNotesDiagramCCImpl.java   Source Code and License 6 votes vote down vote up
public Boolean isSaved(PatientAssessmentRefVo patientAssessment) 
{
	if (patientAssessment == null || !patientAssessment.getID_PatientAssessmentIsNotNull())
		throw new DomainRuntimeException("Can not check invalid record");
	
	String query = "select ass.isAssessmentDocumentSaved from PatientAssessment as ass where ass.id = " + patientAssessment.getID_PatientAssessment().toString();
	
	List<?> result = getDomainFactory().find(query);
	
	if (result.iterator().hasNext())
	{
		if (Boolean.TRUE.equals((Boolean) result.iterator().next()))
			return true;
	}

	return false;
}
 
Example 13
Project: AvoinApotti   File: NeedsAssessmentComponentEditImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessment(PatientAssessmentRefVo ref)
{
	if (ref == null || !ref.getID_PatientAssessmentIsNotNull())
		throw new DomainRuntimeException("Invalid Patient Assessment record to get");
	
	return PatientAssessmentVoAssembler.create((PatientAssessment) getDomainFactory().getDomainObject(PatientAssessment.class, ref.getID_PatientAssessment()));
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private PatientAssessmentVo getNewPatientAssessment(UserAssessmentVo voUserAssessment_latest)
{
	if(voUserAssessment_latest == null)
		return null;
	
	ArrayList records = form.recbrAssessment().getValues();
	if(records != null && records.size() > 0)
	{
		//WDEV-1612 - Get the last saved record - which is the first in the record browser because we have listed the records in reverse chronological order
		Object lastPatientAssessment = records.get(0);
		if(lastPatientAssessment instanceof PatientAssessmentRefVo)
		{
			PatientAssessmentRefVo voPatAssRefVo = (PatientAssessmentRefVo)lastPatientAssessment;
			PatientAssessmentVo voLastPatientAssessment = domain.getPatientAssessment(voPatAssRefVo);
			UserAssessmentVo voLastUserAssessment = voLastPatientAssessment != null && voLastPatientAssessment.getAssessmentDataIsNotNull() ? voLastPatientAssessment.getAssessmentData().getUserAssessment() : null;
			//Check if the User Assessment didn't changed atherwise forget about it - but get the new configuration
			if(voUserAssessment_latest.equals(voLastUserAssessment)  == false)
				return null;
				
			//Get the last record an clone the Patient Assessment Questions
			PatientAssessmentVo voPatientAssessment = new PatientAssessmentVo();
			voPatientAssessment.setAssessmentData(copyAssessmentDataFromPreviousAssessment(voLastPatientAssessment));
			return voPatientAssessment; 
		}
	}
	
	return null;		
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onRecbrAssessmentValueChanged() throws PresentationLogicException
{
	PatientAssessmentRefVo voPatAssRefVo = form.recbrAssessment().getValue();
	//Context User for RIE only
	form.getLocalContext().setSelectedRecord(voPatAssRefVo);
	
	clearDPPQuestionGroupContext();
	if(voPatAssRefVo != null)
	{
		PatientAssessmentVo voPatAssessment = domain.getPatientAssessment(voPatAssRefVo);
		setIsDppAdmissionAssessment(voPatAssessment);
		PlanOfCareVoCollection planOfCareColl = listPOCRecords(voPatAssessment);
		setPOCData(planOfCareColl, voPatAssessment);
		form.getGlobalContext().Nursing.setPatientAssessmentVo(voPatAssessment);
		form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
		form.getGlobalContext().Nursing.setIsDppCompleted(voPatAssessment != null && voPatAssessment.getStatusIsNotNull() && voPatAssessment.getStatus().equals(PatientAssessmentStatusReason.COMPLETED)?Boolean.TRUE:Boolean.FALSE);
		
		populateDetailsGrid(voPatAssessment);
		displayScoreTotalInTree(voPatAssessment);
	}
	//start WDEV-13887
	else
	{
		clearControlsAndContext();
	}
	
	updateControlState();  
	//end
}
 
Example 16
Project: AvoinApotti   File: DailyPatientProgressImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessment(PatientAssessmentRefVo userAssessmentRefVo)
{
	if(userAssessmentRefVo == null)
		throw new CodingRuntimeException("Cannot get PatientAssessmentRefVo for null UserAssessmentRefVo");
	DomainFactory factory = getDomainFactory();
	PatientAssessment doPatientAssessment = (PatientAssessment) factory.getDomainObject(ims.assessment.instantiation.domain.objects.PatientAssessment.class, userAssessmentRefVo.getID_PatientAssessment());
	return PatientAssessmentVoAssembler.create(doPatientAssessment);
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
public void buildAssessmentReport(PatientAssessmentRefVo patientAssessmentRef)
{
	String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
	String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();
	
	String obj[] = domain.getReportAndTemplate(patientAssessmentRef);
	
	if (obj == null || obj.length < 2 || obj[0] == null || obj[1] == null)
	{
		engine.showMessage("I could not get the report and template linked to this assessment !");
		return;
	}
	
	QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());

	// WDEV-13300
	// PatientAssessment reports in new version use PatientAssessment_ID, but some old versions use a combination of
	// CareContext_id and ClinicalContact_id - so we need to set all tree as seeds. Reports are ignoring the extra & unused seeds
	client.addSeed(new SeedValue("PatientAssessment_id", patientAssessmentRef.getID_PatientAssessment(), Integer.class));
	client.addSeed(new SeedValue("CareContext_id", form.getGlobalContext().Core.getCurrentCareContextIsNotNull() ? form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext() : null, Integer.class));
	client.addSeed(new SeedValue("ClinicalContact_id", form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull() ? form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact() : null, Integer.class));
	
	String resultUrl = "";
	try
	{
		resultUrl = client.buildReportAsUrlInlineFrame(obj[0], obj[1], urlReportServer, QueryBuilderClient.HTML, "", 1);
	} 
	catch (QueryBuilderClientException e1)
	{
		engine.showMessage("Error creating report: " + e1.getMessage());
		return;
	}
	
	form.htmView().setHTML(resultUrl);
}
 
Example 18
Project: AvoinApotti   File: VitalSignsImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessmentFull(PatientAssessmentRefVo patientAssessment) 
{
	if(patientAssessment == null || patientAssessment.getID_PatientAssessment() == null)
		throw new CodingRuntimeException("Invalid patient assessment");
	
	return PatientAssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(patientAssessment));	
}
 
Example 19
Project: AvoinApotti   File: GraphicAssessmentInstantiationImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessment(PatientAssessmentRefVo patientAssessmentRefVo)
{
	if(patientAssessmentRefVo == null)
		throw new RuntimeException("Cannot get PatientAssessmentVo for null PatientAssessmentRefVo");
	
	DomainFactory factory = getDomainFactory();
	PatientAssessment doPatientAssesment = (PatientAssessment) factory.getDomainObject(PatientAssessment.class, patientAssessmentRefVo.getID_PatientAssessment());
	return PatientAssessmentVoAssembler.create(doPatientAssesment);
}
 
Example 20
Project: AvoinApotti   File: UserAssessmentInstantiationImpl.java   Source Code and License 5 votes vote down vote up
/**
* get
*/
public ims.assessment.vo.PatientAssessmentVo get(PatientAssessmentRefVo record)
{
	if(record == null || record.getID_PatientAssessment() == null)
		throw new DomainRuntimeException("Invalid need assessment record to get");
	
	return PatientAssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(PatientAssessment.class, record.getID_PatientAssessment()));
}
 
Example 21
Project: AvoinApotti   File: UserAssessmentInstantiationWithComponentImpl.java   Source Code and License 5 votes vote down vote up
/**
* get
*/
public ims.assessment.vo.PatientAssessmentVo get(PatientAssessmentRefVo record)
{
	if(record == null || record.getID_PatientAssessment() == null)
		throw new DomainRuntimeException("Invalid need assessment record to get");
	
	return PatientAssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(PatientAssessment.class, record.getID_PatientAssessment()));
}
 
Example 22
Project: AvoinApotti   File: DynamicAssessmentsImpl.java   Source Code and License 5 votes vote down vote up
public ims.assessment.vo.Patient_AssessmentVo getPatientAssessment(PatientAssessmentRefVo patientAssessment)
{
	if(patientAssessment == null || patientAssessment.getID_PatientAssessment() == null)
		throw new CodingRuntimeException("Invalid patient assessment");
	
	//return Patient_AssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(patientAssessment));	
	PatientAssessment doPatientAssessment = (PatientAssessment) getDomainFactory().getDomainObject(PatientAssessment.class, patientAssessment.getID_PatientAssessment());
	
	Patient_AssessmentVo patAssessment = assemblePatientAssessment(doPatientAssessment);
	
	return patAssessment;
}
 
Example 23
Project: AvoinApotti   File: DynamicAssessmentsImpl.java   Source Code and License 5 votes vote down vote up
/**
 * WDEV-16324
 * getPatientAssessment record for the given assessmentReference - returning
 */
public ims.assessment.vo.Patient_AssessmentListVo getPatientAssessmentList(PatientAssessmentRefVo patientAssessment)
{
	if(patientAssessment == null || patientAssessment.getID_PatientAssessment() == null)
		throw new CodingRuntimeException("Invalid patient assessment");
	
	//return Patient_AssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(patientAssessment));	
	PatientAssessment doPatientAssessment = (PatientAssessment) getDomainFactory().getDomainObject(PatientAssessment.class, patientAssessment.getID_PatientAssessment());
	
	Patient_AssessmentListVo patAssessment = Patient_AssessmentListVoAssembler.create(doPatientAssessment);
	
	return patAssessment;
}
 
Example 24
Project: AvoinApotti   File: PatientICPImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessment(PatientAssessmentRefVo patientAssessment)
{
	if(patientAssessment == null || patientAssessment.getID_PatientAssessment() == null)
		throw new CodingRuntimeException("Invalid patient assessment");
	
	return PatientAssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(patientAssessment));	
}
 
Example 25
Project: AvoinApotti   File: PatientICPActionLinkedDetailsComponentImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessment(PatientAssessmentRefVo patientAssessmentRef)
{
	if (patientAssessmentRef == null || !patientAssessmentRef.getID_PatientAssessmentIsNotNull())
		return null;
	
	return PatientAssessmentVoAssembler.create((PatientAssessment) getDomainFactory().getDomainObject(PatientAssessment.class, patientAssessmentRef.getID_PatientAssessment()));
}
 
Example 26
Project: AvoinApotti   File: PatientICPActionLinkedDetailsComponentImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientGraphicAssessment(PatientAssessmentRefVo patientAssessmentRef)
{
	if (patientAssessmentRef == null || !patientAssessmentRef.getID_PatientAssessmentIsNotNull())
		return null;
	
	return PatientAssessmentVoAssembler.create((PatientAssessment) getDomainFactory().getDomainObject(PatientAssessment.class, patientAssessmentRef.getID_PatientAssessment()));
}
 
Example 27
Project: AvoinApotti   File: PatientSpecialtyAssessmentsImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessment(PatientAssessmentRefVo patientAssessment) 
{
	// Test Patient Assessment record
	if (patientAssessment == null || patientAssessment.getID_PatientAssessment() == null)
		return null;
	
	// Return Patient Assessment record from database
	return PatientAssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(PatientAssessment.class, patientAssessment.getID_PatientAssessment()));
}
 
Example 28
Project: AvoinApotti   File: ObsPatientAssessmentCcImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getObsPatientAssessment(PatientAssessmentRefVo patientAssessmentRef)
{
	if (patientAssessmentRef == null || patientAssessmentRef.getID_PatientAssessment() == null)
	{
		throw new CodingRuntimeException("Cannot get Patient Assessment on null Id ");
	}

	DomainFactory factory = getDomainFactory();

	PatientAssessment domainPatientAssessment = (PatientAssessment) factory.getDomainObject(PatientAssessment.class, patientAssessmentRef.getID_PatientAssessment());

	return PatientAssessmentVoAssembler.create(domainPatientAssessment);
}
 
Example 29
Project: openMAXIMS   File: NeedsAssessmentComponentEditImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessment(PatientAssessmentRefVo ref)
{
	if (ref == null || !ref.getID_PatientAssessmentIsNotNull())
		throw new DomainRuntimeException("Invalid Patient Assessment record to get");
	
	return PatientAssessmentVoAssembler.create((PatientAssessment) getDomainFactory().getDomainObject(PatientAssessment.class, ref.getID_PatientAssessment()));
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private PatientAssessmentVo getNewPatientAssessment(UserAssessmentVo voUserAssessment_latest)
{
	if(voUserAssessment_latest == null)
		return null;
	
	ArrayList records = form.recbrAssessment().getValues();
	if(records != null && records.size() > 0)
	{
		//WDEV-1612 - Get the last saved record - which is the first in the record browser because we have listed the records in reverse chronological order
		Object lastPatientAssessment = records.get(0);
		if(lastPatientAssessment instanceof PatientAssessmentRefVo)
		{
			PatientAssessmentRefVo voPatAssRefVo = (PatientAssessmentRefVo)lastPatientAssessment;
			PatientAssessmentVo voLastPatientAssessment = domain.getPatientAssessment(voPatAssRefVo);
			UserAssessmentVo voLastUserAssessment = voLastPatientAssessment != null && voLastPatientAssessment.getAssessmentDataIsNotNull() ? voLastPatientAssessment.getAssessmentData().getUserAssessment() : null;
			//Check if the User Assessment didn't changed atherwise forget about it - but get the new configuration
			if(voUserAssessment_latest.equals(voLastUserAssessment)  == false)
				return null;
				
			//Get the last record an clone the Patient Assessment Questions
			PatientAssessmentVo voPatientAssessment = new PatientAssessmentVo();
			voPatientAssessment.setAssessmentData(copyAssessmentDataFromPreviousAssessment(voLastPatientAssessment));
			return voPatientAssessment; 
		}
	}
	
	return null;		
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onRecbrAssessmentValueChanged() throws PresentationLogicException
{
	PatientAssessmentRefVo voPatAssRefVo = form.recbrAssessment().getValue();
	//Context User for RIE only
	form.getLocalContext().setSelectedRecord(voPatAssRefVo);
	
	clearDPPQuestionGroupContext();
	if(voPatAssRefVo != null)
	{
		PatientAssessmentVo voPatAssessment = domain.getPatientAssessment(voPatAssRefVo);
		setIsDppAdmissionAssessment(voPatAssessment);
		PlanOfCareVoCollection planOfCareColl = listPOCRecords(voPatAssessment);
		setPOCData(planOfCareColl, voPatAssessment);
		form.getGlobalContext().Nursing.setPatientAssessmentVo(voPatAssessment);
		form.getGlobalContext().Nursing.setPlanOfCareCollection(planOfCareColl);
		form.getGlobalContext().Nursing.setIsDppCompleted(voPatAssessment != null && voPatAssessment.getStatusIsNotNull() && voPatAssessment.getStatus().equals(PatientAssessmentStatusReason.COMPLETED)?Boolean.TRUE:Boolean.FALSE);
		
		populateDetailsGrid(voPatAssessment);
		displayScoreTotalInTree(voPatAssessment);
	}
	//start WDEV-13887
	else
	{
		clearControlsAndContext();
	}
	
	updateControlState();  
	//end
}
 
Example 32
Project: openMAXIMS   File: DailyPatientProgressImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessment(PatientAssessmentRefVo userAssessmentRefVo)
{
	if(userAssessmentRefVo == null)
		throw new CodingRuntimeException("Cannot get PatientAssessmentRefVo for null UserAssessmentRefVo");
	DomainFactory factory = getDomainFactory();
	PatientAssessment doPatientAssessment = (PatientAssessment) factory.getDomainObject(ims.assessment.instantiation.domain.objects.PatientAssessment.class, userAssessmentRefVo.getID_PatientAssessment());
	return PatientAssessmentVoAssembler.create(doPatientAssessment);
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
public void buildAssessmentReport(PatientAssessmentRefVo patientAssessmentRef)
{
	String urlQueryServer = ConfigFlag.GEN.QUERY_SERVER_URL.getValue();
	String urlReportServer = ConfigFlag.GEN.REPORT_SERVER_URL.getValue();
	
	String obj[] = domain.getReportAndTemplate(patientAssessmentRef);
	
	if (obj == null || obj.length < 2 || obj[0] == null || obj[1] == null)
	{
		engine.showMessage("I could not get the report and template linked to this assessment !");
		return;
	}
	
	QueryBuilderClient client = new QueryBuilderClient(urlQueryServer, engine.getSessionId());

	// WDEV-13300
	// PatientAssessment reports in new version use PatientAssessment_ID, but some old versions use a combination of
	// CareContext_id and ClinicalContact_id - so we need to set all tree as seeds. Reports are ignoring the extra & unused seeds
	client.addSeed(new SeedValue("PatientAssessment_id", patientAssessmentRef.getID_PatientAssessment(), Integer.class));
	client.addSeed(new SeedValue("CareContext_id", form.getGlobalContext().Core.getCurrentCareContextIsNotNull() ? form.getGlobalContext().Core.getCurrentCareContext().getID_CareContext() : null, Integer.class));
	client.addSeed(new SeedValue("ClinicalContact_id", form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull() ? form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact() : null, Integer.class));
	
	String resultUrl = "";
	try
	{
		resultUrl = client.buildReportAsUrlInlineFrame(obj[0], obj[1], urlReportServer, QueryBuilderClient.HTML, "", 1);
	} 
	catch (QueryBuilderClientException e1)
	{
		engine.showMessage("Error creating report: " + e1.getMessage());
		return;
	}
	
	form.htmView().setHTML(resultUrl);
}
 
Example 34
Project: openMAXIMS   File: VitalSignsImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessmentFull(PatientAssessmentRefVo patientAssessment) 
{
	if(patientAssessment == null || patientAssessment.getID_PatientAssessment() == null)
		throw new CodingRuntimeException("Invalid patient assessment");
	
	return PatientAssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(patientAssessment));	
}
 
Example 35
Project: openMAXIMS   File: GraphicAssessmentInstantiationImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessment(PatientAssessmentRefVo patientAssessmentRefVo)
{
	if(patientAssessmentRefVo == null)
		throw new RuntimeException("Cannot get PatientAssessmentVo for null PatientAssessmentRefVo");
	
	DomainFactory factory = getDomainFactory();
	PatientAssessment doPatientAssesment = (PatientAssessment) factory.getDomainObject(PatientAssessment.class, patientAssessmentRefVo.getID_PatientAssessment());
	return PatientAssessmentVoAssembler.create(doPatientAssesment);
}
 
Example 36
Project: openMAXIMS   File: PatientAssessmentImpl.java   Source Code and License 5 votes vote down vote up
public ims.assessment.vo.PatientAssessmentListVo getPatientAssessmentList(PatientAssessmentRefVo patAssessmentRef) //WDEV-20161
{
	if(patAssessmentRef == null)
		throw new RuntimeException("Cannot get PatientAssessmentListVo for null reference.");
	DomainFactory factory = getDomainFactory();
	PatientAssessment doPatientAssessment = (PatientAssessment) factory.getDomainObject(PatientAssessment.class, patAssessmentRef.getID_PatientAssessment());
	return PatientAssessmentListVoAssembler.create(doPatientAssessment);
}
 
Example 37
Project: openMAXIMS   File: UserAssessmentInstantiationImpl.java   Source Code and License 5 votes vote down vote up
/**
* get
*/
public ims.assessment.vo.PatientAssessmentVo get(PatientAssessmentRefVo record)
{
	if(record == null || record.getID_PatientAssessment() == null)
		throw new DomainRuntimeException("Invalid need assessment record to get");
	
	return PatientAssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(PatientAssessment.class, record.getID_PatientAssessment()));
}
 
Example 38
Project: openMAXIMS   File: UserAssessmentInstantiationWithComponentImpl.java   Source Code and License 5 votes vote down vote up
/**
* get
*/
public ims.assessment.vo.PatientAssessmentVo get(PatientAssessmentRefVo record)
{
	if(record == null || record.getID_PatientAssessment() == null)
		throw new DomainRuntimeException("Invalid need assessment record to get");
	
	return PatientAssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(PatientAssessment.class, record.getID_PatientAssessment()));
}
 
Example 39
Project: openMAXIMS   File: DynamicAssessmentsImpl.java   Source Code and License 5 votes vote down vote up
/**
 * WDEV-16324
 * getPatientAssessment record for the given assessmentReference - returning
 */
public ims.assessment.vo.Patient_AssessmentListVo getPatientAssessmentList(PatientAssessmentRefVo patientAssessment)
{
	if(patientAssessment == null || patientAssessment.getID_PatientAssessment() == null)
		throw new CodingRuntimeException("Invalid patient assessment");
	
	//return Patient_AssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(patientAssessment));	
	PatientAssessment doPatientAssessment = (PatientAssessment) getDomainFactory().getDomainObject(PatientAssessment.class, patientAssessment.getID_PatientAssessment());
	
	Patient_AssessmentListVo patAssessment = Patient_AssessmentListVoAssembler.create(doPatientAssessment);
	
	return patAssessment;
}
 
Example 40
Project: openMAXIMS   File: PatientICPImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentVo getPatientAssessment(PatientAssessmentRefVo patientAssessment)
{
	if(patientAssessment == null || patientAssessment.getID_PatientAssessment() == null)
		throw new CodingRuntimeException("Invalid patient assessment");
	
	return PatientAssessmentVoAssembler.create((PatientAssessment)getDomainFactory().getDomainObject(patientAssessment));	
}