Java Code Examples for ims.dto.client.Inpat

The following are top voted examples for showing how to use ims.dto.client.Inpat. 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: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
public String[] getRtpStatAndPlBlk(ims.core.vo.PatientId intfId)
{
	if (Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()))
		return null;
	
	Inpat inpatRec = (Inpat) getDTOInstance(Inpat.class);
	inpatRec.Filter.clear();
	
	if (intfId == null)
	{
		throw new DomainRuntimeException("Patient Get call must contain valid interface identifier");
	}

	if (intfId.getType().equals(PatIdType.PKEY))
	{
		inpatRec.Filter.Pkey = intfId.getValue();
	}
	else if (intfId.getType().equals(PatIdType.HOSPNUM))
	{
		inpatRec.Filter.Hospnum = intfId.getValue();
	}
	else
	{
		throw new DomainRuntimeException("No valid Interface Patient Identifier supplied.");
	}

	Result result = inpatRec.get();
	if (result == null)
	{
		return new String[] {inpatRec.DataCollection.get(0).Rtpstat, inpatRec.DataCollection.get(0).Plbk};
	}
	
	return null;
}
 
Example 2
Project: openMAXIMS   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
public String[] getRtpStatAndPlBlk(ims.core.vo.PatientId intfId)
{
	// This condition and return was inserted in WDEV-18604 - as temporary fix for a demo to remove all DTO calls by Rory Fitzpatrik
	// Not sure if this would need to be removed, but this function should return the values from Inpatient Episode not a null,
	// else a local context will not get initialized
	if (Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()) || ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS"))
	{
		return null;
	}
	
	Inpat inpatRec = (Inpat) getDTOInstance(Inpat.class);
	inpatRec.Filter.clear();
	
	if (intfId == null)
	{
		throw new DomainRuntimeException("Patient Get call must contain valid interface identifier");
	}

	if (intfId.getType().equals(PatIdType.PKEY))
	{
		inpatRec.Filter.Pkey = intfId.getValue();
	}
	else if (intfId.getType().equals(PatIdType.HOSPNUM))
	{
		inpatRec.Filter.Hospnum = intfId.getValue();
	}
	else
	{
		throw new DomainRuntimeException("No valid Interface Patient Identifier supplied.");
	}

	Result result = inpatRec.get();
	if (result == null)
	{
		return new String[] {inpatRec.DataCollection.get(0).Rtpstat, inpatRec.DataCollection.get(0).Plbk};
	}
	
	return null;
}
 
Example 3
Project: openMAXIMS   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
public String[] getRtpStatAndPlBlk(ims.core.vo.PatientId intfId)
{
	if (Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()))
		return null;
	
	Inpat inpatRec = (Inpat) getDTOInstance(Inpat.class);
	inpatRec.Filter.clear();
	
	if (intfId == null)
	{
		throw new DomainRuntimeException("Patient Get call must contain valid interface identifier");
	}

	if (intfId.getType().equals(PatIdType.PKEY))
	{
		inpatRec.Filter.Pkey = intfId.getValue();
	}
	else if (intfId.getType().equals(PatIdType.HOSPNUM))
	{
		inpatRec.Filter.Hospnum = intfId.getValue();
	}
	else
	{
		throw new DomainRuntimeException("No valid Interface Patient Identifier supplied.");
	}

	Result result = inpatRec.get();
	if (result == null)
	{
		return new String[] {inpatRec.DataCollection.get(0).Rtpstat, inpatRec.DataCollection.get(0).Plbk};
	}
	
	return null;
}
 
Example 4
Project: openmaxims-linux   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
public String[] getRtpStatAndPlBlk(ims.core.vo.PatientId intfId)
{
	if (Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()))
		return null;
	
	Inpat inpatRec = (Inpat) getDTOInstance(Inpat.class);
	inpatRec.Filter.clear();
	
	if (intfId == null)
	{
		throw new DomainRuntimeException("Patient Get call must contain valid interface identifier");
	}

	if (intfId.getType().equals(PatIdType.PKEY))
	{
		inpatRec.Filter.Pkey = intfId.getValue();
	}
	else if (intfId.getType().equals(PatIdType.HOSPNUM))
	{
		inpatRec.Filter.Hospnum = intfId.getValue();
	}
	else
	{
		throw new DomainRuntimeException("No valid Interface Patient Identifier supplied.");
	}

	Result result = inpatRec.get();
	if (result == null)
	{
		return new String[] {inpatRec.DataCollection.get(0).Rtpstat, inpatRec.DataCollection.get(0).Plbk};
	}
	
	return null;
}
 
Example 5
Project: AvoinApotti   File: BedInfoDialogImpl.java   Source Code and License 4 votes vote down vote up
private void copyToDtoForDischarge(Inpat inpatRec, InpatientEpisode inpatientEpisode, DischargedEpisode doDisch)
{
	//WDEV-9644
	inpatRec.EditFilter.excludeAll();
	inpatRec.EditFilter.IncludeHospnum = true;
	inpatRec.EditFilter.IncludeRescode = true;
	inpatRec.EditFilter.IncludeMors = true;
	inpatRec.EditFilter.IncludeLttm = true;
	inpatRec.EditFilter.IncludeWebadt = true;
	inpatRec.EditFilter.IncludeDsmt = true;
	inpatRec.EditFilter.IncludeDsds = true;
	inpatRec.EditFilter.IncludeRrea = true;
	
	InpatRecord rec = inpatRec.DataCollection.get(0); 
	
	rec.Hospnum = getPatientIdValue(inpatientEpisode, PatIdType.HOSPNUM);
	if(inpatientEpisode.getPasEvent() != null)
	{
		inpatRec.EditFilter.IncludeHcpcode = true;
		rec.Hcpcode = getPasMapping(inpatientEpisode.getPasEvent().getConsultant());
	}
	if(inpatientEpisode.getPasEvent() != null)
	{
		inpatRec.EditFilter.IncludeSpcd = true;
		rec.Spcd = DTOHelper.getPasMapping(inpatientEpisode.getPasEvent().getSpecialty());
		if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO")
			&& inpatientEpisode.getPasEvent() != null
			&& inpatientEpisode.getPasEvent().getPASSpecialty() != null)
			rec.Spcd = DTOHelper.getPasMapping(inpatientEpisode.getPasEvent().getPASSpecialty()); //wdev-15724
	}

	rec.Rescode = inpatientEpisode.getPasEvent() != null && inpatientEpisode.getPasEvent().getLocation() != null ? inpatientEpisode.getPasEvent().getLocation().getExtCode(TaxonomyType.PAS.getID()) : null;
	rec.Mors = DTOHelper.getPasMapping(inpatientEpisode.getWardType());
	Date recentDt = getMostRecentWardStayTransferDate(inpatientEpisode);
	if(recentDt != null)
	{
		inpatRec.EditFilter.IncludeLtdt = true;
		rec.Ltdt = DTOHelper.convertToDtoDate(recentDt);
	}
	if(inpatientEpisode.getAdmissionDateTime() != null)
	{
		inpatRec.EditFilter.IncludeLttm = true;
		rec.Lttm = DTOHelper.convertToDtoTime(inpatientEpisode.getAdmissionDateTime());
	}
	//WDEV-7827
	rec.Webadt = "Y";				

	rec.Dsmt = DTOHelper.getPasMapping(doDisch.getMethodOfDischarge());
	rec.Dsds = DTOHelper.getPasMapping(doDisch.getDischargeDestination());
	
	//WDEV
	if(doDisch.getDischargeDateTime() != null)
	{
		inpatRec.EditFilter.IncludeEpen = true;
		inpatRec.EditFilter.IncludeEetm = true;
		
		rec.Epen = DTOHelper.convertToDtoDate(doDisch.getDischargeDateTime());
		rec.Eetm = DTOHelper.convertToDtoTime(doDisch.getDischargeDateTime());
	}
	
	rec.Rrea = DTOHelper.getPasMapping(doDisch.getTreatmentDeferredReason());
	
	if(doDisch.isEighteenWeekClockStopped() != null)
	{
		inpatRec.EditFilter.IncludeRttstop = true;
		rec.Rttstop = doDisch.isEighteenWeekClockStopped() ? "Y" : "N";
	}
}
 
Example 6
Project: openMAXIMS   File: BedInfoDialogImpl.java   Source Code and License 4 votes vote down vote up
private void copyToDtoForDischarge(Inpat inpatRec, InpatientEpisode inpatientEpisode, DischargedEpisode doDisch)
{
	//WDEV-9644
	inpatRec.EditFilter.excludeAll();
	inpatRec.EditFilter.IncludeHospnum = true;
	inpatRec.EditFilter.IncludeRescode = true;
	inpatRec.EditFilter.IncludeMors = true;
	inpatRec.EditFilter.IncludeLttm = true;
	inpatRec.EditFilter.IncludeWebadt = true;
	inpatRec.EditFilter.IncludeDsmt = true;
	inpatRec.EditFilter.IncludeDsds = true;
	inpatRec.EditFilter.IncludeRrea = true;
	
	InpatRecord rec = inpatRec.DataCollection.get(0); 
	
	rec.Hospnum = getPatientIdValue(inpatientEpisode, PatIdType.HOSPNUM);
	if(inpatientEpisode.getPasEvent() != null)
	{
		inpatRec.EditFilter.IncludeHcpcode = true;
		rec.Hcpcode = getPasMapping(inpatientEpisode.getPasEvent().getConsultant());
	}
	if(inpatientEpisode.getPasEvent() != null)
	{
		inpatRec.EditFilter.IncludeSpcd = true;
		rec.Spcd = DTOHelper.getPasMapping(inpatientEpisode.getPasEvent().getSpecialty());
		if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO")
			&& inpatientEpisode.getPasEvent() != null
			&& inpatientEpisode.getPasEvent().getPASSpecialty() != null)
			rec.Spcd = DTOHelper.getPasMapping(inpatientEpisode.getPasEvent().getPASSpecialty()); //wdev-15724
	}

	rec.Rescode = inpatientEpisode.getPasEvent() != null && inpatientEpisode.getPasEvent().getLocation() != null ? inpatientEpisode.getPasEvent().getLocation().getExtCode(TaxonomyType.PAS.getID()) : null;
	rec.Mors = DTOHelper.getPasMapping(inpatientEpisode.getWardType());
	Date recentDt = getMostRecentWardStayTransferDate(inpatientEpisode);
	if(recentDt != null)
	{
		inpatRec.EditFilter.IncludeLtdt = true;
		rec.Ltdt = DTOHelper.convertToDtoDate(recentDt);
	}
	if(inpatientEpisode.getAdmissionDateTime() != null)
	{
		inpatRec.EditFilter.IncludeLttm = true;
		rec.Lttm = DTOHelper.convertToDtoTime(inpatientEpisode.getAdmissionDateTime());
	}
	//WDEV-7827
	rec.Webadt = "Y";				

	rec.Dsmt = DTOHelper.getPasMapping(doDisch.getMethodOfDischarge());
	rec.Dsds = DTOHelper.getPasMapping(doDisch.getDischargeDestination());
	
	//WDEV
	if(doDisch.getDischargeDateTime() != null)
	{
		inpatRec.EditFilter.IncludeEpen = true;
		inpatRec.EditFilter.IncludeEetm = true;
		
		rec.Epen = DTOHelper.convertToDtoDate(doDisch.getDischargeDateTime());
		rec.Eetm = DTOHelper.convertToDtoTime(doDisch.getDischargeDateTime());
	}
	
	rec.Rrea = DTOHelper.getPasMapping(doDisch.getTreatmentDeferredReason());
	
	if(doDisch.isEighteenWeekClockStopped() != null)
	{
		inpatRec.EditFilter.IncludeRttstop = true;
		rec.Rttstop = doDisch.isEighteenWeekClockStopped() ? "Y" : "N";
	}
}
 
Example 7
Project: openMAXIMS   File: BedInfoDialogImpl.java   Source Code and License 4 votes vote down vote up
private void copyToDtoForDischarge(Inpat inpatRec, InpatientEpisode inpatientEpisode, DischargedEpisode doDisch)
{
	//WDEV-9644
	inpatRec.EditFilter.excludeAll();
	inpatRec.EditFilter.IncludeHospnum = true;
	inpatRec.EditFilter.IncludeRescode = true;
	inpatRec.EditFilter.IncludeMors = true;
	inpatRec.EditFilter.IncludeLttm = true;
	inpatRec.EditFilter.IncludeWebadt = true;
	inpatRec.EditFilter.IncludeDsmt = true;
	inpatRec.EditFilter.IncludeDsds = true;
	inpatRec.EditFilter.IncludeRrea = true;
	
	InpatRecord rec = inpatRec.DataCollection.get(0); 
	
	rec.Hospnum = getPatientIdValue(inpatientEpisode, PatIdType.HOSPNUM);
	if(inpatientEpisode.getPasEvent() != null)
	{
		inpatRec.EditFilter.IncludeHcpcode = true;
		rec.Hcpcode = getPasMapping(inpatientEpisode.getPasEvent().getConsultant());
	}
	if(inpatientEpisode.getPasEvent() != null)
	{
		inpatRec.EditFilter.IncludeSpcd = true;
		rec.Spcd = DTOHelper.getPasMapping(inpatientEpisode.getPasEvent().getSpecialty());
		if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO")
			&& inpatientEpisode.getPasEvent() != null
			&& inpatientEpisode.getPasEvent().getPASSpecialty() != null)
			rec.Spcd = DTOHelper.getPasMapping(inpatientEpisode.getPasEvent().getPASSpecialty()); //wdev-15724
	}

	rec.Rescode = inpatientEpisode.getPasEvent() != null && inpatientEpisode.getPasEvent().getLocation() != null ? inpatientEpisode.getPasEvent().getLocation().getExtCode(TaxonomyType.PAS.getID()) : null;
	rec.Mors = DTOHelper.getPasMapping(inpatientEpisode.getWardType());
	Date recentDt = getMostRecentWardStayTransferDate(inpatientEpisode);
	if(recentDt != null)
	{
		inpatRec.EditFilter.IncludeLtdt = true;
		rec.Ltdt = DTOHelper.convertToDtoDate(recentDt);
	}
	if(inpatientEpisode.getAdmissionDateTime() != null)
	{
		inpatRec.EditFilter.IncludeLttm = true;
		rec.Lttm = DTOHelper.convertToDtoTime(inpatientEpisode.getAdmissionDateTime());
	}
	//WDEV-7827
	rec.Webadt = "Y";				

	rec.Dsmt = DTOHelper.getPasMapping(doDisch.getMethodOfDischarge());
	rec.Dsds = DTOHelper.getPasMapping(doDisch.getDischargeDestination());
	
	//WDEV
	if(doDisch.getDischargeDateTime() != null)
	{
		inpatRec.EditFilter.IncludeEpen = true;
		inpatRec.EditFilter.IncludeEetm = true;
		
		rec.Epen = DTOHelper.convertToDtoDate(doDisch.getDischargeDateTime());
		rec.Eetm = DTOHelper.convertToDtoTime(doDisch.getDischargeDateTime());
	}
	
	rec.Rrea = DTOHelper.getPasMapping(doDisch.getTreatmentDeferredReason());
	
	if(doDisch.isEighteenWeekClockStopped() != null)
	{
		inpatRec.EditFilter.IncludeRttstop = true;
		rec.Rttstop = doDisch.isEighteenWeekClockStopped() ? "Y" : "N";
	}
}
 
Example 8
Project: openmaxims-linux   File: BedInfoDialogImpl.java   Source Code and License 4 votes vote down vote up
private void copyToDtoForDischarge(Inpat inpatRec, InpatientEpisode inpatientEpisode, DischargedEpisode doDisch)
{
	//WDEV-9644
	inpatRec.EditFilter.excludeAll();
	inpatRec.EditFilter.IncludeHospnum = true;
	inpatRec.EditFilter.IncludeRescode = true;
	inpatRec.EditFilter.IncludeMors = true;
	inpatRec.EditFilter.IncludeLttm = true;
	inpatRec.EditFilter.IncludeWebadt = true;
	inpatRec.EditFilter.IncludeDsmt = true;
	inpatRec.EditFilter.IncludeDsds = true;
	inpatRec.EditFilter.IncludeRrea = true;
	
	InpatRecord rec = inpatRec.DataCollection.get(0); 
	
	rec.Hospnum = getPatientIdValue(inpatientEpisode, PatIdType.HOSPNUM);
	if(inpatientEpisode.getPasEvent() != null)
	{
		inpatRec.EditFilter.IncludeHcpcode = true;
		rec.Hcpcode = getPasMapping(inpatientEpisode.getPasEvent().getConsultant());
	}
	if(inpatientEpisode.getPasEvent() != null)
	{
		inpatRec.EditFilter.IncludeSpcd = true;
		rec.Spcd = DTOHelper.getPasMapping(inpatientEpisode.getPasEvent().getSpecialty());
		if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO")
			&& inpatientEpisode.getPasEvent() != null
			&& inpatientEpisode.getPasEvent().getPASSpecialty() != null)
			rec.Spcd = DTOHelper.getPasMapping(inpatientEpisode.getPasEvent().getPASSpecialty()); //wdev-15724
	}

	rec.Rescode = inpatientEpisode.getPasEvent() != null && inpatientEpisode.getPasEvent().getLocation() != null ? inpatientEpisode.getPasEvent().getLocation().getExtCode(TaxonomyType.PAS.getID()) : null;
	rec.Mors = DTOHelper.getPasMapping(inpatientEpisode.getWardType());
	Date recentDt = getMostRecentWardStayTransferDate(inpatientEpisode);
	if(recentDt != null)
	{
		inpatRec.EditFilter.IncludeLtdt = true;
		rec.Ltdt = DTOHelper.convertToDtoDate(recentDt);
	}
	if(inpatientEpisode.getAdmissionDateTime() != null)
	{
		inpatRec.EditFilter.IncludeLttm = true;
		rec.Lttm = DTOHelper.convertToDtoTime(inpatientEpisode.getAdmissionDateTime());
	}
	//WDEV-7827
	rec.Webadt = "Y";				

	rec.Dsmt = DTOHelper.getPasMapping(doDisch.getMethodOfDischarge());
	rec.Dsds = DTOHelper.getPasMapping(doDisch.getDischargeDestination());
	
	//WDEV
	if(doDisch.getDischargeDateTime() != null)
	{
		inpatRec.EditFilter.IncludeEpen = true;
		inpatRec.EditFilter.IncludeEetm = true;
		
		rec.Epen = DTOHelper.convertToDtoDate(doDisch.getDischargeDateTime());
		rec.Eetm = DTOHelper.convertToDtoTime(doDisch.getDischargeDateTime());
	}
	
	rec.Rrea = DTOHelper.getPasMapping(doDisch.getTreatmentDeferredReason());
	
	if(doDisch.isEighteenWeekClockStopped() != null)
	{
		inpatRec.EditFilter.IncludeRttstop = true;
		rec.Rttstop = doDisch.isEighteenWeekClockStopped() ? "Y" : "N";
	}
}